3 dnl# Process this file with autoconf to produce a configure script.
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
12 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
14 dnl require a recent autoconf
18 dnl search for true and false programs.
19 AC_PATH_PROGS(TRUEPRG, true, :)
20 AC_PATH_PROGS(FALSEPRG, false, :)
25 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
26 DATE=`sed -n -e 's/^.*[ \t]*DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
27 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
31 echo "configuring for bacula $VERSION ($DATE)"
34 dnl -------------------------------------------------------
35 dnl# Check for compiler.
36 dnl ------------------------------------------------------
40 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
41 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
48 dnl -------------------------------------------------------
49 dnl# Check for programs.
50 dnl ------------------------------------------------------
53 AC_PATH_PROG(MV, mv, mv)
54 AC_PATH_PROG(RM, rm, rm)
55 AC_PATH_PROG(CP, cp, cp)
56 AC_PATH_PROG(SED, sed, sed)
57 AC_PATH_PROG(AWK, awk, awk)
58 AC_PATH_PROG(ECHO, echo, echo)
59 AC_PATH_PROG(CMP, cmp, cmp)
60 AC_PATH_PROG(TBL, tbl, tbl)
61 AC_PATH_PROG(AR, ar, ar)
62 AC_PATH_PROG(RANLIB, ranlib, ranlib)
63 AC_PATH_PROG(OPENSSL, openssl, none)
65 test -n "$ARFLAG" || ARFLAGS="cr"
72 AC_SUBST(LOCAL_CFLAGS)
73 AC_SUBST(LOCAL_LDFLAGS)
78 dnl --------------------------------------------------
79 dnl Bacula OP Sys determination (see aclocal.m4)
80 dnl --------------------------------------------------
83 # -----------------------------------------------------------
84 dnl Bacula OPSys Distribution determination (see aclocal.m4)
85 # ----------------------------------------------------------
86 BA_CHECK_OPSYS_DISTNAME
88 # -----------------------------------------------------------
89 dnl Check for gnome stuff for gnome-console
90 # ----------------------------------------------------------
91 AM_ACLOCAL_INCLUDE(gnome-macros)
93 # ------------------------------------------------------------------
94 # If the user has not set --prefix, we set our default to nothing.
95 # In this case, if the user has not set --sysconfdir, we set it
96 # to the package default of /etc/bacula. If either --prefix or
97 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
98 # ------------------------------------------------------------------
99 if test x${prefix} = xNONE ; then
100 if test `eval echo ${sysconfdir}` = NONE/etc ; then
101 sysconfdir=/etc/bacula
105 sysconfdir=`eval echo ${sysconfdir}`
107 # -------------------------------------------------------------------------
108 # If the user has not set --exec-prefix, we default to ${prefix}
109 # -------------------------------------------------------------------------
110 if test x${exec_prefix} = xNONE ; then
111 exec_prefix=${prefix}
114 # ------------------------------------------------------------------
115 # If the user has not set --sbindir, we set our default as /sbin
116 # ------------------------------------------------------------------
117 if test x$sbindir = x'${exec_prefix}/sbin' ; then
118 sbindir=${exec_prefix}/sbin
120 sbindir=`eval echo ${sbindir}`
122 # ------------------------------------------------------------------
123 # All list of languages for which a translation exist. Each
124 # language is separated by a space.
125 # ------------------------------------------------------------------
128 AC_PATH_PROGS(MSGFMT, msgfmt, no)
129 if test "$MSGFMT" = "no"
131 echo 'msgfmt program not found, disabling NLS !'
133 USE_INCLUDED_LIBINTL=no
141 support_smartalloc=yes
144 support_static_tools=no
149 dnl# --------------------------------------------------------------------------
150 dnl# CHECKING COMMAND LINE OPTIONS
151 dnl# --------------------------------------------------------------------------
152 AC_ARG_ENABLE(everything,
153 [ --enable-everything enable standard non-multichoice features: marked *],
154 [if test x$enableval = xyes; then
155 support_smartalloc=yes
158 # -------------------------------------------
159 # gnome (default off)
160 # -------------------------------------------
162 [ --enable-gnome enable build of gnome-console GUI *],
163 [if test x$enableval = xyes; then
168 if test x$support_gnome = xyes; then
170 GNOME_DIR=src/gnome-console
175 # -------------------------------------------
176 # smartalloc (default off)
177 # -------------------------------------------
178 AC_ARG_ENABLE(smartalloc,
179 [ --enable-smartalloc enable smartalloc debugging support *],
180 [if test x$enableval = xno; then
181 support_smartalloc=no
184 if test x$support_smartalloc = xyes; then
185 AC_DEFINE(SMARTALLOC)
188 # -------------------------------------------
189 # static-tools (default off)
190 # -------------------------------------------
191 AC_ARG_ENABLE(static-tools,
192 [ --enable-static-tools enable static tape tools *],
193 [if test x$enableval = xyes; then
194 support_static_tools=yes
198 if test x$support_static_tools = xyes; then
199 TTOOL_LDFLAGS="-static"
201 AC_SUBST(TTOOL_LDFLAGS)
206 # ---------------------------------------------------
207 # Check for readline support/directory (default on)
208 # ---------------------------------------------------
209 # this allows you to turn it completely off
210 AC_ARG_ENABLE(readline,
211 [ --disable-readline disable readline support ],
212 [if test x$enableval = xno; then
218 if test x$support_readline = xyes; then
219 AC_ARG_WITH(readline,
220 [ --with-readline[=DIR] Specify readline library directory],
222 case "$with_readline" in
225 if test "$with_readline" != "yes"; then
226 CONS_INC="-I$with_readline"
227 CONS_LDFLAGS="-L$with_readline"
229 with_readline="/usr/include/readline"
231 AC_CHECK_HEADER($with_readline/readline.h,
233 AC_DEFINE(HAVE_READLINE)
234 CONS_LIBS="-lreadline -ltermcap"
237 [ AC_MSG_ERROR([*** readline library missing])
243 # check for standard readline library
244 AC_CHECK_HEADER(/usr/include/readline/readline.h,
246 AC_DEFINE(HAVE_READLINE)
248 CONS_INC="-I/usr/include/readline"
249 CONS_LIBS="-lreadline -ltermcap"
251 # Did not find starndard library, so user our own
253 AC_DEFINE(HAVE_READLINE)
255 CONS_INC="-I${TOP_DIR}/depkgs"
256 CONS_LIBS="-lreadline -lhistory -ltermcap"
257 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
258 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
265 AC_SUBST(CONS_LDFLAGS)
266 AC_SUBST(READLINE_SRC)
268 # Minimal stuff for readline Makefile configuration
275 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
277 #AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
278 # [LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
279 # EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
281 AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
286 AC_CHECK_HEADERS(varargs.h \
287 sys/ptem.h sys/pte.h sys/stream.h)
289 # End of readline stuff
290 # -----------------------------------------------------------------------
293 # ---------------------------------------------------
294 # Check for GMP support/directory
295 # ---------------------------------------------------
299 [ --with-gmp[=DIR] Specify gmp library directory],
304 if test "$with_gmp" != "yes"; then
305 GMP_INC="-I$with_gmp"
307 GMP_LDFLAGS="-L$with_gmp"
309 with_gmp="/usr/include"
311 AC_CHECK_HEADER($with_gmp/gmp.h,
317 [ AC_MSG_ERROR([*** gmp library missing])
323 # check for standard gmp library
324 AC_CHECK_HEADER(/usr/include/gmp.h,
331 # Did not find standard library, so use our own
336 GMP_INC="-I${TOP_DIR}/depkgs/gmp"
338 GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
339 GMP_SRC="${TOP_DIR}/depkgs/gmp"
345 AC_SUBST(GMP_LDFLAGS)
349 # -----------------------------------------------------------------------
352 # ---------------------------------------------------
353 # Check for CWEB support/directory
354 # ---------------------------------------------------
359 [ --with-cweb[=DIR] Specify cweb library directory],
364 if test "$with_cweb" != "yes"; then
365 CWEB_INC="-I$with_cweb"
367 CWEB_LDFLAGS="-L$with_cweb"
369 with_cweb="/usr/include"
371 AC_CHECK_HEADER($with_cweb/cweb.h,
377 [ AC_MSG_ERROR([*** cweb library missing])
383 # check for standard cweb library
384 AC_CHECK_HEADER(/usr/include/cweb.h,
391 # Did not find starndard library, so use our own
396 CWEB=${TOP_DIR}/depkgs/cweb
397 CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
399 CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
400 CWEB_SRC="${TOP_DIR}/depkgs/cweb"
407 AC_SUBST(CWEB_LDFLAGS)
411 # -----------------------------------------------------------------------
415 # -----------------------------------------------------------
416 # Check whether user wants TCP wrappers support (default off)
417 # -----------------------------------------------------------
419 AC_ARG_WITH(tcp-wrappers,
420 [ --with-tcp-wrappers=DIR Enable tcpwrappers support],
422 if test "x$withval" != "xno" ; then
424 LIBS="$LIBS -lwrap -lnsl"
425 AC_MSG_CHECKING(for libwrap)
428 int deny_severity = 0;
429 int allow_severity = 0;
430 struct request_info *req; ],
431 [ hosts_access(req); ],
434 AC_DEFINE(HAVE_LIBWRAP)
437 [AC_MSG_ERROR([*** libwrap missing]) ]
443 # ------------------------------------------
444 # Where to place working dir
445 # ------------------------------------------
446 working_dir=`eval echo ${sysconfdir}/working`
447 AC_ARG_WITH(working-dir,
448 [ --with-working-dir=PATH Specify location of Bacula working files],
450 if test "x$withval" != "xno" ; then
456 AC_SUBST(working_dir)
458 # ------------------------------------------
459 # Where to send dump email
460 # ------------------------------------------
461 dump_email=root@localhost
462 AC_ARG_WITH(dump-email,
463 [ --with-dump-email=Dump email address],
465 if test "x$withval" != "xno" ; then
473 # ------------------------------------------
474 # Where to send job email
475 # ------------------------------------------
476 job_email=root@localhost
477 AC_ARG_WITH(job-email,
478 [ --with-job-email=Job output email address],
480 if test "x$withval" != "xno" ; then
488 # ------------------------------------------
489 # Where to find smtp host
490 # ------------------------------------------
492 AC_ARG_WITH(smtp_host,
493 [ --with-smtp-host=SMTP mail host address],
495 if test "x$withval" != "xno" ; then
504 # ------------------------------------
505 # Where to place pid files
506 # ------------------------------------
509 [ --with-pid-dir=PATH Specify location of Bacula pid files],
511 if test "x$withval" != "xno" ; then
517 # make sure the pid directory exists
518 if test ! -d $piddir ; then
519 piddir=`eval echo ${sysconfdir}`
521 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
525 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
529 # ------------------------------------
530 # Where to place subsys "lock file"
531 # ------------------------------------
532 subsysdir=/var/run/subsys
533 AC_ARG_WITH(subsys-dir,
534 [ --with-subsys-dir=PATH Specify location of Bacula subsys file],
536 if test "x$withval" != "xno" ; then
542 # make sure the pid directory exists
543 if test ! -d $subsysdir ; then
544 subsysdir=`eval echo ${sysconfdir}`
546 NONE/*) subsysdir=`echo $subsysdir | sed "s~NONE~$ac_default_prefix~"` ;;
554 # ------------------------------------
555 # Where to start assigning ports
556 # ------------------------------------
558 AC_ARG_WITH(baseport,
559 [ --with-baseport=PORT Specify base port address for daemons],
561 if test "x$withval" != "xno" ; then
568 dir_port=`expr $baseport`
569 fd_port=`expr $baseport + 1`
570 sd_port=`expr $fd_port + 1`
577 # ------------------------------------------
579 # ------------------------------------------
581 AC_ARG_WITH(dir-password,
582 [ --with-dir-password=PASSWORD Specify Director's password],
584 if test "x$withval" != "xno" ; then
585 dir_password=$withval
590 if test "x$dir_password" = "x" ; then
591 if test "x$OPENSSL" = "xnone" ; then
592 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
593 key=`autoconf/randpass 33`
595 key=`openssl rand -base64 33`
601 AC_ARG_WITH(fd-password,
602 [ --with-fd-password=PASSWORD Specify Client's password],
604 if test "x$withval" != "xno" ; then
610 if test "x$fd_password" = "x" ; then
611 if test "x$OPENSSL" = "xnone" ; then
612 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
613 key=`autoconf/randpass 37`
615 key=`openssl rand -base64 33`
621 AC_ARG_WITH(sd-password,
622 [ --with-sd-password=PASSWORD Specify Storage daemon's password],
624 if test "x$withval" != "xno" ; then
630 if test "x$sd_password" = "x" ; then
631 if test "x$OPENSSL" = "xnone" ; then
632 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
633 key=`autocnf/randpass 41`
635 key=`openssl rand -base64 33`
641 AC_SUBST(dir_password)
642 AC_SUBST(fd_password)
643 AC_SUBST(sd_password)
648 # ------------------------------------------------
649 # Bacula check for various SQL database engines
650 # ------------------------------------------------
654 # ------------------------------------------------
655 # Bacula check for various SQL database engines
656 # ------------------------------------------------
662 AC_DEFINE(PROTOTYPES)
664 dnl# --------------------------------------------------------------------------
665 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
667 if test -z "$CFLAGS"; then
668 if test -z "$CCOPTS"; then
670 dnl> if test "x$GCC" = xyes; then
671 dnl> if test x$system = xLinux; then
672 dnl> CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce'
683 dnl See if we can use 64 bit file addresses
684 largefile_support="no"
690 dnl# --------------------------------------------------------------------------
691 dnl# CHECKING FOR HEADER FILES
692 dnl# --------------------------------------------------------------------------
720 # It seems that that many machines where <utime.h> seems to be
721 # broken just require something like -D_XXX_SOURCE, where XXX might
722 # be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine.
724 AC_CACHE_CHECK(for utime.h, tar_cv_header_utime_h,
726 #include <sys/types.h>
727 #include <utime.h>], [struct utimbuf foo],
728 tar_cv_header_utime_h=yes, tar_cv_header_utime_h=no)])
729 test $tar_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
734 dnl# --------------------------------------------------------------------------
735 dnl# CHECKING FOR FILESYSTEM TYPE
736 dnl# --------------------------------------------------------------------------
737 AC_MSG_CHECKING(how to get filesystem type)
739 # The order of these tests is important.
740 AC_TRY_CPP([#include <sys/statvfs.h>
741 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
742 if test $fstype = no; then
743 AC_TRY_CPP([#include <sys/statfs.h>
744 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
746 if test $fstype = no; then
747 AC_TRY_CPP([#include <sys/statfs.h>
748 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
750 if test $fstype = no; then
751 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
753 if test $fstype = no; then
754 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
756 if test $fstype = no; then
757 AC_TRY_CPP([#include <sys/mount.h>
758 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
760 AC_MSG_RESULT($fstype)
762 dnl# --------------------------------------------------------------------------
763 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
764 dnl# --------------------------------------------------------------------------
772 AC_CHECK_TYPE(ino_t, unsigned long)
773 AC_CHECK_TYPE(dev_t, unsigned long)
774 AC_CHECK_TYPE(daddr_t, long)
775 AC_CHECK_TYPE(major_t, int)
776 AC_CHECK_TYPE(minor_t, int)
777 AC_CHECK_TYPE(ssize_t, int)
784 AC_CHECK_SIZEOF(char, 1)
785 AC_CHECK_SIZEOF(short int, 2)
786 AC_CHECK_SIZEOF(int, 4)
787 AC_CHECK_SIZEOF(long int, 4)
788 AC_CHECK_SIZEOF(long long int, 8)
789 AC_CHECK_SIZEOF(int *, 4)
791 # Check for sys/types.h types
792 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
794 [ #include <sys/types.h> ],
796 [ ac_cv_have_u_int="yes" ],
797 [ ac_cv_have_u_int="no" ]
800 if test "x$ac_cv_have_u_int" = "xyes" ; then
801 AC_DEFINE(HAVE_U_INT)
805 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
807 [ #include <sys/types.h> ],
808 [ intmax_t a; a = 1;],
809 [ ac_cv_have_intmax_t="yes" ],
812 [ #include <stdint.h> ],
813 [ intmax_t a; a = 1;],
814 [ ac_cv_have_intmax_t="yes" ],
815 [ ac_cv_have_intmax_t="no" ]
821 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
822 AC_DEFINE(HAVE_INTMAX_T)
827 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
829 [ #include <sys/types.h> ],
830 [ u_intmax_t a; a = 1;],
831 [ ac_cv_have_u_intmax_t="yes" ],
834 [ #include <stdint.h> ],
835 [ u_intmax_t a; a = 1;],
836 [ ac_cv_have_u_intmax_t="yes" ],
837 [ ac_cv_have_u_intmax_t="no" ]
842 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
843 AC_DEFINE(HAVE_U_INTMAX_T)
848 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
850 [ #include <sys/types.h> ],
851 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
852 [ ac_cv_have_intxx_t="yes" ],
853 [ ac_cv_have_intxx_t="no" ]
856 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
857 AC_DEFINE(HAVE_INTXX_T)
861 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
863 [ #include <sys/types.h> ],
864 [ int64_t a; a = 1;],
865 [ ac_cv_have_int64_t="yes" ],
866 [ ac_cv_have_int64_t="no" ]
869 if test "x$ac_cv_have_int64_t" = "xyes" ; then
870 AC_DEFINE(HAVE_INT64_T)
874 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
876 [ #include <sys/types.h> ],
877 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
878 [ ac_cv_have_u_intxx_t="yes" ],
879 [ ac_cv_have_u_intxx_t="no" ]
882 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
883 AC_DEFINE(HAVE_U_INTXX_T)
887 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
889 [ #include <sys/types.h> ],
890 [ u_int64_t a; a = 1;],
891 [ ac_cv_have_u_int64_t="yes" ],
892 [ ac_cv_have_u_int64_t="no" ]
895 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
896 AC_DEFINE(HAVE_U_INT64_T)
900 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
901 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
903 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
905 [ #include <sys/bitypes.h> ],
906 [ int8_t a; int16_t b; int32_t c;
907 u_int8_t e; u_int16_t f; u_int32_t g;
908 a = b = c = e = f = g = 1; ],
909 [ AC_DEFINE(HAVE_U_INTXX_T)
910 AC_DEFINE(HAVE_INTXX_T)
911 AC_DEFINE(HAVE_SYS_BITYPES_H)
912 AC_MSG_RESULT(yes) ],
917 if test -z "$have_u_intxx_t" ; then
918 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
920 [ #include <sys/types.h> ],
921 [ uint8_t a; uint16_t b;
922 uint32_t c; a = b = c = 1; ],
923 [ ac_cv_have_uintxx_t="yes" ],
924 [ ac_cv_have_uintxx_t="no" ]
927 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
928 AC_DEFINE(HAVE_UINTXX_T)
933 dnl# --------------------------------------------------------------------------
934 dnl# CHECKING FOR LIBRARY FUNCTIONS
935 dnl# --------------------------------------------------------------------------
951 [echo 'configure: cannot find needed function.'; exit 1]
954 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
956 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
958 dnl# --------------------------------------------------------------------------
959 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
960 dnl# --------------------------------------------------------------------------
961 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
963 # If resolver functions are not in libc check for -lnsl or -lresolv.
964 AC_CHECK_FUNC(gethostbyname_r,
965 AC_MSG_RESULT(using libc's resolver),
966 AC_CHECK_LIB(nsl,gethostbyname_r)
967 AC_CHECK_LIB(resolv,gethostbyname_r))
970 # Find where sockets are (especially for Solaris)
971 AC_CHECK_FUNC(socket,
972 AC_MSG_RESULT(using libc's socket),
973 AC_CHECK_LIB(xnet,socket)
974 AC_CHECK_LIB(socket,socket)
975 AC_CHECK_LIB(inet,socket))
977 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
983 AC_FUNC_CLOSEDIR_VOID
984 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
988 dnl# FreeBSD needs to link libxpg4
989 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
992 AC_CHECK_LIB(sun, getpwnam)
994 AC_CHECK_HEADERS(zlib.h)
995 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
997 if test x$FDLIBS = x-lz; then
1002 dnl Check for pthread libraries
1004 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1005 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1006 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1007 [AC_CHECK_FUNC(pthread_create)]
1017 LDFLAGS=${LDFLAGS--O}
1018 DB_LIBS="${SQL_LFLAGS}"
1020 CPPFLAGS="$CPPFLAGS"
1031 AC_SUBST(X_EXTRA_LIBS)
1033 dnl# extra configurable objects
1041 # Finally we set appropriate distribution specific
1042 # variables and defaults
1044 # PFILES are platform specific files
1045 PFILES="platforms/Makefile"
1052 PTHREAD_LIB="-lpthread -lexc"
1053 if test "${CC}" = "gcc" ; then
1060 TAPEDRIVE="/dev/nrmt0"
1063 DISTVER=`uname -a |awk '{print $3}'`
1064 TAPEDRIVE="/dev/nrst0"
1067 DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
1068 TAPEDRIVE="/dev/nrst0"
1069 PSCMD="ps -e -o pid,command"
1070 hostname=`hostname -s`
1073 DISTVER=`uname -a |awk '{print $3}'`
1074 TAPEDRIVE="/dev/nrst0"
1076 CFLAGS="${CFLAGS} -mwindows"
1077 LDFLAGS="${LDFLAGS} -mwindows"
1080 DISTVER=`cat /etc/debian_version`
1081 TAPEDRIVE="/dev/nrst0"
1082 PSCMD="ps -e -o pid,command"
1083 hostname=`hostname -s`
1086 DISTVER=`uname -a |awk '{print $3}'`
1087 PTHREAD_LIB="-pthread"
1088 CFLAGS="${CFLAGS} -pthread"
1091 TAPEDRIVE="/dev/nrst0"
1092 PSCMD="ps -x -o pid,command"
1094 platforms/freebsd/Makefile \
1095 platforms/freebsd/bacula-fd \
1096 platforms/freebsd/bacula-sd \
1097 platforms/freebsd/bacula-dir"
1098 hostname=`hostname -s`
1099 largefile_support="yes"
1103 TAPEDRIVE="/dev/rmt/0hnb"
1107 TAPEDRIVE="/dev/rmt/0cbn"
1108 PSCMD="ps -e -o pid,comm"
1109 hostname=`/usr/bsd/hostname -s`
1111 platforms/irix/Makefile \
1112 platforms/irix/bacula-fd \
1113 platforms/irix/bacula-sd \
1114 platforms/irix/bacula-dir"
1117 DISTVER=`uname -a |awk '{print $3}'`
1120 TAPEDRIVE="/dev/nrst0"
1121 PSCMD="ps -a -o pid,command"
1122 PTHREAD_LIB="-pthread"
1123 CFLAGS="${CFLAGS} -pthread"
1126 DISTVER=`uname -a |awk '{print $3}'`
1129 TAPEDRIVE="/dev/nrst0"
1130 PSCMD="ps -a -o pid,command"
1131 PTHREAD_LIB="-pthread"
1132 CFLAGS="${CFLAGS} -pthread"
1134 platforms/openbsd/Makefile \
1135 platforms/openbsd/bacula-fd \
1136 platforms/openbsd/bacula-sd \
1137 platforms/openbsd/bacula-dir"
1140 DISTVER=`cat /etc/redhat-release | grep release |\
1142 TAPEDRIVE="/dev/nst0"
1143 PSCMD="ps -e -o pid,command"
1145 platforms/redhat/Makefile \
1146 platforms/redhat/bacula-fd \
1147 platforms/redhat/bacula-sd \
1148 platforms/redhat/bacula-dir"
1149 hostname=`hostname -s`
1152 DISTVER=`cat /etc/slackware-version`
1153 TAPEDRIVE="/dev/nst0"
1154 PSCMD="ps -e -o pid,command"
1155 hostname=`hostname -s`
1159 TAPEDRIVE="/dev/rmt/0cbn"
1160 PSCMD="ps -e -o pid,comm"
1162 platforms/solaris/Makefile \
1163 platforms/solaris/bacula-fd \
1164 platforms/solaris/bacula-sd \
1165 platforms/solaris/bacula-dir"
1168 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1170 TAPEDRIVE="/dev/nst0"
1171 PSCMD="ps -e -o pid,command"
1172 hostname=`hostname -s`
1177 TAPEDRIVE="/dev/nst0"
1178 PSCMD="ps -e -o pid,command"
1179 hostname=`hostname -s`
1183 TAPEDRIVE="/dev/nst0"
1186 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1193 LIBS="$PTHREAD_LIB $LIBS"
1195 AC_DEFINE_UNQUOTED(lld, "$lld")
1196 AC_DEFINE_UNQUOTED(llu, "$llu")
1204 dnl# common parts of the Makefile
1205 MCOMMON=./autoconf/Make.common
1206 AC_SUBST_FILE(MCOMMON)
1208 AC_OUTPUT([autoconf/Make.common \
1210 scripts/startmysql \
1212 scripts/btraceback \
1222 src/console/Makefile \
1223 src/console/console.conf \
1224 src/gnome-console/Makefile \
1225 src/gnome-console/gnome-console.conf \
1227 src/dird/bacula-dir.conf \
1229 src/stored/Makefile \
1230 src/stored/bacula-sd.conf \
1231 src/filed/Makefile \
1233 src/filed/bacula-fd.conf \
1234 src/filed/win32/Makefile \
1236 src/cats/alter_mysql_tables \
1237 src/cats/make_mysql_tables \
1238 src/cats/drop_mysql_tables \
1239 src/cats/create_mysql_database \
1240 src/cats/grant_mysql_privileges \
1241 src/cats/alter_sqlite_tables \
1242 src/cats/make_sqlite_tables \
1243 src/cats/drop_sqlite_tables \
1244 src/cats/create_sqlite_database \
1247 src/cats/create_bdb_database \
1248 src/cats/make_bdb_tables \
1249 src/cats/drop_bdb_tables \
1250 src/cats/make_bacula_tables \
1251 src/cats/drop_bacula_tables \
1252 src/findlib/Makefile \
1253 src/tools/Makefile \
1255 [(echo "Doing make of dependencies"; make depend;) ]
1259 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1260 chmod 755 console gconsole
1262 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
1263 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
1264 chmod 755 src/cats/create_mysql_database
1265 chmod 755 src/cats/alter_mysql_tables
1266 chmod 755 src/cats/grant_mysql_privileges
1267 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables
1268 chmod 755 src/cats/make_bacula_tables src/cats/drop_bacula_tables
1269 chmod 755 src/cats/create_sqlite_database
1270 chmod 755 src/cats/alter_sqlite_tables
1271 chmod 755 src/cats/sqlite
1272 chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables
1273 chmod 755 src/cats/create_bdb_database
1275 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1276 largefile_support="yes"
1281 Configuration on `date`:
1283 Host: $host -- ${DISTNAME} ${DISTVER}
1284 Bacula version: ${VERSION} (${DATE})
1285 Source code location: ${srcdir}
1286 Install binaries: ${sbindir}
1287 Install config files: ${sysconfdir}
1289 C++ Compiler: ${CXX}
1290 Compiler flags: ${CFLAGS}
1291 Linker flags: ${LDFLAGS}
1293 Statically Linked Tools: ${support_static_tools}
1294 Database found: ${have_db}
1295 Database type: ${db_name}
1296 Database lib: ${DB_LIBS}
1298 Job Output Email: ${job_email}
1299 Traceback Email: ${dump_email}
1300 SMTP Host Address: ${smtp_host}
1301 Director Port ${dir_port}
1302 File daemon Port ${fd_port}
1303 Storage daemon Port ${sd_port}
1304 Working directory ${working_dir}
1305 SQL binaries Directory ${SQL_BINDIR}
1307 Large file support: $largefile_support
1308 readline support: ${got_readline} ${PRTREADLINE_SRC}
1309 cweb support: ${got_cweb} ${CWEB_SRC}
1310 TCP Wrappers support: ${TCPW_MSG}
1311 ZLIB support: ${have_zlib}
1312 enable-smartalloc: ${support_smartalloc}
1313 enable-gnome: ${support_gnome}
1314 gmp support: ${got_gmp} ${GMP_SRC}