Skip to content

HTTPS clone URL

Subversion checkout URL

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