Skip to content

HTTPS clone URL

Subversion checkout URL

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