Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 576 lines (509 sloc) 16.555 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.
bbe8c9d Set pcap non-block mode back on unless it is a freebsd system. Server…
Damien Stuart authored
10 AC_PREREQ(2.62)
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])
86fde0d @mrash bumped version to 2.0.1-pre2
authored
14 m4_define(my_version, [2.0.1-pre2])
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
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
19 AC_CONFIG_MACRO_DIR([m4])
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
20 AC_CONFIG_AUX_DIR(config)
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
21
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
22 AC_CANONICAL_TARGET
23
2bf25e6 Added perl/legacy distribution (fwknop-1.9.12). Renamed this distrib…
Damien Stuart authored
24 AM_INIT_AUTOMAKE([tar-ustar -Wall -Werror foreign])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
25
bcdef19 Commented out AM_MAINTAINER_MODE.
Damien Stuart authored
26 dnl AM_MAINTAINER_MODE
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
27
bbe8c9d Set pcap non-block mode back on unless it is a freebsd system. Server…
Damien Stuart authored
28 AC_CONFIG_HEADERS([config.h])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
29
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
30 dnl The top of our header
31 dnl
32 AH_TOP([
33 #ifndef FWKNOP_CONFIG_H
34 #define FWKNOP_CONFIG_H
35 ])
36
37 dnl The bottom of our header file
38 dnl
39 AH_BOTTOM([
40 #endif /* FWKNOP_CONFIG_H */
41 ])
42
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
43 dnl FKO_CHECK_COMPILER_ARG([COMPILER FLAG])
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
44 dnl
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
45 dnl Macro to check compiler support for the given compiler option.
46 dnl Adds to CFLAGS and LDFLAGS if supported.
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
47 dnl
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
48 dnl The structure of this macro was adapted from OpenSSH.
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored
49 dnl
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
50 AC_DEFUN([FKO_CHECK_COMPILER_ARG], [
51 saved_CFLAGS="$CFLAGS"
52 saved_LDFLAGS="$LDFLAGS"
53 CFLAGS="$CFLAGS $1 -Werror"
54 LDFLAGS="$LDFLAGS $1 -Werror"
55 AC_MSG_CHECKING([if $CC supports $1])
56 AC_LINK_IFELSE(
57 [AC_LANG_SOURCE([
58 #include <stdio.h>
59 int main(void){char x[[256]]; snprintf(x, sizeof(x), "NNN"); return 0;}
60 ])],
61 [
62 CFLAGS="$saved_CFLAGS $1"
63 LDFLAGS="$saved_LDFLAGS $1"
64 AC_RUN_IFELSE(
65 [AC_LANG_SOURCE([
66 #include <stdio.h>
67 int main(void){char x[[256]]; snprintf(x, sizeof(x), "NNN"); return 0;}
68 ])],
69 [AC_MSG_RESULT(yes)],
70 [AC_MSG_RESULT(no)
71 CFLAGS="$saved_CFLAGS"
72 LDFLAGS="$saved_LDFLAGS"],
73 [AC_MSG_WARN([cross compiling: cannot test])])
74 ],
75 [AC_MSG_RESULT(no)
76 CFLAGS="$saved_CFLAGS"
77 LDFLAGS="$saved_LDFLAGS"]
78 )])dnl
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored
79
9dae73d @mrash added FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY to fix ro-relocations and i…
authored
80 dnl FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY([COMPILER FLAG])
81 dnl
82 dnl Macro to check compiler support for the given compiler option.
83 dnl Adds to LDFLAGS only if supported.
84 dnl
85 AC_DEFUN([FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY], [
86 saved_LDFLAGS="$LDFLAGS"
87 LDFLAGS="$LDFLAGS $1 -Werror"
88 AC_MSG_CHECKING([if $CC supports $1])
89 AC_LINK_IFELSE(
90 [AC_LANG_SOURCE([
91 #include <stdio.h>
92 int main(void){char x[[256]]; snprintf(x, sizeof(x), "NNN"); return 0;}
93 ])],
94 [
95 LDFLAGS="$saved_LDFLAGS $1"
96 AC_RUN_IFELSE(
97 [AC_LANG_SOURCE([
98 #include <stdio.h>
99 int main(void){char x[[256]]; snprintf(x, sizeof(x), "NNN"); return 0;}
100 ])],
101 [AC_MSG_RESULT(yes)],
102 [AC_MSG_RESULT(no)
103 LDFLAGS="$saved_LDFLAGS"],
104 [AC_MSG_WARN([cross compiling: cannot test])])
105 ],
106 [AC_MSG_RESULT(no)
107 LDFLAGS="$saved_LDFLAGS"]
108 )])dnl
109
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
110 AC_GNU_SOURCE
111
112 AC_PROG_CC
113 AM_PROG_CC_C_O
114 AC_PROG_CPP
115 AC_PROG_AWK
116 AC_PROG_SED
117 AC_PROG_GREP
118 AC_PROG_INSTALL
119 AC_PROG_LN_S
120 AC_PROG_MAKE_SET
121 AC_PROG_LIBTOOL
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored
122
10d380d @mrash Test suite support for function coverage testing via gcov
authored
123 dnl Decide whether or not to build binaries with profiling coverage support
124 dnl
125 want_profile_coverage=no
126 AC_ARG_ENABLE([profile-coverage],
127 [AS_HELP_STRING([--enable-profile-coverage],
128 [Build fwknop binaries with profile coverage support @<:@default is to disable@:>@])],
129 [want_profile_coverage=$enableval],
130 [])
131
132 if test "x$want_profile_coverage" = "xyes"; then
133 CFLAGS="-g -O0"
134 FKO_CHECK_COMPILER_ARG([-fprofile-arcs -ftest-coverage -fno-inline])
135 fi
136
637f7a4 @mrash Added -Wall for all gcc warnings during compile
authored
137 dnl Decide whether or not to enable all warnings with -Wall
138 dnl
139 use_wall=yes
140 AC_ARG_ENABLE([wall],
141 [AS_HELP_STRING([--disable-wall],
142 [Do not enable all warnings via -Wall @<:@default is on@:>@])],
143 [use_wall=$enableval],
144 [])
145
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
146 if test "x$use_wall" = "xyes"; then
147 FKO_CHECK_COMPILER_ARG([-Wall])
148 fi
149
150 dnl Check for security features offered by the compiler
637f7a4 @mrash Added -Wall for all gcc warnings during compile
authored
151
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
152 dnl -fstack-protector-all doesn't always work for some GCC versions
153 dnl and/or platforms, so we test if we can. If it's not supported
154 dnl on a given platform gcc will emit a warning so we use -Werror.
155 dnl
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
156 dnl Decide whether or not to enable -fstack-protector
157 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
158 use_stack_protector=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
159 AC_ARG_ENABLE([stack-protector],
160 [AS_HELP_STRING([--disable-stack-protector],
161 [Do not enable -fstack-protector @<:@default is on@:>@])],
162 [use_stack_protector=$enableval],
163 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
164
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
165 if test "x$use_stack_protector" = "xyes"; then
166 FKO_CHECK_COMPILER_ARG([-fstack-protector-all -fstack-protector])
167 fi
168
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
169 dnl Decide whether or not to enable Position Independent Executable (PIE)
170 dnl support
171 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
172 use_pie=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
173 AC_ARG_ENABLE([pie],
174 [AS_HELP_STRING([--disable-pie],
175 [Do not enable Position Independent Executable support @<:@default is on@:>@])],
176 [use_pie=$enableval],
177 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
178
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
179 if test "x$use_pie" = "xyes"; then
180 FKO_CHECK_COMPILER_ARG([-fPIE -pie])
181 fi
182
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
183 dnl Decide whether or not to enable -D_FORTIFY_SOURCE support
184 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
185 use_fortify_source=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
186 AC_ARG_ENABLE([fortify-source],
187 [AS_HELP_STRING([--disable-fortify-source],
188 [Do not enable -D_FORTIFY_SOURCE support @<:@default is on@:>@])],
189 [use_fortify_source=$enableval],
190 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
191
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
192 if test "x$use_fortify_source" = "xyes"; then
193 FKO_CHECK_COMPILER_ARG([-D_FORTIFY_SOURCE=2])
194 fi
195
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
196 dnl Decide whether or not to use read-only relocations protection
197 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
198 use_ro_relocations=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
199 AC_ARG_ENABLE([ro-relocations],
200 [AS_HELP_STRING([--disable-ro-relocations],
201 [Do not enable read-only relocations protection @<:@default is on@:>@])],
202 [use_ro_relocations=$enableval],
203 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
204
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
205 if test "x$use_ro_relocations" = "xyes"; then
9dae73d @mrash added FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY to fix ro-relocations and i…
authored
206 FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY([-Wl,-z,relro])
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
207 fi
208
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
209 dnl Decide whether or not to use immediate binding protection
210 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
211 use_immediate_binding=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored
212 AC_ARG_ENABLE([immediate-binding],
213 [AS_HELP_STRING([--disable-immediate-binding],
214 [Do not enable immediate binding protection @<:@default is on@:>@])],
215 [use_immediate_binding=$enableval],
216 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
217
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
218 if test "x$use_immediate_binding" = "xyes"; then
9dae73d @mrash added FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY to fix ro-relocations and i…
authored
219 FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY([-Wl,-z,now])
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
220 fi
6126b7b Updates to accomodate building and compiling on FreeBSD systems.
Damien Stuart authored
221
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
222 # Checks for header files.
223 #
224 AC_HEADER_STDC
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
225 AC_HEADER_TIME
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
226 AC_HEADER_RESOLV
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
227
6126b7b Updates to accomodate building and compiling on FreeBSD systems.
Damien Stuart authored
228 AC_CHECK_HEADERS([arpa/inet.h ctype.h endian.h errno.h locale.h netdb.h net/ethernet.h netinet/in.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
229
230 # Type checks.
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
231 #
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored
232 AC_C_CONST
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
233 AC_TYPE_INT8_T
234 AC_TYPE_INT16_T
235 AC_TYPE_INT32_T
236 AC_TYPE_INT64_T
237 AC_TYPE_UINT8_T
238 AC_TYPE_UINT16_T
239 AC_TYPE_UINT32_T
240 AC_TYPE_UINT64_T
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
241 AC_TYPE_OFF_T
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
242 AC_TYPE_PID_T
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
243 AC_TYPE_SIZE_T
e3bd3b7 Added additional sanity checks and clean-up of access.conf processing…
Damien Stuart authored
244 AC_TYPE_SSIZE_T
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
245
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored
246 AC_CHECK_SIZEOF(unsigned int)
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
247 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
248
249 AC_C_BIGENDIAN
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
250
153d1ec Added AC_SYS_LARGE_FILE to configure.ac
Damien Stuart authored
251 AC_SYS_LARGEFILE
252
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
253 # Checks for library functions.
254 #
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
255 AC_FUNC_MALLOC
474a787 more checks for configure. omit salt from Rijndael-encrypted data as…
Damien Stuart authored
256 AC_FUNC_REALLOC
be3bb07 Added getpasswd routine for getting a password from the user. A few …
Damien Stuart authored
257 AC_FUNC_STAT
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
258
be3bb07 Added getpasswd routine for getting a password from the user. A few …
Damien Stuart authored
259 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
260
7f0e7a9 Updated autoconf files and code to support Solaris (ver 10 x86 at lea…
Damien Stuart authored
261 AC_SEARCH_LIBS([socket], [socket])
262 AC_SEARCH_LIBS([inet_addr], [nsl])
263
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
264 case "$host" in
265 *-*-linux*)
266 ;;
267 *-*-openbsd*)
268 AC_DEFINE_UNQUOTED([PLATFORM_OPENBSD], [1], [Define if you are running on OpenBSD])
269 ;;
270 esac
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
271
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
272 dnl Decide whether or not to build the client
273 dnl
274 want_client=yes
275 AC_ARG_ENABLE([client],
276 [AS_HELP_STRING([--disable-client],
277 [Do not build the fwknop client @<:@default is to build@:>@])],
278 [want_client=$enableval],
279 [])
280 AM_CONDITIONAL([WANT_CLIENT], [test "$want_client" = yes])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
281
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
282 dnl Decide whether or not to build the server
283 dnl
284 want_server=yes
285 AC_ARG_ENABLE([server],
286 [AS_HELP_STRING([--disable-server],
287 [Do not build the fwknop server @<:@default is to build@:>@])],
288 [want_server=$enableval],
289 [])
290 AM_CONDITIONAL([WANT_SERVER], [test "$want_server" = yes])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
291
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
292 dnl Decide whether or not to enable the digest-cache
293 dnl
294 want_digest_cache=yes
295 AC_ARG_ENABLE([digest-cache],
296 [AS_HELP_STRING([--disable-digest-cache],
297 [Do not enable the fwknopd digest-cache @<:@default is to build@:>@])],
298 [want_digest_cache=$enableval],
299 [])
300 dnl AM_CONDITIONAL([WANT_DIGEST_CACHE], [test "$want_digest_cache" = yes])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
301
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored
302 dnl Decide whether or not to try to look for gdbm/ndbm (default to just
303 dnl use a file-based solution - reduces dependencies)
304 dnl
305 want_file_cache=yes
306 AC_ARG_ENABLE([file-cache],
307 [AS_HELP_STRING([--disable-file-cache],
308 [Replace file cache with gdbm/ndbm @<:@default on@:>@])],
309 [want_file_cache=$enableval],
310 [])
311 AS_IF([test "$want_file_cache" = yes], [
312 AC_DEFINE([USE_FILE_CACHE], [1], [Define this to enable non-gdbm/ndbm digest storing (eliminates gdbm/ndbm dependency).])
313 ])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored
314
d0373a5 Fixed libfko so gpgme engine is gpg by default. Added functions to l…
Damien Stuart authored
315 # Check for 3rd-party libs
316 #
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
317 AC_ARG_WITH([gpgme],
318 [AS_HELP_STRING([--with-gpgme],
319 [support for gpg encryption using libgpgme @<:@default=check@:>@])],
320 [],
321 [with_gpgme=check])
322
10b308b Fixed configure.ac again (I broke it with my last change). Added fir…
Damien Stuart authored
323 have_gpgme=yes
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
324 AS_IF([test "x$with_gpgme" != xno],
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compi…
Damien Stuart authored
325 [AM_PATH_GPGME([],
326 [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
327 [if test "x$with_gpgme" != xcheck; then
328 AC_MSG_FAILURE(
329 [--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
330 else
331 have_gpgme=no
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
332 fi
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compi…
Damien Stuart authored
333 ], [have_gpgme=no])], [have_gpgme=no])
334
b6c57aa Changed the way running external commands are hanlded to address issu…
Damien Stuart authored
335 dnl Add various common way to sbin dir to the path (just in case)
336 APP_PATH=$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/usr/local/sbin
337
338 dnl Check for gpg (not gpg2)
339 dnl
340 AC_ARG_WITH([gpg],
341 [AS_HELP_STRING([--with-gpg=/path/to/gpg],
342 [Specify path to the gpg executable that gpgme will use @<:@default=check path@:>@])],
343 [
344 AS_IF([ test "x$withval" = x -o "x$withval" = xyes -o "x$withval" = xno ],
345 [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
346 [ GPG_EXE=$withval ]
b6c57aa Changed the way running external commands are hanlded to address issu…
Damien Stuart authored
347 )
348 ],
349 [
350 AC_PATH_PROG(GPG_EXE, [gpg], [], [$APP_PATH])
351 ]
352 )
353 AS_IF([test "x$GPG_EXE" != x],
354 [
355 AC_DEFINE_UNQUOTED([GPG_EXE], ["$GPG_EXE"], [Path to gpg executable])
356 gpg_exe=$GPG_EXE
357 ], [ gpg_exe="(not found)"]
358 )
359
04afd28 @mrash On FreeBSD, made gpgme header path inclusion optional
authored
360 if [test "$have_gpgme" = "yes" ]; then
361 case "$host" in
362 *-*-linux*)
363 ;;
364 *-*-freebsd*)
365 if [ test "x$CPPFLAGS" = "x" ] ; then
366 CPPFLAGS="-I/usr/local/include -I/usr/local/include/gpgme"
367 fi
368 if [ test "x$LDFLAGS" = "x" ] ; then
369 LDFLAGS="-L/usr/local/lib"
370 fi
371 ;;
372 esac
373 fi
374
8c1261c Fixed memory leak issue in libfko when fko_new_with_data() was called…
Damien Stuart authored
375 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
376 dnl
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
377 AS_IF([test "$want_server" = yes], [
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored
378 # Looking for libpcap
379 #
380 AC_CHECK_LIB([pcap],[pcap_open_live],
381 [ AC_DEFINE([HAVE_LIBPCAP], [1], [Define if you have libpcap]) ],
382 [ AC_MSG_ERROR([fwknopd needs libpcap])]
383 )
384
385 AS_IF([test "$want_digest_cache" = yes], [
386 use_ndbm=no
387 have_digest_cache=yes
8c1261c Fixed memory leak issue in libfko when fko_new_with_data() was called…
Damien Stuart authored
388
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored
389 AS_IF([test "$want_file_cache" = no], [
390
391 # Looking for gdbm or fallback to ndbm or bail
392 #
393 AC_CHECK_LIB([gdbm],[gdbm_open],
394 [
395 AC_DEFINE([HAVE_LIBGDBM], [1], [Define if you have libgdbm])
396 ],
397 [ AC_CHECK_LIB([ndbm],[dbm_open],
398 [
399 AC_DEFINE([HAVE_LIBNDBM], [1], [Define if you have libndbm])
400 use_ndbm=yes
401 ],
402 [ AC_CHECK_HEADER([ndbm.h],
403 [ AC_CHECK_FUNC([dbm_open],
404 [ AC_DEFINE([HAVE_LIBNDBM], [1], [Define if you have libndbm])],
405 [
406 AC_DEFINE([NO_DIGEST_CACHE], [1], [Define this to disable the digest cache for replay detection - not recommended.])
407 AC_MSG_WARN([No DBM implementation found. Replay detection will be disabled.])
408 have_digest_cache=no
409 ]
410 )]
411 )]
412 )]
413 )]
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored
414 )],
415 [
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored
416 AC_DEFINE([NO_DIGEST_CACHE], [1], [Define this to disable the digest cache for replay detection - not recommended.])
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored
417 have_digest_cache=no
418 ]
791eb40 Added check for libpcap. More stubbing in on the server code side.
Damien Stuart authored
419 )
420
9d2a4c2 Fixed autoconf config so libfko and fwknop client are not linked with…
Damien Stuart authored
421 AM_CONDITIONAL([USE_NDBM], [test x$use_ndbm = xyes])
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored
422 AM_CONDITIONAL([CONFIG_FILE_CACHE], [test x$want_file_cache = xyes])
9d2a4c2 Fixed autoconf config so libfko and fwknop client are not linked with…
Damien Stuart authored
423
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
424 dnl Check for iptables
425 dnl
426 AC_ARG_WITH([iptables],
427 [AS_HELP_STRING([--with-iptables=/path/to/iptables],
428 [Specify path to the iptables executable @<:@default=check path@:>@])],
429 [
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
430 AS_IF([ test "x$withval" = xno ], [],
431 AS_IF([ test "x$withval" = x -o "x$withval" = xyes ],
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
432 [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
433 [ IPTABLES_EXE=$withval ]
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
434 )
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
435 )
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
436 ],
437 [
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
438 AC_PATH_PROG(IPTABLES_EXE, [iptables], [], [$APP_PATH])
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
439 ]
440 )
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
441
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
442 dnl Check for ipfw
443 dnl
444 AC_ARG_WITH([ipfw],
445 [AS_HELP_STRING([--with-ipfw=/path/to/ipfw],
446 [Specify path to the ipfw executable @<:@default=check path@:>@])],
447 [
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
448 AS_IF([ test "x$withval" = xno ], [],
449 AS_IF([ test "x$withval" = x -o "x$withval" = xyes ],
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
450 [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
451 [ IPFW_EXE=$withval ]
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
452 )
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
453 )
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
454 ],
455 [
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
456 AC_PATH_PROG(IPFW_EXE, [ipfw], [], [$APP_PATH])
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
457 ]
458 )
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
459
dcf2d94 @mrash Added autoconf check for pf firewalls
authored
460 dnl Check for pf from OpenBSD
461 dnl
462 AC_ARG_WITH([pf],
463 [AS_HELP_STRING([--with-pf=/path/to/pfctl],
464 [Specify path to the pf executable @<:@default=check path@:>@])],
465 [
466 AS_IF([ test "x$withval" = xno ], [],
467 AS_IF([ test "x$withval" = x -o "x$withval" = xyes ],
468 [AC_MSG_ERROR([--with-pf requires an argument specifying a path to pf])],
469 [ PF_EXE=$withval ]
470 )
471 )
472 ],
473 [
474 AC_PATH_PROG(PF_EXE, [pfctl], [], [$APP_PATH])
475 ]
476 )
477
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
478 dnl Check for ipf (ipfilter)
479 dnl
480 AC_ARG_WITH([ipf],
481 [AS_HELP_STRING([--with-ipf=/path/to/ipf],
482 [Specify path to the ipf executable @<:@default=check path@:>@])],
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored
483 [
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
484 AS_IF([ test "x$withval" = xno ], [],
485 AS_IF([ test "x$withval" = x -o "x$withval" = xyes ],
dcf2d94 @mrash Added autoconf check for pf firewalls
authored
486 [AC_MSG_ERROR([--with-ipf requires an argument specifying a path to ipf])],
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
487 [ IPF_EXE=$withval ]
488 )
489 )
490 ],
491 [
492 AC_PATH_PROG(IPF_EXE, [ipf], [], [$APP_PATH])
493 ]
494 )
7dc24c1 @mrash Bug fix for USE_NDBM variable so that client-only builds work. The s…
authored
495
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
496 dnl Determine which firewall exe we use (if we have one).
497 dnl If iptables was found or specified, it wins, then we fallback to ipfw,
dcf2d94 @mrash Added autoconf check for pf firewalls
authored
498 dnl then pf, and otherwise we try ipf.
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
499 dnl
500 AS_IF([test "x$IPTABLES_EXE" != x], [
501 FW_DEF="FW_IPTABLES"
502 FIREWALL_TYPE="iptables"
503 FIREWALL_EXE=$IPTABLES_EXE
504 AC_DEFINE_UNQUOTED([FIREWALL_IPTABLES], [1], [The firewall type: iptables.])
505 ],[
506 AS_IF([test "x$IPFW_EXE" != x], [
507 FW_DEF="FW_IPFW"
508 FIREWALL_TYPE="ipfw"
509 FIREWALL_EXE=$IPFW_EXE
510 AC_DEFINE_UNQUOTED([FIREWALL_IPFW], [1], [The firewall type: ipfw.])
dcf2d94 @mrash Added autoconf check for pf firewalls
authored
511 ],[
512 AS_IF([test "x$PF_EXE" != x], [
513 FW_DEF="FW_PF"
514 FIREWALL_TYPE="pf"
515 FIREWALL_EXE=$PF_EXE
516 AC_DEFINE_UNQUOTED([FIREWALL_PF], [1], [The firewall type: pf.])
517 ],[
518 AS_IF([test "x$IPF_EXE" != x], [
519 AC_MSG_ERROR([Sorry - ipf was specified or the only one found, however, it is not supported yet.])
520 FIREWALL_TYPE="ipf"
521 FIREWALL_EXE=$IPF_EXE
522 AC_DEFINE_UNQUOTED([FIREWALL_IPF], [1], [The firewall type: ipf.])
523 ], [AC_MSG_ERROR([No firewall program was found or specified.]) ]
524 ]
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
525 ]
526 ]
dcf2d94 @mrash Added autoconf check for pf firewalls
authored
527 ))))
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
528
529 AC_DEFINE_UNQUOTED([FIREWALL_EXE], ["$FIREWALL_EXE"],
530 [Path to firewall command executable (it should match the firewall type).])
531
532 ],
7dc24c1 @mrash Bug fix for USE_NDBM variable so that client-only builds work. The s…
authored
533 [test "$want_server" = no], [
534 use_ndbm=no
535 AM_CONDITIONAL([USE_NDBM], [test x$use_ndbm = xno])
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored
536 AM_CONDITIONAL([CONFIG_FILE_CACHE], [test x$use_ndbm = xno])
7dc24c1 @mrash Bug fix for USE_NDBM variable so that client-only builds work. The s…
authored
537 ]
538 )
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
539
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
540 AC_CONFIG_FILES([Makefile
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
541 lib/Makefile
542 client/Makefile
543 server/Makefile
544 common/Makefile
545 doc/Makefile])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
546
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
547 AC_OUTPUT
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
548
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored
549 if [test "$have_gpgme" = "yes" ]; then
d0373a5 Fixed libfko so gpgme engine is gpg by default. Added functions to l…
Damien Stuart authored
550 have_gpgme="$have_gpgme
551 Gpgme engine: $GPG_EXE"
552 fi
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
553
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
554 echo "
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
555 $PACKAGE_NAME-$PACKAGE_VERSION configuration.
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
556 ==========================================================
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
557 Client build: $want_client
558 Server build: $want_server
559 GPG encryption support: $have_gpgme
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored
560
561 Installation prefix: $prefix
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
562 "
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored
563 if [test "$want_server" = "yes" ]; then
838b80f Refactored firewall rule code to separate files by firewall type. St…
Damien Stuart authored
564 echo " Server support:
565 firewall type: $FIREWALL_TYPE
566 firewall program path: $FIREWALL_EXE
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
567 "
2310b36 Made local exe checks run only of a server is being built. Removed c…
Damien Stuart authored
568
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored
569 if [test "$want_digest_cache" = "no" ]; then
570 echo " *WARNING*
571 The digest-cache functionality is not enabled. This
572 could leave the fwknopd server open to replay attacks!
573 "
574 fi
575 fi
Something went wrong with that request. Please try again.