aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac (renamed from configure.in)66
1 files changed, 35 insertions, 31 deletions
diff --git a/configure.in b/configure.ac
index 575365c..a055c11 100644
--- a/configure.in
+++ b/configure.ac
@@ -1,42 +1,43 @@
1dnl This file is part of IPACCT 1# This file is part of IPACCT
2dnl Copyright (c) Sergey Poznyakoff 2# Copyright (c) Sergey Poznyakoff
3dnl 3#
4dnl This program is free software; you can redistribute it and/or modify 4# This program is free software; you can redistribute it and/or modify
5dnl it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
6dnl the Free Software Foundation; either version 2 of the License, or 6# the Free Software Foundation; either version 2 of the License, or
7dnl (at your option) any later version. 7# (at your option) any later version.
8dnl 8#
9dnl This program is distributed in the hope that it will be useful, 9# This program is distributed in the hope that it will be useful,
10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12dnl GNU General Public License for more details. 12# GNU General Public License for more details.
13dnl 13#
14dnl You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15dnl along with this program; if not, write to the Free Software 15# along with this program; if not, write to the Free Software
16dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17dnl 17#
18AC_INIT(src/ipacct.h) 18AC_PREREQ(2.53)
19AC_INIT(ipacct, 0.2, bug-ipacct@cvs.farlep.net)
20AC_CONFIG_SRCDIR(src/ipacct.h)
19AC_CANONICAL_SYSTEM 21AC_CANONICAL_SYSTEM
20AM_INIT_AUTOMAKE(ipacct, 0.1) 22AM_INIT_AUTOMAKE(no-exeext)
21AM_CONFIG_HEADER(config.h) 23AM_CONFIG_HEADER(config.h)
22 24
23dnl Checks for programs. 25dnl Checks for programs.
24AC_PROG_CC 26AC_PROG_CC
25AC_PROG_YACC 27AC_PROG_YACC
26AM_PROG_LEX 28AM_PROG_LEX
27AC_PROG_INSTALL 29AC_PROG_INSTALL
28AC_PROG_LN_S 30AC_PROG_LN_S
29AC_PROG_RANLIB 31AC_PROG_RANLIB
30AC_ARG_PROGRAM
31 32
32dnl Checks for header files. 33dnl Checks for header files.
33AC_HEADER_STDC 34AC_HEADER_STDC
34AC_HEADER_DIRENT 35AC_HEADER_DIRENT
35AC_HEADER_SYS_WAIT 36AC_HEADER_SYS_WAIT
36AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h malloc.h sys/ioccom.h sys/sockio.h) 37AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h malloc.h sys/ioccom.h sys/sockio.h getopt.h)
37AC_SUBST(INCLUDES) 38AC_SUBST(INCLUDES)
38AC_CHECK_HEADERS(netinet/if_ether.h netinet/ip_var.h, 39AC_CHECK_HEADERS(netinet/if_ether.h netinet/ip_var.h,
39 [], 40 [],
40 [INCLUDES=-I'$(top_srcdir)/libpcap/linux-include'; break]) 41 [INCLUDES=-I'$(top_srcdir)/libpcap/linux-include'; break])
41 42
42dnl Checks for typedefs, structures, and compiler characteristics. 43dnl Checks for typedefs, structures, and compiler characteristics.
@@ -61,12 +62,14 @@ AC_TYPE_SIGNAL
61AC_FUNC_STRFTIME 62AC_FUNC_STRFTIME
62AC_FUNC_VFORK 63AC_FUNC_VFORK
63AC_FUNC_VPRINTF 64AC_FUNC_VPRINTF
64AC_FUNC_WAIT3 65AC_FUNC_WAIT3
65AC_CHECK_FUNCS(ftime gethostname gettimeofday getusershell getwd select socket strdup strerror strtol ether_hostton strerror) 66AC_CHECK_FUNCS(ftime gethostname gettimeofday getusershell getwd select socket strdup strerror strtol ether_hostton strerror)
66 67
68rad_REPLACE_GNU_GETOPT
69
67dnl libpcap stuff 70dnl libpcap stuff
68dnl All the stuff below has been shamelessly stolen from libpcap-0.4 71dnl All the stuff below has been shamelessly stolen from libpcap-0.4
69dnl configure.in 72dnl configure.in
70dnl 73dnl
71dnl Not all versions of test support -c (character special) but it's a 74dnl Not all versions of test support -c (character special) but it's a
72dnl better way of testing since the device might be protected. So we 75dnl better way of testing since the device might be protected. So we
@@ -109,20 +112,21 @@ case "$V_PCAP" in
109 112
110dlpi) 113dlpi)
111 AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h) 114 AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h)
112 AC_MSG_CHECKING(for /dev/dlpi device) 115 AC_MSG_CHECKING(for /dev/dlpi device)
113 if test -c /dev/dlpi ; then 116 if test -c /dev/dlpi ; then
114 AC_MSG_RESULT(yes) 117 AC_MSG_RESULT(yes)
115 AC_DEFINE(HAVE_DEV_DLPI) 118 AC_DEFINE(HAVE_DEV_DLPI,1,[Define this if you have /dev/dlpi])
116 else 119 else
117 AC_MSG_RESULT(no) 120 AC_MSG_RESULT(no)
118 dir="/dev/dlpi" 121 dir="/dev/dlpi"
119 AC_MSG_CHECKING(for $dir directory) 122 AC_MSG_CHECKING(for $dir directory)
120 if test -d $dir ; then 123 if test -d $dir ; then
121 AC_MSG_RESULT(yes) 124 AC_MSG_RESULT(yes)
122 AC_DEFINE_UNQUOTED(PCAP_DEV_PREFIX, "$dir") 125 AC_DEFINE_UNQUOTED(PCAP_DEV_PREFIX, "$dir",
126 [Path to pcap device])
123 else 127 else
124 AC_MSG_RESULT(no) 128 AC_MSG_RESULT(no)
125 fi 129 fi
126 fi 130 fi
127 ;; 131 ;;
128 132
@@ -145,47 +149,46 @@ null)
145 149
146esac 150esac
147 151
148case "$target_os" in 152case "$target_os" in
149 153
150aix*) 154aix*)
151 dnl Workaround to enable certain features 155 AC_DEFINE(_SUN,1,[workarounds to enable certain features])
152 AC_DEFINE(_SUN)
153 ;; 156 ;;
154 157
155hpux9*) 158hpux9*)
156 AC_DEFINE(HAVE_HPUX9) 159 AC_DEFINE(HAVE_HPUX9,1,[Define this if we are on a HP-UX 9 system])
157 ;; 160 ;;
158 161
159hpux10.0*) 162hpux10.0*)
160 ;; 163 ;;
161 164
162hpux10.1*) 165hpux10.1*)
163 ;; 166 ;;
164 167
165hpux*) 168hpux*)
166 dnl HPUX 10.20 and above is similar to HPUX 9... 169 dnl HPUX 10.20 and above is similar to HPUX 9...
167 AC_DEFINE(HAVE_HPUX10_20) 170 AC_DEFINE(HAVE_HPUX10_20,1,[Define this if we are on a HP-UX 10.20 system])
168 ;; 171 ;;
169 172
170sinix*) 173sinix*)
171 AC_MSG_CHECKING(if SINIX compiler defines sinix) 174 AC_MSG_CHECKING(if SINIX compiler defines sinix)
172 AC_CACHE_VAL(ac_cv_cc_sinix_defined, 175 AC_CACHE_VAL(ac_cv_cc_sinix_defined,
173 AC_TRY_COMPILE( 176 AC_TRY_COMPILE(
174 [], 177 [],
175 [int i = sinix;], 178 [int i = sinix;],
176 ac_cv_cc_sinix_defined=yes, 179 ac_cv_cc_sinix_defined=yes,
177 ac_cv_cc_sinix_defined=no)) 180 ac_cv_cc_sinix_defined=no))
178 AC_MSG_RESULT($ac_cv_cc_sinix_defined) 181 AC_MSG_RESULT($ac_cv_cc_sinix_defined)
179 if test $ac_cv_cc_sinix_defined = no ; then 182 if test $ac_cv_cc_sinix_defined = no ; then
180 AC_DEFINE(sinix) 183 AC_DEFINE(sinix,1,[Define this if we are on a sinix system])
181 fi 184 fi
182 ;; 185 ;;
183 186
184solaris*) 187solaris*)
185 AC_DEFINE(HAVE_SOLARIS) 188 AC_DEFINE(HAVE_SOLARIS,1,[Define this if we are on a Solaris])
186 ;; 189 ;;
187 190
188linux*) 191linux*)
189 V_INCLS="$V_INCLS -Ilinux-include" 192 V_INCLS="$V_INCLS -Ilinux-include"
190 ;; 193 ;;
191esac 194esac
@@ -193,12 +196,13 @@ esac
193AC_MSG_CHECKING(for log facility) 196AC_MSG_CHECKING(for log facility)
194log_facility="LOG_DAEMON" 197log_facility="LOG_DAEMON"
195AC_ARG_WITH(log-facility, 198AC_ARG_WITH(log-facility,
196 [ --with-log-facility=facility enable logging to the given facility], 199 [ --with-log-facility=facility enable logging to the given facility],
197 AC_TRY_COMPILE([#include <syslog.h>], int lf = $withval, 200 AC_TRY_COMPILE([#include <syslog.h>], int lf = $withval,
198 log_facility=$withval)) 201 log_facility=$withval))
199AC_DEFINE_UNQUOTED(LOGFACILITY, $log_facility) 202AC_DEFINE_UNQUOTED(LOGFACILITY, $log_facility,
203 [The syslog facility to be used for diagnostics])
200AC_MSG_RESULT($log_facility) 204AC_MSG_RESULT($log_facility)
201 205
202 206
203AC_OUTPUT(libpcap/Makefile src/Makefile Makefile) 207AC_OUTPUT(libpcap/Makefile lib/Makefile src/Makefile m4/Makefile Makefile)
204 208

Return to:

Send suggestions and report system problems to the System administrator.