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"
:
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" != "no"; 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 <<EOF
-#line 2106 "configure"
+#line 2111 "configure"
#include "confdefs.h"
#include <syslog.h>
- #include <tcpd.h>
+#include <tcpd.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;
int main() {
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
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
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 <<EOF
-#line 2144 "configure"
+#line 2150 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
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*
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
-#line 2169 "configure"
+#line 2175 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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
-#line 2187 "configure"
+#line 2193 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 2208 "configure"
+#line 2214 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
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
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
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2263 "configure"
+#line 2269 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2270: \"$ac_link\") 1>&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
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 <<EOF
-#line 2300 "configure"
+#line 2306 "configure"
#include "confdefs.h"
#include <pthread.h>
int func(void *p) { return 0; }
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
dnl YAZ Toolkit, Index Data 1994-2000
dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.29 2000-06-19 09:49:35 adam Exp $
+dnl $Id: configure.in,v 1.30 2000-07-06 10:38:47 adam Exp $
AC_INIT(include/yaz/yaz-version.h)
AM_INIT_AUTOMAKE(yaz, 1.7)
dnl
AC_CHECK_FUNCS(vsnprintf gettimeofday)
dnl
dnl ------ tcpd
-AC_ARG_ENABLE(tcpd,[ --enable-tcpd enable TCP wrapper for server if available])
-if test "$enable_tcpd" = "yes"; then
- AC_MSG_CHECKING(for working tcpd.h)
+AC_ARG_ENABLE(tcpd,[ --enable-tcpd[=PREFIX] enable TCP wrapper for server if available])
+if test "$enable_tcpd" != "no"; then
oldLibs=$LIBS
+ oldCPPFLAGS=$CPPFLAGS
+ if test "$enable_tcpd" != "yes"; then
+ LIBS="$LIBS -L$enable_tcpd/lib"
+ CPPFLAGS="$CPPFLAGS -I$enable_tcpd/include"
+ fi
+ AC_MSG_CHECKING(for working tcpd.h)
LIBS="$LIBS -lwrap -lnsl"
AC_TRY_LINK([#include <syslog.h>
- #include <tcpd.h>
+#include <tcpd.h>
int allow_severity = LOG_INFO;
int deny_severity = LOG_WARNING;],
[struct request_info request_info; int i;
- i = hosts_access(&request_info);],tcpd_ok=1, tcpd_ok=0)
+ i = hosts_access(&request_info);],
+ tcpd_ok=1, tcpd_ok=0)
if test "$tcpd_ok" = "0"; then
AC_MSG_RESULT(no)
LIBS=$oldLibs
+ CPPFLAGS=$oldCPPFLAGS
else
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_TCPD_H)