At present, the configure script looks for the presence of various
static libraries (i.e. .a files) to figure out if the shared library is
installed on the system. This test fails on systems that don't ship
static libraries (e.g. Fedora 7), although required shared library is
actually installed.
The attached patch fixes the above problem and also uses variables
instead of hardcoded library extensions, to make detection more
portable.
The patch is against the trunk.
--
Bojan
Index: configure.in
===================================================================
--- configure.in (revision 1869)
+++ configure.in (working copy)
@@ -346,17 +346,17 @@
LNETINC="${testdir}/include/libnet.h"
LNETINCDIR="${testdir}/include"
if test $dynamic_link = yes; then
- if test -f "${testdir}/lib64/libnet.a" ; then
+ if test -f "${testdir}/lib64/libnet${shrext_cmds}" ; then
LNETLIB="-L${testdir}/lib64 -lnet"
- elif test -f "${testdir}/lib/libnet.a" ; then
+ elif test -f "${testdir}/lib/libnet${shrext_cmds}" ; then
LNETLIB="-L${testdir}/lib -lnet"
else
AC_ERROR([Unable to find libnet in ${testdir}])
fi
- elif test -f "${testdir}/lib64/libnet.a" ; then
- LNETLIB="${testdir}/lib64/libnet.a"
- elif test -f "${testdir}/lib/libnet.a" ; then
- LNETLIB="${testdir}/lib/libnet.a"
+ elif test -f "${testdir}/lib64/libnet.${libext}" ; then
+ LNETLIB="${testdir}/lib64/libnet.${libext}"
+ elif test -f "${testdir}/lib/libnet.${libext}" ; then
+ LNETLIB="${testdir}/lib/libnet.${libext}"
else
AC_ERROR([Unable to find matching library for header file in ${testdir}])
fi
@@ -471,19 +471,19 @@
LPCAPINC="${testdir}/include/pcap.h"
LPCAPINCDIR="${testdir}/include"
if test $dynamic_link = yes; then
- if test -f "${testdir}/lib64/libpcap.a" ; then
+ if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
LPCAPLIB="-L${testdir}/lib64 -lpcap"
- elif test -f "${testdir}/lib/libpcap.a" ; then
+ elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
LPCAPLIB="-L${testdir}/lib -lpcap"
else
AC_ERROR([Unable to find libpcap in ${testdir}])
fi
- elif test -f "${testdir}/lib64/libpcap.a" ; then
- LPCAPLIB="${testdir}/lib64/libpcap.a"
- elif test -f "${testdir}/lib/libpcap.a" ; then
- LPCAPLIB="${testdir}/lib/libpcap.a"
- elif test -f "${testdir}/lib/libwpcap.a" ; then
- LPCAPLIB="${testdir}/lib/libwpcap.a"
+ elif test -f "${testdir}/lib64/libpcap.${libext}" ; then
+ LPCAPLIB="${testdir}/lib64/libpcap.${libext}"
+ elif test -f "${testdir}/lib/libpcap.${libext}" ; then
+ LPCAPLIB="${testdir}/lib/libpcap.${libext}"
+ elif test -f "${testdir}/lib/libwpcap.${libext}" ; then
+ LPCAPLIB="${testdir}/lib/libwpcap.${libext}"
AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap?])
else
AC_ERROR([Unable to find matching library for header file in ${testdir}])
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Tcpreplay-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tcpreplay-users