configure.ac 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183
  1. dnl $Id: configure.ac 1892 2007-08-10 03:45:29Z aturner $
  2. AC_INIT(tcpreplay)
  3. AC_CONFIG_SRCDIR(src/tcpreplay.c)
  4. AM_CONFIG_HEADER(src/config.h)
  5. AC_CONFIG_AUX_DIR(config)
  6. AM_MAINTAINER_MODE
  7. AM_WITH_DMALLOC
  8. dnl Set version info here!
  9. MAJOR_VERSION=3
  10. MINOR_VERSION=2
  11. MICRO_VERSION=0
  12. TCPREPLAY_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
  13. dnl Release is only used for the RPM spec file
  14. TCPREPLAY_RELEASE=1
  15. AC_DEFINE(PACKAGE, [tcpreplay], [This is our package name])
  16. AC_DEFINE_UNQUOTED(VERSION, "$TCPREPLAY_VERSION", [What is our version?])
  17. AC_SUBST(TCPREPLAY_VERSION)
  18. AC_SUBST(TCPREPLAY_RELEASE)
  19. USER_CFLAGS=$CFLAGS
  20. CFLAGS="${CFLAGS} -Wall -O3 -std=gnu99"
  21. dnl Determine OS
  22. AC_CANONICAL_BUILD
  23. AC_CANONICAL_HOST
  24. AC_CANONICAL_TARGET
  25. AC_SUBST(host)
  26. AC_SUBST(build)
  27. AC_SUBST(target)
  28. AC_MSG_CHECKING([for cygwin development environment])
  29. if test `echo $target | grep -c cygwin` -gt 0 ; then
  30. AC_DEFINE([HAVE_WIN32], [1], [Windows/Cygwin])
  31. AC_MSG_RESULT(yes)
  32. else
  33. AC_MSG_RESULT(no)
  34. fi
  35. AM_INIT_AUTOMAKE(tcpreplay, $TCPREPLAY_VERSION, nodefine)
  36. dnl Checks for programs.
  37. AC_PROG_INSTALL
  38. AC_PROG_LIBTOOL
  39. AC_PROG_CC
  40. AC_PROG_CC_STDC
  41. AC_PROG_CXX
  42. AC_PROG_CPP
  43. AC_PROG_LN_S
  44. AC_PROG_RANLIB
  45. AC_PROG_AWK
  46. AC_PROG_SED
  47. AC_PROG_MAKE_SET
  48. AC_EXEEXT
  49. AC_PATH_PROG(PRINTF, printf)
  50. AC_PATH_PROG(AUTOGEN, autogen)
  51. dnl check autogen version
  52. if test -n "${AUTOGEN}" ; then
  53. AC_MSG_CHECKING(for autogen version >= 5.9)
  54. AUTOGEN_VERSION=`${AUTOGEN} -v | ${SED} 's|.*\([[0-9\.]]\{3,\}\)$|\1|'`
  55. AUTOGEN_MAJOR=`echo ${AUTOGEN_VERSION} | ${SED} 's|^\([[0-9]]\)\.[[0-9]]|\1|'`
  56. AUTOGEN_MINOR=`echo ${AUTOGEN_VERSION} | ${SED} 's|^\([[0-9]]\)\.\([[0-9]]\)|\2|'`
  57. if test ${AUTOGEN_MAJOR} -le 5 && test ${AUTOGEN_MINOR} -lt 9 || test ${AUTOGEN_MAJOR} -lt 5 ; then
  58. AC_MSG_RESULT(no)
  59. AC_MSG_WARN([${AUTOGEN} is too old (${AUTOGEN_VERSION}) for building from SVN. Please upgrade to 5.9)])
  60. else
  61. AC_MSG_RESULT(yes)
  62. fi
  63. else
  64. AC_MSG_WARN([Please install autogen >= 5.9 if you are building from SVN])
  65. fi
  66. AC_HEADER_STDC
  67. AC_HEADER_MAJOR
  68. dnl Checks for typedefs, structures, and compiler characteristics.
  69. AC_TYPE_SIZE_T
  70. AC_HEADER_TIME
  71. AC_C_CONST
  72. AC_C_INLINE
  73. AC_SYS_LARGEFILE
  74. dnl Check for functions
  75. AC_FUNC_FSEEKO
  76. dnl Check for types.
  77. AC_CHECK_TYPE(u_int8_t, uint8_t)
  78. AC_CHECK_TYPE(u_int16_t, uint16_t)
  79. AC_CHECK_TYPE(u_int32_t, uint32_t)
  80. AC_CHECK_TYPE(u_int64_t, uint64_t)
  81. dnl Older versions of GCC don't support these options
  82. AC_MSG_CHECKING(for $CC -Wextra support)
  83. OLD_CFLAGS=$CFLAGS
  84. CFLAGS="$CFLAGS -Wextra"
  85. wextra=""
  86. AC_COMPILE_IFELSE([#include <stdlib.h>
  87. int main(int argc, char *argv[]) { return(0); }],
  88. [ AC_MSG_RESULT(yes)
  89. wextra="-Wextra" ],
  90. [ AC_MSG_RESULT(no) ])
  91. CFLAGS="$OLD_CFLAGS $wextra"
  92. AC_MSG_CHECKING(for $CC -Wno-variadic-macros support)
  93. OLD_CFLAGS=$CFLAGS
  94. CFLAGS="$CFLAGS -Wno-variadic-macros"
  95. wno_variadic_macros=""
  96. AC_COMPILE_IFELSE([#include <stdlib.h>
  97. int main(int argc, char *argv[]) { return(0); }],
  98. [ AC_MSG_RESULT(yes)
  99. wno_variadic_macros="-Wno-variadic-macros" ],
  100. [ AC_MSG_RESULT(no) ])
  101. CFLAGS="$OLD_CFLAGS $wno_variadic_macros"
  102. AC_MSG_CHECKING(for $CC -Wfatal-errors support)
  103. OLD_CFLAGS=$CFLAGS
  104. CFLAGS="$CFLAGS -Wfatal-errors"
  105. wfatal_errors=""
  106. AC_COMPILE_IFELSE([#include <stdlib.h>
  107. int main(int argc, char *argv[]) { return(0); }],
  108. [ AC_MSG_RESULT(yes)
  109. wfatal_errors="-Wfatal-errors" ],
  110. [ AC_MSG_RESULT(no) ])
  111. CFLAGS="$OLD_CFLAGS $wfatal_errors"
  112. dnl Check for other header files
  113. AC_CHECK_HEADERS([fcntl.h stddef.h sys/socket.h arpa/inet.h sys/time.h signal.h string.h strings.h sys/types.h sys/select.h netinet/in.h poll.h sys/poll.h unistd.h sys/param.h])
  114. dnl OpenBSD has special requirements
  115. AC_CHECK_HEADERS([sys/sysctl.h net/route.h], [], [], [
  116. [#if HAVE_SYS_PARAM_H
  117. #include <sys/param.h>
  118. #endif
  119. #if HAVE_SYS_TYPES_H
  120. #include <sys/types.h>
  121. #endif
  122. #if HAVE_SYS_SOCKET_H
  123. #include <sys/socket.h>
  124. #endif
  125. ]])
  126. dnl Checks for libraries.
  127. AC_CHECK_LIB(socket, socket)
  128. AC_CHECK_LIB(nsl, gethostbyname)
  129. AC_CHECK_LIB(rt, nanosleep)
  130. AC_CHECK_LIB(resolv, resolv)
  131. dnl Checks for library functions.
  132. AC_FUNC_MALLOC
  133. AC_FUNC_MEMCMP
  134. AC_TYPE_SIGNAL
  135. AC_FUNC_VPRINTF
  136. AC_CHECK_MEMBERS([struct timeval.tv_sec])
  137. AC_CHECK_FUNCS([gettimeofday ctime memset regcomp strdup strchr strerror strtol strncpy strtoull poll ntohll mmap snprintf vsnprintf])
  138. dnl Look for strlcpy since some BSD's have it
  139. AC_CHECK_FUNCS([strlcpy],have_strlcpy=true,have_strlcpy=false)
  140. AM_CONDITIONAL(SYSTEM_STRLCPY, [test x$have_strlcpy = xtrue])
  141. AC_C_BIGENDIAN
  142. AM_CONDITIONAL([WORDS_BIGENDIAN], [ test x$ac_cv_c_bigendian = xyes ])
  143. dnl Enable debugging in code/compiler options
  144. debug=no
  145. AC_ARG_ENABLE(debug,
  146. AC_HELP_STRING([--enable-debug], [Enable debugging code and support for the -d option]),
  147. [ if test x$enableval = xyes; then
  148. debug=yes
  149. CFLAGS="${USER_CFLAGS} -ggdb -std=gnu99 -Wall $wextra $wfatal_errors $wno_variadic_macros"
  150. # We may also want to add:
  151. # -Wformat-security -Wswitch-default -Wunused-paramter -Wpadded"
  152. AC_SUBST(debug_flag)
  153. AC_DEFINE([DEBUG], [1], [Enable debuging code and support for the -d option])
  154. fi])
  155. AC_ARG_ENABLE(pedantic,
  156. AC_HELP_STRING([--enable-pedantic], [Enable gcc's -pedantic option]),
  157. [ if test x$enableval = xyes; then
  158. CFLAGS="$CFLAGS -pedantic"
  159. fi ])
  160. dnl Enable Efense
  161. AC_ARG_ENABLE(efence,
  162. AC_HELP_STRING([--enable-efence], [Enable Electric Fence memory debugger]),
  163. [ if test x$enableval = xyes; then
  164. CFLAGS="$CFLAGS -lefence"
  165. AC_DEFINE([EFENCE], [1], [Enable Electric Fence memory debugger])
  166. fi])
  167. dnl Enable Gprof
  168. AC_ARG_ENABLE(gprof,
  169. AC_HELP_STRING([--enable-gprof], [Enable GNU Profiler]),
  170. [ if test x$enableval = xyes; then
  171. if test $debug = yes; then
  172. CFLAGS="$CFLAGS -pg"
  173. else
  174. # GPROF requires gdb
  175. CFLAGS="$CFLAGS -ggdb -pg -fprofile-arcs"
  176. fi
  177. AC_DEFINE([GPROF], [1], [Enable GNU Profiler])
  178. fi])
  179. dnl Use 64bits for packet counters
  180. use64bit_counters=yes
  181. AC_ARG_ENABLE(64bits,
  182. AC_HELP_STRING([--disable-64bits], [Do not use 64bit packet counters]),
  183. [
  184. AC_MSG_NOTICE([Using u_int32_t for packet counters])
  185. ],
  186. [
  187. AC_DEFINE([ENABLE_64BITS], [1], [Use 64bit packet counters])
  188. AC_MSG_NOTICE([Using u_int64_t for packet counters])
  189. ])
  190. # If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
  191. # so we can use _U_ to flag unused function arguments and not get warnings
  192. # about them. Otherwise, add '-D_U_=""', so that _U_ used to flag an unused
  193. # function argument will compile with non-GCC compilers.
  194. #
  195. if test "x$GCC" = "xyes" ; then
  196. CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
  197. else
  198. CFLAGS="-D_U_=\"\" $CFLAGS"
  199. fi
  200. AC_ARG_ENABLE(force-bpf,
  201. AC_HELP_STRING([--enable-force-bpf], [Force using BPF for sending packets]),
  202. [ AC_DEFINE([FORCE_INJECT_BPF], [1], [Force using BPF for sending packet])])
  203. AC_ARG_ENABLE(force-pf,
  204. AC_HELP_STRING([--enable-force-pf], [Force using Linux's PF_PACKET for sending packets]),
  205. [ AC_DEFINE([FORCE_INJECT_PF], [1], [Force using Linux's PF_PACKET for sending packets])])
  206. AC_ARG_ENABLE(force-libnet,
  207. AC_HELP_STRING([--enable-force-libnet], [Force using libnet for sending packets]),
  208. [ AC_DEFINE([FORCE_INJECT_LIBNET], [1], [Force using libnet for sending packets])])
  209. AC_ARG_ENABLE(force-inject,
  210. AC_HELP_STRING([--enable-force-inject], [Force using libpcap's pcap_inject() for sending packets]),
  211. [ AC_DEFINE([FORCE_INJECT_PCAP_INJECT],[1], [Force using libpcap's pcap_inject() for sending packets])])
  212. AC_ARG_ENABLE(force-sendpacket,
  213. AC_HELP_STRING([--enable-force-sendpacket], [Force using libpcap's pcap_sendpacket() for sending packets]),
  214. [ AC_DEFINE([FORCE_INJECT_PCAP_SENDPACKET], [1], [Force using libpcap's pcap_sendpacket() for sending packets])])
  215. tcpreplay_edit=no
  216. AC_ARG_ENABLE(tcpreplay-edit,
  217. AC_HELP_STRING([--enable-tcpreplay-edit], [Link packet editing code with tcpreplay]),
  218. [ AC_DEFINE([TCPREPLAY_EDIT], [1], [Link packet editing code with tcpreplay])
  219. tcpreplay_edit=yes
  220. ])
  221. AM_CONDITIONAL([ENABLE_TCPREPLAY_EDIT], [test x$tcpreplay_edit = xyes])
  222. dnl Dynamic link libraries
  223. dynamic_link=no
  224. AC_ARG_ENABLE(dynamic-link,
  225. AC_HELP_STRING([--enable-dynamic-link], [Dynamically link libraries]),
  226. [ if test x$enableval = xyes; then
  227. AC_DEFINE([ENABLE_DYNAMIC_LINK], [1], [Enable dynamically linking libs])
  228. dynamic_link=yes
  229. fi
  230. ])
  231. dnl Check for inet_aton and inet_pton
  232. AC_CHECK_FUNC(inet_aton,
  233. AC_DEFINE([HAVE_INET_ATON], [1], [Do we have inet_aton?])
  234. inet_aton=yes,
  235. inet_aton=no)
  236. AC_CHECK_FUNC(inet_pton,
  237. AC_DEFINE([HAVE_INET_PTON], [1], [Do we have inet_pton?])
  238. inet_pton=yes,
  239. inet_pton=no)
  240. AC_CHECK_FUNC(inet_ntop,
  241. AC_DEFINE([HAVE_INET_NTOP], [1], [Do we have inet_ntop?])
  242. inet_ntop=yes,
  243. inet_ntop=no)
  244. if test "$inet_ntop" = "no" -a "$inet_pton" = "no" ; then
  245. AC_MSG_ERROR([We need either inet_ntop or inet_pton])
  246. fi
  247. if test "$inet_aton" = "no" ; then
  248. AC_MSG_ERROR([We need inet_aton])
  249. fi
  250. AC_CHECK_FUNC(inet_addr,
  251. AC_DEFINE([HAVE_INET_ADDR], [1], [Do we have inet_addr?])
  252. inet_addr=yes,
  253. inet_addr=no)
  254. if test x$inet_addr = no ; then
  255. AC_MSG_ERROR([We need inet_addr. See bug 26])
  256. fi
  257. dnl Enable flowreplay
  258. flowreplay=no
  259. AC_ARG_ENABLE(flowreplay,
  260. AC_HELP_STRING([--enable-flowreplay], [Enable building flowreplay (alpha)]),
  261. [ if test x$enableval = xyes; then
  262. flowreplay=yes
  263. AC_DEFINE([ENABLE_FLOWREPLAY], [1], [Enable building flowreplay (alpha)])
  264. fi])
  265. AM_CONDITIONAL([ENABLE_FLOWREPLAY], [test x$flowreplay = xyes])
  266. dnl ##################################################
  267. dnl Checks for libnet IFF you specify --enable-libnet.
  268. dnl We no longer by default use libnet unless you tell me to.
  269. dnl ##################################################
  270. foundnet=no
  271. trynetdir=no
  272. have_libnet=no
  273. use_libnet=no
  274. AC_ARG_ENABLE(libnet,
  275. AC_HELP_STRING([--enable-libnet], [Enable using the libnet 1.1.x library (deprecated)]),
  276. [ if test x$enableval = xyes; then
  277. use_libnet=yes
  278. AC_MSG_WARN([Due to bugs in libnet, it is no longer officially supported])
  279. fi]
  280. )
  281. AC_ARG_WITH(libnet,
  282. AC_HELP_STRING([--with-libnet=DIR], [Use libnet in DIR]),
  283. [trynetdir=$withval])
  284. if test x$use_libnet = xyes ; then
  285. AC_MSG_CHECKING(for libnet)
  286. for testdir in $trynetdir /usr/local /opt/local /usr ; do
  287. if test -f "${testdir}/include/libnet.h" -a $foundnet = no ; then
  288. LNETINC="${testdir}/include/libnet.h"
  289. LNETINCDIR="${testdir}/include"
  290. if test $dynamic_link = yes; then
  291. if test -f "${testdir}/lib64/libnet${shrext_cmds}" ; then
  292. LNETLIB="-L${testdir}/lib64 -lnet"
  293. elif test -f "${testdir}/lib/libnet${shrext_cmds}" ; then
  294. LNETLIB="-L${testdir}/lib -lnet"
  295. else
  296. AC_ERROR([Unable to find libnet in ${testdir}])
  297. fi
  298. elif test -f "${testdir}/lib64/libnet.${libext}" ; then
  299. LNETLIB="${testdir}/lib64/libnet.${libext}"
  300. elif test -f "${testdir}/lib/libnet.${libext}" ; then
  301. LNETLIB="${testdir}/lib/libnet.${libext}"
  302. else
  303. AC_ERROR([Unable to find matching library for header file in ${testdir}])
  304. fi
  305. foundnet=$testdir
  306. fi
  307. done
  308. if test x$foundnet = xno ; then
  309. AC_MSG_RESULT(no)
  310. else
  311. AC_MSG_RESULT($foundnet)
  312. have_libnet=yes
  313. AC_DEFINE([HAVE_LIBNET], [1], [Enable libnet support])
  314. fi
  315. fi
  316. AC_SUBST(LNETINC)
  317. AC_SUBST(LNETLIB)
  318. if test $foundnet != no ; then
  319. OLDLIBS="$LIBS"
  320. OLDCFLAGS="$CFLAGS"
  321. LIBS="$LNETLIB"
  322. CFLAGS="$CFLAGS -I$LNETINCDIR"
  323. dnl Check to see what version of libnet
  324. dnl this code has been reduced a lot, but probably still could be
  325. dnl reduced quite a bit more if we chose too
  326. AC_MSG_CHECKING(for libnet version)
  327. AC_TRY_RUN([
  328. #include <string.h>
  329. #define LIBNET_LIL_ENDIAN 1
  330. #include "$LNETINC"
  331. #define LIB_TEST "1.0"
  332. /*
  333. * simple proggy to test the version of libnet
  334. * returns zero if it's 1.0.x
  335. * or one otherwise
  336. */
  337. int
  338. main (int argc, char *argv[])
  339. {
  340. if (strncmp(LIB_TEST, LIBNET_VERSION, 3) == 0)
  341. exit(0);
  342. exit(1);
  343. }],
  344. libnet_ver_10=yes
  345. AC_MSG_RESULT(1.0.x),
  346. libnet_ver_10=no,
  347. libnet_ver_10=no
  348. )
  349. AC_TRY_RUN([
  350. #include <string.h>
  351. #include "$LNETINC"
  352. #define LIB_TEST "1.1"
  353. /*
  354. * simple proggy to test the version of libnet
  355. * returns zero if it's 1.0.x
  356. * or one otherwise
  357. */
  358. int
  359. main (int argc, char *argv[])
  360. {
  361. if (strncmp(LIB_TEST, LIBNET_VERSION, 3) == 0)
  362. exit(0);
  363. exit(1);
  364. }],
  365. libnet_ver_11=yes
  366. AC_MSG_RESULT(1.1.x),
  367. libnet_ver_11=no,
  368. libnet_ver_11=no
  369. )
  370. if test $libnet_ver_10 = no -a $libnet_ver_11 = no ; then
  371. AC_MSG_RESULT(unknown)
  372. AC_MSG_ERROR(Unable to determine version of libnet)
  373. fi
  374. if test $libnet_ver_10 = yes ; then
  375. AC_MSG_ERROR(Libnet version 1.0.x is no longer supported.
  376. Please upgrade to 1.1.0 or better)
  377. fi
  378. dnl restore LIBS & CFLAGS
  379. LIBS="$OLDLIBS"
  380. CFLAGS="$OLDCFLAGS"
  381. fi
  382. dnl END OF if test $foundnet = yes
  383. dnl #####################################################
  384. dnl Checks for libpcap
  385. dnl #####################################################
  386. foundpcap=no
  387. trypcapdir=/usr/local
  388. AC_MSG_CHECKING(for libpcap)
  389. AC_ARG_WITH(libpcap,
  390. AC_HELP_STRING([--with-libpcap=DIR], [Use libpcap in DIR]),
  391. [trypcapdir=$withval])
  392. for testdir in $trypcapdir /usr/local /opt/local /usr ; do
  393. if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then
  394. LPCAPINC="${testdir}/include/pcap.h"
  395. LPCAPINCDIR="${testdir}/include"
  396. if test $dynamic_link = yes; then
  397. if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
  398. LPCAPLIB="-L${testdir}/lib64 -lpcap"
  399. elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
  400. LPCAPLIB="-L${testdir}/lib -lpcap"
  401. else
  402. AC_ERROR([Unable to find libpcap in ${testdir}])
  403. fi
  404. elif test -f "${testdir}/lib64/libpcap.${libext}" ; then
  405. LPCAPLIB="${testdir}/lib64/libpcap.${libext}"
  406. elif test -f "${testdir}/lib/libpcap.${libext}" ; then
  407. LPCAPLIB="${testdir}/lib/libpcap.${libext}"
  408. elif test -f "${testdir}/lib/libwpcap.${libext}" ; then
  409. LPCAPLIB="${testdir}/lib/libwpcap.${libext}"
  410. AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap?])
  411. else
  412. AC_ERROR([Unable to find matching library for header file in ${testdir}])
  413. fi
  414. foundpcap=$testdir
  415. fi
  416. done
  417. if test $foundpcap = no ; then
  418. AC_MSG_RESULT(no)
  419. AC_ERROR(libpcap not found)
  420. else
  421. AC_MSG_RESULT($foundpcap)
  422. fi
  423. AC_SUBST(LPCAPINC)
  424. AC_SUBST(LPCAPLIB)
  425. dnl Checks to see what version of libpcap we've got
  426. OLDLIBS="$LIBS"
  427. OLDCFLAGS="$CFLAGS -I$LPCAPINCDIR"
  428. LIBS="$LPCAPLIB"
  429. CFLAGS="$CFLAGS -I$LPCAPINCDIR"
  430. dnl Check to see what version of libpcap
  431. dnl this code has been reduced a lot, but probably still could be
  432. dnl reduced quite a bit more if we chose too
  433. AC_MSG_CHECKING(for libpcap version)
  434. dnl 0.9.6 (which is still thinks it is 0.9.5 due to a bug) introduces an important
  435. dnl fix for OSX. See: http://tcpreplay.synfin.net/trac/ticket/167
  436. libpcap_version_096=no
  437. AC_RUN_IFELSE(AC_LANG_PROGRAM([[
  438. #include <string.h>
  439. #include <stdlib.h>
  440. #include <stdio.h>
  441. #include "$LPCAPINC"
  442. #define PCAP_TEST "0.9.6"
  443. ]], [[
  444. /*
  445. * simple proggy to test the version of libpcap
  446. * returns zero if version >= 0.9.6
  447. * or one otherwise
  448. */
  449. if (strncmp(pcap_lib_version(), PCAP_TEST, 5) >= 0)
  450. exit(0);
  451. exit(1);
  452. ]]), [
  453. libpcap_version_096=yes
  454. ])
  455. AC_RUN_IFELSE(AC_LANG_PROGRAM([[
  456. #include <string.h>
  457. #include <stdlib.h>
  458. #include <stdio.h>
  459. #include "$LPCAPINC"
  460. #define PCAP_TEST "0.8"
  461. ]], [[
  462. /*
  463. * simple proggy to test the version of libpcap
  464. * returns zero if version >= 0.8.0
  465. * or one otherwise
  466. */
  467. if (strncmp(pcap_lib_version(), PCAP_TEST, 3) >= 0)
  468. exit(0);
  469. /* winpcap? */
  470. if (strncmp(pcap_lib_version(), "WinPcap", 7) == 0)
  471. exit(0);
  472. exit(1);
  473. ]]), [
  474. libpcap_ver8=yes
  475. ], [
  476. libpcap_ver8=no
  477. ])
  478. AC_RUN_IFELSE(AC_LANG_PROGRAM([[
  479. #include <string.h>
  480. #include <stdlib.h>
  481. #include <stdio.h>
  482. #include "$LPCAPINC"
  483. #define PCAP_TEST "0.7.2"
  484. extern const char pcap_version[[]]; /* double up since autoconf escapes things */
  485. ]], [[
  486. /*
  487. * simple proggy to test the version of libpcap
  488. * returns zero if version >= 0.7.2
  489. * or one otherwise
  490. */
  491. if (strncmp(pcap_version, PCAP_TEST, 5) >= 0)
  492. exit(0);
  493. exit(1);
  494. ]]), [
  495. libpcap_ver7=yes
  496. ], [
  497. libpcap_ver7=no
  498. ])
  499. if test $libpcap_ver8 = yes ; then
  500. AC_MSG_RESULT(>= 0.8.0)
  501. elif test $libpcap_ver7 = yes ; then
  502. AC_MSG_RESULT(>= 0.7.2)
  503. else
  504. AC_MSG_ERROR([Libpcap versions < 0.7.2 are not supported
  505. Please upgrade to version 0.7.2 or better])
  506. fi
  507. libpcap_version=unknown
  508. if test $libpcap_version_096 = yes ; then
  509. libpcap_version=">= 0.9.6"
  510. elif test $libpcap_ver8 = yes ; then
  511. libpcap_version=">= 0.8.0"
  512. elif test $libcap_ver7 = yes ; then
  513. libpcap_version=">= 0.7.0"
  514. fi
  515. dnl Check to see if we've got pcap_datalink_val_to_name()
  516. AC_MSG_CHECKING(for pcap_datalink_val_to_description)
  517. AC_LINK_IFELSE(AC_LANG_PROGRAM([[
  518. #include <stdio.h>
  519. #include <stdlib.h>
  520. #include <string.h>
  521. #include "$LPCAPINC"
  522. ]],[[
  523. if (strcmp(pcap_datalink_val_to_description(1), "Ethernet (10Mb)") == 0)
  524. exit(0);
  525. exit(1);
  526. ]]),[
  527. have_dlt_to_desc=yes
  528. AC_MSG_RESULT(yes)
  529. ], [
  530. have_dlt_to_desc=no
  531. AC_MSG_RESULT(no)
  532. ])
  533. if test $have_dlt_to_desc = yes ; then
  534. AC_DEFINE([HAVE_DLT_VAL_TO_DESC], [1],
  535. [Does libpcap have dlt_val_to_desc?])
  536. fi
  537. dnl Check to see if we've got pcap_dump_fopen()
  538. AC_MSG_CHECKING(for pcap_dump_fopen)
  539. AC_LINK_IFELSE(AC_LANG_PROGRAM([[
  540. #include <stdio.h>
  541. #include <stdlib.h>
  542. #include <string.h>
  543. #include "$LPCAPINC"
  544. ]],[[
  545. pcap_dumper_t *dump;
  546. pcap_t *pcap;
  547. FILE *foo;
  548. dump = pcap_dump_fopen(pcap, foo);
  549. ]]),[
  550. have_pcap_dump_fopen=yes
  551. AC_MSG_RESULT(yes)
  552. ], [
  553. have_pcap_dump_fopen=no
  554. AC_MSG_RESULT(no)
  555. ])
  556. if test $have_pcap_dump_fopen = yes ; then
  557. AC_DEFINE([HAVE_PCAP_DUMP_FOPEN], [1],
  558. [Does libpcap have pcap_dump_fopen?])
  559. else
  560. AC_MSG_NOTICE([--verbose mode requires libpcap >= 0.9.0])
  561. fi
  562. have_pcap_inject=no
  563. dnl Check to see if we've got pcap_inject()
  564. AC_MSG_CHECKING(for pcap_inject sending support)
  565. AC_TRY_COMPILE([
  566. #include <stdio.h>
  567. #include <stdlib.h>
  568. #include <string.h>
  569. #include "$LPCAPINC"
  570. ],[
  571. pcap_t *pcap;
  572. char *buf;
  573. pcap_inject(pcap, (void *)buf, 0);
  574. ],[
  575. AC_DEFINE([HAVE_PCAP_INJECT], [1],
  576. [Does libpcap have pcap_inject?])
  577. AC_MSG_RESULT(yes)
  578. have_pcap_inject=yes
  579. ],[
  580. AC_MSG_RESULT(no)
  581. ])
  582. have_pcap_version=no
  583. dnl Check to see if we have pcap_version[]
  584. AC_MSG_CHECKING(for pcap_version[])
  585. AC_TRY_COMPILE([
  586. #include <stdio.h>
  587. #include <stdlib.h>
  588. #include <string.h>
  589. #include "$LPCAPINC"
  590. extern char pcap_version[];
  591. ],[
  592. printf("%s", pcap_version);
  593. ],[
  594. AC_DEFINE([HAVE_PCAP_VERSION],[1], [Does libpcap have pcap_version[]])
  595. AC_MSG_RESULT(yes)
  596. ],[
  597. AC_MSG_RESULT(no)
  598. ])
  599. have_pcap_sendpacket=no
  600. dnl Check to see if we've got pcap_sendpacket()
  601. AC_MSG_CHECKING(for pcap_sendpacket sending support)
  602. AC_TRY_COMPILE([
  603. #include <stdio.h>
  604. #include <stdlib.h>
  605. #include <string.h>
  606. #include "$LPCAPINC"
  607. ],[
  608. pcap_t *pcap;
  609. u_char *buf;
  610. pcap_sendpacket(pcap, buf, 0);
  611. ],[
  612. AC_DEFINE([HAVE_PCAP_SENDPACKET], [1],
  613. [Does libpcap have pcap_sendpacket?])
  614. AC_MSG_RESULT(yes)
  615. have_pcap_sendpacket=yes
  616. ],[
  617. AC_MSG_RESULT(no)
  618. ])
  619. have_pf=no
  620. dnl Check for linux PF_PACKET support
  621. AC_MSG_CHECKING(for PF_PACKET socket sending support)
  622. AC_TRY_COMPILE([
  623. #include <sys/socket.h>
  624. #include <netpacket/packet.h>
  625. #include <net/ethernet.h> /* the L2 protocols */
  626. #include <netinet/in.h> /* htons */
  627. ],[
  628. int pf_socket;
  629. pf_socket = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
  630. ],[
  631. AC_DEFINE([HAVE_PF_PACKET], [1],
  632. [Do we have Linux PF_PACKET socket support?])
  633. AC_MSG_RESULT(yes)
  634. have_pf=yes
  635. ],[
  636. AC_MSG_RESULT(no)
  637. ])
  638. have_bpf=no
  639. dnl Check for BSD's BPF
  640. AC_MSG_CHECKING(for BPF device sending support)
  641. AC_TRY_RUN([
  642. #include <stdio.h>
  643. #include <stdlib.h>
  644. #include <net/bpf.h>
  645. #include <sys/types.h>
  646. #include <sys/socket.h>
  647. #include <fcntl.h>
  648. #include <sys/time.h>
  649. #include <sys/ioctl.h>
  650. #include <net/bpf.h>
  651. #include <errno.h>
  652. int
  653. main(int argc, char *argv[]) {
  654. int fd;
  655. fd = open("/dev/bpf0", O_RDONLY, 0);
  656. /* if we opened it, we're good */
  657. if (fd > 1)
  658. exit(0);
  659. /* if we got EBUSY or permission denied it exists, so we're good */
  660. if (fd < 0 && (errno == EBUSY || errno == 13))
  661. exit(0);
  662. /* else suck, no good */
  663. exit(-1);
  664. }],
  665. [
  666. AC_DEFINE([HAVE_BPF], [1],
  667. [Do we have BPF device support?])
  668. AC_MSG_RESULT(yes)
  669. have_bpf=yes
  670. ],[
  671. AC_MSG_RESULT(no)
  672. ])
  673. dnl Make sure we have a valid packet injection mechanisim
  674. if test $have_bpf = no -a $have_pcap_inject = no -a $have_pcap_sendpacket = no \
  675. -a $have_libnet = no -a $have_pf = no ; then
  676. AC_MSG_ERROR([Unable to find a supported method to send packets. Please upgrade your libpcap or enable libnet])
  677. fi
  678. dnl Libpcap support doesn't give us a method to get the hardware address of the
  679. dnl interfaces which prevents us from doing proper filtering to prevent bridging loops
  680. enable_tcpbridge=yes
  681. if test $have_bpf = no -a $have_libnet = no -a $have_pf = no ; then
  682. AC_MSG_NOTICE([tcpbridge support disabled without BPF, Libnet or Linux PF_PACKET])
  683. enable_tcpbridge=no
  684. fi
  685. # ADT: Commented for now
  686. # AM_CONDITIONAL(ENABLE_TCPBRIDGE, [test $enable_tcpbridge = yes])
  687. dnl Older versions of libpcap are missing some DLT types
  688. dnl If doesn't exist, we'll define them in src/common/fakepcap.h
  689. AC_MSG_CHECKING(for DLT_LINUX_SLL in libpcap)
  690. AC_TRY_COMPILE([#include "$LPCAPINC"],
  691. [ int foo;
  692. foo = DLT_LINUX_SLL ],
  693. [ AC_DEFINE([HAVE_DLT_LINUX_SLL], [1],
  694. [Does pcap.h include a header with DLT_LINUX_SLL?])
  695. AC_MSG_RESULT(yes)
  696. ],
  697. AC_MSG_RESULT(no)
  698. )
  699. AC_MSG_CHECKING(for DLT_C_HDLC in libpcap)
  700. AC_TRY_COMPILE([#include "$LPCAPINC"],
  701. [ int foo;
  702. foo = DLT_C_HDLC ],
  703. [ AC_DEFINE([HAVE_DLT_C_HDLC], [1],
  704. [Does pcap.h include a header with DLT_C_HDLC?])
  705. AC_MSG_RESULT(yes)
  706. ],
  707. AC_MSG_RESULT(no)
  708. )
  709. PCAP_BPF_H_FILE="$LPCAPINCDIR/pcap-bpf.h"
  710. AC_MSG_CHECKING(for $PCAP_BPF_H_FILE)
  711. AC_TRY_COMPILE([#include <sys/types.h>
  712. #include <sys/time.h>
  713. #include "$PCAP_BPF_H_FILE"],
  714. [ int foo;
  715. foo = BPF_MAJOR_VERSION; ],
  716. [ AC_DEFINE([INCLUDE_PCAP_BPF_HEADER], [1],
  717. [What is the path (if any) to the pcap-bpf.h
  718. header?])
  719. AC_MSG_RESULT(yes)
  720. AC_SUBST(PCAP_BPF_H_FILE)
  721. ],
  722. AC_MSG_RESULT(no)
  723. )
  724. foundbpfheader=no
  725. AC_MSG_CHECKING(for libpcap bpf header)
  726. for testfile in $LPCAPINCDIR/pcap/bpf.h $LPCAPINCDIR/pcap-bpf.h ; do
  727. if test -f "${testfile}" -a $foundbpfheader = no ; then
  728. AC_TRY_COMPILE([
  729. #include <sys/types.h>
  730. #include <sys/time.h>
  731. #include "$testfile"],
  732. [
  733. int foo;
  734. foo = BPF_MAJOR_VERSION;
  735. ],
  736. [
  737. foundbpfheader=yes
  738. PCAP_BPF_H_FILE=$testfile
  739. AC_SUBST(PCAP_BPF_H_FILE)
  740. AC_DEFINE([INCLUDE_PCAP_BPF_HEADER], [1],
  741. [What is the path (if any) to the libpcap bpf header file?])
  742. AC_MSG_RESULT($testfile)
  743. ],
  744. AC_MSG_RESULT(no)
  745. )
  746. fi
  747. done
  748. dnl restore LIBS & CFLAGS
  749. LIBS="$OLDLIBS"
  750. CFLAGS="$OLDCFLAGS"
  751. dnl ##################################################
  752. dnl # Check for pcapnav
  753. dnl ##################################################
  754. pcapnav_ver=no
  755. pcncfg=no
  756. AC_ARG_WITH(pcapnav-config,
  757. AC_HELP_STRING([--with-pcapnav-config=FILE], [Use given pcapnav-config]),
  758. [ AC_MSG_CHECKING(for pcapnav-config)
  759. if test -x $withval ; then
  760. pcncfg=$withval
  761. AC_MSG_RESULT($pcncfg)
  762. elif test x$withval = xno ; then
  763. AC_MSG_RESULT(no)
  764. else
  765. AC_MSG_RESULT([Can't find pcapnav-config: disabling offset jump feature])
  766. fi ],
  767. [ AC_PATH_PROG(pcncfg,[pcapnav-config], [no] ) ]
  768. )
  769. if test $pcncfg != no ; then
  770. LNAVLIB=`$pcncfg --libs`
  771. LNAV_CFLAGS=`$pcncfg --cflags`
  772. PCAPNAV_VERSION=`$pcncfg --version`
  773. AC_SUBST(LNAVLIB)
  774. AC_SUBST(LNAV_CFLAGS)
  775. AC_DEFINE_UNQUOTED(PCAPNAV_VERSION, "$PCAPNAV_VERSION",
  776. [libpcapnav's version?])
  777. dnl Check to see what version of libpcapnav
  778. dnl this code has been reduced a lot, but probably still could be
  779. dnl reduced quite a bit more if we chose too
  780. AC_MSG_CHECKING(for libpcapnav version)
  781. AC_TRY_RUN([
  782. #include <string.h>
  783. #define PCAPNAV_TEST "0.4"
  784. /*
  785. * simple proggy to test the version of libpcapnav
  786. * returns zero if version >= 0.4
  787. * or one otherwise
  788. */
  789. int
  790. main (int argc, char *argv[])
  791. {
  792. if (strncmp(PCAPNAV_VERSION, PCAPNAV_TEST, 3) >= 0)
  793. exit(0);
  794. exit(1);
  795. }],
  796. libpcapnav_ver=yes
  797. AC_MSG_RESULT(>= 0.4),
  798. libpcapnav_ver=no
  799. AC_MSG_RESULT(< 0.4),
  800. libpcapnav_ver=no
  801. )
  802. if test x$libpcapnav_ver = xno ; then
  803. AC_MSG_WARN([Libpcapnav versions < 0.4 are not supported.
  804. Please upgrade to version 0.4 or better.
  805. Disabling offset jump feature.])
  806. else
  807. AC_DEFINE([HAVE_PCAPNAV], [1], [Do we have libpcapnav?])
  808. fi
  809. fi # checking pcapnav version
  810. dnl (shamelessly ripped off from libpcap)
  811. dnl Checks to see if unaligned memory accesses fail
  812. dnl
  813. dnl FORCE_ALIGN (DEFINED)
  814. dnl
  815. AC_MSG_CHECKING(for requires strict byte alignment)
  816. AC_CACHE_VAL(unaligned_fail,
  817. [case "$host_cpu" in
  818. # XXX: should also check that they don't do weird things (like on arm)
  819. alpha*|arm*|hp*|mips*|sparc*|ia64)
  820. unaligned_fail=yes
  821. ;;
  822. *)
  823. cat >conftest.c <<EOF
  824. #include <sys/types.h>
  825. #include <sys/wait.h>
  826. #include <stdio.h>
  827. unsigned char a[[5]] = { 1, 2, 3, 4, 5 };
  828. main() {
  829. unsigned int i;
  830. pid_t pid;
  831. int status;
  832. /* avoid "core dumped" message */
  833. pid = fork();
  834. if (pid < 0)
  835. exit(2);
  836. if (pid > 0) {
  837. /* parent */
  838. pid = waitpid(pid, &status, 0);
  839. if (pid < 0)
  840. exit(3);
  841. exit(!WIFEXITED(status));
  842. }
  843. /* child */
  844. i = *(unsigned int *)&a[[1]];
  845. printf("%d\n", i);
  846. exit(0);
  847. }
  848. EOF
  849. ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
  850. conftest.c $LIBS >/dev/null 2>&1
  851. if test ! -x conftest ; then
  852. dnl failed to compile for some reason
  853. unaligned_fail=yes
  854. else
  855. ./conftest >conftest.out
  856. if test ! -s conftest.out ; then
  857. unaligned_fail=yes
  858. else
  859. unaligned_fail=no
  860. fi
  861. fi
  862. rm -f conftest* core core.conftest
  863. ;;
  864. esac])
  865. AC_MSG_RESULT($unaligned_fail)
  866. if test $unaligned_fail = yes ; then
  867. AC_DEFINE([FORCE_ALIGN],[1],[Are we strictly aligned?])
  868. fi
  869. dnl ##################################################
  870. dnl # Check for tcpdump.
  871. dnl ##################################################
  872. tcpdump_path=no
  873. AC_ARG_WITH(tcpdump,
  874. AC_HELP_STRING([--with-tcpdump=FILE], [Path to tcpdump binary]),
  875. [ if test -x $withval ; then
  876. tcpdump_path=$withval
  877. AC_MSG_RESULT([Using tcpdump in $tcpdump_path])
  878. else
  879. AC_MSG_RESULT([Error: $withval does not exist or is not executable])
  880. fi ],
  881. [ AC_PATH_PROG(tcpdump_path, tcpdump, "no", [$PATH:/usr/sbin:/sbin:/usr/local/sbin]) ])
  882. if test "$tcpdump_path" = "no"; then
  883. AC_MSG_WARN([Unable to find tcpdump. Please specify --with-tcpdump.
  884. Disabling --verbose])
  885. else
  886. AC_DEFINE([HAVE_TCPDUMP], [1], [Do we have tcpdump?])
  887. AC_DEFINE_UNQUOTED(TCPDUMP_BINARY, "$tcpdump_path", [The tcpdump binary initially used])
  888. fi
  889. AM_CONDITIONAL([ENABLE_TCPDUMP], test "$tcpdump_path" != "no" -a x$have_pcap_dump_fopen = xyes)
  890. if test x$tcpdump_path != xno -a x$have_pcap_dump_fopen = xyes ; then
  891. AC_DEFINE([ENABLE_VERBOSE], [1], [Do we have tcpdump and pcap_dump_fopen()?])
  892. else
  893. AC_MSG_WARN([Your version of libpcap is too old for --verbose support])
  894. fi
  895. dnl No 'make test' when cross compile
  896. AC_MSG_CHECKING(for 'make test' profile)
  897. if test "$host" != "$build" ; then
  898. AC_MSG_WARN(Unable to do tests when cross-compiling)
  899. fi
  900. dnl Allows user to choose which nic to use for testing purposes
  901. AC_ARG_WITH(testnic,
  902. AC_HELP_STRING([--with-testnic=NIC], [Select which network card to use for testing]),
  903. [ nic1=$withval
  904. nic2=$withval
  905. AC_MSG_RESULT([Using --with-testnic=$withval])],
  906. [
  907. dnl There's a bug in OS X which causes pcap_findalldevs() to make the wifi NIC to disassociate
  908. dnl so under OSX we disable the interface list feature
  909. disable_pcap_findalldevs=no
  910. dnl these need to be dynamic based on OS
  911. case $host in
  912. *-*-linux*)
  913. nic1=eth0
  914. nic2=eth0
  915. AC_MSG_RESULT(Linux)
  916. ;;
  917. *-*-solaris*)
  918. nic1=hme0
  919. nic2=hme0
  920. AC_MSG_RESULT(Solaris)
  921. ;;
  922. *-*-sunos*)
  923. nic1=hme0
  924. nic2=hme0
  925. AC_MSG_RESULT(SunOS)
  926. ;;
  927. *-apple-darwin*)
  928. nic1=en0
  929. nic2=en0
  930. if test x$libpcap_version_096 = xno ; then
  931. disable_pcap_findalldevs=yes
  932. fi
  933. AC_MSG_RESULT(Apple OS X)
  934. ;;
  935. *-*-openbsd*)
  936. nic1=xl0
  937. nic2=xl0
  938. AC_MSG_RESULT(OpenBSD)
  939. ;;
  940. *-*-cygwin)
  941. AC_MSG_RESULT(Win32/Cygwin)
  942. nic1=%0
  943. nic2=%0
  944. ;;
  945. *)
  946. AC_MSG_RESULT([$host is unknown! Using first non-loopback interface])
  947. nic1=%0
  948. nic2=%0
  949. ;;
  950. esac])
  951. AC_ARG_WITH(testnic2,
  952. AC_HELP_STRING([--with-testnic2=NIC2], [Select an optional 2nd network card to use for testing]),
  953. [ nic2=$withval ])
  954. AC_MSG_NOTICE([Using $nic1 for 1st test network interface card])
  955. AC_MSG_NOTICE([Using $nic2 for 2nd test network interface card])
  956. AC_SUBST(nic1)
  957. AC_SUBST(nic2)
  958. AC_MSG_CHECKING([if it's ok to use pcap_findalldevs()])
  959. if test x$disable_pcap_findalldevs = xno ; then
  960. AC_DEFINE([ENABLE_PCAP_FINDALLDEVS], [1], [Enable use of pcap_findalldevs()])
  961. AC_MSG_RESULT(yes)
  962. else
  963. AC_MSG_RESULT(no)
  964. fi
  965. dnl tcpreplay has (so far) been relying on leading-edge autogen.
  966. dnl Therefore, by default:
  967. dnl - use the version we ship with
  968. dnl - do not install it
  969. dnl - build a static copy (AC_DISABLE_SHARED - implicitly done earlier)
  970. case "${enable_local_libopts+set}" in
  971. set) ;;
  972. *) enable_local_libopts=yes ;;
  973. esac
  974. case "${enable_libopts_install+set}" in
  975. set) ;;
  976. *) enable_libopts_install=no ;;
  977. esac
  978. LIBOPTS_CHECK(libopts)
  979. AC_OUTPUT([Makefile
  980. doxygen.cfg
  981. lib/Makefile
  982. docs/Makefile
  983. src/Makefile
  984. src/common/Makefile
  985. src/tcpedit/Makefile
  986. src/flow/Makefile
  987. src/defines.h
  988. test/Makefile
  989. test/config
  990. scripts/Makefile
  991. tcpreplay.spec])
  992. # Configuration results
  993. AC_MSG_RESULT(
  994. ##########################################################################
  995. TCPREPLAY Suite Configuration Results (${TCPREPLAY_VERSION})
  996. ##########################################################################
  997. libpcap: ${foundpcap} (${libpcap_version})
  998. libnet: ${foundnet}
  999. autogen: ${AUTOGEN}
  1000. 64bit counter support: ${use64bit_counters}
  1001. tcpdump binary path: ${tcpdump_path}
  1002. tcpreplay edit support: ${tcpreplay_edit}
  1003. tcpbridge support: ${enable_tcpbridge}
  1004. Supported Packet Injection Methods (*):
  1005. Linux PF_PACKET: ${have_pf}
  1006. BSD BPF: ${have_bpf}
  1007. libnet: ${have_libnet}
  1008. pcap_inject: ${have_pcap_inject}
  1009. pcap_sendpacket: ${have_pcap_sendpacket}
  1010. * In order of preference; see configure --help to override
  1011. )
  1012. case $host in
  1013. *-apple-darwin*)
  1014. AC_MSG_WARN([Apple OS X has a serious problem!
  1015. Please see: http://tcpreplay.synfin.net/trac/ticket/142 for more details])
  1016. ;;
  1017. *-*-cygwin)
  1018. AC_MSG_WARN([Windows/Cygwin support is still somewhat experimental. Please report any bugs!
  1019. http://tcpreplay.synfin.net/trac/newticket])
  1020. ;;
  1021. esac