source: configure.in @ 97eadcc

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

support for largefiles

  • Property mode set to 100644
File size: 2.7 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
7AC_CONFIG_HEADERS(config.h)
8dnl Checks for programs.
9AC_PROG_CC
10AC_PROG_INSTALL
11AC_PROG_LIBTOOL
12
13
14dnl GNU C library
15AC_GNU_SOURCE
16
17dnl Checks for header files.
18AC_HEADER_STDC
19dnl 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)
20AC_CHECK_HEADERS(pcap.h zlib.h pcap-bpf.h net/bpf.h)
21
22dnl Checks for typedefs, structures, and compiler characteristics.
23AC_C_CONST
24AC_C_INLINE
25AC_C_BIGENDIAN
26AC_TYPE_SIZE_T
27AC_HEADER_TIME
28
29dnl Checks for library functions.
30AC_PROG_GCC_TRADITIONAL
31AC_CHECK_FUNCS(socket strdup)
32
33
34dnl we need large files
35AC_SYS_LARGEFILE
36
37dnl check to make sure we have 64 bit file support
38
39
40dnl configure time options for selecting which libpcap and libz to use
41dnl this is provided to allow for systems whose default libraries don't support
42dnl large files - you can build your own and link using these options
43AC_DEFUN([CHECK_LIBPCAP],
44         [AC_ARG_WITH([pcap],
45                      AC_HELP_STRING([--with-pcap],
46                                     [name of pcap library (default is pcap)]),
47                      [ac_cv_use_pcap=$withval], [ac_cv_use_pcap=pcap])
48AC_CACHE_CHECK([which pcap library to use],
49               [ac_cv_use_pcap], [ac_cv_use_pcap=pcap])])
50
51AC_DEFUN([CHECK_LIBPCAP_PATH],
52         [AC_ARG_WITH([pcap-path],
53                      AC_HELP_STRING([--with-pcap-path],
54                                     [location of pcap library (default is /usr/lib)]),
55                      [ac_cv_use_pcap_path=$withval], [ac_cv_use_pcap_path=/usr/lib])
56AC_CACHE_CHECK([location of pcap library],
57               [ac_cv_use_pcap_path], [ac_cv_use_pcap_path=/usr/lib])])
58
59
60AC_DEFUN([CHECK_LIBZ],
61         [AC_ARG_WITH([zlib],
62                      AC_HELP_STRING([--with-zlib],
63                                     [name of zlib library (default is z)]),
64                      [ac_cv_use_zlib=$withval], [ac_cv_use_zlib=z])
65AC_CACHE_CHECK([which zlib library to use],
66               [ac_cv_use_zlib], [ac_cv_use_zlib=z])])
67
68AC_DEFUN([CHECK_LIBZ_PATH],
69        [AC_ARG_WITH([zlib-path],
70                AC_HELP_STRING([--with-zlib-path],
71                        [location of zlib library (default is /usr/lib)]),
72                [ac_cv_use_zlib_path=$withval], [ac_cv_use_zlib_path=/usr/lib])
73AC_CACHE_CHECK([location of zlib library],
74               [ac_cv_use_zlib_path], [ac_cv_use_zlib_path=/usr/lib])])
75
76CHECK_LIBPCAP
77CHECK_LIBPCAP_PATH
78CHECK_LIBZ
79CHECK_LIBZ_PATH
80
81LIBPCAP=-l$ac_cv_use_pcap
82LIBPCAP_PATH=-L$ac_cv_use_pcap_path
83
84AC_SUBST([LIBPCAP])
85AC_SUBST([LIBPCAP_PATH])
86
87LIBZ=-l$ac_cv_use_zlib
88LIBZ_PATH=-L$ac_cv_use_zlib_path
89AC_SUBST([LIBZ])
90AC_SUBST([LIBZ_PATH])
91
92AC_OUTPUT(Makefile lib/Makefile)
Note: See TracBrowser for help on using the repository browser.