Deleted Added
sdiff udiff text old ( 266114 ) new ( 276605 )
full compact
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3AC_PREREQ(2.56)
4sinclude(acx_nlnetlabs.m4)
5sinclude(ax_pthread.m4)
6sinclude(acx_python.m4)
7sinclude(ac_pkg_swig.m4)
8
9# must be numbers. ac_defun because of later processing
10m4_define([VERSION_MAJOR],[1])
11m4_define([VERSION_MINOR],[4])
12m4_define([VERSION_MICRO],[22])
13AC_INIT(unbound, m4_defn([VERSION_MAJOR]).m4_defn([VERSION_MINOR]).m4_defn([VERSION_MICRO]), unbound-bugs@nlnetlabs.nl, unbound)
14AC_SUBST(UNBOUND_VERSION_MAJOR, [VERSION_MAJOR])
15AC_SUBST(UNBOUND_VERSION_MINOR, [VERSION_MINOR])
16AC_SUBST(UNBOUND_VERSION_MICRO, [VERSION_MICRO])
17
18LIBUNBOUND_CURRENT=4
19LIBUNBOUND_REVISION=1
20LIBUNBOUND_AGE=2
21# 1.0.0 had 0:12:0
22# 1.0.1 had 0:13:0
23# 1.0.2 had 0:14:0
24# 1.1.0 had 0:15:0
25# 1.1.1 had 0:16:0
26# 1.2.0 had 0:17:0
27# 1.2.1 had 0:18:0
28# 1.3.0 had 1:0:0 # ub_cancel and -export-symbols.

--- 20 unchanged lines hidden (view full) ---

49# 1.4.14 had 2:14:0
50# 1.4.15 had 3:0:1 # adds ub_version()
51# 1.4.16 had 3:1:1
52# 1.4.17 had 3:2:1
53# 1.4.18 had 3:3:1
54# 1.4.19 had 3:4:1
55# 1.4.20 had 4:0:2 # adds libunbound.ttl # but shipped 3:5:1
56# 1.4.21 had 4:1:2
57
58# Current -- the number of the binary API that we're implementing
59# Revision -- which iteration of the implementation of the binary
60# API are we supplying?
61# Age -- How many previous binary API versions do we also
62# support?
63#
64# If we release a new version that does not change the binary API,

--- 192 unchanged lines hidden (view full) ---

257AC_PROG_LEX
258ACX_YYLEX_DESTROY
259AC_PROG_YACC
260AC_CHECK_PROG(doxygen, doxygen, doxygen)
261AC_CHECK_TOOL(STRIP, strip)
262ACX_LIBTOOL_C_ONLY
263
264# Checks for header files.
265AC_CHECK_HEADERS([stdarg.h stdbool.h netinet/in.h sys/param.h sys/socket.h sys/uio.h sys/resource.h arpa/inet.h syslog.h netdb.h sys/wait.h pwd.h glob.h grp.h login_cap.h winsock2.h ws2tcpip.h],,, [AC_INCLUDES_DEFAULT])
266
267# check for types.
268# Using own tests for int64* because autoconf builtin only give 32bit.
269AC_CHECK_TYPE(int8_t, signed char)
270AC_CHECK_TYPE(int16_t, short)
271AC_CHECK_TYPE(int32_t, int)
272AC_CHECK_TYPE(int64_t, long long)
273AC_CHECK_TYPE(uint8_t, unsigned char)

--- 35 unchanged lines hidden (view full) ---

