--- configure.in 2006-02-19 23:35:42.000000000 +0100 +++ configure.in.oden 2006-03-19 15:10:15.000000000 +0100 @@ -39,7 +39,7 @@ owd=`pwd` if cd $withval; then withval=`pwd`; cd $owd; fi PCAPINC="-I$withval -I$withval/bpf" - PCAPLIB="-L$withval -lpcap" + PCAPLIB="-L${libdir} -lpcap" else AC_ERROR(pcap.h or libpcap.a not found in $withval) fi @@ -47,7 +47,7 @@ esac ], [ if test -f ${prefix}/include/pcap.h; then PCAPINC="-I${prefix}/include" - PCAPLIB="-L${prefix}/lib -lpcap" + PCAPLIB="-L${libdir} -lpcap" elif test -f /usr/include/pcap/pcap.h; then PCAPINC="-I/usr/include/pcap" PCAPLIB="-lpcap" @@ -74,7 +74,7 @@ AC_MSG_RESULT($withval) if test -f $withval/src/libdnet.a; then DNETINC="-I$withval/include" - DNETLIB="-L$withval/src -ldnet `$withval/dnet-config --libs`" + DNETLIB="-L${libdir}/src -ldnet `$withval/dnet-config --libs`" elif test -x $withval/bin/dnet-config; then DNETINC="`$withval/bin/dnet-config --cflags`" DNETLIB="`$withval/bin/dnet-config --libs`" @@ -129,12 +129,12 @@ owd=`pwd` if cd $withval; then withval=`pwd`; cd $owd; fi EVENTINC="-I$withval" - EVENTLIB="-L$withval -levent" - elif test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then + EVENTLIB="-L${libdir} -levent" + elif test -f $withval/include/event.h -a -f ${libdir}/libevent.a; then owd=`pwd` if cd $withval; then withval=`pwd`; cd $owd; fi EVENTINC="-I$withval/include" - EVENTLIB="-L$withval/lib -levent" + EVENTLIB="-L${libdir} -levent" else AC_ERROR(event.h or libevent.a not found in $withval) fi @@ -142,7 +142,7 @@ esac ], [ if test -f ${prefix}/include/event.h; then EVENTINC="-I${prefix}/include" - EVENTLIB="-L${prefix}/lib -levent" + EVENTLIB="-L${libdir} -levent" elif test -f /usr/include/event/event.h; then EVENTINC="-I/usr/include/event" EVENTLIB="-levent" @@ -178,12 +178,12 @@ if cd $withval; then withval=`pwd`; cd $owd; fi DNSRESINC="-I$withval" DNSRESLIB="-L$withval -ldnsres" - elif test -f $withval/include/dnsres.h -a -f $withval/lib/libdnsres.a + elif test -f $withval/include/dnsres.h -a -f ${libdir}/libdnsres.a then owd=`pwd` if cd $withval; then withval=`pwd`; cd $owd; fi DNSRESINC="-I$withval/include" - DNSRESLIB="-L$withval/lib -ldnsres" + DNSRESLIB="-L${libdir} -ldnsres" else AC_ERROR(dnsres.h or libdnsres.a not found in $withval) fi @@ -191,7 +191,7 @@ esac ], [ if test -f ${prefix}/include/dnsres.h; then DNSRESINC="-I${prefix}/include" - DNSRESLIB="-L${prefix}/lib -ldnsres" + DNSRESLIB="-L${libdir} -ldnsres" elif test -f /usr/include/dnsres/dnsres.h; then DNSRESINC="-I/usr/include/dnsres" DNSRESLIB="-ldnsres" @@ -221,12 +221,12 @@ if cd $withval; then withval=`pwd`; cd $owd; fi PCREINC="-I$withval" PCRELIB="-L$withval -lpcre" - elif test -f $withval/include/pcre.h -a -f $withval/lib/libpcre.a + elif test -f $withval/include/pcre.h -a -f ${libdir}/libpcre.a then owd=`pwd` if cd $withval; then withval=`pwd`; cd $owd; fi PCREINC="-I$withval/include" - PCRELIB="-L$withval/lib -lpcre" + PCRELIB="-L${libdir} -lpcre" else AC_ERROR(pcre.h or libpcre.a not found in $withval) fi @@ -234,7 +234,7 @@ esac ], [ if test -f ${prefix}/include/pcre.h; then PCREINC="-I${prefix}/include" - PCRELIB="-L${prefix}/lib -lpcre" + PCRELIB="-L${libdir} -lpcre" elif test -f /usr/include/pcre/pcre.h; then PCREINC="-I/usr/include/pcre" PCRELIB="-lpcre" @@ -264,7 +264,7 @@ if cd $withval; then withval=`pwd`; cd $owd; fi AC_DEFINE(HAVE_LIBEDIT, 1, [Define if you have libedit]) EDITINC="-I$withval" - EDITLIB="-L$withval -ledit" + EDITLIB="-L${libdir} -ledit" else AC_ERROR(histedit.h or libedit.a not found in $withval) fi @@ -272,7 +272,7 @@ esac ], [ if test -f ${prefix}/include/histedit.h; then EDITINC="-I${prefix}/include" - EDITLIB="-L${prefix}/lib -ledit" + EDITLIB="-L${libdir} -ledit" elif test -f /usr/include/edit/histedit.h; then EDITINC="-I/usr/include/edit" EDITLIB="-ledit" @@ -304,7 +304,7 @@ if cd $withval; then withval=`pwd`; cd $owd; fi AC_DEFINE(HAVE_LIBREADLINE, 1, [Define if you have libreadline]) EDITINC="-I$withval" - EDITLIB="-L$withval -lreadline" + EDITLIB="-L${libdir} -lreadline" else AC_ERROR(readline/readline.h or libreadline.a not found in $withval) fi @@ -312,7 +312,7 @@ esac ], [ if test -f ${prefix}/include/readline/readline.h; then EDITINC="-I${prefix}/include" - EDITLIB="-L${prefix}/lib -lreadline" + EDITLIB="-L${libdir} -lreadline" elif test -f /usr/include/readline/readline.h; then EDITLIB="-lreadline" else @@ -339,8 +339,8 @@ if test "x$withval" = "xno" ; then AC_MSG_ERROR([zlib is required]) fi - if test -d "$withval/lib"; then - ZLIB="-L${withval}/lib" + if test -d "${libdir}"; then + ZLIB="-L${libdir}" else ZLIB="-L${withval}" fi @@ -405,7 +405,7 @@ AC_MSG_CHECKING(for Python linkage) py_prefix=`$PATH_PYTHON -c 'import sys; print sys.prefix'` py_ver=`$PATH_PYTHON -c 'import sys; print sys.version[[:3]]'` - py_libdir="${py_prefix}/lib/python${py_ver}" + py_libdir="${libdir}/python${py_ver}" PYTHONINC="-I${py_prefix}/include/python${py_ver}" py_libs=`grep '^LIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'` py_libc=`grep '^LIBC=' $py_libdir/config/Makefile | sed -e 's/^.*=//'` @@ -716,9 +716,10 @@ dnl ugly, ugly hack LIBCGUESS=`echo /lib/libc.so.*` - USRLIBCGUESS=`echo /usr/lib/libc.so*` + LIB64CGUESS=`echo /lib64/libc.so.*` + USRLIBCGUESS=`echo ${libdir}/libc.so*` - if test "$USRLIBCGUESS" = "/usr/lib/libc.so.*"; then + if test "$USRLIBCGUESS" = "${libdir}/libc.so.*"; then USRLIBCGUESS="" fi @@ -726,7 +727,7 @@ LIBCGUESS="" fi - for TESTLIB in libc.so `echo $USRLIBCGUESS` `echo $LIBCGUESS` + for TESTLIB in libc.so `echo $USRLIBCGUESS` `echo $LIBCGUESS` `echo $LIB64CGUESS` do AC_MSG_CHECKING(if we can access libc with $TESTLIB) AC_TRY_RUN(