diff options
-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 @@ | |||
1 | dnl This file is part of IPACCT | 1 | # This file is part of IPACCT |
2 | dnl Copyright (c) Sergey Poznyakoff | 2 | # Copyright (c) Sergey Poznyakoff |
3 | dnl | 3 | # |
4 | dnl 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 |
5 | dnl 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 |
6 | dnl the Free Software Foundation; either version 2 of the License, or | 6 | # the Free Software Foundation; either version 2 of the License, or |
7 | dnl (at your option) any later version. | 7 | # (at your option) any later version. |
8 | dnl | 8 | # |
9 | dnl 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, |
10 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | dnl GNU General Public License for more details. | 12 | # GNU General Public License for more details. |
13 | dnl | 13 | # |
14 | dnl 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 |
15 | dnl along with this program; if not, write to the Free Software | 15 | # along with this program; if not, write to the Free Software |
16 | dnl 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. |
17 | dnl | 17 | # |
18 | AC_INIT(src/ipacct.h) | 18 | AC_PREREQ(2.53) |
19 | AC_INIT(ipacct, 0.2, bug-ipacct@cvs.farlep.net) | ||
20 | AC_CONFIG_SRCDIR(src/ipacct.h) | ||
19 | AC_CANONICAL_SYSTEM | 21 | AC_CANONICAL_SYSTEM |
20 | AM_INIT_AUTOMAKE(ipacct, 0.1) | 22 | AM_INIT_AUTOMAKE(no-exeext) |
21 | AM_CONFIG_HEADER(config.h) | 23 | AM_CONFIG_HEADER(config.h) |
22 | 24 | ||
23 | dnl Checks for programs. | 25 | dnl Checks for programs. |
24 | AC_PROG_CC | 26 | AC_PROG_CC |
25 | AC_PROG_YACC | 27 | AC_PROG_YACC |
26 | AM_PROG_LEX | 28 | AM_PROG_LEX |
27 | AC_PROG_INSTALL | 29 | AC_PROG_INSTALL |
28 | AC_PROG_LN_S | 30 | AC_PROG_LN_S |
29 | AC_PROG_RANLIB | 31 | AC_PROG_RANLIB |
30 | AC_ARG_PROGRAM | ||
31 | 32 | ||
32 | dnl Checks for header files. | 33 | dnl Checks for header files. |
33 | AC_HEADER_STDC | 34 | AC_HEADER_STDC |
34 | AC_HEADER_DIRENT | 35 | AC_HEADER_DIRENT |
35 | AC_HEADER_SYS_WAIT | 36 | AC_HEADER_SYS_WAIT |
36 | AC_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) | 37 | AC_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) |
37 | AC_SUBST(INCLUDES) | 38 | AC_SUBST(INCLUDES) |
38 | AC_CHECK_HEADERS(netinet/if_ether.h netinet/ip_var.h, | 39 | AC_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 | ||
42 | dnl Checks for typedefs, structures, and compiler characteristics. | 43 | dnl Checks for typedefs, structures, and compiler characteristics. |
@@ -61,12 +62,14 @@ AC_TYPE_SIGNAL | |||
61 | AC_FUNC_STRFTIME | 62 | AC_FUNC_STRFTIME |
62 | AC_FUNC_VFORK | 63 | AC_FUNC_VFORK |
63 | AC_FUNC_VPRINTF | 64 | AC_FUNC_VPRINTF |
64 | AC_FUNC_WAIT3 | 65 | AC_FUNC_WAIT3 |
65 | AC_CHECK_FUNCS(ftime gethostname gettimeofday getusershell getwd select socket strdup strerror strtol ether_hostton strerror) | 66 | AC_CHECK_FUNCS(ftime gethostname gettimeofday getusershell getwd select socket strdup strerror strtol ether_hostton strerror) |
66 | 67 | ||
68 | rad_REPLACE_GNU_GETOPT | ||
69 | |||
67 | dnl libpcap stuff | 70 | dnl libpcap stuff |
68 | dnl All the stuff below has been shamelessly stolen from libpcap-0.4 | 71 | dnl All the stuff below has been shamelessly stolen from libpcap-0.4 |
69 | dnl configure.in | 72 | dnl configure.in |
70 | dnl | 73 | dnl |
71 | dnl Not all versions of test support -c (character special) but it's a | 74 | dnl Not all versions of test support -c (character special) but it's a |
72 | dnl better way of testing since the device might be protected. So we | 75 | dnl better way of testing since the device might be protected. So we |
@@ -109,20 +112,21 @@ case "$V_PCAP" in | |||
109 | 112 | ||
110 | dlpi) | 113 | dlpi) |
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 | ||
146 | esac | 150 | esac |
147 | 151 | ||
148 | case "$target_os" in | 152 | case "$target_os" in |
149 | 153 | ||
150 | aix*) | 154 | aix*) |
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 | ||
155 | hpux9*) | 158 | hpux9*) |
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 | ||
159 | hpux10.0*) | 162 | hpux10.0*) |
160 | ;; | 163 | ;; |
161 | 164 | ||
162 | hpux10.1*) | 165 | hpux10.1*) |
163 | ;; | 166 | ;; |
164 | 167 | ||
165 | hpux*) | 168 | hpux*) |
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 | ||
170 | sinix*) | 173 | sinix*) |
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 | ||
184 | solaris*) | 187 | solaris*) |
185 | AC_DEFINE(HAVE_SOLARIS) | 188 | AC_DEFINE(HAVE_SOLARIS,1,[Define this if we are on a Solaris]) |
186 | ;; | 189 | ;; |
187 | 190 | ||
188 | linux*) | 191 | linux*) |
189 | V_INCLS="$V_INCLS -Ilinux-include" | 192 | V_INCLS="$V_INCLS -Ilinux-include" |
190 | ;; | 193 | ;; |
191 | esac | 194 | esac |
@@ -193,12 +196,13 @@ esac | |||
193 | AC_MSG_CHECKING(for log facility) | 196 | AC_MSG_CHECKING(for log facility) |
194 | log_facility="LOG_DAEMON" | 197 | log_facility="LOG_DAEMON" |
195 | AC_ARG_WITH(log-facility, | 198 | AC_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)) |
199 | AC_DEFINE_UNQUOTED(LOGFACILITY, $log_facility) | 202 | AC_DEFINE_UNQUOTED(LOGFACILITY, $log_facility, |
203 | [The syslog facility to be used for diagnostics]) | ||
200 | AC_MSG_RESULT($log_facility) | 204 | AC_MSG_RESULT($log_facility) |
201 | 205 | ||
202 | 206 | ||
203 | AC_OUTPUT(libpcap/Makefile src/Makefile Makefile) | 207 | AC_OUTPUT(libpcap/Makefile lib/Makefile src/Makefile m4/Makefile Makefile) |
204 | 208 | ||