source: configure.in @ 0654f5a

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 0654f5a was 0654f5a, checked in by Daniel Lawson <dlawson@…>, 17 years ago

added support for pathing for extra pcap and zlib

  • Property mode set to 100644
File size: 2.4 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(lib/trace.c)
3AM_INIT_AUTOMAKE(libtrace,[2.0.0],[libtrace@wand.net.nz])
4
5AC_PREREQ(2.5)
6
7AM_CONFIG_HEADER(config.h)
8dnl Checks for programs.
9AC_PROG_CC
10AC_PROG_INSTALL
11AC_PROG_LIBTOOL
12
13dnl Checks for libraries.
14dnl Replace `main' with a function in -lpcap:
15dnl AC_CHECK_LIB(pcap, pcap_open_dead)
16dnl Replace `main' with a function in -lz:
17dnl AC_CHECK_LIB(z, gzread)
18
19dnl Checks for header files.
20AC_HEADER_STDC
21AC_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)
22
23dnl Checks for typedefs, structures, and compiler characteristics.
24AC_C_CONST
25AC_C_INLINE
26AC_TYPE_SIZE_T
27AC_HEADER_TIME
28
29dnl Checks for library functions.
30AC_PROG_GCC_TRADITIONAL
31AC_CHECK_FUNCS(socket strdup)
32
33AC_DEFUN([WITH_LIBPCAP],
34         [AC_ARG_WITH([pcap],
35                      AC_HELP_STRING([--with-pcap],
36                                     [name of pcap library (default is pcap)]),
37                      [ac_cv_use_pcap=$withval], [ac_cv_use_pcap=pcap])
38AC_CACHE_CHECK([which pcap library to use],
39               [ac_cv_use_pcap], [ac_cv_use_pcap=pcap])])
40
41AC_DEFUN([WITH_LIBPCAP_PATH],
42         [AC_ARG_WITH([pcap-path],
43                      AC_HELP_STRING([--with-pcap-path],
44                                     [location of pcap library (default is /usr/lib)]),
45                      [ac_cv_use_pcap_path=$withval], [ac_cv_use_pcap_path=/usr/lib])
46AC_CACHE_CHECK([location of pcap library],
47               [ac_cv_use_pcap_path], [ac_cv_use_pcap_path=/usr/lib])])
48
49AC_DEFUN([WITH_LIBZ],
50         [AC_ARG_WITH([zlib],
51                      AC_HELP_STRING([--with-zlib],
52                                     [name of zlib library (default is z)]),
53                      [ac_cv_use_zlib=$withval], [ac_cv_use_zlib=z])
54AC_CACHE_CHECK([which zlib library to use],
55               [ac_cv_use_zlib], [ac_cv_use_zlib=z])])
56
57AC_DEFUN([WITH_LIBZ_PATH],
58         [AC_ARG_WITH([zlib-path],
59                      AC_HELP_STRING([--with-zlib-path],
60                                     [location of zlib library (default is /usr/lib)]),
61                      [ac_cv_use_zlib_path=$withval], [ac_cv_use_zlib_path=/usr/lib])
62AC_CACHE_CHECK([location of zlib library],
63               [ac_cv_use_zlib_path], [ac_cv_use_zlib_path=/usr/lib])])
64
65WITH_LIBPCAP
66WITH_LIBPCAP_PATH
67WITH_LIBZ
68WITH_LIBZ_PATH
69
70LIBPCAP=-l$ac_cv_use_pcap
71LIBPCAP_PATH=-L$ac_cv_use_pcap_path
72
73AC_SUBST([LIBPCAP])
74AC_SUBST([LIBPCAP_PATH)]
75
76LIBZ=-l$ac_cv_use_zlib
77LIBZ_PATH=-L$ac_cv_use_zlib_path
78AC_SUBST([LIBZ])
79AC_SUBST([LIBZ_PATH])
80
81AC_OUTPUT(Makefile lib/Makefile)
Note: See TracBrowser for help on using the repository browser.