diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-06-16 23:09:25 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-06-16 23:09:25 +0000 |
commit | c951d0b590e07b3ea92350749ced92c4e4873786 (patch) | |
tree | de22a2e3f5f3cc93b56ecbfd058765be06b214fb | |
parent | f462c89847e55f14bccbfebde5520c08b23ebbcf (diff) | |
download | ipacct-c951d0b590e07b3ea92350749ced92c4e4873786.tar.gz ipacct-c951d0b590e07b3ea92350749ced92c4e4873786.tar.bz2 |
Switched to autoconf 2.53
-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,48 +1,49 @@ | |||
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. |
43 | AC_C_CONST | 44 | AC_C_CONST |
44 | AC_C_INLINE | 45 | AC_C_INLINE |
45 | AC_TYPE_OFF_T | 46 | AC_TYPE_OFF_T |
46 | AC_TYPE_PID_T | 47 | AC_TYPE_PID_T |
47 | AC_TYPE_SIZE_T | 48 | AC_TYPE_SIZE_T |
48 | AC_STRUCT_ST_RDEV | 49 | AC_STRUCT_ST_RDEV |
@@ -55,24 +56,26 @@ AC_CHECK_LIB(nsl, main) | |||
55 | 56 | ||
56 | dnl Checks for library functions. | 57 | dnl Checks for library functions. |
57 | AC_PROG_GCC_TRADITIONAL | 58 | AC_PROG_GCC_TRADITIONAL |
58 | AC_HEADER_MAJOR | 59 | AC_HEADER_MAJOR |
59 | AC_FUNC_SETPGRP | 60 | AC_FUNC_SETPGRP |
60 | AC_TYPE_SIGNAL | 61 | 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 |
73 | dnl check in our normal order using -r and then check the for the /dev | 76 | dnl check in our normal order using -r and then check the for the /dev |
74 | dnl guys again using -c. | 77 | dnl guys again using -c. |
75 | dnl | 78 | dnl |
76 | AC_SUBST(V_PCAP) | 79 | AC_SUBST(V_PCAP) |
77 | AC_ARG_WITH(pcap, [ --with-pcap=TYPE use packet capture TYPE]) | 80 | AC_ARG_WITH(pcap, [ --with-pcap=TYPE use packet capture TYPE]) |
78 | AC_MSG_CHECKING(packet capture type) | 81 | AC_MSG_CHECKING(packet capture type) |
@@ -103,32 +106,33 @@ elif test -c /dev/nit ; then # check again in case not readable | |||
103 | else | 106 | else |
104 | V_PCAP=null | 107 | V_PCAP=null |
105 | fi | 108 | fi |
106 | AC_MSG_RESULT($V_PCAP) | 109 | AC_MSG_RESULT($V_PCAP) |
107 | 110 | ||
108 | case "$V_PCAP" in | 111 | 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 | ||
129 | linux) | 133 | linux) |
130 | AC_CHECK_HEADERS(net/if_arp.h) | 134 | AC_CHECK_HEADERS(net/if_arp.h) |
131 | AC_MSG_CHECKING(Linux kernel version) | 135 | AC_MSG_CHECKING(Linux kernel version) |
132 | AC_CACHE_VAL(ac_cv_linux_vers, | 136 | AC_CACHE_VAL(ac_cv_linux_vers, |
133 | ac_cv_linux_vers=`uname -r 2>&1 | \ | 137 | ac_cv_linux_vers=`uname -r 2>&1 | \ |
134 | sed -n -e '$s/.* //' -e '$s/\..*//p'`) | 138 | sed -n -e '$s/.* //' -e '$s/\..*//p'`) |
@@ -139,66 +143,66 @@ linux) | |||
139 | ;; | 143 | ;; |
140 | 144 | ||
141 | null) | 145 | null) |
142 | AC_MSG_WARN(cannot determine packet capture interface) | 146 | AC_MSG_WARN(cannot determine packet capture interface) |
143 | AC_MSG_WARN((see the INSTALL doc for more info)) | 147 | AC_MSG_WARN((see the INSTALL doc for more info)) |
144 | ;; | 148 | ;; |
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 |