On Sat, 2007-04-14 at 14:56 -0700, Aaron Turner wrote:

> Well I've been playing around with your patch and it seems to have the
> same problems I've experienced in the past- namely if you have
> multiple instances of a shared library, you can have only one shared
> library search path and so you'll possibly link to the wrong one.

I created another patch, against 3.0.RC1 for now. This time I'm using
explicit file tests against shared libs and using absolute paths to
link. In case these don't exist, I'm falling back to static libs.

Let me know if it's any better... (or worse :-)

-- 
Bojan
--- configure.in.original	2007-04-15 13:09:32.000000000 +1000
+++ configure.in	2007-04-16 13:46:38.000000000 +1000
@@ -302,11 +302,19 @@
      LNETINC="${testdir}/include/libnet.h"
      LNETINCDIR="$testdir/include"
      if test $dynamic_link = yes; then
-         LNETLIB="-L${testdir}/lib -lnet"
-     elif test -f "${testdir}/lib64/libnet.a" ; then
-         LNETLIB="${testdir}/lib64/libnet.a"
+         if test -f "${testdir}/lib64/libnet${shrext_cmds}" ; then
+             LNETLIB="${testdir}/lib64/libnet${shrext_cmds}"
+         elif test -f "${testdir}/lib/libnet${shrext_cmds}" ; then
+             LNETLIB="${testdir}/lib/libnet${shrext_cmds}"
+         elif test -f "${testdir}/lib64/libnet.$libext" ; then
+             LNETLIB="${testdir}/lib64/libnet.$libext"
+         else
+             LNETLIB="${testdir}/lib/libnet.$libext"
+         fi
+     elif test -f "${testdir}/lib64/libnet.$libext" ; then
+         LNETLIB="${testdir}/lib64/libnet.$libext"
      else
-         LNETLIB="${testdir}/lib/libnet.a"
+         LNETLIB="${testdir}/lib/libnet.$libext"
      fi
      foundnet=$testdir
     fi
@@ -414,23 +422,30 @@
         	LPCAPINC="${testdir}/include/pcap.h"
 	        LPCAPINCDIR="${testdir}/include"
 	        if test $dynamic_link = yes; then
-				if test -f "${testdir}/lib/libpcap.a" ; then
-		            LPCAPLIB="-L${testdir}/lib -lpcap"
-				elif test -f "${testdir}/lib64/libpcap.a" ; then
-					LPCAPLIB="-L${testdir}/lib64 -lpcap"
-				else
-					AC_ERROR([Unable to find libpcap in ${testdir}])
-				fi
+		    if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
+		        LPCAPLIB="${testdir}/lib64/libpcap${shrext_cmds}"
+		    elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
+		        LPCAPLIB="{testdir}/lib/libpcap${shrext_cmds}"
+	            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"
+		        AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap?])
+		    else
+		        AC_ERROR([Unable to find matching library for header file 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"
-				AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap?])
-		 	else
-				AC_ERROR([Unable to find matching library for header file in ${testdir}])
-			fi
+		    AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap?])
+		else
+		    AC_ERROR([Unable to find matching library for header file in ${testdir}])
+		fi
         	foundpcap=$testdir
      	fi
 	done
-------------------------------------------------------------------------
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

Reply via email to