Skip to content
Newer
Older
100644 562 lines (497 sloc) 15.7 KB
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
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 Dec 21, 2008
8
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
9 dnl Minimum Autoconf version required.
bbe8c9d Set pcap non-block mode back on unless it is a freebsd system. Server…
Damien Stuart authored Oct 21, 2010
10 AC_PREREQ(2.62)
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
11
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
12 dnl Define our name, version and email.
13 m4_define(my_package, [fwknop])
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
14 m4_define(my_version, [2.0])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
15 m4_define(my_bug_email, [dstuart@dstuart.org])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
16
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
17 AC_INIT(my_package, my_version, my_bug_email)
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "c…
Damien Stuart authored Aug 9, 2009
18
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
19 AC_CONFIG_MACRO_DIR([m4])
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored Dec 24, 2008
20 AC_CONFIG_AUX_DIR(config)
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored Jan 25, 2009
21
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
22 AC_CANONICAL_TARGET
23
2bf25e6 Added perl/legacy distribution (fwknop-1.9.12). Renamed this distribu…
Damien Stuart authored Sep 11, 2009
24 AM_INIT_AUTOMAKE([tar-ustar -Wall -Werror foreign])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
25
bcdef19 Commented out AM_MAINTAINER_MODE.
Damien Stuart authored Jan 6, 2010
26 dnl AM_MAINTAINER_MODE
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
27
bbe8c9d Set pcap non-block mode back on unless it is a freebsd system. Server…
Damien Stuart authored Oct 21, 2010
28 AC_CONFIG_HEADERS([config.h])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
29
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
30 dnl The top of our header
31 dnl
32 AH_TOP([
33 #ifndef FWKNOP_CONFIG_H
34 #define FWKNOP_CONFIG_H
35 ])
36
37 dnl The bottom of our header file
38 dnl
39 AH_BOTTOM([
40 #endif /* FWKNOP_CONFIG_H */
41 ])
42
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
43 dnl FKO_CHECK_COMPILER_ARG([COMPILER FLAG])
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
44 dnl
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
45 dnl Macro to check compiler support for the given compiler option.
46 dnl Adds to CFLAGS and LDFLAGS if supported.
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
47 dnl
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
48 dnl The structure of this macro was adapted from OpenSSH.
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored Mar 27, 2011
49 dnl
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
50 AC_DEFUN([FKO_CHECK_COMPILER_ARG], [
51 saved_CFLAGS="$CFLAGS"
52 saved_LDFLAGS="$LDFLAGS"
53 CFLAGS="$CFLAGS $1 -Werror"
54 LDFLAGS="$LDFLAGS $1 -Werror"
55 AC_MSG_CHECKING([if $CC supports $1])
56 AC_LINK_IFELSE(
57 [AC_LANG_SOURCE([
58 #include <stdio.h>
59 int main(void){char x[[256]]; snprintf(x, sizeof(x), "NNN"); return 0;}
60 ])],
61 [
62 CFLAGS="$saved_CFLAGS $1"
63 LDFLAGS="$saved_LDFLAGS $1"
64 AC_RUN_IFELSE(
65 [AC_LANG_SOURCE([
66 #include <stdio.h>
67 int main(void){char x[[256]]; snprintf(x, sizeof(x), "NNN"); return 0;}
68 ])],
69 [AC_MSG_RESULT(yes)],
70 [AC_MSG_RESULT(no)
71 CFLAGS="$saved_CFLAGS"
72 LDFLAGS="$saved_LDFLAGS"],
73 [AC_MSG_WARN([cross compiling: cannot test])])
74 ],
75 [AC_MSG_RESULT(no)
76 CFLAGS="$saved_CFLAGS"
77 LDFLAGS="$saved_LDFLAGS"]
78 )])dnl
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored Mar 27, 2011
79
9dae73d @mrash added FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY to fix ro-relocations and i…
authored Jan 2, 2012
80 dnl FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY([COMPILER FLAG])
81 dnl
82 dnl Macro to check compiler support for the given compiler option.
83 dnl Adds to LDFLAGS only if supported.
84 dnl
85 AC_DEFUN([FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY], [
86 saved_LDFLAGS="$LDFLAGS"
87 LDFLAGS="$LDFLAGS $1 -Werror"
88 AC_MSG_CHECKING([if $CC supports $1])
89 AC_LINK_IFELSE(
90 [AC_LANG_SOURCE([
91 #include <stdio.h>
92 int main(void){char x[[256]]; snprintf(x, sizeof(x), "NNN"); return 0;}
93 ])],
94 [
95 LDFLAGS="$saved_LDFLAGS $1"
96 AC_RUN_IFELSE(
97 [AC_LANG_SOURCE([
98 #include <stdio.h>
99 int main(void){char x[[256]]; snprintf(x, sizeof(x), "NNN"); return 0;}
100 ])],
101 [AC_MSG_RESULT(yes)],
102 [AC_MSG_RESULT(no)
103 LDFLAGS="$saved_LDFLAGS"],
104 [AC_MSG_WARN([cross compiling: cannot test])])
105 ],
106 [AC_MSG_RESULT(no)
107 LDFLAGS="$saved_LDFLAGS"]
108 )])dnl
109
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
110 AC_GNU_SOURCE
111
112 AC_PROG_CC
113 AM_PROG_CC_C_O
114 AC_PROG_CPP
115 AC_PROG_AWK
116 AC_PROG_SED
117 AC_PROG_GREP
118 AC_PROG_INSTALL
119 AC_PROG_LN_S
120 AC_PROG_MAKE_SET
121 AC_PROG_LIBTOOL
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored Aug 10, 2011
122
637f7a4 @mrash Added -Wall for all gcc warnings during compile
authored Aug 19, 2011
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
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
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
637f7a4 @mrash Added -Wall for all gcc warnings during compile
authored Aug 20, 2011
137
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
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
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 19, 2011
142 dnl Decide whether or not to enable -fstack-protector
143 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 17, 2011
144 use_stack_protector=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 20, 2011
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 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
150
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
151 if test "x$use_stack_protector" = "xyes"; then
152 FKO_CHECK_COMPILER_ARG([-fstack-protector-all -fstack-protector])
153 fi
154
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 20, 2011
155 dnl Decide whether or not to enable Position Independent Executable (PIE)
156 dnl support
157 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
158 use_pie=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 20, 2011
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 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
164
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
165 if test "x$use_pie" = "xyes"; then
166 FKO_CHECK_COMPILER_ARG([-fPIE -pie])
167 fi
168
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 20, 2011
169 dnl Decide whether or not to enable -D_FORTIFY_SOURCE support
170 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
171 use_fortify_source=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 20, 2011
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 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
177
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
178 if test "x$use_fortify_source" = "xyes"; then
179 FKO_CHECK_COMPILER_ARG([-D_FORTIFY_SOURCE=2])
180 fi
181
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 20, 2011
182 dnl Decide whether or not to use read-only relocations protection
183 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
184 use_ro_relocations=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 20, 2011
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 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
190
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
191 if test "x$use_ro_relocations" = "xyes"; then
9dae73d @mrash added FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY to fix ro-relocations and i…
authored Jan 2, 2012
192 FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY([-Wl,-z,relro])
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
193 fi
194
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 20, 2011
195 dnl Decide whether or not to use immediate binding protection
196 dnl
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
197 use_immediate_binding=yes
bf59c26 @mrash Bug fix for ./configure args to disable compile time security options
authored Aug 20, 2011
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 [])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
203
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
204 if test "x$use_immediate_binding" = "xyes"; then
9dae73d @mrash added FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY to fix ro-relocations and i…
authored Jan 2, 2012
205 FKO_CHECK_COMPILER_ARG_LDFLAGS_ONLY([-Wl,-z,now])
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
206 fi
6126b7b Updates to accomodate building and compiling on FreeBSD systems.
Damien Stuart authored Aug 8, 2010
207
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
208 # Checks for header files.
209 #
210 AC_HEADER_STDC
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows wa…
Damien Stuart authored Aug 2, 2009
211 AC_HEADER_TIME
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
212 AC_HEADER_RESOLV
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows wa…
Damien Stuart authored Aug 2, 2009
213
6126b7b Updates to accomodate building and compiling on FreeBSD systems.
Damien Stuart authored Aug 8, 2010
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])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
215
216 # Type checks.
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
217 #
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored Jan 25, 2009
218 AC_C_CONST
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
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
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
227 AC_TYPE_OFF_T
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
228 AC_TYPE_PID_T
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
229 AC_TYPE_SIZE_T
e3bd3b7 Added additional sanity checks and clean-up of access.conf processing…
Damien Stuart authored Jan 30, 2010
230 AC_TYPE_SSIZE_T
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows wa…
Damien Stuart authored Aug 2, 2009
231
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored Jan 25, 2009
232 AC_CHECK_SIZEOF(unsigned int)
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
233 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 Mar 15, 2009
234
235 AC_C_BIGENDIAN
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
236
153d1ec Added AC_SYS_LARGE_FILE to configure.ac
Damien Stuart authored Jul 9, 2010
237 AC_SYS_LARGEFILE
238
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
239 # Checks for library functions.
240 #
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored Dec 24, 2008
241 AC_FUNC_MALLOC
474a787 more checks for configure. omit salt from Rijndael-encrypted data as …
Damien Stuart authored Dec 28, 2008
242 AC_FUNC_REALLOC
be3bb07 Added getpasswd routine for getting a password from the user. A few u…
Damien Stuart authored Feb 10, 2009
243 AC_FUNC_STAT
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows wa…
Damien Stuart authored Aug 2, 2009
244
be3bb07 Added getpasswd routine for getting a password from the user. A few u…
Damien Stuart authored Feb 10, 2009
245 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 Dec 24, 2008
246
7f0e7a9 Updated autoconf files and code to support Solaris (ver 10 x86 at lea…
Damien Stuart authored Mar 15, 2009
247 AC_SEARCH_LIBS([socket], [socket])
248 AC_SEARCH_LIBS([inet_addr], [nsl])
249
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
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
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
257
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
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])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
267
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
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])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
277
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
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])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
287
aff8832 @damienstuart Refactored configure.ac to use a custom macro for compiler flag checks.
damienstuart authored Dec 29, 2011
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 ])
df96e42 @mrash Added stack protection, PIE, fortify source, etc.
authored Aug 18, 2011
300
d0373a5 Fixed libfko so gpgme engine is gpg by default. Added functions to li…
Damien Stuart authored Feb 6, 2010
301 # Check for 3rd-party libs
302 #
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. Se…
Damien Stuart authored Jan 25, 2009
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
10b308b Fixed configure.ac again (I broke it with my last change). Added firs…
Damien Stuart authored Jan 26, 2009
309 have_gpgme=yes
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. Se…
Damien Stuart authored Jan 25, 2009
310 AS_IF([test "x$with_gpgme" != xno],
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compil…
Damien Stuart authored Feb 22, 2009
311 [AM_PATH_GPGME([],
312 [AC_DEFINE([HAVE_LIBGPGME], [1], [Define if you have libgpgme])],
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. Se…
Damien Stuart authored Jan 25, 2009
313 [if test "x$with_gpgme" != xcheck; then
314 AC_MSG_FAILURE(
315 [--with-gpgme was given, but test for gpgme failed])
10b308b Fixed configure.ac again (I broke it with my last change). Added firs…
Damien Stuart authored Jan 26, 2009
316 else
317 have_gpgme=no
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. Se…
Damien Stuart authored Jan 25, 2009
318 fi
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compil…
Damien Stuart authored Feb 22, 2009
319 ], [have_gpgme=no])], [have_gpgme=no])
320
b6c57aa Changed the way running external commands are hanlded to address issu…
Damien Stuart authored Jul 3, 2010
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])],
9413006 Cleaned out some old commented-out sections configure.ac and fixed an…
Damien Stuart authored Jul 19, 2010
332 [ GPG_EXE=$withval ]
b6c57aa Changed the way running external commands are hanlded to address issu…
Damien Stuart authored Jul 3, 2010
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
04afd28 @mrash On FreeBSD, made gpgme header path inclusion optional
authored Aug 20, 2011
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
8c1261c Fixed memory leak issue in libfko when fko_new_with_data() was called…
Damien Stuart authored Oct 16, 2009
361 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 Sep 4, 2009
362 dnl
2310b36 Made local exe checks run only of a server is being built. Removed ch…
Damien Stuart authored Dec 29, 2009
363 AS_IF([test "$want_server" = yes], [
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored Mar 27, 2011
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
8c1261c Fixed memory leak issue in libfko when fko_new_with_data() was called…
Damien Stuart authored Oct 16, 2009
374
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored Aug 11, 2011
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 )]
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored Mar 27, 2011
400 )],
401 [
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored Aug 11, 2011
402 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 Mar 27, 2011
403 have_digest_cache=no
404 ]
791eb40 Added check for libpcap. More stubbing in on the server code side.
Damien Stuart authored Sep 4, 2009
405 )
406
9d2a4c2 Fixed autoconf config so libfko and fwknop client are not linked with…
Damien Stuart authored Jul 8, 2010
407 AM_CONDITIONAL([USE_NDBM], [test x$use_ndbm = xyes])
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored Aug 11, 2011
408 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 Jul 8, 2010
409
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored Dec 29, 2009
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 [
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
416 AS_IF([ test "x$withval" = xno ], [],
417 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 Dec 29, 2009
418 [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 Jul 19, 2010
419 [ IPTABLES_EXE=$withval ]
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored Dec 29, 2009
420 )
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
421 )
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored Dec 29, 2009
422 ],
423 [
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
424 AC_PATH_PROG(IPTABLES_EXE, [iptables], [], [$APP_PATH])
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored Dec 29, 2009
425 ]
426 )
2310b36 Made local exe checks run only of a server is being built. Removed ch…
Damien Stuart authored Dec 29, 2009
427
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored Dec 29, 2009
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 [
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
434 AS_IF([ test "x$withval" = xno ], [],
435 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 Dec 29, 2009
436 [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 Jul 19, 2010
437 [ IPFW_EXE=$withval ]
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored Dec 29, 2009
438 )
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
439 )
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored Dec 29, 2009
440 ],
441 [
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
442 AC_PATH_PROG(IPFW_EXE, [ipfw], [], [$APP_PATH])
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored Dec 29, 2009
443 ]
444 )
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
445
dcf2d94 @mrash Added autoconf check for pf firewalls
authored Aug 24, 2011
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
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
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@:>@])],
b823580 Added configure args for specifying specific pathes to the local exec…
Damien Stuart authored Dec 29, 2009
469 [
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
470 AS_IF([ test "x$withval" = xno ], [],
471 AS_IF([ test "x$withval" = x -o "x$withval" = xyes ],
dcf2d94 @mrash Added autoconf check for pf firewalls
authored Aug 25, 2011
472 [AC_MSG_ERROR([--with-ipf requires an argument specifying a path to ipf])],
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
473 [ IPF_EXE=$withval ]
474 )
475 )
476 ],
477 [
478 AC_PATH_PROG(IPF_EXE, [ipf], [], [$APP_PATH])
479 ]
480 )
7dc24c1 @mrash Bug fix for USE_NDBM variable so that client-only builds work. The sp…
authored Jul 29, 2010
481
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
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,
dcf2d94 @mrash Added autoconf check for pf firewalls
authored Aug 25, 2011
484 dnl then pf, and otherwise we try ipf.
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
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.])
dcf2d94 @mrash Added autoconf check for pf firewalls
authored Aug 25, 2011
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 ]
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
511 ]
512 ]
dcf2d94 @mrash Added autoconf check for pf firewalls
authored Aug 25, 2011
513 ))))
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
514
515 AC_DEFINE_UNQUOTED([FIREWALL_EXE], ["$FIREWALL_EXE"],
516 [Path to firewall command executable (it should match the firewall type).])
517
518 ],
7dc24c1 @mrash Bug fix for USE_NDBM variable so that client-only builds work. The sp…
authored Jul 29, 2010
519 [test "$want_server" = no], [
520 use_ndbm=no
521 AM_CONDITIONAL([USE_NDBM], [test x$use_ndbm = xno])
0525cd4 @mrash Added autoconf support for non-dbm file cache.
authored Aug 11, 2011
522 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 sp…
authored Jul 29, 2010
523 ]
524 )
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
525
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored Dec 24, 2008
526 AC_CONFIG_FILES([Makefile
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "c…
Damien Stuart authored Aug 9, 2009
527 lib/Makefile
528 client/Makefile
529 server/Makefile
530 common/Makefile
531 doc/Makefile])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
532
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored Dec 24, 2008
533 AC_OUTPUT
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored Jan 25, 2009
534
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored Mar 27, 2011
535 if [test "$have_gpgme" = "yes" ]; then
d0373a5 Fixed libfko so gpgme engine is gpg by default. Added functions to li…
Damien Stuart authored Feb 6, 2010
536 have_gpgme="$have_gpgme
537 Gpgme engine: $GPG_EXE"
538 fi
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
539
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored Jan 25, 2009
540 echo "
2310b36 Made local exe checks run only of a server is being built. Removed ch…
Damien Stuart authored Dec 29, 2009
541 $PACKAGE_NAME-$PACKAGE_VERSION configuration.
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
542 ==========================================================
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "c…
Damien Stuart authored Aug 9, 2009
543 Client build: $want_client
544 Server build: $want_server
545 GPG encryption support: $have_gpgme
861c0e8 Autoconf updates for detecting locally installed program paths and ch…
Damien Stuart authored Dec 28, 2009
546
547 Installation prefix: $prefix
2310b36 Made local exe checks run only of a server is being built. Removed ch…
Damien Stuart authored Dec 29, 2009
548 "
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored Mar 27, 2011
549 if [test "$want_server" = "yes" ]; then
838b80f Refactored firewall rule code to separate files by firewall type. Stu…
Damien Stuart authored Aug 10, 2010
550 echo " Server support:
551 firewall type: $FIREWALL_TYPE
552 firewall program path: $FIREWALL_EXE
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored Jan 25, 2009
553 "
2310b36 Made local exe checks run only of a server is being built. Removed ch…
Damien Stuart authored Dec 29, 2009
554
39e7412 Added a no-digest-cache configure option and capability (though it is…
Damien Stuart authored Mar 27, 2011
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.