| 1 | # Process this file with autoconf to produce a configure script. |
|---|
| 2 | |
|---|
| 3 | # Now you only need to update the version number in two places - below, |
|---|
| 4 | # and in the README |
|---|
| 5 | |
|---|
| 6 | AC_INIT(libtrace,3.0.0-beta1,[contact@wand.net.nz],libtrace) |
|---|
| 7 | |
|---|
| 8 | LIBTRACE_MAJOR=3 |
|---|
| 9 | LIBTRACE_MID=0 |
|---|
| 10 | LIBTRACE_MINOR=0 |
|---|
| 11 | |
|---|
| 12 | AC_CONFIG_SRCDIR(lib/trace.c) |
|---|
| 13 | AM_INIT_AUTOMAKE |
|---|
| 14 | |
|---|
| 15 | AC_DEFINE([LIBTRACE_MAJOR],${LIBTRACE_MAJOR},[libtrace major version]) |
|---|
| 16 | AC_DEFINE([LIBTRACE_MID],${LIBTRACE_MID},[libtrace mid version]) |
|---|
| 17 | AC_DEFINE([LIBTRACE_MINOR],${LIBTRACE_MINOR},[libtrace minor version]) |
|---|
| 18 | |
|---|
| 19 | AC_CONFIG_FILES([Makefile lib/Makefile docs/Makefile libpacketdump/Makefile |
|---|
| 20 | libpacketdump/parser/Makefile |
|---|
| 21 | tools/Makefile tools/traceanon/Makefile tools/tracedump/Makefile |
|---|
| 22 | tools/tracemerge/Makefile tools/tracereport/Makefile |
|---|
| 23 | tools/tracertstats/Makefile tools/tracesplit/Makefile |
|---|
| 24 | tools/tracestats/Makefile docs/libtrace.doxygen lib/libtrace.h]) |
|---|
| 25 | dnl GNU C library |
|---|
| 26 | dnl AC_GNU_SOURCE |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | AM_CONFIG_HEADER(config.h) |
|---|
| 30 | #AC_CONFIG_HEADERS([config.h]) |
|---|
| 31 | dnl Checks for programs. |
|---|
| 32 | AC_PROG_CC |
|---|
| 33 | AC_PROG_CXX |
|---|
| 34 | AC_PROG_INSTALL |
|---|
| 35 | #AC_LIBTOOL_DLOPEN |
|---|
| 36 | AC_PROG_LIBTOOL |
|---|
| 37 | AC_PROG_YACC |
|---|
| 38 | AC_PROG_LEX |
|---|
| 39 | |
|---|
| 40 | AC_CONFIG_LIBOBJ_DIR(lib) |
|---|
| 41 | |
|---|
| 42 | # Checks for typedefs, structures, and compiler characteristics. |
|---|
| 43 | AC_C_CONST |
|---|
| 44 | AC_C_INLINE |
|---|
| 45 | AC_C_BIGENDIAN |
|---|
| 46 | AC_TYPE_SIZE_T |
|---|
| 47 | AC_HEADER_TIME |
|---|
| 48 | AC_SYS_LARGEFILE |
|---|
| 49 | |
|---|
| 50 | # Checks for library functions. |
|---|
| 51 | AC_PROG_GCC_TRADITIONAL |
|---|
| 52 | AC_CHECK_FUNCS(socket strdup strlcpy) |
|---|
| 53 | |
|---|
| 54 | AC_CHECK_SIZEOF([long int]) |
|---|
| 55 | |
|---|
| 56 | |
|---|
| 57 | |
|---|
| 58 | # Check for various broken functions |
|---|
| 59 | AC_FUNC_MALLOC |
|---|
| 60 | AC_FUNC_REALLOC |
|---|
| 61 | |
|---|
| 62 | # *BSD doesn't have strndup. Currently provide our own. |
|---|
| 63 | AC_REPLACE_FUNCS(strndup) |
|---|
| 64 | |
|---|
| 65 | # Checks for header files. |
|---|
| 66 | AC_HEADER_STDC |
|---|
| 67 | dnl AC_CHECK_HEADERS(errno.h stdlib.h stdio.h assert.h string.h netinet/in.h assert.h errno.h fcntl.h net/ethernet.h netdb.h pcap.h stdio.h stdlib.h string.h sys/stat.h sys/types.h sys/socket.h sys/un.h unistd.h time.h sys/ioctl.h net/bpf.h pcap.h zlib.h pcap-bpf.h) |
|---|
| 68 | AC_CHECK_HEADERS(pcap.h pcap-int.h pcap-bpf.h net/bpf.h zlib.h sys/limits.h stddef.h inttypes.h limits.h net/ethernet.h ) |
|---|
| 69 | |
|---|
| 70 | AC_CHECK_HEADERS(netinet/in.h) |
|---|
| 71 | AC_CHECK_HEADER(netpacket/packet.h, |
|---|
| 72 | libtrace_netpacket_packet_h=true |
|---|
| 73 | AC_DEFINE(HAVE_NETPACKET_PACKET_H,1,[We have netpacket/packet.h]), |
|---|
| 74 | [libtrace_netpacket_packet_h=false]) |
|---|
| 75 | |
|---|
| 76 | AC_CHECK_HEADER(net/if.h, |
|---|
| 77 | AC_DEFINE(HAVE_NET_IF_H,1,[We have net/if.h]), [], |
|---|
| 78 | [#include <sys/types.h> |
|---|
| 79 | #include <sys/socket.h> |
|---|
| 80 | ]) |
|---|
| 81 | |
|---|
| 82 | |
|---|
| 83 | AC_CHECK_HEADER(netinet/ether.h, |
|---|
| 84 | AC_DEFINE(HAVE_NETINET_ETHER_H,1,[We have netinet/ether.h] |
|---|
| 85 | ), [], |
|---|
| 86 | [ |
|---|
| 87 | #include <sys/types.h> |
|---|
| 88 | #include <sys/socket.h> |
|---|
| 89 | #include <netinet/in.h> |
|---|
| 90 | #include <net/if.h> |
|---|
| 91 | ]) |
|---|
| 92 | |
|---|
| 93 | AC_CHECK_HEADER(netinet/if_ether.h, |
|---|
| 94 | AC_DEFINE(HAVE_NETINET_IF_ETHER_H,1,[We have netinet/if_ether.h]), [], |
|---|
| 95 | [ |
|---|
| 96 | #include <sys/types.h> |
|---|
| 97 | #include <sys/socket.h> |
|---|
| 98 | #include <netinet/in.h> |
|---|
| 99 | #include <net/if.h> |
|---|
| 100 | ]) |
|---|
| 101 | |
|---|
| 102 | AC_CHECK_HEADER(net/if_arp.h, |
|---|
| 103 | AC_DEFINE(HAVE_NET_IF_ARP_H,1,[We have net/if_arp.h]), [], |
|---|
| 104 | [ |
|---|
| 105 | #include <sys/types.h> |
|---|
| 106 | #include <sys/socket.h> |
|---|
| 107 | #include <netinet/in.h> |
|---|
| 108 | #include <net/if.h> |
|---|
| 109 | ]) |
|---|
| 110 | |
|---|
| 111 | |
|---|
| 112 | # Checking for the right bpf header to include |
|---|
| 113 | AC_MSG_CHECKING([where the bpf headers are kept]) |
|---|
| 114 | echo "" |
|---|
| 115 | bpfh=no |
|---|
| 116 | AC_CHECK_HEADER(pcap-bpf.h, |
|---|
| 117 | [AC_DEFINE([HAVE_PCAP_BPF_H]) bpfh=pcap-bpf.h]) |
|---|
| 118 | if test $bpfh = no; then |
|---|
| 119 | AC_CHECK_HEADER(net/bpf.h, |
|---|
| 120 | [AC_DEFINE([HAVE_NET_BPF_H]) bpfh=net/bpf.h]) |
|---|
| 121 | fi |
|---|
| 122 | |
|---|
| 123 | if test $bpfh = no; then |
|---|
| 124 | AC_MSG_RESULT([No BPF headers, compiling without support for BPF filters]) |
|---|
| 125 | AC_DEFINE(HAVE_BPF,0,[Conditional for building bpf support]) |
|---|
| 126 | libtrace_bpf=false |
|---|
| 127 | else |
|---|
| 128 | AC_MSG_RESULT([Using $bpfh]) |
|---|
| 129 | AC_DEFINE(HAVE_BPF,1,[Conditional for building bpf support]) |
|---|
| 130 | libtrace_bpf=true |
|---|
| 131 | fi |
|---|
| 132 | |
|---|
| 133 | |
|---|
| 134 | AC_CHECK_HEADER(gdc.h, |
|---|
| 135 | [AC_DEFINE(HAVE_GDC_H,1,[Conditional for building with libGDC support]) libtrace_gdc=true], |
|---|
| 136 | [AC_DEFINE(HAVE_GDC_H,0,[Conditional for building with libGDC support]) libtrace_gdc=false]) |
|---|
| 137 | |
|---|
| 138 | # Check to see if we have libdl - *BSD has built-in libdl |
|---|
| 139 | AC_CHECK_LIB(dl, dlopen, libtrace_dl=true, libtrace_dl=false) |
|---|
| 140 | if test "$libtrace_dl" = true; then |
|---|
| 141 | AC_DEFINE(HAVE_LIBDL,1,[Conditional for building with dynamic library support]) |
|---|
| 142 | ADD_LIBS="$ADD_LIBS -ldl" |
|---|
| 143 | else |
|---|
| 144 | AC_DEFINE(HAVE_LIBDL,0,[Conditional for building with dynamic library support]) |
|---|
| 145 | fi |
|---|
| 146 | |
|---|
| 147 | |
|---|
| 148 | # Check to see if we have libpcap |
|---|
| 149 | AC_CHECK_LIB(pcap,pcap_open_live, |
|---|
| 150 | libtrace_pcap=true, |
|---|
| 151 | libtrace_pcap=false) |
|---|
| 152 | |
|---|
| 153 | if test "$libtrace_pcap" = true; then |
|---|
| 154 | AC_DEFINE(HAVE_PCAP,1,[Conditional for building PCAP support]) |
|---|
| 155 | ADD_LIBS="$ADD_LIBS -lpcap" |
|---|
| 156 | else |
|---|
| 157 | AC_DEFINE(HAVE_PCAP,0,[Conditional for building PCAP support]) |
|---|
| 158 | fi |
|---|
| 159 | |
|---|
| 160 | # Only test for these functions if we have PCAP installed |
|---|
| 161 | if test "$libtrace_pcap" = true; then |
|---|
| 162 | # Earlier versions of pcap don't have pcap_open_dead. EG: the one |
|---|
| 163 | # OpenBSD ships with. Even Debian Woody is more up to date. |
|---|
| 164 | AC_CHECK_LIB(pcap,pcap_open_dead, |
|---|
| 165 | have_pcap_open_dead=true, |
|---|
| 166 | have_pcap_open_dead=false) |
|---|
| 167 | |
|---|
| 168 | if test "$have_pcap_open_dead" = false; then |
|---|
| 169 | AC_REPLACE_FUNCS(pcap_open_dead) |
|---|
| 170 | fi |
|---|
| 171 | |
|---|
| 172 | # Versions of libpcap earlier than 0.8 don't have pcap_dump_flush or |
|---|
| 173 | # pcap_next_ex |
|---|
| 174 | AC_CHECK_LIB(pcap,pcap_dump_flush, |
|---|
| 175 | have_pcap_dump_flush=true, |
|---|
| 176 | have_pcap_dump_flush=false) |
|---|
| 177 | |
|---|
| 178 | if test "$have_pcap_dump_flush" = false; then |
|---|
| 179 | AC_REPLACE_FUNCS(pcap_dump_flush) |
|---|
| 180 | fi |
|---|
| 181 | |
|---|
| 182 | AC_CHECK_LIB(pcap,pcap_next_ex, |
|---|
| 183 | have_pcap_next_ex=true, |
|---|
| 184 | have_pcap_next_ex=false) |
|---|
| 185 | |
|---|
| 186 | if test "$have_pcap_next_ex" = false; then |
|---|
| 187 | AC_REPLACE_FUNCS(pcap_next_ex) |
|---|
| 188 | fi |
|---|
| 189 | |
|---|
| 190 | AC_CHECK_LIB(pcap,pcap_inject, |
|---|
| 191 | AC_DEFINE(HAVE_PCAP_INJECT,1,[pcap has pcap_inject]), |
|---|
| 192 | have_pcap_inject=false) |
|---|
| 193 | |
|---|
| 194 | AC_CHECK_LIB(pcap,pcap_sendpacket, |
|---|
| 195 | AC_DEFINE(HAVE_PCAP_SENDPACKET,1,[pcap has pcap_sendpacket]), |
|---|
| 196 | have_pcap_sendpacket=false) |
|---|
| 197 | |
|---|
| 198 | AC_CHECK_LIB(pcap,pcap_setnonblock, |
|---|
| 199 | AC_DEFINE(HAVE_PCAP_SETNONBLOCK,1,[pcap has pcap_setnonblock]), |
|---|
| 200 | have_pcap_setnonblock=false) |
|---|
| 201 | fi |
|---|
| 202 | |
|---|
| 203 | |
|---|
| 204 | # configure time options for man pages |
|---|
| 205 | AC_ARG_WITH(man, |
|---|
| 206 | AC_HELP_STRING([--with-man], |
|---|
| 207 | [install man pages by default]), |
|---|
| 208 | |
|---|
| 209 | if test "$withval" = yes |
|---|
| 210 | then |
|---|
| 211 | MANPAGES="docs/man/man3/[a-zA-Z]*.3]" |
|---|
| 212 | else |
|---|
| 213 | MANPAGES="" |
|---|
| 214 | fi |
|---|
| 215 | ) |
|---|
| 216 | |
|---|
| 217 | # configure time option for building libpacketdump |
|---|
| 218 | # libpacketdump needs a C++ compiler to build, so we should do some tests |
|---|
| 219 | # at this point to see if one is installed |
|---|
| 220 | libtrace_libpacketdump=true |
|---|
| 221 | AC_ARG_ENABLE(libpacketdump, |
|---|
| 222 | AC_HELP_STRING([--disable-libpacketdump], |
|---|
| 223 | [disable building of libpacketdump (enabled by default). libpacketdump needs a c++ compiler to build] ), |
|---|
| 224 | [ |
|---|
| 225 | if test "$enableval" = no -o "$enableval" = false |
|---|
| 226 | then |
|---|
| 227 | libtrace_libpacketdump=false |
|---|
| 228 | else |
|---|
| 229 | libtrace_libpacketdump=true |
|---|
| 230 | fi |
|---|
| 231 | ], |
|---|
| 232 | [ |
|---|
| 233 | libtrace_libpacketdump=true |
|---|
| 234 | ]) |
|---|
| 235 | |
|---|
| 236 | if test "$libtrace_libpacketdump" = true; then |
|---|
| 237 | AC_LANG_PUSH(C++) |
|---|
| 238 | AC_MSG_CHECKING([if we can compile C++ ]) |
|---|
| 239 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( |
|---|
| 240 | [[ |
|---|
| 241 | #include <iostream> |
|---|
| 242 | ]])], |
|---|
| 243 | [AC_DEFINE(HAVE_CXX,1,[define to test for presence of a working C++ compiler]) libtrace_cxx=true], |
|---|
| 244 | [AC_DEFINE(HAVE_CXX,0,[define to test for presence of a working C++ compiler]) libtrace_cxx=false]) |
|---|
| 245 | |
|---|
| 246 | AC_MSG_RESULT($libtrace_cxx) |
|---|
| 247 | AC_LANG_POP(C++) |
|---|
| 248 | |
|---|
| 249 | if test "$libtrace_cxx" = false; then |
|---|
| 250 | AC_MSG_ERROR([libpacketdump requested, but no C++ compiler found. Build with --disable-libpacketdump if you wish to continue anyway ]) |
|---|
| 251 | fi |
|---|
| 252 | fi |
|---|
| 253 | |
|---|
| 254 | # configure time option for building the libtrace tools |
|---|
| 255 | # one of the tools requires libpacketdump, so won't build if libpacketdump |
|---|
| 256 | # hasn't also been built |
|---|
| 257 | libtrace_tools=true |
|---|
| 258 | AC_ARG_ENABLE(tools, |
|---|
| 259 | AC_HELP_STRING([--disable-tools], |
|---|
| 260 | [disable building of the tools contained in the tools/ directory]), |
|---|
| 261 | [ |
|---|
| 262 | if test "$enableval" = no -o "$enableval" = false |
|---|
| 263 | then |
|---|
| 264 | libtrace_tools=false |
|---|
| 265 | else |
|---|
| 266 | libtrace_tools=true |
|---|
| 267 | fi |
|---|
| 268 | |
|---|
| 269 | ], |
|---|
| 270 | [ |
|---|
| 271 | libtrace_tools=true |
|---|
| 272 | ]) |
|---|
| 273 | |
|---|
| 274 | # configure time options for use of DAG cards |
|---|
| 275 | # borrowed from libpcap! |
|---|
| 276 | AC_ARG_WITH(dag, |
|---|
| 277 | AC_HELP_STRING([--with-dag[=DIR]], |
|---|
| 278 | [include DAG support (located in directory DIR, if supplied)]), |
|---|
| 279 | [ |
|---|
| 280 | if test "$withval" = no |
|---|
| 281 | then |
|---|
| 282 | want_dag=no |
|---|
| 283 | elif test "$withval" = yes |
|---|
| 284 | then |
|---|
| 285 | want_dag=yes |
|---|
| 286 | dag_root=/root/dag |
|---|
| 287 | else |
|---|
| 288 | want_dag=yes |
|---|
| 289 | dag_root=$withval |
|---|
| 290 | fi |
|---|
| 291 | ],[ |
|---|
| 292 | # |
|---|
| 293 | # Use DAG API if present, otherwise don't |
|---|
| 294 | # |
|---|
| 295 | want_dag=ifpresent |
|---|
| 296 | dag_root=/root/dag/ |
|---|
| 297 | ]) |
|---|
| 298 | |
|---|
| 299 | # turn the test part of the next block into a function, so it can be |
|---|
| 300 | # called multiple times for $dag_root, /root/dag, /usr/local/lib |
|---|
| 301 | libtrace_dag=false |
|---|
| 302 | libtrace_dag2_4=false |
|---|
| 303 | if test "$with_dag" != no; then |
|---|
| 304 | AC_MSG_CHECKING(whether we have DAG API) |
|---|
| 305 | |
|---|
| 306 | if test -r "$dag_root/lib"; then |
|---|
| 307 | dag_lib_dir="$dag_root/lib" |
|---|
| 308 | else |
|---|
| 309 | dag_lib_dir="$dag_root" |
|---|
| 310 | fi |
|---|
| 311 | |
|---|
| 312 | if test -r "$dag_root/tools" -a -r "$dag_root/include"; then |
|---|
| 313 | dag_tools_dir="$dag_root/tools" |
|---|
| 314 | dag_include_dir="$dag_root/include" |
|---|
| 315 | else |
|---|
| 316 | dag_tools_dir="$dag_root" |
|---|
| 317 | dag_include_dir="$dag_root" |
|---|
| 318 | fi |
|---|
| 319 | |
|---|
| 320 | if test -r "$dag_include_dir/dagapi.h" -a -r "$dag_lib_dir/libdag.a"; |
|---|
| 321 | then |
|---|
| 322 | ADD_INCLS="$ADD_INCLS -I $dag_include_dir" |
|---|
| 323 | ADD_LIBS="$ADD_LIBS -ldag" |
|---|
| 324 | ADD_LDFLAGS="$ADD_LDFLAGS -L$dag_lib_dir" |
|---|
| 325 | DAG_TOOLS_DIR=$dag_tools_dir |
|---|
| 326 | AC_SUBST([DAG_TOOLS_DIR]) |
|---|
| 327 | libtrace_dag=true |
|---|
| 328 | |
|---|
| 329 | AC_DEFINE(HAVE_DAG_API, 1, [define if you have a DAG API]) |
|---|
| 330 | AC_DEFINE(HAVE_DAG,1,[conditional for building with DAG support]) |
|---|
| 331 | else |
|---|
| 332 | if test "$want_dag" = yes; then |
|---|
| 333 | AC_MSG_ERROR(DAG API not found under directory $dag_root |
|---|
| 334 | ; use --without-dag) |
|---|
| 335 | fi |
|---|
| 336 | libtrace_dag=false |
|---|
| 337 | fi |
|---|
| 338 | AC_MSG_RESULT($libtrace_dag) |
|---|
| 339 | |
|---|
| 340 | AC_MSG_CHECKING(if we are using DAG 2.4) |
|---|
| 341 | if grep '2.4.' $dag_root/VERSION > /dev/null 2>&1; then |
|---|
| 342 | libtrace_dag2_4=true |
|---|
| 343 | AC_DEFINE(DAG_VERSION_2_4, 1, [define if using DAG 2.4]) |
|---|
| 344 | else |
|---|
| 345 | libtrace_dag2_4=false |
|---|
| 346 | fi |
|---|
| 347 | AC_MSG_RESULT($libtrace_dag2_4) |
|---|
| 348 | else |
|---|
| 349 | AC_DEFINE(HAVE_DAG,0,[conditional for building with DAG support]) |
|---|
| 350 | fi |
|---|
| 351 | |
|---|
| 352 | |
|---|
| 353 | |
|---|
| 354 | |
|---|
| 355 | |
|---|
| 356 | AC_ARG_WITH([zlib], |
|---|
| 357 | AC_HELP_STRING([--with-zlib], |
|---|
| 358 | [name of zlib library (default is z)]), |
|---|
| 359 | [ac_cv_use_zlib=$withval], |
|---|
| 360 | [ac_cv_use_zlib=z]) |
|---|
| 361 | |
|---|
| 362 | AC_ARG_WITH([zlib-path], |
|---|
| 363 | AC_HELP_STRING([--with-zlib-path], |
|---|
| 364 | [location of zlib library (default is /usr/lib)]), |
|---|
| 365 | [ac_cv_use_zlib_path=$withval], |
|---|
| 366 | [ac_cv_use_zlib_path=/usr/lib]) |
|---|
| 367 | |
|---|
| 368 | libtrace_zlib=false |
|---|
| 369 | if test "$ac_cv_use_zlib" != no; then |
|---|
| 370 | |
|---|
| 371 | zlib_lib_file="${ac_cv_use_zlib_path}/lib${ac_cv_use_zlib}.so" |
|---|
| 372 | |
|---|
| 373 | # if the library is in /usr/lib/, then just use AC_CHECK_LIB |
|---|
| 374 | if test x"${ac_cv_use_zlib_path}" == x"/usr/lib"; then |
|---|
| 375 | AC_CHECK_LIB(${ac_cv_use_zlib}, gzopen, |
|---|
| 376 | libtrace_zlib=true, |
|---|
| 377 | libtrace_zlib=false) |
|---|
| 378 | else |
|---|
| 379 | ADD_LDFLAGS="$ADD_LDFLAGS -L$ac_cv_use_zlib_path" |
|---|
| 380 | # if it's not in /usr/lib/, check manually. This isn't nice |
|---|
| 381 | # and will probably break. |
|---|
| 382 | if test ! -r "$ac_cv_use_zlib_path" -o ! -r "$zlib_lib_file"; then |
|---|
| 383 | AC_MSG_NOTICE([Cannot find zlib library $zlib_lib_file.]) |
|---|
| 384 | AC_MSG_ERROR([Exiting]); |
|---|
| 385 | else |
|---|
| 386 | libtrace_zlib=true |
|---|
| 387 | fi |
|---|
| 388 | fi |
|---|
| 389 | fi |
|---|
| 390 | |
|---|
| 391 | if test $libtrace_zlib = true; then |
|---|
| 392 | ADD_LIBS="$ADD_LIBS -l$ac_cv_use_zlib" |
|---|
| 393 | AC_DEFINE(HAVE_ZLIB,1,[Conditional for building zlib support]) |
|---|
| 394 | else |
|---|
| 395 | AC_DEFINE(HAVE_ZLIB,0,[Conditional for building zlib support]) |
|---|
| 396 | fi |
|---|
| 397 | |
|---|
| 398 | AM_CONDITIONAL([HAVE_DAG], [test "$libtrace_dag" = true]) |
|---|
| 399 | AM_CONDITIONAL([DAG2_4], [test "$libtrace_dag2_4" = true]) |
|---|
| 400 | AM_CONDITIONAL([HAVE_CXX], [test "$libtrace_cxx" = true]) |
|---|
| 401 | AM_CONDITIONAL([HAVE_ZLIB], [test "$libtrace_zlib" = true]) |
|---|
| 402 | AM_CONDITIONAL([HAVE_NETPACKET_PACKET_H], [test "$libtrace_netpacket_packet_h" = true]) |
|---|
| 403 | AM_CONDITIONAL([LIBPACKETDUMP], [test "$libtrace_libpacketdump" = true]) |
|---|
| 404 | AM_CONDITIONAL([LIBTRACE_TOOLS], [test "$libtrace_tools" = true]) |
|---|
| 405 | AM_CONDITIONAL([LIBGDC], [test "$libtrace_gdc" = true]) |
|---|
| 406 | |
|---|
| 407 | |
|---|
| 408 | # Check for miscellaneous programs |
|---|
| 409 | AC_CHECK_PROG([libtrace_doxygen], [doxygen], [true], [false]) |
|---|
| 410 | |
|---|
| 411 | AM_CONDITIONAL(HAS_DOXYGEN, [test x"$libtrace_doxygen" = xtrue]) |
|---|
| 412 | |
|---|
| 413 | |
|---|
| 414 | AC_SUBST([ADD_LIBS]) |
|---|
| 415 | AC_SUBST([ADD_LDFLAGS]) |
|---|
| 416 | AC_SUBST([ADD_INCLS]) |
|---|
| 417 | AC_SUBST([LTLIBOBJS]) |
|---|
| 418 | AC_SUBST([MANPAGES]) |
|---|
| 419 | AC_SUBST([PACKAGE_VERSION]) |
|---|
| 420 | AC_SUBST([LIBTRACE_MAJOR]) |
|---|
| 421 | AC_SUBST([LIBTRACE_MID]) |
|---|
| 422 | AC_SUBST([LIBTRACE_MINOR]) |
|---|
| 423 | |
|---|
| 424 | dnl and finally, output our Makefiles |
|---|
| 425 | AC_OUTPUT |
|---|
| 426 | |
|---|
| 427 | reportopt() { |
|---|
| 428 | if test x"$2" = xtrue -o x"$2" = xyes; then |
|---|
| 429 | AC_MSG_NOTICE([$1: Yes]) |
|---|
| 430 | else |
|---|
| 431 | AC_MSG_NOTICE([$1: No]) |
|---|
| 432 | fi |
|---|
| 433 | } |
|---|
| 434 | |
|---|
| 435 | AC_MSG_NOTICE([Libtrace version $PACKAGE_VERSION]) |
|---|
| 436 | reportopt "Compiled with BPF filter support" $libtrace_bpf |
|---|
| 437 | reportopt "Compiled with PCAP support" $libtrace_pcap |
|---|
| 438 | reportopt "Compiled with compressed trace (zlib) support" $libtrace_zlib |
|---|
| 439 | reportopt "Compiled with DAG support (libdag)" $libtrace_dag |
|---|
| 440 | reportopt "Compiled with DAG support (DAG 2.4)" $libtrace_dag2_4 |
|---|
| 441 | reportopt "Building man pages/documentation" $libtrace_doxygen |
|---|
| 442 | reportopt "Building libpacketdump" $libtrace_libpacketdump |
|---|
| 443 | reportopt "Building tools/ directory" $libtrace_tools |
|---|
| 444 | |
|---|