Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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