configure.ac 2.18 KB
Newer Older
1 2 3
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

4
AC_PREREQ([2.59])
5 6 7 8 9 10 11 12 13 14
AC_INIT(bind, 10.0.0, bind10-bugs@isc.org)
AC_CONFIG_SRCDIR(README)
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB

15 16 17
m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3 python3.1])
AM_PATH_PYTHON([3.1])

18 19 20 21 22 23 24 25
# Checks for libraries.

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T

26 27 28 29 30 31 32 33 34
AC_MSG_CHECKING(for sa_len in struct sockaddr)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>],
[struct sockaddr sa; sa.sa_len = 0; return (0);],
        [AC_MSG_RESULT(yes)
        AC_DEFINE(HAVE_SIN_LEN, 1, Define to 1 if sockaddr_in has a sin_len member)],
        AC_MSG_RESULT(no))

35
#
36
# Check availablity of gtest, which might be used for unit tests.
37
#
38 39 40 41
AC_ARG_WITH(gtest,
[  --with-gtest=PATH       specify a path to Gtest header files (PATH/include) and library (PATH/lib)],
    gtest_path="$withval", gtest_path="no")
if test "$gtest_path" != "no"
42
then
43 44 45
	GTEST_INCLUDES="-I${gtest_path}/include"
	GTEST_LDFLAGS="-L${gtest_path}/lib"
	GTEST_LDADD="-lgtest"
46
else
47 48 49
	GTEST_INCLUDES=
	GTEST_LDFLAGS=
	GTEST_LDADD=
50
fi
51 52 53 54
AM_CONDITIONAL(HAVE_GTEST, test $gtest_path != "no")
AC_SUBST(GTEST_INCLUDES)
AC_SUBST(GTEST_LDFLAGS)
AC_SUBST(GTEST_LDADD)
55

56 57 58 59
# Checks for library functions.

AC_CONFIG_FILES([Makefile
                 src/Makefile
60
                 src/bin/Makefile
61
                 src/bin/host/Makefile
62
                 src/bin/parkinglot/Makefile
63
                 src/lib/Makefile
64 65
                 src/lib/cc/Makefile
                 src/lib/cc/cpp/Makefile
Jelte Jansen's avatar
Jelte Jansen committed
66 67
                 src/lib/dns/Makefile
               ])
68
AC_OUTPUT([src/bin/bind-cfgd/bind-cfgd
69
           src/bin/bigtool/run_bigtool
70
           src/bin/bind10/bind10
71
	   src/bin/pymsgq/msgq
72
	   src/bin/pymsgq/msgq_test
73 74
          ], [
           chmod +x src/bin/bind-cfgd/bind-cfgd
75
           chmod +x src/bin/bigtool/run_bigtool
76
           chmod +x src/bin/bind10/bind10
77
           chmod +x src/bin/pymsgq/msgq
78
           chmod +x src/bin/pymsgq/msgq_test
79
          ])
80
AC_OUTPUT