309AC_SEARCH_LIBS([socket], [socket])
310
311# check wether strptime also works
312AC_DEFUN([AC_CHECK_STRPTIME_WORKS],
313[AC_REQUIRE([AC_PROG_CC])
314AC_MSG_CHECKING(whether strptime works)
315if test c${cross_compiling} = cno; then
316AC_RUN_IFELSE([AC_LANG_SOURCE([[
317#define _XOPEN_SOURCE
318#include <time.h>
319int main(void) { struct tm tm; char *res;
320res = strptime("2010-07-15T00:00:00+00:00", "%t%Y%t-%t%m%t-%t%d%tT%t%H%t:%t%M%t:%t%S%t", &tm);
321if (!res) return 2;
322res = strptime("20070207111842", "%Y%m%d%H%M%S", &tm);
323if (!res) return 1; return 0; }
324]])] , [eval "ac_cv_c_strptime_works=yes"], [eval "ac_cv_c_strptime_works=no"])
325else

--- 131 unchanged lines hidden (view full) ---

457# Check for Python & SWIG only on PyUnbound or PyModule
458if test x_$ub_test_python != x_no; then
459
460 # Check for Python
461 ub_have_python=no
462 ac_save_LIBS="$LIBS" dnl otherwise AC_PYTHON_DEVEL thrashes $LIBS
463 AC_PYTHON_DEVEL
464 if test ! -z "$PYTHON_VERSION"; then
465 if test `$PYTHON -c "print '$PYTHON_VERSION' >= '2.4.0'"` = "False"; then
466 AC_ERROR([Python version >= 2.4.0 is required])
467 fi
468
469 # Have Python
470 AC_DEFINE(HAVE_PYTHON,1,[Define if you have Python libraries and header files.])
471 LIBS="$PYTHON_LDFLAGS $LIBS"
472 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
473 ub_have_python=yes

--- 75 unchanged lines hidden (view full) ---

549 LIBS="$LIBS -lnss3 -lnspr4"
550 ]
551)
552
553# openssl
554if test $USE_NSS = "no"; then
555ACX_WITH_SSL
556ACX_LIB_SSL
557AC_CHECK_HEADERS([openssl/conf.h],,, [AC_INCLUDES_DEFAULT])
558AC_CHECK_HEADERS([openssl/engine.h],,, [AC_INCLUDES_DEFAULT])
559AC_CHECK_FUNCS([OPENSSL_config EVP_sha1 EVP_sha256 EVP_sha512 FIPS_mode])
560AC_CHECK_DECLS([SSL_COMP_get_compression_methods,sk_SSL_COMP_pop_free], [], [], [
561AC_INCLUDES_DEFAULT
562#ifdef HAVE_OPENSSL_ERR_H
563#include <openssl/err.h>
564#endif

--- 149 unchanged lines hidden (view full) ---

714 if test $USE_NSS = "no"; then
715 AC_CHECK_FUNC(ECDSA_sign, [], [AC_MSG_ERROR([OpenSSL does not support ECDSA: please upgrade or rerun with --disable-ecdsa])])
716 AC_CHECK_FUNC(SHA384_Init, [], [AC_MSG_ERROR([OpenSSL does not support SHA384: please upgrade or rerun with --disable-ecdsa])])
717 AC_CHECK_DECLS([NID_X9_62_prime256v1, NID_secp384r1], [], [AC_MSG_ERROR([OpenSSL does not support the ECDSA curves: please upgrade or rerun with --disable-ecdsa])], [AC_INCLUDES_DEFAULT
718#include <openssl/evp.h>
719 ])
720 # see if OPENSSL 1.0.0 or later (has EVP MD and Verify independency)
721 AC_MSG_CHECKING([if openssl supports SHA2 and ECDSA with EVP])
722 if grep OPENSSL_VERSION_NUMBER $ssldir/include/openssl/opensslv.h | grep 0x0 >/dev/null; then
723 AC_MSG_RESULT([no])
724 AC_DEFINE_UNQUOTED([USE_ECDSA_EVP_WORKAROUND], [1], [Define this to enable an EVP workaround for older openssl])
725 else
726 AC_MSG_RESULT([yes])
727 fi
728 fi
729 # we now know we have ECDSA and the required curves.
730 AC_DEFINE_UNQUOTED([USE_ECDSA], [1], [Define this to enable ECDSA support.])
731 use_ecdsa="yes"
732 ;;
733esac

--- 227 unchanged lines hidden (view full) ---

961AC_REPLACE_FUNCS(inet_aton)
962AC_REPLACE_FUNCS(inet_pton)
963AC_REPLACE_FUNCS(inet_ntop)
964AC_REPLACE_FUNCS(snprintf)
965AC_REPLACE_FUNCS(strlcat)
966AC_REPLACE_FUNCS(strlcpy)
967AC_REPLACE_FUNCS(memmove)
968AC_REPLACE_FUNCS(gmtime_r)
969LIBOBJ_WITHOUT_CTIME="$LIBOBJS"
970AC_SUBST(LIBOBJ_WITHOUT_CTIME)
971AC_REPLACE_FUNCS(ctime_r)
972
973AC_ARG_ENABLE(allsymbols, AC_HELP_STRING([--enable-allsymbols], [export all symbols from libunbound and link binaries to it, smaller install size but libunbound export table is polluted by internal symbols]))
974case "$enable_allsymbols" in
975 yes)
976 COMMON_OBJ_ALL_SYMBOLS=""

--- 20 unchanged lines hidden (view full) ---

997 echo checklock_stop >> clubsyms.def
998 echo checklock_lock >> clubsyms.def
999 echo checklock_unlock >> clubsyms.def
1000 echo checklock_init >> clubsyms.def
1001 echo checklock_thrcreate >> clubsyms.def
1002 echo checklock_thrjoin >> clubsyms.def
1003fi
1004
1005AC_MSG_CHECKING([if ${MAKE:-make} supports $< with implicit rule in scope])
1006# on openBSD, the implicit rule make $< work.
1007# on Solaris, it does not work ($? is changed sources, $^ lists dependencies).
1008# gmake works.
1009cat >conftest.make <<EOF
1010all: conftest.lo
1011
1012conftest.lo foo.lo bla.lo:

--- 141 unchanged lines hidden (view full) ---

1154#endif
1155
1156#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
1157#define strptime unbound_strptime
1158struct tm;
1159char *strptime(const char *s, const char *format, struct tm *tm);
1160#endif
1161
1162#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && !(defined(HAVE_EV_LOOP) || defined(HAVE_EV_DEFAULT_LOOP)) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
1163 /* using version of libevent that is not threadsafe. */
1164# define LIBEVENT_SIGNAL_PROBLEM 1
1165#endif
1166
1167#ifndef CHECKED_INET6
1168# define CHECKED_INET6
1169# ifdef AF_INET6

--- 34 unchanged lines hidden (view full) ---

1204/** default port for unbound control traffic, registered port with IANA,
1205 ub-dns-control 8953/tcp unbound dns nameserver control */
1206#define UNBOUND_CONTROL_PORT 8953
1207/** the version of unbound-control that this software implements */
1208#define UNBOUND_CONTROL_VERSION 1
1209
1210])
1211
1212AC_CONFIG_FILES([Makefile doc/example.conf doc/libunbound.3 doc/unbound.8 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound.conf.5 doc/unbound-control.8 smallapp/unbound-control-setup.sh])
1213AC_CONFIG_HEADER([config.h])
1214AC_OUTPUT