configure.ac 32 KB

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