Skip to content
Newer
Older
100644 180 lines (158 sloc) 4.9 KB
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
1 dnl Process thie file with autoconf to produce teh configure script
2
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored Jan 25, 2009
3 AC_PREREQ(2.61)
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
4
5 m4_define(my_package, [fwknop])
7951d32 Make version consistent for real this time.
Damien Stuart authored Jan 27, 2009
6 m4_define(my_version, [1.10.0-alpha])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
7 m4_define(my_bug_email, [dstuart@dstuart.org])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
8
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
9 AC_INIT(my_package, my_version, my_bug_email)
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored Dec 24, 2008
10 AC_CONFIG_AUX_DIR(config)
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored Jan 25, 2009
11
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. Se…
Damien Stuart authored Jan 25, 2009
12 #AM_INIT_AUTOMAKE(my_package, my_version)
13 AM_INIT_AUTOMAKE([-Wall foreign])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
14
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
15 dnl AM_MAINTAINER_MODE
16
17 AC_CONFIG_HEADER([config.h])
18
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
19 AC_GNU_SOURCE
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
20
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
21 AC_PROG_CC
22 AM_PROG_CC_C_O
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
23 AC_PROG_CXX
24 AC_PROG_CPP
25 AC_PROG_INSTALL
26 AC_PROG_LN_S
27 AC_PROG_MAKE_SET
474a787 more checks for configure. omit salt from Rijndael-encrypted data as …
Damien Stuart authored Dec 28, 2008
28 AC_PROG_RANLIB
e113cb7 Updates to allow for building libfko as a shared lib. (make use of li…
Damien Stuart authored Dec 25, 2008
29 AC_PROG_LIBTOOL
30
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
31 # Checks for header files.
32 #
33 AC_HEADER_STDC
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compil…
Damien Stuart authored Feb 22, 2009
34 AC_CHECK_HEADERS([ctype.h endian.h netinet/in.h stdlib.h string.h strings.h sys/endian.h sys/socket.h sys/time.h termios.h unistd.h])
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
35
36 # Type checks.
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
37 #
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored Jan 25, 2009
38 AC_C_CONST
deb85dd Total re-arrangement for autoconf/automake implementation.
Damien Stuart authored Dec 21, 2008
39 AC_TYPE_OFF_T
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
40 AC_TYPE_SIZE_T
41 AC_TYPE_INT16_T
42 AC_TYPE_INT32_T
43 AC_TYPE_INT64_T
44 AC_TYPE_INT8_T
45 AC_TYPE_SIZE_T
46 AC_HEADER_TIME
47 AC_TYPE_UINT32_T
48 AC_TYPE_UINT8_T
2a51204 Removing files that are auto-generated by the autogen.sh script.
Damien Stuart authored Jan 25, 2009
49 AC_CHECK_SIZEOF(unsigned int)
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
50
51 # Checks for library functions.
52 #
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored Dec 24, 2008
53 AC_FUNC_MALLOC
474a787 more checks for configure. omit salt from Rijndael-encrypted data as …
Damien Stuart authored Dec 28, 2008
54 AC_FUNC_REALLOC
be3bb07 Added getpasswd routine for getting a password from the user. A few u…
Damien Stuart authored Feb 10, 2009
55 AC_FUNC_STAT
56 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
57
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compil…
Damien Stuart authored Feb 22, 2009
58 dnl For finding and checking gpgme (taken from the gpgme.m4 file that
59 dnl comes with gpgme)
60 dnl
61 AC_DEFUN([_AM_PATH_GPGME_CONFIG],
62 [ AC_ARG_WITH(gpgme-prefix,
63 AC_HELP_STRING([--with-gpgme-prefix=PFX],
64 [prefix where GPGME is installed (optional)]),
65 gpgme_config_prefix="$withval", gpgme_config_prefix="")
66 if test "x$gpgme_config_prefix" != x ; then
67 GPGME_CONFIG="$gpgme_config_prefix/bin/gpgme-config"
68 fi
69 AC_PATH_PROG(GPGME_CONFIG, gpgme-config, no)
70
71 if test "$GPGME_CONFIG" != "no" ; then
72 gpgme_version=`$GPGME_CONFIG --version`
73 fi
74 gpgme_version_major=`echo $gpgme_version | \
75 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
76 gpgme_version_minor=`echo $gpgme_version | \
77 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
78 gpgme_version_micro=`echo $gpgme_version | \
79 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
80 ])
81
82 dnl AM_PATH_GPGME([MINIMUM-VERSION,
83 dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
84 dnl Test for libgpgme and define GPGME_CFLAGS and GPGME_LIBS.
85 dnl
86 AC_DEFUN([AM_PATH_GPGME],
87 [ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
88 tmp=ifelse([$1], ,1:0.4.2,$1)
89 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
90 req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
91 min_gpgme_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
92 else
93 req_gpgme_api=0
94 min_gpgme_version="$tmp"
95 fi
96
97 AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
98 ok=no
99 if test "$GPGME_CONFIG" != "no" ; then
100 req_major=`echo $min_gpgme_version | \
101 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
102 req_minor=`echo $min_gpgme_version | \
103 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
104 req_micro=`echo $min_gpgme_version | \
105 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
106 if test "$gpgme_version_major" -gt "$req_major"; then
107 ok=yes
108 else
109 if test "$gpgme_version_major" -eq "$req_major"; then
110 if test "$gpgme_version_minor" -gt "$req_minor"; then
111 ok=yes
112 else
113 if test "$gpgme_version_minor" -eq "$req_minor"; then
114 if test "$gpgme_version_micro" -ge "$req_micro"; then
115 ok=yes
116 fi
117 fi
118 fi
119 fi
120 fi
121 fi
122 if test $ok = yes; then
123 # If we have a recent GPGME, we should also check that the
124 # API is compatible.
125 if test "$req_gpgme_api" -gt 0 ; then
126 tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
127 if test "$tmp" -gt 0 ; then
128 if test "$req_gpgme_api" -ne "$tmp" ; then
129 ok=no
130 fi
131 fi
132 fi
133 fi
134 if test $ok = yes; then
135 GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
136 GPGME_LIBS=`$GPGME_CONFIG --libs`
137 AC_MSG_RESULT(yes)
138 ifelse([$2], , :, [$2])
139 else
140 GPGME_CFLAGS=""
141 GPGME_LIBS=""
142 AC_MSG_RESULT(no)
143 ifelse([$3], , :, [$3])
144 fi
145 AC_SUBST(GPGME_CFLAGS)
146 AC_SUBST(GPGME_LIBS)
147 ])
148
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. Se…
Damien Stuart authored Jan 25, 2009
149 AC_ARG_WITH([gpgme],
150 [AS_HELP_STRING([--with-gpgme],
151 [support for gpg encryption using libgpgme @<:@default=check@:>@])],
152 [],
153 [with_gpgme=check])
154
10b308b Fixed configure.ac again (I broke it with my last change). Added firs…
Damien Stuart authored Jan 26, 2009
155 have_gpgme=yes
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. Se…
Damien Stuart authored Jan 25, 2009
156 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
157 [AM_PATH_GPGME([],
158 [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
159 [if test "x$with_gpgme" != xcheck; then
160 AC_MSG_FAILURE(
161 [--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
162 else
163 have_gpgme=no
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. Se…
Damien Stuart authored Jan 25, 2009
164 fi
41127cd Added better autoconf handling of gpgpme. Fixes so libfko will compil…
Damien Stuart authored Feb 22, 2009
165 ], [have_gpgme=no])], [have_gpgme=no])
166
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored Jan 25, 2009
167
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored Dec 24, 2008
168 AC_CONFIG_FILES([Makefile
169 fko/Makefile
65e11ab Added documentation stub.
Damien Stuart authored Dec 25, 2008
170 doc/Makefile
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored Dec 24, 2008
171 src/Makefile])
a82c361 Another major re-write of the fwknop library.
Damien Stuart authored Dec 24, 2008
172
1cdf9fd Re-arrangement of source tree.
Damien Stuart authored Dec 24, 2008
173 AC_OUTPUT
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored Jan 25, 2009
174
175 echo "
176 libfko v${VERSION} has been configured.
18c0560 Fixed gpgme check so it would not fail if gpgme was not installed. Se…
Damien Stuart authored Jan 25, 2009
177 ============================================
178 GPG encryption support: $have_gpgme
e846cdd First cut at GPG encrytion support (decryption and doc update are pen…
Damien Stuart authored Jan 25, 2009
179 "
Something went wrong with that request. Please try again.