AC_CHECK_HEADERS([sys/select.h sys/socket.h])
+if test -d ${srcdir}/.git; then
+ SHA1=`git show --pretty=format:%H|head -1`
+else
+ SHA1=`head -1 ${srcdir}/ChangeLog|awk '{print $2}'`
+fi
+AC_DEFINE_UNQUOTED([VERSION_SHA1], "$SHA1", [SHA-1 from Git])
+
AC_CONFIG_FILES([
Doxyfile
Makefile
uid = arg;
break;
case 'V':
- std::cout << VERSION "\n";
+ std::cout << VERSION;
+#ifdef VERSION_SHA1
+ std::cout << " " VERSION_SHA1;
+#endif
+ std::cout << "\n";
return 0;
break;
case 'w':
return 1;
}
- yaz_log(YLOG_LOG, "Metaproxy " VERSION " started");
+ yaz_log(YLOG_LOG, "Metaproxy start " VERSION
+#ifdef VERSION_SHA1
+ " " VERSION_SHA1
+#endif
+ );
+
xmlDocPtr doc = xmlReadFile(fname,
NULL,
XML_PARSE_XINCLUDE + XML_PARSE_NOBLANKS