ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
- --with-yc compile using YC: The Yaz Compiler"
+ --enable-yc compile using YAZ' ASN.1 Compiler (YC)"
+ac_help="$ac_help
+ --enable-tcpd enable TCP wrapper for server if available"
ac_help="$ac_help
--enable-threads enable threads if available"
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:532: checking for $ac_word" >&5
+echo "configure:534: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:562: checking for $ac_word" >&5
+echo "configure:564: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:613: checking for $ac_word" >&5
+echo "configure:615: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:645: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:647: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cat > conftest.$ac_ext << EOF
-#line 656 "configure"
+#line 658 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:687: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:689: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:692: checking whether we are using GNU C" >&5
+echo "configure:694: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:720: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:722: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:752: checking how to run the C preprocessor" >&5
+echo "configure:754: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 767 "configure"
+#line 769 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:775: \"$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*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 784 "configure"
+#line 786 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:792: \"$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*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 801 "configure"
+#line 803 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:809: \"$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
:
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:862: checking for a BSD compatible install" >&5
+echo "configure:864: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:917: checking for $ac_word" >&5
+echo "configure:919: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
-# Check whether --with-yc or --without-yc was given.
-if test "${with_yc+set}" = set; then
- withval="$with_yc"
- YCDIR=$withval
-else
- YCDIR=""
+# Check whether --enable-yc or --disable-yc was given.
+if test "${enable_yc+set}" = set; then
+ enableval="$enable_yc"
+ :
fi
-if test "$YCDIR" = "yes"; then
+if test "$enable_yc" = "yes"; then
ASNMODULE="z39.50"
cp -f include/z-proto.h include/proto.h
else
done
fi
-echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6
-echo "configure:1308: checking for working tcpd.h" >&5
-oldLibs=$LIBS
-LIBS="$LIBS -lwrap"
-cat > conftest.$ac_ext <<EOF
-#line 1312 "configure"
+# Check whether --enable-tcpd or --disable-tcpd was given.
+if test "${enable_tcpd+set}" = set; then
+ enableval="$enable_tcpd"
+ :
+fi
+
+if test "$enable_tcpd" = "yes"; then
+ echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6
+echo "configure:1315: checking for working tcpd.h" >&5
+ oldLibs=$LIBS
+ LIBS="$LIBS -lwrap"
+ cat > conftest.$ac_ext <<EOF
+#line 1319 "configure"
#include "confdefs.h"
#include <syslog.h>
-#include <tcpd.h>
-int allow_severity = LOG_INFO;
-int deny_severity = LOG_WARNING;
+ #include <tcpd.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;
int main() {
struct request_info request_info; int i;
-i = hosts_access(&request_info);
+ i = hosts_access(&request_info);
; return 0; }
EOF
-if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
tcpd_ok=1
else
tcpd_ok=0
fi
rm -f conftest*
-if test "$tcpd_ok" = "0"; then
- echo "$ac_t""no" 1>&6
- LIBS=$oldLibs
-else
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ if test "$tcpd_ok" = "0"; then
+ echo "$ac_t""no" 1>&6
+ LIBS=$oldLibs
+ else
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
#define HAVE_TCPD_H 1
EOF
+ fi
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1344: checking for ANSI C header files" >&5
+echo "configure:1352: 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 1349 "configure"
+#line 1357 "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:1357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1365: \"$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 1374 "configure"
+#line 1382 "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 1392 "configure"
+#line 1400 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1413 "configure"
+#line 1421 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
enableval="$enable_threads"
- threads_ok=$enableval
-else
- threads_ok=no
+ :
fi
-if test "$threads_ok" = "yes"; then
+if test "$enable_threads" = "yes"; then
for ac_hdr in pthread.h threads.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1463: checking for $ac_hdr" >&5
+echo "configure:1469: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1468 "configure"
+#line 1474 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1479: \"$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*
done
echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
-echo "configure:1500: checking for pthread_mutex_lock" >&5
+echo "configure:1506: checking for pthread_mutex_lock" >&5
if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1505 "configure"
+#line 1511 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pthread_mutex_lock(); below. */
; return 0; }
EOF
-if { (eval echo configure:1528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_pthread_mutex_lock=yes"
else
if test "$ac_cv_func_pthread_mutex_lock" = "no"; then
echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
-echo "configure:1549: checking for main in -lpthread" >&5
+echo "configure:1555: 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 1557 "configure"
+#line 1563 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1570: \"$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
dnl YAZ Toolkit
dnl (c) Index Data 1994-1999
dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.10 1999-06-08 13:11:55 adam Exp $
+dnl $Id: configure.in,v 1.11 1999-06-09 14:23:58 adam Exp $
AC_INIT(include/yaz-version.h)
dnl
dnl ------ Checking programs
dnl
dnl ----- YC: The Yaz Compiler
AC_SUBST(ASNMODULE)
-AC_ARG_WITH(yc,[ --with-yc compile using YC: The Yaz Compiler], [YCDIR=$withval],[YCDIR=""])
-if test "$YCDIR" = "yes"; then
+AC_ARG_ENABLE(yc,[ --enable-yc compile using YAZ' ASN.1 Compiler (YC)])
+if test "$enable_yc" = "yes"; then
ASNMODULE="z39.50"
cp -f include/z-proto.h include/proto.h
else
fi
dnl
dnl ------ tcpd
-AC_MSG_CHECKING(for working tcpd.h)
-oldLibs=$LIBS
-LIBS="$LIBS -lwrap"
-AC_TRY_LINK([#include <syslog.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)
-if test "$tcpd_ok" = "0"; then
- AC_MSG_RESULT(no)
- LIBS=$oldLibs
-else
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_TCPD_H)
+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)
+ oldLibs=$LIBS
+ LIBS="$LIBS -lwrap"
+ AC_TRY_LINK([#include <syslog.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)
+ if test "$tcpd_ok" = "0"; then
+ AC_MSG_RESULT(no)
+ LIBS=$oldLibs
+ else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_TCPD_H)
+ fi
fi
dnl
dnl ------ Headers
fi
dnl
dnl ------ Threads
-AC_ARG_ENABLE(threads, [ --enable-threads enable threads if available],
- [threads_ok=$enableval], [threads_ok=no])
-if test "$threads_ok" = "yes"; then
+AC_ARG_ENABLE(threads, [ --enable-threads enable threads if available])
+if test "$enable_threads" = "yes"; then
AC_CHECK_HEADERS(pthread.h threads.h)
AC_CHECK_FUNC(pthread_mutex_lock)
if test "$ac_cv_func_pthread_mutex_lock" = "no"; then