configure.ac 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167
  1. dnl $Id: configure.ac 1937 2007-11-01 18:53:05Z 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=3
  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 strsignal])
  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. AC_CHECK_FUNC(inet_addr,
  248. AC_DEFINE([HAVE_INET_ADDR], [1], [Do we have inet_addr?])
  249. inet_addr=yes,
  250. inet_addr=no)
  251. if test x$inet_addr = no ; then
  252. AC_MSG_ERROR([We need inet_addr. See bug 26])
  253. fi
  254. dnl ##################################################
  255. dnl Checks for libnet IFF you specify --enable-libnet.
  256. dnl We no longer by default use libnet unless you tell me to.
  257. dnl ##################################################
  258. foundnet=no
  259. trynetdir=no
  260. have_libnet=no
  261. use_libnet=no
  262. AC_ARG_ENABLE(libnet,
  263. AC_HELP_STRING([--enable-libnet], [Enable using the libnet 1.1.x library (deprecated)]),
  264. [ if test x$enableval = xyes; then
  265. use_libnet=yes
  266. AC_MSG_WARN([Due to bugs in libnet, it is no longer officially supported])
  267. fi]
  268. )
  269. AC_ARG_WITH(libnet,
  270. AC_HELP_STRING([--with-libnet=DIR], [Use libnet in DIR]),
  271. [trynetdir=$withval])
  272. if test x$use_libnet = xyes ; then
  273. AC_MSG_CHECKING(for libnet)
  274. for testdir in $trynetdir /usr/local /opt/local /usr ; do
  275. if test -f "${testdir}/include/libnet.h" -a $foundnet = no ; then
  276. LNETINC="${testdir}/include/libnet.h"
  277. LNETINCDIR="${testdir}/include"
  278. if test $dynamic_link = yes; then
  279. if test -f "${testdir}/lib64/libnet${shrext_cmds}" ; then
  280. LNETLIB="-L${testdir}/lib64 -lnet"
  281. elif test -f "${testdir}/lib/libnet${shrext_cmds}" ; then
  282. LNETLIB="-L${testdir}/lib -lnet"
  283. else
  284. AC_ERROR([Unable to find libnet in ${testdir}])
  285. fi
  286. elif test -f "${testdir}/lib64/libnet.${libext}" ; then
  287. LNETLIB="${testdir}/lib64/libnet.${libext}"
  288. elif test -f "${testdir}/lib/libnet.${libext}" ; then
  289. LNETLIB="${testdir}/lib/libnet.${libext}"
  290. else
  291. AC_ERROR([Unable to find matching library for header file in ${testdir}])
  292. fi
  293. foundnet=$testdir
  294. fi
  295. done
  296. if test x$foundnet = xno ; then
  297. AC_MSG_RESULT(no)
  298. else
  299. AC_MSG_RESULT($foundnet)
  300. have_libnet=yes
  301. AC_DEFINE([HAVE_LIBNET], [1], [Enable libnet support])
  302. fi
  303. fi
  304. AC_SUBST(LNETINC)
  305. AC_SUBST(LNETLIB)
  306. if test $foundnet != no ; then
  307. OLDLIBS="$LIBS"
  308. OLDCFLAGS="$CFLAGS"
  309. LIBS="$LNETLIB"
  310. CFLAGS="$CFLAGS -I$LNETINCDIR"
  311. dnl Check to see what version of libnet
  312. dnl this code has been reduced a lot, but probably still could be
  313. dnl reduced quite a bit more if we chose too
  314. AC_MSG_CHECKING(for libnet version)
  315. AC_TRY_RUN([
  316. #include <string.h>
  317. #define LIBNET_LIL_ENDIAN 1
  318. #include "$LNETINC"
  319. #define LIB_TEST "1.0"
  320. /*
  321. * simple proggy to test the version of libnet
  322. * returns zero if it's 1.0.x
  323. * or one otherwise
  324. */
  325. int
  326. main (int argc, char *argv[])
  327. {
  328. if (strncmp(LIB_TEST, LIBNET_VERSION, 3) == 0)
  329. exit(0);
  330. exit(1);
  331. }],
  332. libnet_ver_10=yes
  333. AC_MSG_RESULT(1.0.x),
  334. libnet_ver_10=no,
  335. libnet_ver_10=no
  336. )
  337. AC_TRY_RUN([
  338. #include <string.h>
  339. #include "$LNETINC"
  340. #define LIB_TEST "1.1"
  341. /*
  342. * simple proggy to test the version of libnet
  343. * returns zero if it's 1.0.x
  344. * or one otherwise
  345. */
  346. int
  347. main (int argc, char *argv[])
  348. {
  349. if (strncmp(LIB_TEST, LIBNET_VERSION, 3) == 0)
  350. exit(0);
  351. exit(1);
  352. }],
  353. libnet_ver_11=yes
  354. AC_MSG_RESULT(1.1.x),
  355. libnet_ver_11=no,
  356. libnet_ver_11=no
  357. )
  358. if test $libnet_ver_10 = no -a $libnet_ver_11 = no ; then
  359. AC_MSG_RESULT(unknown)
  360. AC_MSG_ERROR(Unable to determine version of libnet)
  361. fi
  362. if test $libnet_ver_10 = yes ; then
  363. AC_MSG_ERROR(Libnet version 1.0.x is no longer supported.
  364. Please upgrade to 1.1.0 or better)
  365. fi
  366. dnl restore LIBS & CFLAGS
  367. LIBS="$OLDLIBS"
  368. CFLAGS="$OLDCFLAGS"
  369. fi
  370. dnl END OF if test $foundnet = yes
  371. dnl #####################################################
  372. dnl Checks for libpcap
  373. dnl #####################################################
  374. foundpcap=no
  375. trypcapdir=/usr/local
  376. AC_MSG_CHECKING(for libpcap)
  377. AC_ARG_WITH(libpcap,
  378. AC_HELP_STRING([--with-libpcap=DIR], [Use libpcap in DIR]),
  379. [trypcapdir=$withval])
  380. for testdir in $trypcapdir /usr/local /opt/local /usr ; do
  381. if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then
  382. LPCAPINC="${testdir}/include/pcap.h"
  383. LPCAPINCDIR="${testdir}/include"
  384. if test $dynamic_link = yes; then
  385. if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
  386. LPCAPLIB="-L${testdir}/lib64 -lpcap"
  387. elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
  388. LPCAPLIB="-L${testdir}/lib -lpcap"
  389. else
  390. AC_ERROR([Unable to find libpcap in ${testdir}])
  391. fi
  392. elif test -f "${testdir}/lib64/libpcap.${libext}" ; then
  393. LPCAPLIB="${testdir}/lib64/libpcap.${libext}"
  394. elif test -f "${testdir}/lib/libpcap.${libext}" ; then
  395. LPCAPLIB="${testdir}/lib/libpcap.${libext}"
  396. elif test -f "${testdir}/lib/libwpcap.${libext}" ; then
  397. LPCAPLIB="${testdir}/lib/libwpcap.${libext}"
  398. AC_DEFINE([HAVE_WINPCAP], [1], [Do we have WinPcap?])
  399. else
  400. AC_ERROR([Unable to find matching library for header file in ${testdir}])
  401. fi
  402. foundpcap=$testdir
  403. fi
  404. done
  405. if test $foundpcap = no ; then
  406. AC_MSG_RESULT(no)
  407. AC_ERROR(libpcap not found)
  408. else
  409. AC_MSG_RESULT($foundpcap)
  410. fi
  411. AC_SUBST(LPCAPINC)
  412. AC_SUBST(LPCAPLIB)
  413. dnl Checks to see what version of libpcap we've got
  414. OLDLIBS="$LIBS"
  415. OLDCFLAGS="$CFLAGS -I$LPCAPINCDIR"
  416. LIBS="$LPCAPLIB"
  417. CFLAGS="$CFLAGS -I$LPCAPINCDIR"
  418. dnl Check to see what version of libpcap
  419. dnl this code has been reduced a lot, but probably still could be
  420. dnl reduced quite a bit more if we chose too
  421. AC_MSG_CHECKING(for libpcap version)
  422. dnl 0.9.6 (which is still thinks it is 0.9.5 due to a bug) introduces an important
  423. dnl fix for OSX. See: http://tcpreplay.synfin.net/trac/ticket/167
  424. libpcap_version_096=no
  425. AC_RUN_IFELSE(AC_LANG_PROGRAM([[
  426. #include <string.h>
  427. #include <stdlib.h>
  428. #include <stdio.h>
  429. #include "$LPCAPINC"
  430. #define PCAP_TEST "0.9.6"
  431. ]], [[
  432. /*
  433. * simple proggy to test the version of libpcap
  434. * returns zero if version >= 0.9.6
  435. * or one otherwise
  436. */
  437. if (strncmp(pcap_lib_version(), PCAP_TEST, 5) >= 0)
  438. exit(0);
  439. exit(1);
  440. ]]), [
  441. libpcap_version_096=yes
  442. ])
  443. AC_RUN_IFELSE(AC_LANG_PROGRAM([[
  444. #include <string.h>
  445. #include <stdlib.h>
  446. #include <stdio.h>
  447. #include "$LPCAPINC"
  448. #define PCAP_TEST "0.8"
  449. ]], [[
  450. /*
  451. * simple proggy to test the version of libpcap
  452. * returns zero if version >= 0.8.0
  453. * or one otherwise
  454. */
  455. if (strncmp(pcap_lib_version(), PCAP_TEST, 3) >= 0)
  456. exit(0);
  457. /* winpcap? */
  458. if (strncmp(pcap_lib_version(), "WinPcap", 7) == 0)
  459. exit(0);
  460. exit(1);
  461. ]]), [
  462. libpcap_ver8=yes
  463. ], [
  464. libpcap_ver8=no
  465. ])
  466. AC_RUN_IFELSE(AC_LANG_PROGRAM([[
  467. #include <string.h>
  468. #include <stdlib.h>
  469. #include <stdio.h>
  470. #include "$LPCAPINC"
  471. #define PCAP_TEST "0.7.2"
  472. extern const char pcap_version[[]]; /* double up since autoconf escapes things */
  473. ]], [[
  474. /*
  475. * simple proggy to test the version of libpcap
  476. * returns zero if version >= 0.7.2
  477. * or one otherwise
  478. */
  479. if (strncmp(pcap_version, PCAP_TEST, 5) >= 0)
  480. exit(0);
  481. exit(1);
  482. ]]), [
  483. libpcap_ver7=yes
  484. ], [
  485. libpcap_ver7=no
  486. ])
  487. if test $libpcap_ver8 = yes ; then
  488. AC_MSG_RESULT(>= 0.8.0)
  489. elif test $libpcap_ver7 = yes ; then
  490. AC_MSG_RESULT(>= 0.7.2)
  491. else
  492. AC_MSG_ERROR([Libpcap versions < 0.7.2 are not supported
  493. Please upgrade to version 0.7.2 or better])
  494. fi
  495. libpcap_version=unknown
  496. if test $libpcap_version_096 = yes ; then
  497. libpcap_version=">= 0.9.6"
  498. elif test $libpcap_ver8 = yes ; then
  499. libpcap_version=">= 0.8.0"
  500. elif test $libcap_ver7 = yes ; then
  501. libpcap_version=">= 0.7.0"
  502. fi
  503. dnl Check to see if we've got pcap_datalink_val_to_name()
  504. AC_MSG_CHECKING(for pcap_datalink_val_to_description)
  505. AC_LINK_IFELSE(AC_LANG_PROGRAM([[
  506. #include <stdio.h>
  507. #include <stdlib.h>
  508. #include <string.h>
  509. #include "$LPCAPINC"
  510. ]],[[
  511. if (strcmp(pcap_datalink_val_to_description(1), "Ethernet (10Mb)") == 0)
  512. exit(0);
  513. exit(1);
  514. ]]),[
  515. have_dlt_to_desc=yes
  516. AC_MSG_RESULT(yes)
  517. ], [
  518. have_dlt_to_desc=no
  519. AC_MSG_RESULT(no)
  520. ])
  521. if test $have_dlt_to_desc = yes ; then
  522. AC_DEFINE([HAVE_DLT_VAL_TO_DESC], [1],
  523. [Does libpcap have dlt_val_to_desc?])
  524. fi
  525. dnl Check to see if we've got pcap_dump_fopen()
  526. AC_MSG_CHECKING(for pcap_dump_fopen)
  527. AC_LINK_IFELSE(AC_LANG_PROGRAM([[
  528. #include <stdio.h>
  529. #include <stdlib.h>
  530. #include <string.h>
  531. #include "$LPCAPINC"
  532. ]],[[
  533. pcap_dumper_t *dump;
  534. pcap_t *pcap;
  535. FILE *foo;
  536. dump = pcap_dump_fopen(pcap, foo);
  537. ]]),[
  538. have_pcap_dump_fopen=yes
  539. AC_MSG_RESULT(yes)
  540. ], [
  541. have_pcap_dump_fopen=no
  542. AC_MSG_RESULT(no)
  543. ])
  544. if test $have_pcap_dump_fopen = yes ; then
  545. AC_DEFINE([HAVE_PCAP_DUMP_FOPEN], [1],
  546. [Does libpcap have pcap_dump_fopen?])
  547. else
  548. AC_MSG_NOTICE([--verbose mode requires libpcap >= 0.9.0])
  549. fi
  550. have_pcap_inject=no
  551. dnl Check to see if we've got pcap_inject()
  552. AC_MSG_CHECKING(for pcap_inject sending support)
  553. AC_TRY_COMPILE([
  554. #include <stdio.h>
  555. #include <stdlib.h>
  556. #include <string.h>
  557. #include "$LPCAPINC"
  558. ],[
  559. pcap_t *pcap;
  560. char *buf;
  561. pcap_inject(pcap, (void *)buf, 0);
  562. ],[
  563. AC_DEFINE([HAVE_PCAP_INJECT], [1],
  564. [Does libpcap have pcap_inject?])
  565. AC_MSG_RESULT(yes)
  566. have_pcap_inject=yes
  567. ],[
  568. AC_MSG_RESULT(no)
  569. ])
  570. have_pcap_version=no
  571. dnl Check to see if we have pcap_version[]
  572. AC_MSG_CHECKING(for pcap_version[])
  573. AC_TRY_COMPILE([
  574. #include <stdio.h>
  575. #include <stdlib.h>
  576. #include <string.h>
  577. #include "$LPCAPINC"
  578. extern char pcap_version[];
  579. ],[
  580. printf("%s", pcap_version);
  581. ],[
  582. AC_DEFINE([HAVE_PCAP_VERSION],[1], [Does libpcap have pcap_version[]])
  583. AC_MSG_RESULT(yes)
  584. ],[
  585. AC_MSG_RESULT(no)
  586. ])
  587. have_pcap_sendpacket=no
  588. dnl Check to see if we've got pcap_sendpacket()
  589. AC_MSG_CHECKING(for pcap_sendpacket sending support)
  590. AC_TRY_COMPILE([
  591. #include <stdio.h>
  592. #include <stdlib.h>
  593. #include <string.h>
  594. #include "$LPCAPINC"
  595. ],[
  596. pcap_t *pcap;
  597. u_char *buf;
  598. pcap_sendpacket(pcap, buf, 0);
  599. ],[
  600. AC_DEFINE([HAVE_PCAP_SENDPACKET], [1],
  601. [Does libpcap have pcap_sendpacket?])
  602. AC_MSG_RESULT(yes)
  603. have_pcap_sendpacket=yes
  604. ],[
  605. AC_MSG_RESULT(no)
  606. ])
  607. have_pf=no
  608. dnl Check for linux PF_PACKET support
  609. AC_MSG_CHECKING(for PF_PACKET socket sending support)
  610. AC_TRY_COMPILE([
  611. #include <sys/socket.h>
  612. #include <netpacket/packet.h>
  613. #include <net/ethernet.h> /* the L2 protocols */
  614. #include <netinet/in.h> /* htons */
  615. ],[
  616. int pf_socket;
  617. pf_socket = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
  618. ],[
  619. AC_DEFINE([HAVE_PF_PACKET], [1],
  620. [Do we have Linux PF_PACKET socket support?])
  621. AC_MSG_RESULT(yes)
  622. have_pf=yes
  623. ],[
  624. AC_MSG_RESULT(no)
  625. ])
  626. have_bpf=no
  627. dnl Check for BSD's BPF
  628. AC_MSG_CHECKING(for BPF device sending support)
  629. AC_TRY_RUN([
  630. #include <stdio.h>
  631. #include <stdlib.h>
  632. #include <net/bpf.h>
  633. #include <sys/types.h>
  634. #include <sys/socket.h>
  635. #include <fcntl.h>
  636. #include <sys/time.h>
  637. #include <sys/ioctl.h>
  638. #include <net/bpf.h>
  639. #include <errno.h>
  640. int
  641. main(int argc, char *argv[]) {
  642. int fd;
  643. fd = open("/dev/bpf0", O_RDONLY, 0);
  644. /* if we opened it, we're good */
  645. if (fd > 1)
  646. exit(0);
  647. /* if we got EBUSY or permission denied it exists, so we're good */
  648. if (fd < 0 && (errno == EBUSY || errno == 13))
  649. exit(0);
  650. /* else suck, no good */
  651. exit(-1);
  652. }],
  653. [
  654. AC_DEFINE([HAVE_BPF], [1],
  655. [Do we have BPF device support?])
  656. AC_MSG_RESULT(yes)
  657. have_bpf=yes
  658. ],[
  659. AC_MSG_RESULT(no)
  660. ])
  661. dnl Make sure we have a valid packet injection mechanisim
  662. if test $have_bpf = no -a $have_pcap_inject = no -a $have_pcap_sendpacket = no \
  663. -a $have_libnet = no -a $have_pf = no ; then
  664. AC_MSG_ERROR([Unable to find a supported method to send packets. Please upgrade your libpcap or enable libnet])
  665. fi
  666. dnl Libpcap support doesn't give us a method to get the hardware address of the
  667. dnl interfaces which prevents us from doing proper filtering to prevent bridging loops
  668. enable_tcpbridge=yes
  669. if test $have_bpf = no -a $have_libnet = no -a $have_pf = no ; then
  670. AC_MSG_NOTICE([tcpbridge support disabled without BPF, Libnet or Linux PF_PACKET])
  671. enable_tcpbridge=no
  672. fi
  673. # ADT: Commented for now
  674. # AM_CONDITIONAL(ENABLE_TCPBRIDGE, [test $enable_tcpbridge = yes])
  675. dnl Older versions of libpcap are missing some DLT types
  676. dnl If doesn't exist, we'll define them in src/common/fakepcap.h
  677. AC_MSG_CHECKING(for DLT_LINUX_SLL in libpcap)
  678. AC_TRY_COMPILE([#include "$LPCAPINC"],
  679. [ int foo;
  680. foo = DLT_LINUX_SLL ],
  681. [ AC_DEFINE([HAVE_DLT_LINUX_SLL], [1],
  682. [Does pcap.h include a header with DLT_LINUX_SLL?])
  683. AC_MSG_RESULT(yes)
  684. ],
  685. AC_MSG_RESULT(no)
  686. )
  687. AC_MSG_CHECKING(for DLT_C_HDLC in libpcap)
  688. AC_TRY_COMPILE([#include "$LPCAPINC"],
  689. [ int foo;
  690. foo = DLT_C_HDLC ],
  691. [ AC_DEFINE([HAVE_DLT_C_HDLC], [1],
  692. [Does pcap.h include a header with DLT_C_HDLC?])
  693. AC_MSG_RESULT(yes)
  694. ],
  695. AC_MSG_RESULT(no)
  696. )
  697. PCAP_BPF_H_FILE="$LPCAPINCDIR/pcap-bpf.h"
  698. AC_MSG_CHECKING(for $PCAP_BPF_H_FILE)
  699. AC_TRY_COMPILE([#include <sys/types.h>
  700. #include <sys/time.h>
  701. #include "$PCAP_BPF_H_FILE"],
  702. [ int foo;
  703. foo = BPF_MAJOR_VERSION; ],
  704. [ AC_DEFINE([INCLUDE_PCAP_BPF_HEADER], [1],
  705. [What is the path (if any) to the pcap-bpf.h
  706. header?])
  707. AC_MSG_RESULT(yes)
  708. AC_SUBST(PCAP_BPF_H_FILE)
  709. ],
  710. AC_MSG_RESULT(no)
  711. )
  712. foundbpfheader=no
  713. AC_MSG_CHECKING(for libpcap bpf header)
  714. for testfile in $LPCAPINCDIR/pcap/bpf.h $LPCAPINCDIR/pcap-bpf.h ; do
  715. if test -f "${testfile}" -a $foundbpfheader = no ; then
  716. AC_TRY_COMPILE([
  717. #include <sys/types.h>
  718. #include <sys/time.h>
  719. #include "$testfile"],
  720. [
  721. int foo;
  722. foo = BPF_MAJOR_VERSION;
  723. ],
  724. [
  725. foundbpfheader=yes
  726. PCAP_BPF_H_FILE=$testfile
  727. AC_SUBST(PCAP_BPF_H_FILE)
  728. AC_DEFINE([INCLUDE_PCAP_BPF_HEADER], [1],
  729. [What is the path (if any) to the libpcap bpf header file?])
  730. AC_MSG_RESULT($testfile)
  731. ],
  732. AC_MSG_RESULT(no)
  733. )
  734. fi
  735. done
  736. dnl restore LIBS & CFLAGS
  737. LIBS="$OLDLIBS"
  738. CFLAGS="$OLDCFLAGS"
  739. dnl ##################################################
  740. dnl # Check for pcapnav
  741. dnl ##################################################
  742. pcapnav_ver=no
  743. pcncfg=no
  744. AC_ARG_WITH(pcapnav-config,
  745. AC_HELP_STRING([--with-pcapnav-config=FILE], [Use given pcapnav-config]),
  746. [ AC_MSG_CHECKING(for pcapnav-config)
  747. if test -x $withval ; then
  748. pcncfg=$withval
  749. AC_MSG_RESULT($pcncfg)
  750. elif test x$withval = xno ; then
  751. AC_MSG_RESULT(no)
  752. else
  753. AC_MSG_RESULT([Can't find pcapnav-config: disabling offset jump feature])
  754. fi ],
  755. [ AC_PATH_PROG(pcncfg,[pcapnav-config], [no] ) ]
  756. )
  757. if test $pcncfg != no ; then
  758. LNAVLIB=`$pcncfg --libs`
  759. LNAV_CFLAGS=`$pcncfg --cflags`
  760. PCAPNAV_VERSION=`$pcncfg --version`
  761. AC_SUBST(LNAVLIB)
  762. AC_SUBST(LNAV_CFLAGS)
  763. AC_DEFINE_UNQUOTED(PCAPNAV_VERSION, "$PCAPNAV_VERSION",
  764. [libpcapnav's version?])
  765. dnl Check to see what version of libpcapnav
  766. dnl this code has been reduced a lot, but probably still could be
  767. dnl reduced quite a bit more if we chose too
  768. AC_MSG_CHECKING(for libpcapnav version)
  769. AC_TRY_RUN([
  770. #include <string.h>
  771. #define PCAPNAV_TEST "0.4"
  772. /*
  773. * simple proggy to test the version of libpcapnav
  774. * returns zero if version >= 0.4
  775. * or one otherwise
  776. */
  777. int
  778. main (int argc, char *argv[])
  779. {
  780. if (strncmp(PCAPNAV_VERSION, PCAPNAV_TEST, 3) >= 0)
  781. exit(0);
  782. exit(1);
  783. }],
  784. libpcapnav_ver=yes
  785. AC_MSG_RESULT(>= 0.4),
  786. libpcapnav_ver=no
  787. AC_MSG_RESULT(< 0.4),
  788. libpcapnav_ver=no
  789. )
  790. if test x$libpcapnav_ver = xno ; then
  791. AC_MSG_WARN([Libpcapnav versions < 0.4 are not supported.
  792. Please upgrade to version 0.4 or better.
  793. Disabling offset jump feature.])
  794. else
  795. AC_DEFINE([HAVE_PCAPNAV], [1], [Do we have libpcapnav?])
  796. fi
  797. fi # checking pcapnav version
  798. dnl (shamelessly ripped off from libpcap)
  799. dnl Checks to see if unaligned memory accesses fail
  800. dnl
  801. dnl FORCE_ALIGN (DEFINED)
  802. dnl
  803. AC_MSG_CHECKING(for requires strict byte alignment)
  804. AC_CACHE_VAL(unaligned_fail,
  805. [case "$host_cpu" in
  806. # XXX: should also check that they don't do weird things (like on arm)
  807. alpha*|arm*|hp*|mips*|sparc*|ia64)
  808. unaligned_fail=yes
  809. ;;
  810. *)
  811. cat >conftest.c <<EOF
  812. #include <sys/types.h>
  813. #include <sys/wait.h>
  814. #include <stdio.h>
  815. unsigned char a[[5]] = { 1, 2, 3, 4, 5 };
  816. main() {
  817. unsigned int i;
  818. pid_t pid;
  819. int status;
  820. /* avoid "core dumped" message */
  821. pid = fork();
  822. if (pid < 0)
  823. exit(2);
  824. if (pid > 0) {
  825. /* parent */
  826. pid = waitpid(pid, &status, 0);
  827. if (pid < 0)
  828. exit(3);
  829. exit(!WIFEXITED(status));
  830. }
  831. /* child */
  832. i = *(unsigned int *)&a[[1]];
  833. printf("%d\n", i);
  834. exit(0);
  835. }
  836. EOF
  837. ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
  838. conftest.c $LIBS >/dev/null 2>&1
  839. if test ! -x conftest ; then
  840. dnl failed to compile for some reason
  841. unaligned_fail=yes
  842. else
  843. ./conftest >conftest.out
  844. if test ! -s conftest.out ; then
  845. unaligned_fail=yes
  846. else
  847. unaligned_fail=no
  848. fi
  849. fi
  850. rm -f conftest* core core.conftest
  851. ;;
  852. esac])
  853. AC_MSG_RESULT($unaligned_fail)
  854. if test $unaligned_fail = yes ; then
  855. AC_DEFINE([FORCE_ALIGN],[1],[Are we strictly aligned?])
  856. fi
  857. dnl ##################################################
  858. dnl # Check for tcpdump.
  859. dnl ##################################################
  860. tcpdump_path=no
  861. AC_ARG_WITH(tcpdump,
  862. AC_HELP_STRING([--with-tcpdump=FILE], [Path to tcpdump binary]),
  863. [ if test -x $withval ; then
  864. tcpdump_path=$withval
  865. AC_MSG_RESULT([Using tcpdump in $tcpdump_path])
  866. else
  867. AC_MSG_RESULT([Error: $withval does not exist or is not executable])
  868. fi ],
  869. [ AC_PATH_PROG(tcpdump_path, tcpdump, "no", [$PATH:/usr/sbin:/sbin:/usr/local/sbin]) ])
  870. if test "$tcpdump_path" = "no"; then
  871. AC_MSG_WARN([Unable to find tcpdump. Please specify --with-tcpdump.
  872. Disabling --verbose])
  873. else
  874. AC_DEFINE([HAVE_TCPDUMP], [1], [Do we have tcpdump?])
  875. AC_DEFINE_UNQUOTED(TCPDUMP_BINARY, "$tcpdump_path", [The tcpdump binary initially used])
  876. fi
  877. AM_CONDITIONAL([ENABLE_TCPDUMP], test "$tcpdump_path" != "no" -a x$have_pcap_dump_fopen = xyes)
  878. if test x$tcpdump_path != xno -a x$have_pcap_dump_fopen = xyes ; then
  879. AC_DEFINE([ENABLE_VERBOSE], [1], [Do we have tcpdump and pcap_dump_fopen()?])
  880. else
  881. AC_MSG_WARN([Your version of libpcap is too old for --verbose support])
  882. fi
  883. dnl No 'make test' when cross compile
  884. AC_MSG_CHECKING(for 'make test' profile)
  885. if test "$host" != "$build" ; then
  886. AC_MSG_WARN(Unable to do tests when cross-compiling)
  887. fi
  888. dnl Allows user to choose which nic to use for testing purposes
  889. AC_ARG_WITH(testnic,
  890. AC_HELP_STRING([--with-testnic=NIC], [Select which network card to use for testing]),
  891. [ nic1=$withval
  892. nic2=$withval
  893. AC_MSG_RESULT([Using --with-testnic=$withval])],
  894. [
  895. dnl There's a bug in OS X which causes pcap_findalldevs() to make the wifi NIC to disassociate
  896. dnl so under OSX we disable the interface list feature
  897. disable_pcap_findalldevs=no
  898. dnl these need to be dynamic based on OS
  899. case $host in
  900. *-*-linux*)
  901. nic1=eth0
  902. nic2=eth0
  903. AC_MSG_RESULT(Linux)
  904. ;;
  905. *-*-solaris*)
  906. nic1=hme0
  907. nic2=hme0
  908. AC_MSG_RESULT(Solaris)
  909. ;;
  910. *-*-sunos*)
  911. nic1=hme0
  912. nic2=hme0
  913. AC_MSG_RESULT(SunOS)
  914. ;;
  915. *-apple-darwin*)
  916. nic1=en0
  917. nic2=en0
  918. if test x$libpcap_version_096 = xno ; then
  919. disable_pcap_findalldevs=yes
  920. fi
  921. AC_MSG_RESULT(Apple OS X)
  922. ;;
  923. *-*-openbsd*)
  924. nic1=xl0
  925. nic2=xl0
  926. AC_MSG_RESULT(OpenBSD)
  927. ;;
  928. *-*-cygwin)
  929. AC_MSG_RESULT(Win32/Cygwin)
  930. nic1=%0
  931. nic2=%0
  932. ;;
  933. *)
  934. AC_MSG_RESULT([$host is unknown! Using first non-loopback interface])
  935. nic1=%0
  936. nic2=%0
  937. ;;
  938. esac])
  939. AC_ARG_WITH(testnic2,
  940. AC_HELP_STRING([--with-testnic2=NIC2], [Select an optional 2nd network card to use for testing]),
  941. [ nic2=$withval ])
  942. AC_MSG_NOTICE([Using $nic1 for 1st test network interface card])
  943. AC_MSG_NOTICE([Using $nic2 for 2nd test network interface card])
  944. AC_SUBST(nic1)
  945. AC_SUBST(nic2)
  946. AC_MSG_CHECKING([if it's ok to use pcap_findalldevs()])
  947. if test x$disable_pcap_findalldevs = xno ; then
  948. AC_DEFINE([ENABLE_PCAP_FINDALLDEVS], [1], [Enable use of pcap_findalldevs()])
  949. AC_MSG_RESULT(yes)
  950. else
  951. AC_MSG_RESULT(no)
  952. fi
  953. dnl tcpreplay has (so far) been relying on leading-edge autogen.
  954. dnl Therefore, by default:
  955. dnl - use the version we ship with
  956. dnl - do not install it
  957. dnl - build a static copy (AC_DISABLE_SHARED - implicitly done earlier)
  958. case "${enable_local_libopts+set}" in
  959. set) ;;
  960. *) enable_local_libopts=yes ;;
  961. esac
  962. case "${enable_libopts_install+set}" in
  963. set) ;;
  964. *) enable_libopts_install=no ;;
  965. esac
  966. LIBOPTS_CHECK(libopts)
  967. AC_OUTPUT([Makefile
  968. doxygen.cfg
  969. lib/Makefile
  970. docs/Makefile
  971. src/Makefile
  972. src/common/Makefile
  973. src/tcpedit/Makefile
  974. src/defines.h
  975. test/Makefile
  976. test/config
  977. scripts/Makefile
  978. tcpreplay.spec])
  979. # Configuration results
  980. AC_MSG_RESULT(
  981. ##########################################################################
  982. TCPREPLAY Suite Configuration Results (${TCPREPLAY_VERSION})
  983. ##########################################################################
  984. libpcap: ${foundpcap} (${libpcap_version})
  985. libnet: ${foundnet}
  986. autogen: ${AUTOGEN}
  987. 64bit counter support: ${use64bit_counters}
  988. tcpdump binary path: ${tcpdump_path}
  989. tcpreplay edit support: ${tcpreplay_edit}
  990. tcpbridge support: ${enable_tcpbridge}
  991. Supported Packet Injection Methods (*):
  992. Linux PF_PACKET: ${have_pf}
  993. BSD BPF: ${have_bpf}
  994. libnet: ${have_libnet}
  995. pcap_inject: ${have_pcap_inject}
  996. pcap_sendpacket: ${have_pcap_sendpacket}
  997. * In order of preference; see configure --help to override
  998. )
  999. case $host in
  1000. *-apple-darwin*)
  1001. AC_MSG_WARN([Apple OS X versions prior to 10.5 (Leopard) has a serious problem!
  1002. Please see: http://tcpreplay.synfin.net/trac/ticket/142 for more details])
  1003. ;;
  1004. *-*-cygwin)
  1005. AC_MSG_WARN([Windows/Cygwin support is still somewhat experimental. Please report any bugs!
  1006. http://tcpreplay.synfin.net/trac/newticket])
  1007. ;;
  1008. esac