X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=configure;h=b61b06f9f2661d2ba49192ddb98c6515ec427d4c;hb=53d3f4a26c04bd272452cac57cb4672456027324;hp=7d53d14dbe3d6c48e989e71bdd33750a73d5a545;hpb=bc0541635987ad8f35af9df6aacd5534d519ccb6;p=yaz-moved-to-github.git diff --git a/configure b/configure index 7d53d14..b61b06f 100755 --- a/configure +++ b/configure @@ -24,9 +24,9 @@ ac_help="$ac_help ac_help="$ac_help --disable-comp use old encoders, i.e. disable the YAZ ASN.1 Compiler" ac_help="$ac_help - --enable-tcpd enable TCP wrapper for server if available" + --enable-tcpd[=PREFIX] enable TCP wrapper for server if available" ac_help="$ac_help - --disable-threads disable threads" + --enable-threads enable POSIX threads" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -2035,7 +2035,7 @@ fi done fi -for ac_func in vsnprintf +for ac_func in vsnprintf gettimeofday do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo "configure:2042: checking for $ac_func" >&5 @@ -2096,16 +2096,21 @@ if test "${enable_tcpd+set}" = set; then : fi -if test "$enable_tcpd" = "yes"; then - echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6 -echo "configure:2102: checking for working tcpd.h" >&5 +if test "$enable_tcpd" != ""; then oldLibs=$LIBS + oldCPPFLAGS=$CPPFLAGS + if test "$enable_tcpd" != "yes"; then + LIBS="$LIBS -L$enable_tcpd/lib" + CPPFLAGS="$CPPFLAGS -I$enable_tcpd/include" + fi + echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6 +echo "configure:2108: checking for working tcpd.h" >&5 LIBS="$LIBS -lwrap -lnsl" cat > conftest.$ac_ext < - #include +#include int allow_severity = LOG_INFO; int deny_severity = LOG_WARNING; int main() { @@ -2113,7 +2118,7 @@ struct request_info request_info; int i; i = hosts_access(&request_info); ; return 0; } EOF -if { (eval echo configure:2117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* tcpd_ok=1 else @@ -2126,6 +2131,7 @@ rm -f conftest* if test "$tcpd_ok" = "0"; then echo "$ac_t""no" 1>&6 LIBS=$oldLibs + CPPFLAGS=$oldCPPFLAGS else echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -2135,12 +2141,12 @@ EOF fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2139: checking for ANSI C header files" >&5 +echo "configure:2145: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2148,7 +2154,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2165,7 +2171,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2183,7 +2189,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2204,7 +2210,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2215,7 +2221,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2246,12 +2252,12 @@ if test "${enable_threads+set}" = set; then enableval="$enable_threads" enable_threads=$enableval else - enable_threads=yes + enable_threads=no fi if test "$enable_threads" = "yes"; then echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 -echo "configure:2255: checking for main in -lpthread" >&5 +echo "configure:2261: checking for main in -lpthread" >&5 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2259,14 +2265,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2294,9 +2300,9 @@ else fi echo $ac_n "checking for working POSIX Threads""... $ac_c" 1>&6 -echo "configure:2298: checking for working POSIX Threads" >&5 +echo "configure:2304: checking for working POSIX Threads" >&5 cat > conftest.$ac_ext < int func(void *p) { return 0; } @@ -2307,7 +2313,7 @@ int main() { int r = pthread_create (&pthread_id, 0, func, 0); ; return 0; } EOF -if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* thread_ok=yes else @@ -2446,7 +2452,26 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo " +Makefile +util/Makefile +odr/Makefile +z39.50/Makefile +asn/Makefile +ill/Makefile +zutil/Makefile +comstack/Makefile +ccl/Makefile +tab/Makefile +retrieval/Makefile +server/Makefile +include/Makefile +include/yaz/Makefile +lib/Makefile +client/Makefile +ztest/Makefile +doc/Makefile +lib/yaz-config" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -2616,7 +2659,7 @@ cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - +chmod +x lib/yaz-config exit 0 EOF chmod +x $CONFIG_STATUS