Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 208 lines (179 sloc) 5.804 kb
488ca56 Minor updates to non-code-related files. Changed some copyrights to …
Damien Stuart authored
1 dnl Process thie file with autoconf to produce the configure script
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
2
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored
3 AC_PREREQ(2.61)
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
4
ee78a35 Made the dist name "fwknop-c" so as not to confuse it with the curren…
Damien Stuart authored
5 m4_define(my_package, [fwknop-c])
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
6 m4_define(my_version, [0.63])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
7 m4_define(my_bug_email, [dstuart@dstuart.org])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
8
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
9 AC_INIT(my_package, my_version, my_bug_email)
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
10
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
11 AC_CONFIG_AUX_DIR(config)
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
12
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
13 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
14
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
15 dnl AM_MAINTAINER_MODE
16
17 AC_CONFIG_HEADER([config.h])
18
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
19 AC_GNU_SOURCE
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
20
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
21 AC_PROG_CC
22 AM_PROG_CC_C_O
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
23 AC_PROG_CPP
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
24 AC_PROG_AWK
25 AC_PROG_GREP
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
26 AC_PROG_INSTALL
27 AC_PROG_LN_S
28 AC_PROG_MAKE_SET
474a787 more checks for configure. omit salt from Rijndael-encrypted data as…
Damien Stuart authored
29 AC_PROG_RANLIB
e113cb7 Updates to allow for building libfko as a shared lib. (make use of li…
Damien Stuart authored
30 AC_PROG_LIBTOOL
31
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
32 # Checks for header files.
33 #
34 AC_HEADER_STDC
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
35 AC_HEADER_TIME
36
37 AC_CHECK_HEADERS([ctype.h endian.h netdb.h netinet/in.h stdint.h stdlib.h string.h strings.h sys/byteorder.h sys/endian.h sys/socket.h sys/stat.h sys/time.h termios.h unistd.h])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
38
39 # Type checks.
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
40 #
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored
41 AC_C_CONST
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored
42 AC_TYPE_OFF_T
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
43 AC_TYPE_SIZE_T
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
44 AC_TYPE_UINT32_T
45 AC_TYPE_UINT8_T
46
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored
47 AC_CHECK_SIZEOF(unsigned int)
7f0e7a9 Updated autoconf files and code to support Solaris (ver 10 x86 at lea…
Damien Stuart authored
48 AC_CHECK_TYPES([uint8_t, uint32_t])
49
50 AC_C_BIGENDIAN
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
51
52 # Checks for library functions.
53 #
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
54 AC_FUNC_MALLOC
474a787 more checks for configure. omit salt from Rijndael-encrypted data as…
Damien Stuart authored
55 AC_FUNC_REALLOC
be3bb07 Added getpasswd routine for getting a password from the user. A few …
Damien Stuart authored
56 AC_FUNC_STAT
7f45031 Added SHA384 and SHA512 digests. Tweaks for getting rid of windows w…
Damien Stuart authored
57
be3bb07 Added getpasswd routine for getting a password from the user. A few …
Damien Stuart authored
58 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
59
7f0e7a9 Updated autoconf files and code to support Solaris (ver 10 x86 at lea…
Damien Stuart authored
60 AC_SEARCH_LIBS([socket], [socket])
61 AC_SEARCH_LIBS([inet_addr], [nsl])
62
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compi…
Damien Stuart authored
63 dnl For finding and checking gpgme (taken from the gpgme.m4 file that
64 dnl comes with gpgme)
65 dnl
66 AC_DEFUN([_AM_PATH_GPGME_CONFIG],
67 [ AC_ARG_WITH(gpgme-prefix,
68 AC_HELP_STRING([--with-gpgme-prefix=PFX],
69 [prefix where GPGME is installed (optional)]),
70 gpgme_config_prefix="$withval", gpgme_config_prefix="")
71 if test "x$gpgme_config_prefix" != x ; then
72 GPGME_CONFIG="$gpgme_config_prefix/bin/gpgme-config"
73 fi
74 AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
75
76 if test "$GPGME_CONFIG" != "no" ; then
77 gpgme_version=`$GPGME_CONFIG --version`
78 fi
79 gpgme_version_major=`echo $gpgme_version | \
80 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
81 gpgme_version_minor=`echo $gpgme_version | \
82 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
83 gpgme_version_micro=`echo $gpgme_version | \
84 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
85 ])
86
87 dnl AM_PATH_GPGME([MINIMUM-VERSION,
88 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
89 dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS.
90 dnl
91 AC_DEFUN([AM_PATH_GPGME],
92 [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
93 tmp=ifelse([$1], ,1:0.4.2,$1)
94 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
95 req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
96 min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
97 else
98 req_gpgme_api=0
99 min_gpgme_version="$tmp"
100 fi
101
102 AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
103 ok=no
104 if test "$GPGME_CONFIG" != "no" ; then
105 req_major=`echo $min_gpgme_version | \
106 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
107 req_minor=`echo $min_gpgme_version | \
108 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
109 req_micro=`echo $min_gpgme_version | \
110 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
111 if test "$gpgme_version_major" -gt "$req_major"; then
112 ok=yes
113 else
114 if test "$gpgme_version_major" -eq "$req_major"; then
115 if test "$gpgme_version_minor" -gt "$req_minor"; then
116 ok=yes
117 else
118 if test "$gpgme_version_minor" -eq "$req_minor"; then
119 if test "$gpgme_version_micro" -ge "$req_micro"; then
120 ok=yes
121 fi
122 fi
123 fi
124 fi
125 fi
126 fi
127 if test $ok = yes; then
128 # If we have a recent GPGME, we should also check that the
129 # API is compatible.
130 if test "$req_gpgme_api" -gt 0 ; then
131 tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
132 if test "$tmp" -gt 0 ; then
133 if test "$req_gpgme_api" -ne "$tmp" ; then
134 ok=no
135 fi
136 fi
137 fi
138 fi
139 if test $ok = yes; then
140 GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
141 GPGME_LIBS=`$GPGME_CONFIG --libs`
142 AC_MSG_RESULT(yes)
143 ifelse([$2], , :, [$2])
144 else
145 GPGME_CFLAGS=""
146 GPGME_LIBS=""
147 AC_MSG_RESULT(no)
148 ifelse([$3], , :, [$3])
149 fi
150 AC_SUBST(GPGME_CFLAGS)
151 AC_SUBST(GPGME_LIBS)
152 ])
153
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
154 AC_ARG_WITH([gpgme],
155 [AS_HELP_STRING([--with-gpgme],
156 [support for gpg encryption using libgpgme @<:@default=check@:>@])],
157 [],
158 [with_gpgme=check])
159
10b308b Fixed configure.ac again (I broke it with my last change). Added fir…
Damien Stuart authored
160 have_gpgme=yes
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
161 AS_IF([test "x$with_gpgme" != xno],
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compi…
Damien Stuart authored
162 [AM_PATH_GPGME([],
163 [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
164 [if test "x$with_gpgme" != xcheck; then
165 AC_MSG_FAILURE(
166 [--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
167 else
168 have_gpgme=no
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
169 fi
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compi…
Damien Stuart authored
170 ], [have_gpgme=no])], [have_gpgme=no])
171
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
172 dnl Decide whether or not to build the client
173 dnl
174 want_client=yes
175 AC_ARG_ENABLE([client],
176 [AS_HELP_STRING([--enable-client],
177 [Build the fwknop client @<:@default=yes@:>@])],
178 [want_client=$enableval],
179 [])
180 AM_CONDITIONAL([WANT_CLIENT], [test "$want_client" = yes])
181
182 dnl Decide whether or not to build the server
183 dnl
184 want_server=yes
185 AC_ARG_ENABLE([server],
186 [AS_HELP_STRING([--enable-server],
187 [Build the fwknop server @<:@default=yes@:>@])],
188 [want_server=$enableval],
189 [])
190 AM_CONDITIONAL([WANT_SERVER], [test "$want_server" = yes])
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
191
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
192 AC_CONFIG_FILES([Makefile
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
193 lib/Makefile
194 client/Makefile
195 server/Makefile
196 common/Makefile
197 doc/Makefile])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored
198
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored
199 AC_OUTPUT
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
200
201 echo "
202 libfko v${VERSION} has been configured.
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. S…
Damien Stuart authored
203 ============================================
53b7fae Major rearrangement. Renamed directories: "fko" to "lib", "src" to "…
Damien Stuart authored
204 Client build: $want_client
205 Server build: $want_server
206 GPG encryption support: $have_gpgme
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored
207 "
Something went wrong with that request. Please try again.