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