Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 264 lines (225 sloc) 6.823 kB
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
1 dnl Fwknop AutoConf script...
2 dnl =========================
3 dnl
4 dnl Created by Damien Stuart
5 dnl
6 dnl Inspiration from RRDtool configure.ac, the AutoConf Archive
7 dnl (http://www.nongnu.org/autoconf-archive/), and other examples.
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
8
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
9 dnl Minimum Autoconf version required.
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored
10 AC_PREREQ(2.61)
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
11
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
12 dnl Define our name, version and email.
13 m4_define(my_package, [fwknop])
4c995c1 Almost all he conf variables have a default value if they are not the…
Damien Stuart authored
14 m4_define(my_version, [2.0.0rc1])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
15 m4_define(my_bug_email, [dstuart@dstuart.org])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
16
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
17 AC_INIT(my_package, my_version, my_bug_email)
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
18
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
19 AC_CONFIG_AUX_DIR(config)
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
20
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
21 AC_CANONICAL_TARGET
22
2bf25e6 Added perl/legacy distribution (fwknop-1.9.12). Renamed this distrib…
Damien Stuart authored
23 AM_INIT_AUTOMAKE([tar-ustar -Wall -Werror foreign])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
24
bcdef19 Commented out AM_MAINTAINER_MODE.
Damien Stuart authored
25 dnl AM_MAINTAINER_MODE
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
26
27 AC_CONFIG_HEADER([config.h])
28
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
29 dnl The top of our header
30 dnl
31 AH_TOP([
32 #ifndef FWKNOP_CONFIG_H
33 #define FWKNOP_CONFIG_H
34 ])
35
36 dnl The bottom of our header file
37 dnl
38 AH_BOTTOM([
39 #endif /* FWKNOP_CONFIG_H */
40 ])
41
42 dnl Decide whether or not to build the client
43 dnl
44 want_client=yes
45 AC_ARG_ENABLE([client],
46 [AS_HELP_STRING([--disable-client],
47 [Do not build the fwknop client @<:@default is to build@:>@])],
48 [want_client=$enableval],
49 [])
50 AM_CONDITIONAL([WANT_CLIENT], [test "$want_client" = yes])
51
52 dnl Decide whether or not to build the server
53 dnl
54 want_server=yes
55 AC_ARG_ENABLE([server],
56 [AS_HELP_STRING([--disable-server],
57 [Do not build the fwknop server @<:@default is to build@:>@])],
58 [want_server=$enableval],
59 [])
60 AM_CONDITIONAL([WANT_SERVER], [test "$want_server" = yes])
61
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
62 AC_GNU_SOURCE
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
63
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
64 AC_PROG_CC
65 AM_PROG_CC_C_O
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
66 AC_PROG_CPP
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
67 AC_PROG_AWK
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
68 AC_PROG_SED
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
69 AC_PROG_GREP
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
70 AC_PROG_INSTALL
71 AC_PROG_LN_S
72 AC_PROG_MAKE_SET
474a787 more checks for configure. omit salt from Rijndael-encrypted data as…
Damien Stuart authored
73 AC_PROG_RANLIB
e113cb7 Updates to allow for building libfko as a shared lib. (make use of li…
Damien Stuart authored
74 AC_PROG_LIBTOOL
75
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
76 # Checks for header files.
77 #
78 AC_HEADER_STDC
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
79 AC_HEADER_TIME
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
80 AC_HEADER_RESOLV
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
81
b0886a1 Updates and clean-up to address the many compiler warnings when compi…
Damien Stuart authored
82 AC_CHECK_HEADERS([arpa/inet.h ctype.h endian.h errno.h locale.h netdb.h net/ethernet.h netinet/ether.h netinet/ip_icmp.h netinet/in.h netinet/ip.h netinet/tcp.h netinet/udp.h stdint.h stdlib.h string.h strings.h sys/byteorder.h sys/endian.h sys/ethernet.h sys/socket.h sys/stat.h sys/time.h sys/wait.h termios.h time.h unistd.h])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
83
84 # Type checks.
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
85 #
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored
86 AC_C_CONST
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
87 AC_TYPE_INT8_T
88 AC_TYPE_INT16_T
89 AC_TYPE_INT32_T
90 AC_TYPE_INT64_T
91 AC_TYPE_UINT8_T
92 AC_TYPE_UINT16_T
93 AC_TYPE_UINT32_T
94 AC_TYPE_UINT64_T
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
95 AC_TYPE_OFF_T
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
96 AC_TYPE_PID_T
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
97 AC_TYPE_SIZE_T
e3bd3b7 Added additional sanity checks and clean-up of access.conf processing…
Damien Stuart authored
98 AC_TYPE_SSIZE_T
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
99
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored
100 AC_CHECK_SIZEOF(unsigned int)
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
101 dnl AC_CHECK_TYPES([uint8_t, uint32_t])
7f0e7a9 Updated autoconf files and code to support Solaris (ver 10 x86 at lea…
Damien Stuart authored
102
103 AC_C_BIGENDIAN
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
104
153d1ec Added AC_SYS_LARGE_FILE to configure.ac
Damien Stuart authored
105 AC_SYS_LARGEFILE
106
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
107 # Checks for library functions.
108 #
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
109 AC_FUNC_MALLOC
474a787 more checks for configure. omit salt from Rijndael-encrypted data as…
Damien Stuart authored
110 AC_FUNC_REALLOC
be3bb07 Added getpasswd routine for getting a password from the user. A few …
Damien Stuart authored
111 AC_FUNC_STAT
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
112
be3bb07 Added getpasswd routine for getting a password from the user. A few …
Damien Stuart authored
113 AC_CHECK_FUNCS([bzero gettimeofday memmove memset socket strchr strcspn strdup strncasecmp strndup strrchr strspn])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
114
7f0e7a9 Updated autoconf files and code to support Solaris (ver 10 x86 at lea…
Damien Stuart authored
115 AC_SEARCH_LIBS([socket], [socket])
116 AC_SEARCH_LIBS([inet_addr], [nsl])
117
d0373a5 Fixed libfko so gpgme engine is gpg by default. Added functions to l…
Damien Stuart authored
118 # Check for 3rd-party libs
119 #
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
120 AC_ARG_WITH([gpgme],
121 [AS_HELP_STRING([--with-gpgme],
122 [support for gpg encryption using libgpgme @<:@default=check@:>@])],
123 [],
124 [with_gpgme=check])
125
10b308b Fixed configure.ac again (I broke it with my last change). Added fir…
Damien Stuart authored
126 have_gpgme=yes
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
127 AS_IF([test "x$with_gpgme" != xno],
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compi…
Damien Stuart authored
128 [AM_PATH_GPGME([],
129 [AC_DEFINE([HAVE_LIBGPGME], [1], [Define if you have libgpgme])],
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
130 [if test "x$with_gpgme" != xcheck; then
131 AC_MSG_FAILURE(
132 [--with-gpgme was given, but test for gpgme failed])
10b308b Fixed configure.ac again (I broke it with my last change). Added fir…
Damien Stuart authored
133 else
134 have_gpgme=no
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
135 fi
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compi…
Damien Stuart authored
136 ], [have_gpgme=no])], [have_gpgme=no])
137
b6c57aa Changed the way running external commands are hanlded to address issu…
Damien Stuart authored
138 dnl Add various common way to sbin dir to the path (just in case)
139 APP_PATH=$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/usr/local/sbin
140
141 dnl Check for gpg (not gpg2)
142 dnl
143 AC_ARG_WITH([gpg],
144 [AS_HELP_STRING([--with-gpg=/path/to/gpg],
145 [Specify path to the gpg executable that gpgme will use @<:@default=check path@:>@])],
146 [
147 AS_IF([ test "x$withval" = x -o "x$withval" = xyes -o "x$withval" = xno ],
148 [AC_MSG_ERROR([--with-gpg requires an argument specifying a path to gpg])],
9413006 Cleaned out some old commented-out sections configure.ac and fixed an…
Damien Stuart authored
149 [ GPG_EXE=$withval ]
b6c57aa Changed the way running external commands are hanlded to address issu…
Damien Stuart authored
150 )
151 ],
152 [
153 AC_PATH_PROG(GPG_EXE, [gpg], [], [$APP_PATH])
154 ]
155 )
156 AS_IF([test "x$GPG_EXE" != x],
157 [
158 AC_DEFINE_UNQUOTED([GPG_EXE], ["$GPG_EXE"], [Path to gpg executable])
159 gpg_exe=$GPG_EXE
160 ], [ gpg_exe="(not found)"]
161 )
162
8c1261c Fixed memory leak issue in libfko when fko_new_with_data() was called…
Damien Stuart authored
163 dnl Check for libpcap, gdbm (or ndbm) if we are building the server component
791eb40 Added check for libpcap. More stubbing in on the server code side.
Damien Stuart authored
164 dnl
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
165 AS_IF([test "$want_server" = yes], [
9d2a4c2 Fixed autoconf config so libfko and fwknop client are not linked with…
Damien Stuart authored
166 use_ndbm=no
8c1261c Fixed memory leak issue in libfko when fko_new_with_data() was called…
Damien Stuart authored
167 # Looking for libpcap
168 #
9d2a4c2 Fixed autoconf config so libfko and fwknop client are not linked with…
Damien Stuart authored
169 AC_CHECK_LIB([pcap],[pcap_open_live],
170 [ AC_DEFINE([HAVE_LIBPCAP], [1], [Define if you have libpcap]) ],
8c1261c Fixed memory leak issue in libfko when fko_new_with_data() was called…
Damien Stuart authored
171 [ AC_MSG_ERROR([fwknopd needs libpcap])]
172 )
173
174 # Looking for gdbm or fallback to ndbm or bail
175 #
9d2a4c2 Fixed autoconf config so libfko and fwknop client are not linked with…
Damien Stuart authored
176 AC_CHECK_LIB([gdbm],[gdbm_open],
177 [ AC_DEFINE([HAVE_LIBGDBM], [1], [Define if you have libgdbm]) ],
178 [ AC_CHECK_LIB([ndbm],[dbm_open],
179 [
180 AC_DEFINE([HAVE_LIBNDBM], [1], [Define if you have libndbm])
181 use_ndbm=yes
182 ],
8c1261c Fixed memory leak issue in libfko when fko_new_with_data() was called…
Damien Stuart authored
183 [ AC_MSG_ERROR([fwknopd needs either gdbm or ndbm])]
184 )]
791eb40 Added check for libpcap. More stubbing in on the server code side.
Damien Stuart authored
185 )
186
9d2a4c2 Fixed autoconf config so libfko and fwknop client are not linked with…
Damien Stuart authored
187 AM_CONDITIONAL([USE_NDBM], [test x$use_ndbm = xyes])
188
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
189 dnl Check for iptables
190 dnl
191 AC_ARG_WITH([iptables],
192 [AS_HELP_STRING([--with-iptables=/path/to/iptables],
193 [Specify path to the iptables executable @<:@default=check path@:>@])],
194 [
195 AS_IF([ test "x$withval" = x -o "x$withval" = xyes -o "x$withval" = xno ],
196 [AC_MSG_ERROR([--with-iptables requires an argument specifying a path to iptables])],
9413006 Cleaned out some old commented-out sections configure.ac and fixed an…
Damien Stuart authored
197 [ IPTABLES_EXE=$withval ]
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
198 )
199 ],
200 [
201 AC_PATH_PROG(IPTABLES_EXE, [iptables], [], [$APP_PATH])
202 ]
203 )
204 AS_IF([test "x$IPTABLES_EXE" != x],
205 [
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
206 AC_DEFINE_UNQUOTED([IPTABLES_EXE], ["$IPTABLES_EXE"], [Path to iptables executable])
207 iptables_exe=$IPTABLES_EXE
208 ], [ iptables_exe="(not found)"]
209 )
210
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
211 dnl Check for ipfw
212 dnl
213 AC_ARG_WITH([ipfw],
214 [AS_HELP_STRING([--with-ipfw=/path/to/ipfw],
215 [Specify path to the ipfw executable @<:@default=check path@:>@])],
216 [
217 AS_IF([ test "x$withval" = x -o "x$withval" = xyes -o "x$withval" = xno ],
218 [AC_MSG_ERROR([--with-ipfw requires an argument specifying a path to ipfw])],
9413006 Cleaned out some old commented-out sections configure.ac and fixed an…
Damien Stuart authored
219 [ IPFW_EXE=$withval ]
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
220 )
221 ],
222 [
223 AC_PATH_PROG(IPFW_EXE, [ipfw], [], [$APP_PATH])
224 ]
225 )
226 AS_IF([test "x$IPFW_EXE" != x],
227 [
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
228 AC_DEFINE_UNQUOTED([IPFW_EXE], ["$IPFW_EXE"], [Path to ipfw executable])
229 ipfw_exe=$IPFW_EXE
230 ], [ ipfw_exe="(not found)"]
231 )
232 ])
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
233
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
234 AC_CONFIG_FILES([Makefile
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
235 lib/Makefile
236 client/Makefile
237 server/Makefile
238 common/Makefile
239 doc/Makefile])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
240
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
241 AC_OUTPUT
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
242
d0373a5 Fixed libfko so gpgme engine is gpg by default. Added functions to l…
Damien Stuart authored
243 if [test $have_gpgme = "yes" ]; then
244 have_gpgme="$have_gpgme
245 Gpgme engine: $GPG_EXE"
246 fi
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
247
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
248 echo "
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
249 $PACKAGE_NAME-$PACKAGE_VERSION configuration.
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
250 ==========================================================
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
251 Client build: $want_client
252 Server build: $want_server
253 GPG encryption support: $have_gpgme
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
254
255 Installation prefix: $prefix
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
256 "
257 if [test $want_server = "yes" ]; then
258 echo " Server support programs:
9413006 Cleaned out some old commented-out sections configure.ac and fixed an…
Damien Stuart authored
259 iptables: $iptables_exe
260 ipfw: $ipfw_exe
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
261 "
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
262 fi
263
Something went wrong with that request. Please try again.