configure.in 32 KB

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