summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2001-06-05 03:56:52 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2001-06-05 03:56:52 +0000
commit58c31c551442cee29b2711c37fcd573a1ee0fd6a (patch)
tree783f7ee287febbf7d77d9a2197337aa07cd7fcdd
parent56960edd72e00e4b6fd08dfcb0ab4606e44439e5 (diff)
downloadtinyproxy-58c31c551442cee29b2711c37fcd573a1ee0fd6a.tar.gz
tinyproxy-58c31c551442cee29b2711c37fcd573a1ee0fd6a.zip
Had a problem where we test for the libraries, but not actually included
then in the linking.
-rw-r--r--configure.in32
1 files changed, 13 insertions, 19 deletions
diff --git a/configure.in b/configure.in
index 99edc02..5a8f474 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.11 2001-06-04 23:33:11 rjkaes Exp $
+dnl $Id: configure.in,v 1.12 2001-06-05 03:56:52 rjkaes Exp $
AC_INIT()
AM_INIT_AUTOMAKE(tinyproxy,1.4.0pre6)
@@ -92,17 +92,17 @@ AC_UNP_CHECK_TYPE(in_addr_t, uint32_t)
dnl Checks for libraries
AC_CHECK_LIB(pthread, pthread_create)
if test "$ac_cv_lib_pthread_pthread_create" = "yes"; then
- CFLAGS="$CFLAGS -D_REENTRANT"
+ CFLAGS="-D_REENTRANT $CFLAGS"
else
AC_CHECK_LIB(pthreads, pthread_create)
if test "$ac_cv_lib_pthreads_pthread_create" = "yes"; then
- CFLAGS="$CFLAGS -D_REENTRANT"
+ CFLAGS="-D_REENTRANT $CFLAGS"
else
AC_MSG_ERROR(You must have a POSIX compliant threading library installed)
fi
fi
-AC_CHECK_LIB(socket, socket, [ ], [ AC_CHECK_LIB(socket, htonl) ])
+AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS", AC_CHECK_LIB(socket, htonl))
dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try to
dnl avoid -lnsl checks, if we already have the functions which are
@@ -113,7 +113,7 @@ AC_CHECK_FUNC(yp_get_default_domain, [ tinyproxy_no_nsl_checks=yes ], [ ])
unset ac_cv_func_yp_get_default_domain
if test "$tinyproxy_no_nsl_checks" != "yes"; then
- AC_CHECK_LIB(nsl, gethostname, [ ], [ AC_CHECK_LIB(nsl, gethostbyaddr) ])
+ AC_CHECK_LIB(nsl, gethostname, LIBS="-lnsl $LIBS", AC_CHECK_LIB(nsl, gethostbyaddr))
fi
AC_CHECK_LIB(resolv, inet_aton)
@@ -175,7 +175,7 @@ fi
if test "$tinyproxy_cv_regex" = "yes" ; then
AC_DEFINE(USE_GNU_REGEX)
- LIBOBJS="$LIBOBJS gnuregex.o"
+ LIBOBJS="gnuregex.o $LIBOBJS"
fi
dnl Add compiler-specific optimization flags
@@ -183,21 +183,15 @@ AC_ARG_ENABLE(debug,
[ --enable-debug Disable aggressive optimizations [default=no]],
debug_enabled=yes)
-CFLAGS="$CFLAGS -Wall"
+CFLAGS="-Wall $CFLAGS"
if test "$enable_debug" = "yes" ; then
dnl Add the warnings if we have the GCC compiler
if test x$ac_cv_prog_gcc = xyes ; then
- CFLAGS="$CFLAGS -Wshadow"
- CFLAGS="$CFLAGS -Wcast-qual"
- CFLAGS="$CFLAGS -Wcast-align"
- CFLAGS="$CFLAGS -Wstrict-prototypes"
- CFLAGS="$CFLAGS -Wmissing-prototypes"
- CFLAGS="$CFLAGS -Wmissing-declarations"
- CFLAGS="$CFLAGS -Wpointer-arith"
- CFLAGS="$CFLAGS -Waggregate-return"
- CFLAGS="$CFLAGS -Wnested-externs"
+ CFLAGS="-Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes $CFLAGS"
+ CFLAGS="-Wmissing-prototypes -Wmissing-declarations $CFLAGS"
+ CFLAGS="-Wpointer-arith -Waggregate-return -Wnested-externs $CFLAGS"
fi
- CFLAGS="$CFLAGS -DYYDEBUG"
+ CFLAGS="-DYYDEBUG $CFLAGS"
YFLAGS="-v -d"
else
dnl No debugging information, include the optimizations
@@ -213,8 +207,8 @@ if test "$socks_enabled" = "yes"; then
AC_CHECK_HEADER(socks.h, socks_header=yes, socks_header=no)
AC_CHECK_LIB(socks, main, socks_library=yes, socks_library=no)
if test "$socks_header" = "yes" -a "$socks_library" = "yes"; then
- CFLAGS="$CFLAGS -I/usr/include/sock.h -DSOCKS"
- LIBS="$LIBS -lsocks"
+ CFLAGS="-I/usr/include/sock.h -DSOCKS $CFLAGS"
+ LIBS="-lsocks $LIBS"
else
AC_MSG_ERROR(could not find the SOCKS library or header)
fi