chiark / gitweb /
Fixed spurious failure with Interrupted system call; Fixed race when fd closed at...
[userv.git] / configure.in
index 86ce18feb3e64dc1d3865ed24cfc0e74357e4c34..a97feaef3e4aafe8f69f0a15d22a2f8bc530256e 100644 (file)
@@ -39,8 +39,24 @@ AC_ARG_ENABLE(debug,
 ])
 
 AC_PROG_CC
+AC_PROG_CPP
 AC_PROG_INSTALL
 
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
+
+AC_CACHE_CHECK(for EPROTO,userv_cv_hdr_eproto,
+ AC_EGREP_CPP(yes,
+[
+#include <errno.h>
+#ifdef EPROTO
+ yes
+#endif
+],userv_cv_hdr_eproto=yes,userv_cv_hdr_eproto=no))
+if test $userv_cv_hdr_eproto = yes
+then
+       AC_DEFINE(HAVE_EPROTO)
+fi
+
 AC_SUBST(OPTIMISE)
 if test "${GCC-no}" = yes; then
  OPTIMISE=-O2
@@ -131,7 +147,7 @@ fi
 [CFLAGS="`echo $CFLAGS $CWARNS | sed -e 's/-O[0-9]*/$(OPTIMISE)/'`"]
 
 AC_SUBST(VERSION)
-VERSION="`sed -n '/^userv (.*)/!d; s/^userv (//; s/).*//; p; q' Changelog`"
+VERSION="`sed -n '/^userv (.*)/!d; s/^userv (//; s/).*//; p; q' debian/changelog`"
 echo will build version $VERSION
 
 AC_OUTPUT(Makefile)