X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=userv.git;a=blobdiff_plain;f=configure;h=7ec41760a7ca62a517bfaa666c4df93e4a730eab;hp=f284b20fefa6a664bf2287d58f3028998957875e;hb=dcadbc2296660082203ef157f1fd333a7b2e1675;hpb=a36c2e0235323aacb9c4ea55ae0201e656362059 diff --git a/configure b/configure index f284b20..7ec4176 100755 --- a/configure +++ b/configure @@ -855,16 +855,152 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +for ac_prog in md5sum md5 gmd5sum +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:864: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_MD5SUM_SIMPLE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$MD5SUM_SIMPLE"; then + ac_cv_prog_MD5SUM_SIMPLE="$MD5SUM_SIMPLE" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_MD5SUM_SIMPLE="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +MD5SUM_SIMPLE="$ac_cv_prog_MD5SUM_SIMPLE" +if test -n "$MD5SUM_SIMPLE"; then + echo "$ac_t""$MD5SUM_SIMPLE" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$MD5SUM_SIMPLE" && break +done + CFLAGS="$CFLAGS -D_GNU_SOURCE" +echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 +echo "configure:896: 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:945: 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:973: \"$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:863: checking for EPROTO" >&5 +echo "configure:999: 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 < @@ -894,6 +1030,42 @@ EOF fi +echo $ac_n "checking for LOG_AUTHPRIV""... $ac_c" 1>&6 +echo "configure:1035: 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 @@ -905,20 +1077,20 @@ fi echo $ac_n "checking your C compiler""... $ac_c" 1>&6 -echo "configure:909: checking your C compiler" >&5 +echo "configure:1081: 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:922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_works=yes else @@ -943,20 +1115,20 @@ fi echo $ac_n "checking __attribute__((,,))""... $ac_c" 1>&6 -echo "configure:947: checking __attribute__((,,))" >&5 +echo "configure:1119: 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:1132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_attribute_supported=yes else @@ -978,20 +1150,20 @@ EOF echo $ac_n "checking __attribute__((noreturn))""... $ac_c" 1>&6 -echo "configure:982: checking __attribute__((noreturn))" >&5 +echo "configure:1154: 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:1167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_attribute_noreturn=yes else @@ -1018,20 +1190,20 @@ EOF echo $ac_n "checking __attribute__((unused))""... $ac_c" 1>&6 -echo "configure:1022: checking __attribute__((unused))" >&5 +echo "configure:1194: 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:1207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_attribute_unused=yes else @@ -1058,20 +1230,20 @@ EOF echo $ac_n "checking __attribute__((format...))""... $ac_c" 1>&6 -echo "configure:1062: checking __attribute__((format...))" >&5 +echo "configure:1234: 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:1247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_attribute_format=yes else @@ -1109,7 +1281,7 @@ CWARNS="" echo $ac_n "checking GCC warning flag(s) -Wall -Wno-implicit""... $ac_c" 1>&6 -echo "configure:1113: checking GCC warning flag(s) -Wall -Wno-implicit" >&5 +echo "configure:1285: 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 @@ -1119,7 +1291,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wall -Wno-implicit -Werror" cat > conftest.$ac_ext < @@ -1131,7 +1303,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_all=yes else @@ -1157,7 +1329,7 @@ fi echo $ac_n "checking GCC warning flag(s) -Wwrite-strings""... $ac_c" 1>&6 -echo "configure:1161: checking GCC warning flag(s) -Wwrite-strings" >&5 +echo "configure:1333: 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 @@ -1167,7 +1339,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wwrite-strings -Werror" cat > conftest.$ac_ext < @@ -1179,7 +1351,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_writestrings=yes else @@ -1205,7 +1377,7 @@ fi echo $ac_n "checking GCC warning flag(s) -Wpointer-arith""... $ac_c" 1>&6 -echo "configure:1209: checking GCC warning flag(s) -Wpointer-arith" >&5 +echo "configure:1381: 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 @@ -1215,7 +1387,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wpointer-arith -Werror" cat > conftest.$ac_ext < @@ -1227,7 +1399,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_pointerarith=yes else @@ -1253,7 +1425,7 @@ fi echo $ac_n "checking GCC warning flag(s) -Wimplicit -Wnested-externs""... $ac_c" 1>&6 -echo "configure:1257: checking GCC warning flag(s) -Wimplicit -Wnested-externs" >&5 +echo "configure:1429: 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 @@ -1263,7 +1435,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wimplicit -Wnested-externs -Werror" cat > conftest.$ac_ext < @@ -1275,7 +1447,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_implicit=yes else @@ -1301,12 +1473,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 @@ -1446,6 +1618,7 @@ s%@CC@%$CC%g s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@MD5SUM_SIMPLE@%$MD5SUM_SIMPLE%g s%@OPTIMISE@%$OPTIMISE%g s%@CWARNS@%$CWARNS%g s%@VERSION@%$VERSION%g