Hi, tcpreplay can't cross compile as configure.ac use AC_RUN_IFELSE without defining a cross-compiling result :
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=i586-alix-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --locals tatedir=/var/lib --enable-shared --disable-local-libopts --with-tcpdump=/usr/sbin/tcpdump --without-pcapnav-config --disable-debug ... checking for library containing pcap_close... -lpcap checking for libpcap version... configure: error: in `/usr/i586-alix-linux-gnu/tmp/portage/net-analyzer/tcpreplay-3.4.4-r1/work/tcpreplay-3.4.4': configure: error: cannot run test program while cross compiling So here is a fix to default to last pcap release configure: Building tcpbridge checking for PF_PACKET socket sending support... yes checking for BPF device sending support... configure: error: in `/usr/i586-alix-linux-gnu/tmp/portage/net-analyzer/tcpreplay-3.4.4-r1/work/tcpreplay-3.4.4': configure: error: cannot run test program while cross compiling Same case, and use AC_CACHE_CHECK to let users define ac_cv_have_bpf and control the result if cross compiling : configure: Building tcpbridge checking for PF_PACKET socket sending support... yes checking for BPF device sending support... configure: error: cross-compiling, presetting ac_cv_have_bpf=(yes|no) will help This apply on 3.4.4, I did check for 3.4.5_beta2, this should apply too. -- Beber
--- configure.ac.ori 2011-07-19 20:21:01.000000000 +0200 +++ configure.ac 2011-07-19 20:25:06.000000000 +0200 @@ -402,7 +402,6 @@ dnl 0.9.6 (which is still thinks it is 0.9.5 due to a bug) introduces an important dnl fix for OSX. See: http://tcpreplay.synfin.net/trac/ticket/167 -libpcap_version_096=no AC_RUN_IFELSE(AC_LANG_PROGRAM([[ #include <string.h> #include <stdlib.h> @@ -419,11 +418,12 @@ exit(0); exit(1); -]]), [ - libpcap_version_096=yes -]) +]]), + [libpcap_version_096=yes], + [libpcap_version_096=no], + [libpcap_version_096=yes] +) -libpcap_ver8=no AC_RUN_IFELSE(AC_LANG_PROGRAM([[ #include <string.h> #include <stdlib.h> @@ -444,13 +444,12 @@ exit(0); exit(1); -]]), [ - libpcap_ver8=yes -], [ - libpcap_ver8=no -]) +]]), + [libpcap_ver8=yes], + [libpcap_ver8=no], + [libpcap_ver8=yes] +) -libpcap_ver7=no AC_RUN_IFELSE(AC_LANG_PROGRAM([[ #include <string.h> #include <stdlib.h> @@ -469,11 +468,11 @@ exit(0); exit(1); -]]), [ - libpcap_ver7=yes -], [ - libpcap_ver7=no -]) +]]), + [libpcap_ver7=yes], + [libpcap_ver7=no], + [libpcap_ver7=yes] +) if test x$libpcap_ver8 = xyes ; then AC_MSG_RESULT(>= 0.8.0) @@ -761,8 +760,8 @@ have_bpf=no dnl Check for BSD's BPF -AC_MSG_CHECKING(for BPF device sending support) -AC_TRY_RUN([ +AC_CACHE_CHECK([for BPF device sending support], ac_cv_have_bpf, +[AC_TRY_RUN([ #include <stdio.h> #include <stdlib.h> #include <sys/types.h> @@ -796,8 +795,11 @@ [Do we have BPF device support?]) AC_MSG_RESULT(yes) have_bpf=yes -],[ - AC_MSG_RESULT(no) +], +[AC_MSG_RESULT(no)], +[AC_MSG_ERROR([cross-compiling, + presetting ac_cv_have_bpf=(yes|no) will help])] +) ])
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss prevention market. Includes in-depth analysis on the changes within the DLP market, and the criteria used to evaluate the strengths and weaknesses of these DLP solutions. http://www.accelacomm.com/jaw/sfnl/114/51385063/
_______________________________________________ Tcpreplay-users mailing list Tcpreplay-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tcpreplay-users Support Information: http://tcpreplay.synfin.net/trac/wiki/Support