~ubuntu-branches/ubuntu/karmic/libspf2/karmic

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Magnus Holmgren
  • Date: 2008-11-04 21:14:31 UTC
  • mfrom: (1.1.4 upstream) (6.2.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081104211431-4nbkrnj0x3quxup5
Tags: 1.2.9-1
* New upstream release.
  - Drops non-dfsg Free IETF internet draft, so tarball no longer needs
    repacking
  + Fixes exploitable buffer overflow (LP: #287534)
  + Multiple fixes for improved RFC 4408 compliance
  + Update libspf2-2.symbols for new symbol
        + 20_spf_dns_include_std_headers.dpatch: Updated.
* Thanks to Scott Kitterman.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Process this file with autoconf to produce a configure script.
3
3
 
4
4
AC_PREREQ(2.59)
5
 
AC_INIT(libspf2, 1.2.5, libspf2@rt.anarres.org)
 
5
AC_INIT(libspf2, 1.2.9, libspf2@anarres.org)
6
6
AC_CONFIG_AUX_DIR(config)
7
7
AM_INIT_AUTOMAKE(libspf2, $PACKAGE_VERSION)
8
8
AC_CONFIG_SRCDIR([src/libspf2/spf_server.c])
10
10
 
11
11
# remember the version info for later
12
12
 
13
 
major=`echo $PACKAGE_VERSION | sed 's/^\([[0-9]]*\)\.[[0-9]]*\.[[0-9]]*/\1/'`
14
 
minor=`echo $PACKAGE_VERSION | sed 's/^[[0-9]]*\.\([[0-9]]*\)\.[[0-9]]*/\1/'`
15
 
patch=`echo $PACKAGE_VERSION | sed 's/^[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)/\1/'`
 
13
KV_MAJOR=`echo $PACKAGE_VERSION | sed 's/^\([[0-9]]*\)\.[[0-9]]*\.[[0-9]]*/\1/'`
 
14
KV_MINOR=`echo $PACKAGE_VERSION | sed 's/^[[0-9]]*\.\([[0-9]]*\)\.[[0-9]]*/\1/'`
 
15
KV_PATCH=`echo $PACKAGE_VERSION | sed 's/^[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)/\1/'`
 
16
AC_SUBST([KV_MAJOR])
 
17
AC_SUBST([KV_MINOR])
 
18
AC_SUBST([KV_PATCH])
16
19
 
17
 
cat >src/libspf2/spf_lib_version.h <<_EOF_VERSION
 
20
cat >src/include/spf_lib_version.h <<_EOF_VERSION
 
21
/**
 
22
 * @file
 
23
 * @brief Autogenerated configuration information - do not edit.
 
24
 */
18
25
#ifndef INC_SPF_VERSION
19
26
#define INC_SPF_VERSION
20
27
 
21
 
#define SPF_LIB_VERSION_MAJOR   $major
22
 
#define SPF_LIB_VERSION_MINOR   $minor
23
 
#define SPF_LIB_VERSION_PATCH   $patch
 
28
#define SPF_LIB_VERSION_MAJOR   $KV_MAJOR
 
29
#define SPF_LIB_VERSION_MINOR   $KV_MINOR
 
30
#define SPF_LIB_VERSION_PATCH   $KV_PATCH
24
31
 
25
32
#endif
26
33
_EOF_VERSION
27
34
 
 
35
AX_WITH_PERL
 
36
PERL_SUBDIRS=""
 
37
AC_SUBST([PERL_SUBDIRS])
 
38
AC_ARG_ENABLE(perl,
 
39
        AC_HELP_STRING([--enable-perl],
 
40
                [build the Perl/XS interface to libspf2]),
 
41
[
 
42
        PERL_SUBDIRS="perl"
 
43
        AC_CONFIG_COMMANDS([perl/Makefile], [
 
44
                # XXX This needs to use $PERL, somehow.
 
45
                ( cd perl && perl Makefile.PL )
 
46
        ])
 
47
])
 
48
 
28
49
 
29
50
# Checks for programs.
30
51
AC_PROG_CC
41
62
        fi
42
63
fi
43
64
AC_PROG_CPP
44
 
AC_SUBST(SUBDIRS)
 
65
AC_SUBST([SUBDIRS])
45
66
AC_PROG_MAKE_SET
46
 
AC_SUBST(LIBPROGS)
 
67
AC_SUBST([LIBPROGS])
47
68
AC_PROG_LIBTOOL
48
69
AC_PROG_INSTALL
49
70
AC_PROG_LN_S
50
 
AC_PROG_RANLIB
 
71
dnl This is obsolete
 
72
dnl AC_PROG_RANLIB
51
73
 
52
74
# Check if the linker accepts --rpath (for Darwin)
53
75
AC_MSG_CHECKING([if ld accepts --rpath])
63
85
AC_HEADER_SYS_WAIT
64
86
AC_HEADER_TIME
65
87
AC_CHECK_SIZEOF([int])
66
 
AC_CHECK_HEADERS([limits.h])
67
 
AC_CHECK_HEADERS([sys/param.h])
68
 
AC_CHECK_HEADERS([netinet/in.h sys/socket.h syslog.h sys/time.h errno.h sys/types.h])
69
 
AC_CHECK_HEADERS([fcntl.h malloc.h nmemory.h stddef.h inttypes.h stdlib.h string.h syslog.h unistd.h stdarg.h])
70
 
AC_CHECK_HEADERS([pthread.h pwd.h grp.h])
71
 
AC_CHECK_HEADERS([netdb.h arpa/inet.h arpa/nameser.h])
72
 
AC_CHECK_HEADERS([syslog.h])
73
 
AC_CHECK_HEADERS([resolv.h], [], [],
74
 
      [[#if HAVE_SYS_TYPES_H
 
88
AC_CHECK_HEADERS([limits.h sys/param.h syslog.h sys/time.h errno.h sys/types.h])
 
89
AC_CHECK_HEADERS([fcntl.h malloc.h nmemory.h stddef.h inttypes.h stdlib.h string.h unistd.h stdarg.h])
 
90
AC_CHECK_HEADERS([pthread.h pwd.h grp.h libintl.h getopt.h])
 
91
AC_CHECK_HEADERS([netdb.h netinet/in.h sys/socket.h arpa/inet.h arpa/nameser.h])
 
92
AC_CHECK_HEADERS([resolv.h], [], [], [[
 
93
        #if HAVE_SYS_TYPES_H
75
94
        #  include <sys/types.h>
76
95
        #endif
77
 
        #ifdef HAVE_NETINET_IN_H
78
 
        #  include <netinet/in.h>   /* inet_ functions / structs */
79
 
        #endif
80
 
        #ifdef HAVE_ARPA_NAMESER_H
81
 
        #  include <arpa/nameser.h> /* DNS HEADER struct */
82
 
        #endif
83
96
        #ifdef HAVE_SYS_SOCKET_H
84
97
        #  include <sys/socket.h> /* DNS HEADER struct */
85
98
        #endif
86
 
     ]])
87
 
AC_CHECK_HEADERS([libintl.h])
88
 
AC_CHECK_HEADERS([getopt.h])
89
 
 
 
99
        #ifdef HAVE_NETINET_IN_H
 
100
        #  include <netinet/in.h>   /* inet_ functions / structs */
 
101
        #endif
 
102
        #ifdef HAVE_ARPA_NAMESER_H
 
103
        #  include <arpa/nameser.h> /* DNS HEADER struct */
 
104
        #endif
 
105
        ]])
 
106
dnl XXX This is no longer true.
90
107
AC_CHECK_HEADER(pthread.h, , [
91
108
        echo "pthread.h is required to build this program."
92
109
        exit 1;
143
160
AC_C_INLINE
144
161
AC_C_CHAR_UNSIGNED
145
162
AC_CHECK_TYPES([u_char, u_int8_t, u_int16_t, u_int32_t, uint8_t, uint16_t, uint32_t])
146
 
AC_CHECK_TYPES([ns_type], [], [],
147
 
        [[
 
163
AC_CHECK_TYPES([ns_type], [], [], [[
 
164
        #ifdef HAVE_SYS_TYPES_H
 
165
        # include <sys/types.h>
 
166
        #endif
148
167
        #ifdef HAVE_SYS_SOCKET_H
149
168
        # include <sys/socket.h>                /* inet_ functions / structs */
150
169
        #endif
152
171
        # include <netinet/in.h>                /* inet_ functions / structs */
153
172
        #endif
154
173
        #ifdef HAVE_ARPA_NAMESER_H
155
 
        #  include <arpa/nameser.h> /* DNS HEADER struct */
 
174
        # include <arpa/nameser.h> /* DNS HEADER struct */
156
175
        #endif
157
176
        ]])
158
 
AC_CHECK_TYPES([struct in6_addr], [], [],
159
 
        [[
 
177
AC_CHECK_TYPES([struct in6_addr], [], [], [[
160
178
        #ifdef HAVE_NETINET_IN_H
161
 
        #  include <netinet/in.h>   /* inet_ functions / structs */
 
179
        # include <netinet/in.h>   /* inet_ functions / structs */
162
180
        #endif
163
181
        ]])
164
182
 
178
196
 
179
197
# Nowadays, I think libspf2 requires this function to be available.
180
198
AC_CHECK_DECLS([res_ninit], [], [], [[
181
 
        #ifdef HAVE_SYS_SOCKET_H
182
 
        # include <sys/socket.h>                /* inet_ functions / structs */
183
 
        #endif
184
 
        #ifdef HAVE_NETINET_IN_H
185
 
        # include <netinet/in.h>                /* inet_ functions / structs */
186
 
        #endif
187
 
        #ifdef HAVE_ARPA_NAMESER_H
188
 
        #  include <arpa/nameser.h> /* DNS HEADER struct */
189
 
        #endif
190
 
        #include <resolv.h>
 
199
        #ifdef HAVE_SYS_TYPES_H
 
200
        # include <sys/types.h>
 
201
        #endif
 
202
        #ifdef HAVE_SYS_SOCKET_H
 
203
        # include <sys/socket.h>                /* inet_ functions / structs */
 
204
        #endif
 
205
        #ifdef HAVE_NETINET_IN_H
 
206
        # include <netinet/in.h>                /* inet_ functions / structs */
 
207
        #endif
 
208
        #ifdef HAVE_ARPA_NAMESER_H
 
209
        #  include <arpa/nameser.h> /* DNS HEADER struct */
 
210
        #endif
 
211
        #ifdef HAVE_RESOLV_H
 
212
        # include <resolv.h>
 
213
        #endif
 
214
        ]])
 
215
AC_CHECK_DECLS([res_ndestroy], [], [], [[
 
216
        #ifdef HAVE_SYS_TYPES_H
 
217
        # include <sys/types.h>
 
218
        #endif
 
219
        #ifdef HAVE_SYS_SOCKET_H
 
220
        # include <sys/socket.h>                /* inet_ functions / structs */
 
221
        #endif
 
222
        #ifdef HAVE_NETINET_IN_H
 
223
        # include <netinet/in.h>                /* inet_ functions / structs */
 
224
        #endif
 
225
        #ifdef HAVE_ARPA_NAMESER_H
 
226
        #  include <arpa/nameser.h> /* DNS HEADER struct */
 
227
        #endif
 
228
        #ifdef HAVE_RESOLV_H
 
229
        # include <resolv.h>
 
230
        #endif
 
231
        ]])
 
232
 
 
233
AC_CHECK_DECLS([ns_t_spf], [], [], [[
 
234
        #ifdef HAVE_SYS_TYPES_H
 
235
        # include <sys/types.h>
 
236
        #endif
 
237
        #ifdef HAVE_SYS_SOCKET_H
 
238
        # include <sys/socket.h>                /* inet_ functions / structs */
 
239
        #endif
 
240
        #ifdef HAVE_NETINET_IN_H
 
241
        # include <netinet/in.h>                /* inet_ functions / structs */
 
242
        #endif
 
243
        #ifdef HAVE_ARPA_NAMESER_H
 
244
        #  include <arpa/nameser.h> /* DNS HEADER struct */
 
245
        #endif
 
246
        #ifdef HAVE_RESOLV_H
 
247
        # include <resolv.h>
 
248
        #endif
 
249
        ]])
 
250
 
 
251
AC_CHECK_DECLS([ns_t_invalid], [], [], [[
 
252
        #ifdef HAVE_SYS_TYPES_H
 
253
        # include <sys/types.h>
 
254
        #endif
 
255
        #ifdef HAVE_SYS_SOCKET_H
 
256
        # include <sys/socket.h>                /* inet_ functions / structs */
 
257
        #endif
 
258
        #ifdef HAVE_NETINET_IN_H
 
259
        # include <netinet/in.h>                /* inet_ functions / structs */
 
260
        #endif
 
261
        #ifdef HAVE_ARPA_NAMESER_H
 
262
        #  include <arpa/nameser.h> /* DNS HEADER struct */
 
263
        #endif
 
264
        #ifdef HAVE_RESOLV_H
 
265
        # include <resolv.h>
 
266
        #endif
191
267
        ]])
192
268
 
193
269
AC_CHECK_FUNCS([ftruncate gethostname memmove memset socket])
195
271
AC_CHECK_FUNCS([strcasecmp strncasecmp strspn strtoul])
196
272
AC_CHECK_FUNCS([gethostbyname inet_ntoa select strrchr strstr strtol])
197
273
 
198
 
AC_REPLACE_FUNCS([getopt_long_only])
 
274
AC_REPLACE_FUNCS([getopt_long_only strncasecmp])
199
275
AC_REPLACE_FUNCS([__ns_initparse __ns_name_uncompress __ns_get16 __ns_msg_getflag])
200
276
 
201
277
AC_CONFIG_FILES([Makefile
 
278
                 Doxyfile
202
279
                 src/Makefile
203
280
                 src/include/Makefile
204
281
                 src/libreplace/Makefile
206
283
                 src/spfquery/Makefile
207
284
                 src/spftest/Makefile
208
285
                 src/spfd/Makefile
209
 
                 src/spf_example/Makefile
210
 
                 docs/Makefile
211
 
                 tests/Makefile])
 
286
                 src/spf_example/Makefile])
212
287
AC_OUTPUT