Changeset 7d31d26


Ignore:
Timestamp:
08/10/04 14:53:46 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
20b0755
Parents:
fdc49d0
Message:

added in macros to let you specify which pcap and zlib to link against

File:
1 edited

Legend:

Unmodified
Added
Removed
  • configure.in

    r14e60c60 r7d31d26  
    11dnl Process this file with autoconf to produce a configure script.
    22AC_INIT(lib/trace.c)
    3 AM_INIT_AUTOMAKE(libtrace,[1.1.0],[libtrace@wand.net.nz])
     3AM_INIT_AUTOMAKE(libtrace,[2.0.0],[libtrace@wand.net.nz])
    44
    55AC_PREREQ(2.5)
     
    1313dnl Checks for libraries.
    1414dnl Replace `main' with a function in -lpcap:
    15 AC_CHECK_LIB(pcap, pcap_open_dead)
     15dnl AC_CHECK_LIB(pcap, pcap_open_dead)
    1616dnl Replace `main' with a function in -lz:
    17 AC_CHECK_LIB(z, gzread)
     17dnl AC_CHECK_LIB(z, gzread)
    1818
    1919dnl Checks for header files.
     
    3131AC_CHECK_FUNCS(socket strdup)
    3232
     33AC_DEFUN([CHECK_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([CHECK_LIBZ],
     42         [AC_ARG_WITH([zlib],
     43                      AC_HELP_STRING([--with-zlib],
     44                                     [name of zlib library (default is z)]),
     45                      [ac_cv_use_zlib=$withval], [ac_cv_use_zlib=z])
     46AC_CACHE_CHECK([which zlib library to use],
     47               [ac_cv_use_zlib], [ac_cv_use_zlib=z])])
     48
     49CHECK_LIBPCAP
     50CHECK_LIBZ
     51
     52LIBPCAP=-l$ac_cv_use_pcap
     53AC_SUBST([LIBPCAP])
     54
     55LIBZ=-l$ac_cv_use_zlib
     56AC_SUBST([LIBZ])
     57
    3358AC_OUTPUT(Makefile lib/Makefile)
Note: See TracChangeset for help on using the changeset viewer.