tweak configure options based on feedback from build log, looks like more
[debian/amanda] / configure.in
1 AC_INIT
2 AC_CONFIG_SRCDIR([common-src/amanda.h])
3 AC_CONFIG_AUX_DIR(config)
4 AC_CANONICAL_TARGET([])
5
6 PACKAGE=amanda
7 AC_SUBST(PACKAGE)
8
9 AM_INIT_AUTOMAKE(amanda, "2.6.1")
10 AC_CONFIG_HEADERS([config/config.h])
11
12 dnl Minimum Autoconf version required.
13 AC_PREREQ(2.59)
14
15 #
16 # Take care of some early Amanda-specific setup
17 #
18 AMANDA_INIT_SUMMARY
19 AMANDA_SNAPSHOT_STAMP
20 AMANDA_SPLIT_VERSION
21 AMANDA_CONFIG_LOCAL
22
23 #
24 # Set up compiler location, basic flags, and include locations
25 # and library locations before we start checking the system
26 # configuration in more detail...
27 #
28 AC_PROG_CC
29 gl_EARLY
30 gl_INIT
31 AC_OBJEXT
32 AC_EXEEXT
33 AMANDA_INIT_FLAGS
34 AMANDA_ADD_CPPFLAGS([-D_GNU_SOURCE])
35
36 dnl -------------------------------------------------------------------------
37
38 #
39 # Configuration flags (--with-xxx and --enable-xxx)
40 #
41
42 AMANDA_WITH_USER
43 AMANDA_WITH_GROUP
44 AMANDA_WITH_APPLICATIONDIR
45 AMANDA_WITH_CONFIGDIR
46 AMANDA_WITH_INDEXDIR
47 AMANDA_WITH_DBDIR
48 AMANDA_WITH_LOGDIR
49 AMANDA_WITH_SUFFIXES
50 AMANDA_WITH_GNUTAR_LISTDIR
51 AMANDA_WITH_TMPDIR
52 AMANDA_WITH_FORCE_UID
53 AMANDA_WITH_OWNER
54 AMANDA_WITH_FQDN
55 AMANDA_WITH_REUSEPORTS
56 AMANDA_WITH_PORTRANGES
57 AMANDA_WITH_BUFFERED_DUMP
58 AMANDA_WITH_MAXTAPEBLOCKSIZE
59 AMANDA_WITH_ASSERTIONS
60 AMANDA_WITH_DEBUGGING
61 AMANDA_WITH_DEBUG_DAYS
62 AMANDA_WITH_TESTING
63 AMANDA_WITH_SINGLE_USERID
64 AMANDA_DISABLE_INSTALLPERMS
65
66 dnl -------------------------------------------------------------------------
67
68 #
69 # Set up for Amanda components and modules
70 #
71 AMANDA_CHECK_COMPONENTS
72 AMANDA_SETUP_AMPLOT
73 AMANDA_SETUP_DOCUMENTATION
74 AMANDA_SETUP_DEFAULTS
75 AMANDA_SETUP_LFS
76 AMANDA_SETUP_CHANGER
77 AMANDA_SETUP_GETFSENT
78 AMANDA_SETUP_FILE_LOCKING
79 AMANDA_SETUP_SWIG
80 AMANDA_CHECK_COMPRESSION
81 AMANDA_CHECK_IPV6
82 AMANDA_CHECK_SHMEM
83 AMANDA_CHECK_READDIR
84 AMANDA_CHECK_DEVICE_PREFIXES
85 AMANDA_SYSHACKS
86 AMANDA_EXPAND_DIRS
87
88 #
89 # Internationalization
90 #
91 AMANDA_SETUP_I18N
92 dnl These lines *must* be in configure.in, and not indented
93 AM_GNU_GETTEXT_VERSION([0.15])
94 AM_GNU_GETTEXT([external])
95
96 #
97 # Devices
98 #
99 AMANDA_S3_DEVICE
100 AMANDA_TAPE_DEVICE
101
102 #
103 # Security (authentication) mechansims
104 #
105 AMANDA_BSD_SECURITY
106 AMANDA_BSDTCP_SECURITY
107 AMANDA_BSDUDP_SECURITY
108 AMANDA_RSH_SECURITY
109 AMANDA_SSH_SECURITY
110 AMANDA_KRB4_SECURITY
111 AMANDA_KRB5_SECURITY
112
113 #
114 # Dumpers
115 #
116 AMANDA_PROG_XFSDUMP_XFSRESTORE
117 AMANDA_PROG_VXDUMP_VXRESTORE
118 AMANDA_PROG_VDUMP_VRESTORE
119 AMANDA_PROG_DUMP_RESTORE
120 AMANDA_PROG_GNUTAR
121 AMANDA_PROG_SAMBA_CLIENT
122 AMANDA_CHECK_USE_RUNDUMP
123
124 #
125 # Look for other programs Amanda will use
126
127 AMANDA_PROG_GREP
128 AC_PROG_EGREP
129 AMANDA_PROG_LINT
130 AM_PROG_LEX
131 AMANDA_PROG_AR
132 AMANDA_PROG_GETTEXT
133 AC_PROG_AWK
134 AC_PROG_YACC
135 AC_PROG_MKDIR_P
136 AMANDA_PROG_DD
137 AMANDA_PROG_BASH
138 AMANDA_PROG_SORT
139 AMANDA_PROG_MAILER
140 AMANDA_PROG_MT
141 AMANDA_PROG_PRINT
142 AMANDA_PROG_PCAT
143 AMANDA_PROG_PERL
144 AMANDA_PROG_SWIG
145 AMANDA_PS_ARGUMENT
146
147 dnl -------------------------------------------------------------------------
148
149 #
150 # Compiler / system characteristics
151 #
152
153 #
154 # compiler
155 #
156 AC_PROG_GCC_TRADITIONAL
157 AC_C_CONST
158 AC_C_BIGENDIAN
159
160 # GCC_COMPILER is needed in the gnulib Makefile to silence errors
161 AM_CONDITIONAL([GCC_COMPILER], [test "x$GCC" = "xyes"])
162
163 #
164 # Warnings
165 #
166 AMANDA_ENABLE_GCC_WARNING([parentheses])
167 AMANDA_ENABLE_GCC_WARNING([declaration-after-statement])
168 AMANDA_ENABLE_GCC_WARNING([missing-prototypes])
169 AMANDA_ENABLE_GCC_WARNING([strict-prototypes])
170 AMANDA_ENABLE_GCC_WARNING([missing-declarations])
171 AMANDA_ENABLE_GCC_WARNING([format])
172 AMANDA_ENABLE_GCC_WARNING([format-security])
173 AMANDA_ENABLE_GCC_WARNING([sign-compare])
174 AMANDA_ENABLE_GCC_WARNING([float-equal])
175 AMANDA_ENABLE_GCC_WARNING([old-style-definition])
176 AMANDA_DISABLE_GCC_WARNING([strict-aliasing])
177 AMANDA_DISABLE_GCC_WARNING([unknown-pragmas])
178
179
180 #
181 # Libtool
182 #
183 AM_PROG_LIBTOOL
184 AC_SUBST(LIBTOOL_DEPS)
185 AMANDA_STATIC_FLAGS
186
187 #
188 # headers
189 #
190 AC_HEADER_DIRENT
191 AC_HEADER_STDC
192 AC_HEADER_TIME
193 AC_CHECK_HEADERS(
194         arpa/inet.h \
195         grp.h \
196         libc.h \
197         libgen.h \
198         limits.h \
199         math.h \
200         netdb.h \
201         netinet/in.h \
202         regex.h \
203         stdarg.h \
204         stdlib.h \
205         strings.h \
206         sys/file.h \
207         sys/ioctl.h \
208         sys/ipc.h \
209         sys/mntent.h \
210         sys/param.h \
211         sys/select.h \
212         sys/stat.h \
213         sys/shm.h \
214         sys/time.h \
215         sys/types.h \
216         sys/uio.h \
217         syslog.h \
218         time.h \
219         unistd.h \
220 )
221 AC_DEFINE([HAVE_AMANDA_H], 1, [Define to 1 if you have the "amanda.h" header file.])
222 AC_DEFINE([HAVE_UTIL_H], 1, [Define to 1 if you have the "util.h" header file.])
223
224 AC_DEFINE([USE_GETTEXT], 1, [Define to 1 if files will be processed with gettextize])
225
226 #
227 # Types
228 #
229 AC_CHECK_SIZEOF(int)
230 AC_CHECK_SIZEOF(long)
231 AC_CHECK_SIZEOF(long long)
232 AC_CHECK_SIZEOF(intmax_t)
233 AC_CHECK_SIZEOF(off_t)
234 AC_CHECK_SIZEOF(size_t)
235 AC_CHECK_SIZEOF(ssize_t)
236 AC_CHECK_SIZEOF(time_t)
237 AC_TYPE_OFF_T
238 AC_TYPE_PID_T
239 AC_TYPE_SIZE_T
240 AC_TYPE_UID_T
241 AC_TYPE_SIGNAL
242 AC_STRUCT_TM
243 AMANDA_SOCKLEN_T_EQUIV
244 AMANDA_CHECK_TYPE(sa_family_t, unsigned short, sys/socket.h)
245 AMANDA_CHECK_TYPE(in_port_t, unsigned short, netinet/in.h)
246 CF_WAIT
247 CF_WAIT_INT
248
249 #
250 # Libraries
251 #
252 # cur_colr is on some HP's
253 AC_CHECK_LIB(cur_colr,main)
254 AC_CHECK_LIB(intl,main)
255 AMANDA_CHECK_NET_LIBS
256 AMANDA_CHECK_GLIB
257 AMANDA_CHECK_READLINE
258 AC_CHECK_LIB(m,modf)
259 AMANDA_GLIBC_BACKTRACE
260
261 #
262 # Declarations
263 #
264 # Checks for library functions and if the function is declared in
265 # an appropriate header file.  Functions which exist, but for which
266 # no declaration is available, are declared in common-src/amanda.h.
267 # It's not clear that any existing system implements but does not
268 # declare common functions such as these.
269 #
270 ICE_CHECK_DECL(accept,sys/types.h sys/socket.h)
271 AC_FUNC_ALLOCA
272 AC_CHECK_FUNCS(atexit)
273 ICE_CHECK_DECL(atof,stdlib.h)
274 ICE_CHECK_DECL(atol,stdlib.h)
275 ICE_CHECK_DECL(atoll,stdlib.h)
276 ICE_CHECK_DECL(strtol,stdlib.h)
277 ICE_CHECK_DECL(strtoll,stdlib.h)
278 AC_CHECK_FUNCS(basename)
279 ICE_CHECK_DECL(bind,sys/types.h sys/socket.h)
280 ICE_CHECK_DECL(bcopy,string.h strings.h stdlib.h)
281 ICE_CHECK_DECL(bzero,string.h strings.h stdlib.h)
282 AC_FUNC_CLOSEDIR_VOID
283 ICE_CHECK_DECL(closelog,syslog.h)
284 ICE_CHECK_DECL(connect,sys/types.h sys/socket.h)
285 ICE_CHECK_DECL(fclose,stdio.h)
286 ICE_CHECK_DECL(fflush,stdio.h)
287 ICE_CHECK_DECL(fprintf,stdio.h)
288 ICE_CHECK_DECL(fputc,stdio.h)
289 ICE_CHECK_DECL(fputs,stdio.h)
290 ICE_CHECK_DECL(fread,stdio.h stdlib.h)
291 ICE_CHECK_DECL(fseek,stdio.h)
292 ICE_CHECK_DECL(fwrite,stdio.h stdlib.h)
293 AC_CHECK_FUNCS(getgrgid_r)
294 AC_CHECK_FUNCS(getpwuid_r)
295 ICE_CHECK_DECL(gethostname,unistd.h)
296 ICE_CHECK_DECL(getopt,stdlib.h unistd.h libc.h)
297 ICE_CHECK_DECL(getpeername,sys/types.h sys/socket.h)
298 AC_CHECK_FUNC(getpgrp)
299 AC_FUNC_GETPGRP
300 ICE_CHECK_DECL(getsockname,sys/types.h sys/socket.h)
301 ICE_CHECK_DECL(getsockopt,sys/types.h sys/socket.h)
302 ICE_CHECK_DECL(initgroups,grp.h sys/types.h unistd.h libc.h)
303 ICE_CHECK_DECL(ioctl,sys/ioctl.h unistd.h libc.h)
304 ICE_CHECK_DECL(isnormal,math.h)
305 ICE_CHECK_DECL(listen,sys/types.h sys/socket.h)
306 ICE_CHECK_DECL(lstat,sys/types.h sys/stat.h)
307 ICE_CHECK_DECL(malloc,stdlib.h)
308 ICE_CHECK_DECL(memmove,string.h strings.h)
309 ICE_CHECK_DECL(memset,string.h strings.h)
310 ICE_CHECK_DECL(mkstemp,stdlib.h)
311 ICE_CHECK_DECL(mktemp,stdlib.h)
312 ICE_CHECK_DECL(mktime,time.h sys/time.h)
313 AC_CHECK_FUNCS(on_exit)
314 ICE_CHECK_DECL(openlog,syslog.h)
315 ICE_CHECK_DECL(pclose,stdio.h)
316 ICE_CHECK_DECL(perror,stdio.h)
317 ICE_CHECK_DECL(printf,stdio.h)
318 AC_CHECK_FUNCS(putenv)
319 ICE_CHECK_DECL(puts,stdio.h)
320 ICE_CHECK_DECL(realloc,stdlib.h)
321 ICE_CHECK_DECL(recvfrom,sys/types.h sys/socket.h)
322 ICE_CHECK_DECL(remove,stdio.h)
323 ICE_CHECK_DECL(rename,stdio.h)
324 ICE_CHECK_DECL(rewind,stdio.h)
325 ICE_CHECK_DECL(ruserok,netdb.h sys/socket.h libc.h unistd.h)
326 ICE_CHECK_DECL(select,sys/types.h sys/socket.h sys/select.h time.h sys/time.h)
327 AMANDA_FUNC_SELECT_ARG_TYPE
328 ICE_CHECK_DECL(sendto,sys/types.h sys/socket.h)
329 ICE_CHECK_DECL(setegid,unistd.h)
330 ICE_CHECK_DECL(seteuid,unistd.h)
331 ICE_CHECK_DECL(setresgid,unistd.h)
332 ICE_CHECK_DECL(setresuid,unistd.h)
333 ICE_CHECK_DECL(snprintf,stdio.h)
334 ICE_CHECK_DECL(vsnprintf,stdio.h)
335 AMANDA_FUNC_SETPGID
336 AC_CHECK_FUNC(setpgrp,[AC_FUNC_SETPGRP])
337 ICE_CHECK_DECL(setpgrp,sys/types.h unistd.h libc.h)
338 ICE_CHECK_DECL(setsockopt,sys/types.h sys/socket.h)
339 AC_CHECK_FUNCS(sigaction sigemptyset sigvec)
340 ICE_CHECK_DECL(socket,sys/types.h sys/socket.h)
341 ICE_CHECK_DECL(socketpair,sys/types.h sys/socket.h)
342 ICE_CHECK_DECL(sscanf,stdio.h)
343 ICE_CHECK_DECL(strerror,string.h strings.h)
344 AC_FUNC_STRFTIME
345 ICE_CHECK_DECL(strftime,time.h sys/time.h)
346 ICE_CHECK_DECL(strncasecmp,string.h strings.h)
347 ICE_CHECK_DECL(syslog,syslog.h)
348 ICE_CHECK_DECL(system,stdlib.h)
349 ICE_CHECK_DECL(time,time.h sys/time.h)
350 ICE_CHECK_DECL(tolower,ctype.h)
351 ICE_CHECK_DECL(toupper,ctype.h)
352 ICE_CHECK_DECL(ungetc,stdio.h)
353 ICE_CHECK_DECL(vfprintf,stdio.h stdlib.h)
354 ICE_CHECK_DECL(vprintf,stdio.h stdlib.h)
355 AC_CHECK_FUNC(wait4)
356 ICE_CHECK_DECL(writev, unistd.h sys/uio.h)
357 ICE_CHECK_DECL(strcasecmp,string.h strings.h)
358
359 dnl -------------------------------------------------------------------------
360
361 dnl
362 dnl Set up files for autoconf substitution.  All files are listed here, in
363 dnl order by subdirectory, as a central location for this list.  
364 dnl
365 AC_CONFIG_FILES([
366     Makefile
367     amandad-src/Makefile
368     amar-src/Makefile
369     amplot/Makefile
370     changer-src/Makefile
371     client-src/Makefile
372     common-src/Makefile
373     common-src/versuff.c
374     config/Makefile
375     device-src/Makefile
376     application-src/Makefile
377     example/Makefile
378     example/amanda-client.conf
379     example/amanda.conf
380     example/xinetd.amandaclient
381     example/xinetd.amandaserver
382     example/inetd.conf.amandaclient
383     example/inetd.conf.amandaserver
384     example/chg-mcutil.conf
385     example/template.d/advanced.conf
386     example/template.d/amanda-S3.conf
387     example/template.d/amanda-harddisk.conf
388     example/template.d/amanda-single-tape.conf
389     example/template.d/amanda-tape-changer.conf
390     gnulib/Makefile
391     installcheck/Makefile
392     man/Makefile
393     oldrecover-src/Makefile
394     packaging/Makefile
395     perl/Makefile
396     po/Makefile
397     recover-src/Makefile
398     restore-src/Makefile
399     server-src/Makefile
400     xfer-src/Makefile
401 ])
402
403 AC_OUTPUT
404 AMANDA_GET_SVN_INFO
405 AMANDA_SHOW_SUMMARY