X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=configure;h=914f61280d69e5d355f832a80e804196a6305152;hp=8b020fcf8c7fbd0b571ebbe8bc81e8796d9c4a7c;hb=139f750b61dda9f5724be6d9458efcc98473ea4c;hpb=fe7db348221a33fd856c06fb140201458c95d1ef diff --git a/configure b/configure index 8b020fc..914f612 100755 --- a/configure +++ b/configure @@ -856,13 +856,118 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +CFLAGS="$CFLAGS -D_GNU_SOURCE" + +echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:863: checking for socket in -lsocket" >&5 +ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +for ac_func in setenv +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:912: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + echo $ac_n "checking for EPROTO""... $ac_c" 1>&6 -echo "configure:861: checking for EPROTO" >&5 +echo "configure:966: checking for EPROTO" >&5 if eval "test \"`echo '$''{'userv_cv_hdr_eproto'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -892,6 +997,42 @@ EOF fi +echo $ac_n "checking for LOG_AUTHPRIV""... $ac_c" 1>&6 +echo "configure:1002: checking for LOG_AUTHPRIV" >&5 +if eval "test \"`echo '$''{'userv_cv_hdr_logauthpriv'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#ifdef LOG_AUTHPRIV + yes +#endif + +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + userv_cv_hdr_logauthpriv=yes +else + rm -rf conftest* + userv_cv_hdr_logauthpriv=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$userv_cv_hdr_logauthpriv" 1>&6 +if test $userv_cv_hdr_logauthpriv = yes +then + cat >> confdefs.h <<\EOF +#define HAVE_LOG_AUTHPRIV 1 +EOF + +fi + if test "${GCC-no}" = yes; then OPTIMISE=-O2 @@ -903,20 +1044,20 @@ fi echo $ac_n "checking your C compiler""... $ac_c" 1>&6 -echo "configure:907: checking your C compiler" >&5 +echo "configure:1048: checking your C compiler" >&5 if eval "test \"`echo '$''{'dpkg_cv_c_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { strcmp("a","b") ; return 0; } EOF -if { (eval echo configure:920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_works=yes else @@ -941,20 +1082,20 @@ fi echo $ac_n "checking __attribute__((,,))""... $ac_c" 1>&6 -echo "configure:945: checking __attribute__((,,))" >&5 +echo "configure:1086: checking __attribute__((,,))" >&5 if eval "test \"`echo '$''{'dpkg_cv_c_attribute_supported'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_attribute_supported=yes else @@ -976,20 +1117,20 @@ EOF echo $ac_n "checking __attribute__((noreturn))""... $ac_c" 1>&6 -echo "configure:980: checking __attribute__((noreturn))" >&5 +echo "configure:1121: checking __attribute__((noreturn))" >&5 if eval "test \"`echo '$''{'dpkg_cv_c_attribute_noreturn'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_attribute_noreturn=yes else @@ -1016,20 +1157,20 @@ EOF echo $ac_n "checking __attribute__((unused))""... $ac_c" 1>&6 -echo "configure:1020: checking __attribute__((unused))" >&5 +echo "configure:1161: checking __attribute__((unused))" >&5 if eval "test \"`echo '$''{'dpkg_cv_c_attribute_unused'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_attribute_unused=yes else @@ -1056,20 +1197,20 @@ EOF echo $ac_n "checking __attribute__((format...))""... $ac_c" 1>&6 -echo "configure:1060: checking __attribute__((format...))" >&5 +echo "configure:1201: checking __attribute__((format...))" >&5 if eval "test \"`echo '$''{'dpkg_cv_attribute_format'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_attribute_format=yes else @@ -1107,7 +1248,7 @@ CWARNS="" echo $ac_n "checking GCC warning flag(s) -Wall -Wno-implicit""... $ac_c" 1>&6 -echo "configure:1111: checking GCC warning flag(s) -Wall -Wno-implicit" >&5 +echo "configure:1252: checking GCC warning flag(s) -Wall -Wno-implicit" >&5 if test "${GCC-no}" = yes then if eval "test \"`echo '$''{'dpkg_cv_c_gcc_warn_all'+set}'`\" = set"; then @@ -1117,7 +1258,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wall -Wno-implicit -Werror" cat > conftest.$ac_ext < @@ -1129,7 +1270,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_all=yes else @@ -1155,7 +1296,7 @@ fi echo $ac_n "checking GCC warning flag(s) -Wwrite-strings""... $ac_c" 1>&6 -echo "configure:1159: checking GCC warning flag(s) -Wwrite-strings" >&5 +echo "configure:1300: checking GCC warning flag(s) -Wwrite-strings" >&5 if test "${GCC-no}" = yes then if eval "test \"`echo '$''{'dpkg_cv_c_gcc_warn_writestrings'+set}'`\" = set"; then @@ -1165,7 +1306,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wwrite-strings -Werror" cat > conftest.$ac_ext < @@ -1177,7 +1318,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_writestrings=yes else @@ -1203,7 +1344,7 @@ fi echo $ac_n "checking GCC warning flag(s) -Wpointer-arith""... $ac_c" 1>&6 -echo "configure:1207: checking GCC warning flag(s) -Wpointer-arith" >&5 +echo "configure:1348: checking GCC warning flag(s) -Wpointer-arith" >&5 if test "${GCC-no}" = yes then if eval "test \"`echo '$''{'dpkg_cv_c_gcc_warn_pointerarith'+set}'`\" = set"; then @@ -1213,7 +1354,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wpointer-arith -Werror" cat > conftest.$ac_ext < @@ -1225,7 +1366,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_pointerarith=yes else @@ -1251,7 +1392,7 @@ fi echo $ac_n "checking GCC warning flag(s) -Wimplicit -Wnested-externs""... $ac_c" 1>&6 -echo "configure:1255: checking GCC warning flag(s) -Wimplicit -Wnested-externs" >&5 +echo "configure:1396: checking GCC warning flag(s) -Wimplicit -Wnested-externs" >&5 if test "${GCC-no}" = yes then if eval "test \"`echo '$''{'dpkg_cv_c_gcc_warn_implicit'+set}'`\" = set"; then @@ -1261,7 +1402,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wimplicit -Wnested-externs -Werror" cat > conftest.$ac_ext < @@ -1273,7 +1414,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_implicit=yes else @@ -1299,12 +1440,12 @@ fi if test "${GCC-no}" = yes; then - CWARNS="${CWARNS} -Wmissing-prototypes -Wstrict-prototypes -Werror" + CWARNS="${CWARNS} -Wmissing-prototypes -Wstrict-prototypes" fi CFLAGS="`echo $CFLAGS $CWARNS | sed -e 's/-O[0-9]*/$(OPTIMISE)/'`" -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 trap '' 1 2 15