-
Notifications
You must be signed in to change notification settings - Fork 9
/
configure.ac
177 lines (157 loc) · 5.08 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
##
## $Id: configure.ac,v 1.114 2005/04/21 16:40:13 bboy Exp $
##
## Copyright (C) 2002-2005 Don Moore <bboy@bboy.net>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at Your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
AC_INIT(mydns, [1.2.8.31], [http://bugs.mydns-ng.com/])
AC_USE_SYSTEM_EXTENSIONS
AC_PREREQ([2.60])
AC_COPYRIGHT([Portions of this script are Copyright 2002-2005 Don Moore 2007-2009 Howard Wilkinson])
AM_INIT_AUTOMAKE([1.9.5 dist-bzip2])
AM_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
## Checks for programs
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_LIBTOOL
## GNU gettext
AM_GNU_GETTEXT
AM_GNU_GETTEXT_VERSION(0.12)
## Checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h getopt.h libintl.h netdb.h pwd.h signal.h stdarg.h termios.h time.h])
AC_CHECK_HEADERS([sys/fcntl.h sys/file.h sys/ioctl.h sys/resource.h])
AC_CHECK_HEADERS([sys/socket.h sys/sockio.h sys/time.h sys/wait.h])
AC_CHECK_HEADERS([sys/select.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([net/if.h])
AC_CHECK_HEADERS([arpa/inet.h])
AC_CHECK_HEADERS([inttypes.h])
AC_CHECK_HEADERS([string.h])
AC_CHECK_HEADERS([poll.h])
AC_CHECK_HEADERS([langinfo.h])
AC_CHECK_HEADERS([stdio_ext.h])
AC_CHECK_HEADERS([syslog.h])
## Typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_PID_T
AC_TYPE_SSIZE_T
AC_TYPE_UID_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
AC_TYPE_OFF_T
AC_CHECK_TYPES([uchar uint uint8_t uint16_t uint32_t])
## Library functions
AC_FUNC_MALLOC
AC_TYPE_SIGNAL
AC_FUNC_ALLOCA
AC_FUNC_REALLOC
AC_FUNC_CHOWN
AC_FUNC_FORK
AC_FUNC_STRCOLL
AC_CHECK_FUNCS([memset getpwuid shutdown inet_pton strsep strndup strdup strncmp])
AC_CHECK_FUNCS([select poll])
AC_CHECK_FUNCS([getaddrinfo getnameinfo])
AC_CHECK_FUNCS([alarm])
AC_CHECK_FUNCS([gethostbyname])
AC_CHECK_FUNCS([gethostname])
AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([inet_ntoa])
AC_CHECK_FUNCS([memchr])
AC_CHECK_FUNCS([memmove])
AC_CHECK_FUNCS([mkdir])
AC_CHECK_FUNCS([nl_langinfo])
AC_CHECK_FUNCS([socket])
AC_CHECK_FUNCS([strchr])
AC_CHECK_FUNCS([strcspn])
AC_CHECK_FUNCS([strerror])
AC_CHECK_FUNCS([strncasecmp])
AC_CHECK_FUNCS([strpbrk])
AC_CHECK_FUNCS([strrchr])
AC_CHECK_FUNCS([strstr])
AC_CHECK_FUNCS([strtol])
AC_CHECK_FUNC(inet_ntop, AC_DEFINE(HAVE_INET_NTOP, 1, [Define to 1 if you have the 'inet_ntop' function.]),
AC_CHECK_LIB(nsl, inet_ntop, AC_DEFINE(HAVE_INET_NTOP, 1, [Define to 1 if you have the 'inet_ntop' function.])))
AC_LIB_SOCKET
AC_LIB_NSL
AC_LIB_MATH
## Declarations
AC_CHECK_DECLS([strcasecmp, strcoll, strerror, strncasecmp, strsep, strndup, strdup, strncmp])
AC_CHECK_DECLS([poll, select])
##
## Package-specific variables
##
PACKAGE_HOMEPAGE="http://mydns.bboy.net"
PACKAGE_COPYRIGHT="Copyright (C) 2002-2005 Don Moore 2007-2008 Howard Wilkinson"
PACKAGE_AUTHOR="Don Moore <bboy@bboy.net> Howard Wilkinson <howard@cohtech.com>"
##
## Some MyDNS-specific checks (see m4/mydns.m4)
##
AC_CHECK_IPV6 # Check IPv6 support
AC_CHECK_SOCKADDR_SA_LEN # Check for sa_len in struct sockaddr_in
AC_MYDNS_PKGINFO # Set some package-specific variables
AC_ENABLE_ALIAS # Enable David Phillips aliasing?
AC_CHECK_MYSQL # Check for MySQL support
AC_CHECK_PGSQL # Check for PostgreSQL support
AC_WITH_OPENSSL # Check if OpenSSL is desired
AC_MYDNS_CONF # Set conf file location
AC_ENABLE_STATIC_BUILD # Build static binary?
AC_CHOOSE_DB # Choose between MySQL and PostgreSQL
AC_ENABLE_PROFILING # Enable profiling?
AC_ENABLE_DEBUG # Enable debugging?
AC_ENABLE_VALGRIND # Compile with Valgrind-friendly flags?
AC_ENABLE_STRICT # Compile with extra-strict warnings?
AC_ENABLE_ALT_NAMES # Alternate column names for DN
AC_ENABLE_STATUS # Enable the STATUS opcode to check server status
AC_DISABLE_DATE_LOGGING # Disable date/time in verbose output?
AC_MYDNS_VARS # Set variables containing dirs
AC_CONFIG_FILES(contrib/Makefile intl/Makefile\
po/Makefile.in \
m4/Makefile \
Makefile \
lib/Makefile \
src/Makefile \
src/lib/Makefile \
src/mydns/Makefile \
src/util/Makefile \
pkg/Makefile \
doc/Makefile \
doc/mydns.8 \
doc/mydnscheck.8 \
doc/mydns.conf.5 \
doc/mydns-conf.8 \
doc/mydnsexport.8 \
doc/mydnsimport.8 \
doc/mydnsptrconvert.8 \
pkg/mydns-mysql.spec \
pkg/mydns-postgres.spec
)
AC_OUTPUT
echo
echo " ###"
echo " ### MyDNS $PACKAGE_VERSION configured. Using $USE_DB_NAME database."
echo " ###"
echo " ### Type \"make\" to build, then \"make install\" to install."
echo " ###"
echo
## vi:set ts=3: