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
146 dnl# --------------------------------------------------------------------------
147 dnl# CHECKING COMMAND LINE OPTIONS
148 dnl# --------------------------------------------------------------------------
149 AC_ARG_ENABLE(everything,
150 [ --enable-everything enable standard non-multichoice features: marked *],
151 [if test x$enableval = xyes; then
152 support_smartalloc=yes
155 # -------------------------------------------
156 # gnome (default off)
157 # -------------------------------------------
160 [ --enable-gnome enable build of gnome-console GUI *],
161 [if test x$enableval = xyes; then
166 if test x$support_gnome = xyes; then
168 GNOME_DIR=src/gnome-console
173 # -------------------------------------------
174 # smartalloc (default off)
175 # -------------------------------------------
176 AC_ARG_ENABLE(smartalloc,
177 [ --enable-smartalloc enable smartalloc debugging support *],
178 [if test x$enableval = xno; then
179 support_smartalloc=no
182 if test x$support_smartalloc = xyes; then
183 AC_DEFINE(SMARTALLOC)
188 # ---------------------------------------------------
189 # Check for readline support/directory (default on)
190 # ---------------------------------------------------
192 # this allows you to turn it completely off
193 AC_ARG_ENABLE(readline,
194 [ --disable-readline disable readline support ],
195 [if test x$enableval = xno; then
201 if test x$support_readline = xyes; then
202 AC_ARG_WITH(readline,
203 [ --with-readline[=DIR] Specify readline library directory],
205 case "$with_readline" in
208 if test "$with_readline" != "yes"; then
209 CONS_INC="-I$with_readline"
210 CONS_LDFLAGS="-L$with_readline"
212 with_readline="/usr/include/readline"
214 AC_CHECK_HEADER($with_readline/readline.h,
216 AC_DEFINE(HAVE_READLINE)
217 CONS_LIBS="-lreadline -ltermcap"
220 [ AC_MSG_ERROR([*** readline library missing])
226 # check for standard readline library
227 AC_CHECK_HEADER(/usr/include/readline/readline.h,
229 AC_DEFINE(HAVE_READLINE)
231 CONS_INC="-I/usr/include/readline"
232 CONS_LIBS="-lreadline -ltermcap"
234 # Did not find starndard library, so user our own
236 AC_DEFINE(HAVE_READLINE)
238 CONS_INC="-I${TOP_DIR}/depkgs"
239 CONS_LIBS="-lreadline -lhistory -ltermcap"
240 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
241 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
248 AC_SUBST(CONS_LDFLAGS)
249 AC_SUBST(READLINE_SRC)
251 # Minimal stuff for readline Makefile configuration
258 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
260 #AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
261 # [LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
262 # EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
264 AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
269 AC_CHECK_HEADERS(varargs.h \
270 sys/ptem.h sys/pte.h sys/stream.h)
272 # End of readline stuff
273 # -----------------------------------------------------------------------
276 # ---------------------------------------------------
277 # Check for GMP support/directory
278 # ---------------------------------------------------
282 [ --with-gmp[=DIR] Specify gmp library directory],
287 if test "$with_gmp" != "yes"; then
288 GMP_INC="-I$with_gmp"
290 GMP_LDFLAGS="-L$with_gmp"
292 with_gmp="/usr/include"
294 AC_CHECK_HEADER($with_gmp/gmp.h,
300 [ AC_MSG_ERROR([*** gmp library missing])
306 # check for standard gmp library
307 AC_CHECK_HEADER(/usr/include/gmp.h,
314 # Did not find standard library, so use our own
319 GMP_INC="-I${TOP_DIR}/depkgs/gmp"
321 GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
322 GMP_SRC="${TOP_DIR}/depkgs/gmp"
328 AC_SUBST(GMP_LDFLAGS)
332 # -----------------------------------------------------------------------
335 # ---------------------------------------------------
336 # Check for CWEB support/directory
337 # ---------------------------------------------------
342 [ --with-cweb[=DIR] Specify cweb library directory],
347 if test "$with_cweb" != "yes"; then
348 CWEB_INC="-I$with_cweb"
350 CWEB_LDFLAGS="-L$with_cweb"
352 with_cweb="/usr/include"
354 AC_CHECK_HEADER($with_cweb/cweb.h,
360 [ AC_MSG_ERROR([*** cweb library missing])
366 # check for standard cweb library
367 AC_CHECK_HEADER(/usr/include/cweb.h,
374 # Did not find starndard library, so use our own
379 CWEB=${TOP_DIR}/depkgs/cweb
380 CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
382 CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
383 CWEB_SRC="${TOP_DIR}/depkgs/cweb"
390 AC_SUBST(CWEB_LDFLAGS)
394 # -----------------------------------------------------------------------
398 # -----------------------------------------------------------
399 # Check whether user wants TCP wrappers support (default off)
400 # -----------------------------------------------------------
402 AC_ARG_WITH(tcp-wrappers,
403 [ --with-tcp-wrappers=DIR Enable tcpwrappers support],
405 if test "x$withval" != "xno" ; then
407 LIBS="$LIBS -lwrap -lnsl"
408 AC_MSG_CHECKING(for libwrap)
411 int deny_severity = 0;
412 int allow_severity = 0;
413 struct request_info *req; ],
414 [ hosts_access(req); ],
417 AC_DEFINE(HAVE_LIBWRAP)
420 [AC_MSG_ERROR([*** libwrap missing]) ]
426 # ------------------------------------------
427 # Where to place working dir
428 # ------------------------------------------
429 working_dir=`eval echo ${sysconfdir}/working`
430 AC_ARG_WITH(working-dir,
431 [ --with-working-dir=PATH Specify location of Bacula working files],
433 if test "x$withval" != "xno" ; then
439 AC_SUBST(working_dir)
441 # ------------------------------------------
442 # Where to send dump email
443 # ------------------------------------------
445 AC_ARG_WITH(dump-email,
446 [ --with-dump-email=Dump email address],
448 if test "x$withval" != "xno" ; then
456 # ------------------------------------------
457 # Where to send job email
458 # ------------------------------------------
460 AC_ARG_WITH(job-email,
461 [ --with-job-email=Job output email address],
463 if test "x$withval" != "xno" ; then
471 # ------------------------------------------
472 # Where to find smtp host
473 # ------------------------------------------
475 AC_ARG_WITH(smtp_host,
476 [ --with-smtp-host=SMTP mail host address],
478 if test "x$withval" != "xno" ; then
487 # ------------------------------------
488 # Where to place pid files
489 # ------------------------------------
492 [ --with-pid-dir=PATH Specify location of Bacula pid files],
494 if test "x$withval" != "xno" ; then
500 # make sure the pid directory exists
501 if test ! -d $piddir ; then
502 piddir=`eval echo ${sysconfdir}`
504 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
508 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
512 # ------------------------------------
513 # Where to place subsys "lock file"
514 # ------------------------------------
515 subsysdir=/var/run/subsys
516 AC_ARG_WITH(subsys-dir,
517 [ --with-subsys-dir=PATH Specify location of Bacula subsys file],
519 if test "x$withval" != "xno" ; then
525 # make sure the pid directory exists
526 if test ! -d $subsysdir ; then
527 subsysdir=`eval echo ${sysconfdir}`
529 NONE/*) subsysdir=`echo $subsysdir | sed "s~NONE~$ac_default_prefix~"` ;;
537 # ------------------------------------
538 # Where to start assigning ports
539 # ------------------------------------
541 AC_ARG_WITH(baseport,
542 [ --with-baseport=PORT Specify base port address for daemons],
544 if test "x$withval" != "xno" ; then
551 dir_port=`expr $baseport`
552 fd_port=`expr $baseport + 1`
553 sd_port=`expr $fd_port + 1`
560 # ------------------------------------------
562 # ------------------------------------------
564 AC_ARG_WITH(dir-password,
565 [ --with-dir-password=PASSWORD Specify Director's password],
567 if test "x$withval" != "xno" ; then
568 dir_password=$withval
573 if test "x$dir_password" = "x" ; then
574 if test "x$OPENSSL" = "xnone" ; then
575 key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
577 key=`openssl rand -base64 33`
583 AC_ARG_WITH(fd-password,
584 [ --with-fd-password=PASSWORD Specify Client's password],
586 if test "x$withval" != "xno" ; then
592 if test "x$fd_password" = "x" ; then
593 if test "x$OPENSSL" = "xnone" ; then
594 key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
596 key=`openssl rand -base64 33`
602 AC_ARG_WITH(sd-password,
603 [ --with-sd-password=PASSWORD Specify Storage daemon's password],
605 if test "x$withval" != "xno" ; then
611 if test "x$sd_password" = "x" ; then
612 if test "x$OPENSSL" = "xnone" ; then
613 key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
615 key=`openssl rand -base64 33`
621 AC_SUBST(dir_password)
622 AC_SUBST(fd_password)
623 AC_SUBST(sd_password)
628 # ------------------------------------------------
629 # Bacula check for various SQL database engines
630 # ------------------------------------------------
634 # ------------------------------------------------
635 # Bacula check for various SQL database engines
636 # ------------------------------------------------
642 AC_DEFINE(PROTOTYPES)
644 dnl# --------------------------------------------------------------------------
645 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
647 if test -z "$CFLAGS"; then
648 if test -z "$CCOPTS"; then
650 dnl> if test "x$GCC" = xyes; then
651 dnl> if test x$system = xLinux; then
652 dnl> CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce'
662 dnl # AC_SYS_LARGEFILE must modify aclocal.m4
663 dnl LARGE_FILE_SUPPORT
669 dnl# --------------------------------------------------------------------------
670 dnl# CHECKING FOR HEADER FILES
671 dnl# --------------------------------------------------------------------------
699 # It seems that that many machines where <utime.h> seems to be
700 # broken just require something like -D_XXX_SOURCE, where XXX might
701 # be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine.
703 AC_CACHE_CHECK(for utime.h, tar_cv_header_utime_h,
705 #include <sys/types.h>
706 #include <utime.h>], [struct utimbuf foo],
707 tar_cv_header_utime_h=yes, tar_cv_header_utime_h=no)])
708 test $tar_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
713 dnl# --------------------------------------------------------------------------
714 dnl# CHECKING FOR FILESYSTEM TYPE
715 dnl# --------------------------------------------------------------------------
716 AC_MSG_CHECKING(how to get filesystem type)
718 # The order of these tests is important.
719 AC_TRY_CPP([#include <sys/statvfs.h>
720 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
721 if test $fstype = no; then
722 AC_TRY_CPP([#include <sys/statfs.h>
723 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
725 if test $fstype = no; then
726 AC_TRY_CPP([#include <sys/statfs.h>
727 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
729 if test $fstype = no; then
730 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
732 if test $fstype = no; then
733 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
735 if test $fstype = no; then
736 AC_TRY_CPP([#include <sys/mount.h>
737 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
739 AC_MSG_RESULT($fstype)
741 dnl# --------------------------------------------------------------------------
742 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
743 dnl# --------------------------------------------------------------------------
751 AC_CHECK_TYPE(ino_t, unsigned long)
752 AC_CHECK_TYPE(dev_t, unsigned long)
753 AC_CHECK_TYPE(daddr_t, long)
754 AC_CHECK_TYPE(major_t, int)
755 AC_CHECK_TYPE(minor_t, int)
756 AC_CHECK_TYPE(ssize_t, int)
763 AC_CHECK_SIZEOF(char, 1)
764 AC_CHECK_SIZEOF(short int, 2)
765 AC_CHECK_SIZEOF(int, 4)
766 AC_CHECK_SIZEOF(long int, 4)
767 AC_CHECK_SIZEOF(long long int, 8)
768 AC_CHECK_SIZEOF(int *, 4)
770 # Check for sys/types.h types
771 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
773 [ #include <sys/types.h> ],
775 [ ac_cv_have_u_int="yes" ],
776 [ ac_cv_have_u_int="no" ]
779 if test "x$ac_cv_have_u_int" = "xyes" ; then
780 AC_DEFINE(HAVE_U_INT)
784 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
786 [ #include <sys/types.h> ],
787 [ intmax_t a; a = 1;],
788 [ ac_cv_have_intmax_t="yes" ],
791 [ #include <stdint.h> ],
792 [ intmax_t a; a = 1;],
793 [ ac_cv_have_intmax_t="yes" ],
794 [ ac_cv_have_intmax_t="no" ]
800 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
801 AC_DEFINE(HAVE_INTMAX_T)
806 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
808 [ #include <sys/types.h> ],
809 [ u_intmax_t a; a = 1;],
810 [ ac_cv_have_u_intmax_t="yes" ],
813 [ #include <stdint.h> ],
814 [ u_intmax_t a; a = 1;],
815 [ ac_cv_have_u_intmax_t="yes" ],
816 [ ac_cv_have_u_intmax_t="no" ]
821 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
822 AC_DEFINE(HAVE_U_INTMAX_T)
827 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
829 [ #include <sys/types.h> ],
830 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
831 [ ac_cv_have_intxx_t="yes" ],
832 [ ac_cv_have_intxx_t="no" ]
835 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
836 AC_DEFINE(HAVE_INTXX_T)
840 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
842 [ #include <sys/types.h> ],
843 [ int64_t a; a = 1;],
844 [ ac_cv_have_int64_t="yes" ],
845 [ ac_cv_have_int64_t="no" ]
848 if test "x$ac_cv_have_int64_t" = "xyes" ; then
849 AC_DEFINE(HAVE_INT64_T)
853 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
855 [ #include <sys/types.h> ],
856 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
857 [ ac_cv_have_u_intxx_t="yes" ],
858 [ ac_cv_have_u_intxx_t="no" ]
861 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
862 AC_DEFINE(HAVE_U_INTXX_T)
866 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
868 [ #include <sys/types.h> ],
869 [ u_int64_t a; a = 1;],
870 [ ac_cv_have_u_int64_t="yes" ],
871 [ ac_cv_have_u_int64_t="no" ]
874 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
875 AC_DEFINE(HAVE_U_INT64_T)
879 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
880 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
882 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
884 [ #include <sys/bitypes.h> ],
885 [ int8_t a; int16_t b; int32_t c;
886 u_int8_t e; u_int16_t f; u_int32_t g;
887 a = b = c = e = f = g = 1; ],
888 [ AC_DEFINE(HAVE_U_INTXX_T)
889 AC_DEFINE(HAVE_INTXX_T)
890 AC_DEFINE(HAVE_SYS_BITYPES_H)
891 AC_MSG_RESULT(yes) ],
896 if test -z "$have_u_intxx_t" ; then
897 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
899 [ #include <sys/types.h> ],
900 [ uint8_t a; uint16_t b;
901 uint32_t c; a = b = c = 1; ],
902 [ ac_cv_have_uintxx_t="yes" ],
903 [ ac_cv_have_uintxx_t="no" ]
906 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
907 AC_DEFINE(HAVE_UINTXX_T)
912 dnl# --------------------------------------------------------------------------
913 dnl# CHECKING FOR LIBRARY FUNCTIONS
914 dnl# --------------------------------------------------------------------------
929 [echo 'configure: cannot find needed function.'; exit 1]
932 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
934 AC_CHECK_FUNCS(snprintf vsnprintf)
936 AC_CHECK_FUNCS(localtime_r, [AC_DEFINE(HAVE_LOCALTIME_R)])
938 AC_CHECK_FUNCS(readdir_r, [AC_DEFINE(HAVE_READDIR_R)])
940 # Find where sockets are (especially for Solaris)
941 AC_CHECK_FUNC(socket,
942 AC_MSG_RESULT(using libc's socket),
943 AC_CHECK_LIB(xnet,socket)
944 AC_CHECK_LIB(socket,socket)
945 AC_CHECK_LIB(inet,socket))
947 # If resolver functions are not in libc check for -lnsl or -lresolv.
948 AC_CHECK_FUNC(gethostbyname,
949 AC_MSG_RESULT(using libc's resolver),
950 AC_CHECK_LIB(nsl,gethostbyname)
951 AC_CHECK_LIB(resolv,gethostbyname))
958 AC_FUNC_CLOSEDIR_VOID
959 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
963 dnl# FreeBSD needs to link libxpg4
964 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
967 AC_CHECK_LIB(sun, getpwnam)
968 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
970 if test x$FDLIBS = x-lz; then
975 dnl Check for pthread libraries
977 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
978 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
979 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
980 [AC_CHECK_FUNC(pthread_create)]
990 LDFLAGS=${LDFLAGS--O}
991 LIBS="${LIBS} ${SQL_LFLAGS}"
1003 AC_SUBST(X_EXTRA_LIBS)
1005 dnl# extra configurable objects
1013 # Finally we set appropriate distribution specific
1014 # variables and defaults
1016 # PFILES are platform specific files
1017 PFILES="platforms/Makefile"
1024 PTHREAD_LIB="-lpthread -lexc"
1025 if test "${CC}" = "gcc" ; then
1032 TAPEDRIVE="/dev/nrmt0"
1035 DISTVER=`uname -a |awk '{print $3}'`
1036 TAPEDRIVE="/dev/nrst0"
1039 DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
1040 TAPEDRIVE="/dev/nrst0"
1041 PSCMD="ps -e -o pid,command"
1042 hostname=`hostname -s`
1045 DISTVER=`uname -a |awk '{print $3}'`
1046 TAPEDRIVE="/dev/nrst0"
1048 CFLAGS="${CFLAGS} -mwindows"
1049 LDFLAGS="${LDFLAGS} -mwindows"
1052 DISTVER=`cat /etc/debian_version`
1053 TAPEDRIVE="/dev/nrst0"
1054 PSCMD="ps -e -o pid,command"
1055 hostname=`hostname -s`
1058 DISTVER=`uname -a |awk '{print $3}'`
1059 PTHREAD_LIB="-pthread"
1060 CFLAGS="${CFLAGS} -pthread"
1063 TAPEDRIVE="/dev/nrst0"
1064 PSCMD="ps -x -o pid,command"
1066 platforms/freebsd/Makefile \
1067 platforms/freebsd/bacula-fd \
1068 platforms/freebsd/bacula-sd \
1069 platforms/freebsd/bacula-dir"
1070 hostname=`hostname -s`
1074 TAPEDRIVE="/dev/rmt/0hnb"
1077 DISTVER=`uname -a |awk '{print $3}'`
1080 TAPEDRIVE="/dev/nrst0"
1081 PSCMD="ps -a -o pid,command"
1084 DISTVER=`uname -a |awk '{print $3}'`
1087 TAPEDRIVE="/dev/nrst0"
1088 PSCMD="ps -a -o pid,command"
1091 DISTVER=`cat /etc/redhat-release | grep release |\
1093 TAPEDRIVE="/dev/nst0"
1094 PSCMD="ps -e -o pid,command"
1096 platforms/redhat/Makefile \
1097 platforms/redhat/bacula-fd \
1098 platforms/redhat/bacula-sd \
1099 platforms/redhat/bacula-dir"
1100 hostname=`hostname -s`
1103 DISTVER=`cat /etc/slackware-version`
1104 TAPEDRIVE="/dev/nst0"
1105 PSCMD="ps -e -o pid,command"
1106 hostname=`hostname -s`
1110 TAPEDRIVE="/dev/rmt/0cbn"
1111 PSCMD="ps -e -o pid,comm"
1113 platforms/solaris/Makefile \
1114 platforms/solaris/bacula-fd \
1115 platforms/solaris/bacula-sd \
1116 platforms/solaris/bacula-dir"
1119 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1121 TAPEDRIVE="/dev/nst0"
1122 PSCMD="ps -e -o pid,command"
1123 hostname=`hostname -s`
1128 TAPEDRIVE="/dev/nst0"
1129 PSCMD="ps -e -o pid,command"
1130 hostname=`hostname -s`
1134 TAPEDRIVE="/dev/nst0"
1137 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1144 LIBS="$PTHREAD_LIB $LIBS"
1146 AC_DEFINE_UNQUOTED(lld, "$lld")
1147 AC_DEFINE_UNQUOTED(llu, "$llu")
1155 dnl# common parts of the Makefile
1156 MCOMMON=./autoconf/Make.common
1157 AC_SUBST_FILE(MCOMMON)
1159 AC_OUTPUT([autoconf/Make.common \
1170 src/console/Makefile \
1171 src/console/console.conf \
1172 src/gnome-console/Makefile \
1173 src/gnome-console/gnome-console.conf \
1175 src/dird/bacula-dir.conf \
1177 src/stored/Makefile \
1178 src/stored/bacula-sd.conf \
1179 src/filed/Makefile \
1180 src/filed/bacula-fd.conf \
1181 src/filed/win32/Makefile \
1183 src/cats/make_mysql_tables \
1184 src/cats/drop_mysql_tables \
1185 src/cats/create_mysql_database \
1186 src/cats/grant_mysql_privileges \
1187 src/cats/make_sqlite_tables \
1188 src/cats/drop_sqlite_tables \
1189 src/cats/create_sqlite_database \
1191 src/cats/create_bdb_database \
1192 src/cats/make_bdb_tables \
1193 src/cats/drop_bdb_tables \
1194 src/findlib/Makefile \
1196 [(echo "Doing make of dependencies"; make depend;) ]
1199 chmod 755 startmysql stopmysql bacula startit stopit btraceback
1200 cp -f startit stopit btraceback btraceback.gdb src/console
1201 cp -f startit stopit btraceback btraceback.gdb src/dird
1202 cp -f startit stopit btraceback btraceback.gdb src/filed
1203 cp -f startit stopit btraceback btraceback.gdb src/lib
1204 cp -f startit stopit btraceback btraceback.gdb src/stored
1205 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
1206 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
1207 chmod 755 src/cats/create_mysql_database
1208 chmod 755 src/cats/grant_mysql_privileges
1209 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables
1210 chmod 755 src/cats/create_sqlite_database
1211 chmod 755 src/cats/sqlite
1212 chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables
1213 chmod 755 src/cats/create_bdb_database
1216 Configuration on `date`:
1218 Host: ${DISTNAME} ${DISTVER}
1219 Bacula version: ${VERSION} (${DATE})
1220 Source code location: ${srcdir}
1221 Install binaries: ${sbindir}
1222 Install config files: ${sysconfdir}
1224 C++ Compiler: ${CXX}
1225 Compiler flags: ${CFLAGS}
1226 Linker flags: ${LDFLAGS}
1228 Database found: ${have_db}
1229 Database type: ${db_name}
1231 Job Output Email: ${job_email}
1232 Traceback Email: ${dump_email}
1233 SMTP Host Address: ${smtp_host}
1234 Director Port ${dir_port}
1235 File daemon Port ${fd_port}
1236 Storage daemon Port ${sd_port}
1237 Working directory ${working_dir}
1238 SQL binaries Directory ${SQL_BINDIR}
1240 readline support: ${got_readline} ${PRTREADLINE_SRC}
1241 cweb support: ${got_cweb} ${CWEB_SRC}
1242 TCP Wrappers support: ${TCPW_MSG}
1243 ZLIB support: ${have_zlib}
1244 enable-smartalloc: ${support_smartalloc}
1245 enable-gnome: ${support_gnome}
1246 gmp support: ${got_gmp} ${GMP_SRC}