]> git.sur5r.net Git - bacula/bacula/blob - bacula/autoconf/configure.in
Better bootstrap file + static daemons
[bacula/bacula] / bacula / autoconf / configure.in
1 dnl#
2 dnl#
3 dnl# Process this file with autoconf to produce a configure script.
4 dnl#
5 AC_INIT(src/version.h)
6 BUILD_DIR=`pwd`
7 cd ..
8 TOP_DIR=`pwd`
9 cd ${BUILD_DIR}
10 AC_SUBST(BUILD_DIR)
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
12 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
13
14 dnl require a recent autoconf
15 AC_PREREQ(2.13)
16
17
18 dnl search for true and false programs.
19 AC_PATH_PROGS(TRUEPRG, true, :)
20 AC_PATH_PROGS(FALSEPRG, false, :)
21
22 AC_CANONICAL_HOST
23
24 dnl bacula version
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`
28 AC_SUBST(VERSION)dnl 
29 AC_SUBST(DATE)dnl 
30 AC_SUBST(LSMDATE)dnl 
31 echo "configuring for bacula $VERSION ($DATE)"
32
33
34 dnl -------------------------------------------------------
35 dnl# Check for compiler.
36 dnl ------------------------------------------------------
37
38 AC_PROG_CC
39 AC_PROG_CXX
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.
42
43 if test x$CC = xgcc
44 then
45    AC_DEFINE(HAVE_GCC)
46 fi
47
48 dnl -------------------------------------------------------
49 dnl# Check for programs.
50 dnl ------------------------------------------------------
51 AC_PROG_INSTALL
52 AC_PROG_RANLIB
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)
64
65 test -n "$ARFLAG" || ARFLAGS="cr"
66 AC_SUBST(ARFLAGS)
67
68 MAKE_SHELL=/bin/sh
69 AC_SUBST(MAKE_SHELL)
70
71 AC_SUBST(LOCAL_LIBS)
72 AC_SUBST(LOCAL_CFLAGS)
73 AC_SUBST(LOCAL_LDFLAGS)
74 AC_SUBST(LOCAL_DEFS)
75
76
77
78 dnl --------------------------------------------------
79 dnl Bacula OP Sys determination (see aclocal.m4)
80 dnl --------------------------------------------------
81 BA_CHECK_OPSYS
82
83 # -----------------------------------------------------------
84 dnl Bacula OPSys Distribution determination (see aclocal.m4)
85 # ----------------------------------------------------------
86 BA_CHECK_OPSYS_DISTNAME
87
88 # -----------------------------------------------------------
89 dnl Check for gnome stuff for gnome-console
90 # ----------------------------------------------------------
91 AM_ACLOCAL_INCLUDE(gnome-macros)
92
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
102     fi
103     prefix=
104 fi
105 sysconfdir=`eval echo ${sysconfdir}`
106
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}
112 fi
113
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
119 fi
120 sbindir=`eval echo ${sbindir}`
121                       
122 # ------------------------------------------------------------------
123 # All list of languages for which a translation exist. Each
124 #  language is separated by a space.
125 # ------------------------------------------------------------------
126 ALL_LINGUAS=""
127
128 AC_PATH_PROGS(MSGFMT, msgfmt, no)
129 if test "$MSGFMT" = "no"
130 then
131    echo 'msgfmt program not found, disabling NLS !'
132    USE_NLS=no
133    USE_INCLUDED_LIBINTL=no
134 #else
135 #   AM_GNU_GETTEXT
136 fi
137
138
139 support_mysql=no
140 support_sqlite=no
141 support_smartalloc=yes
142 support_readline=yes
143 support_gnome=no
144 support_static_tools=no
145 support_static_fd=no
146 support_static_sd=no
147 support_static_dir=no
148 cats=
149 db_name=Internal
150 DB_NAME=bdb
151
152 dnl# --------------------------------------------------------------------------
153 dnl# CHECKING COMMAND LINE OPTIONS
154 dnl# --------------------------------------------------------------------------
155 AC_ARG_ENABLE(everything,
156   [  --enable-everything     enable standard non-multichoice features: marked *],
157   [if test x$enableval = xyes; then
158     support_smartalloc=yes
159   fi])
160
161 # -------------------------------------------
162 # gnome (default off)
163 # -------------------------------------------
164 AC_ARG_ENABLE(gnome,
165   [  --enable-gnome     enable build of gnome-console GUI                     *],
166   [if test x$enableval = xyes; then
167     support_gnome=yes
168   fi])
169
170 GNOME_DIR=
171 if test x$support_gnome = xyes; then
172     GNOME_INIT
173     GNOME_DIR=src/gnome-console
174 fi
175 AC_SUBST(GNOME_DIR)
176
177
178 # -------------------------------------------
179 # smartalloc (default off)
180 # -------------------------------------------
181 AC_ARG_ENABLE(smartalloc,
182   [  --enable-smartalloc     enable smartalloc debugging support                   *],
183   [if test x$enableval = xno; then
184     support_smartalloc=no
185   fi])
186
187 if test x$support_smartalloc = xyes; then
188    AC_DEFINE(SMARTALLOC)
189 fi
190
191 # -------------------------------------------
192 # static-tools (default off)
193 # -------------------------------------------
194 AC_ARG_ENABLE(static-tools,
195    [  --enable-static-tools    enable static tape tools                            *],
196    [if test x$enableval = xyes; then
197      support_static_tools=yes
198    fi])
199
200 TTOOL_LDFLAGS=
201 if test x$support_static_tools = xyes; then
202    TTOOL_LDFLAGS="-static"
203 fi
204 AC_SUBST(TTOOL_LDFLAGS)
205
206 # -------------------------------------------
207 # static-fd    (default off)
208 # -------------------------------------------
209 AC_ARG_ENABLE(static-fd,
210    [  --enable-static-fd    enable static File daemon                           *],
211    [if test x$enableval = xyes; then
212      support_static_fd=yes
213    fi])
214
215 FD_LDFLAGS=
216 if test x$support_static_fd = xyes; then
217    FD_LDFLAGS="-static"
218 fi
219 AC_SUBST(FD_LDFLAGS)
220
221 # -------------------------------------------
222 # static-sd    (default off)
223 # -------------------------------------------
224 AC_ARG_ENABLE(static-sd,
225    [  --enable-static-sd    enable static Storage daemon                         *],
226    [if test x$enableval = xyes; then
227      support_static_sd=yes
228    fi])
229
230 SD_LDFLAGS=
231 if test x$support_static_sd = xyes; then
232    SD_LDFLAGS="-static"
233 fi
234 AC_SUBST(SD_LDFLAGS)
235
236 # -------------------------------------------
237 # static-dir   (default off)
238 # -------------------------------------------
239 AC_ARG_ENABLE(static-dir,
240    [  --enable-static-dir   enable static Director                              *],
241    [if test x$enableval = xyes; then
242      support_static_dir=yes
243    fi])
244
245 DIR_LDFLAGS=
246 if test x$support_static_dir = xyes; then
247    DIR_LDFLAGS="-static"
248 fi
249 AC_SUBST(DIR_LDFLAGS)
250
251
252
253
254
255
256 # ---------------------------------------------------
257 # Check for readline support/directory (default on)
258 # ---------------------------------------------------
259 # this allows you to turn it completely off
260 AC_ARG_ENABLE(readline,
261   [  --disable-readline      disable readline support ],
262   [if test x$enableval = xno; then
263     support_readline=no
264   fi])
265
266 got_readline="no"
267 READLINE_SRC=
268 if test x$support_readline = xyes; then
269    AC_ARG_WITH(readline,
270      [  --with-readline[=DIR]   Specify readline library directory],
271      [
272         case "$with_readline" in
273         no) : ;;
274         yes|*)
275           if test "$with_readline" != "yes"; then
276             CONS_INC="-I$with_readline"
277             CONS_LDFLAGS="-L$with_readline"
278           else
279              with_readline="/usr/include/readline" 
280           fi
281           AC_CHECK_HEADER($with_readline/readline.h, 
282              [ AC_MSG_RESULT(yes)
283                AC_DEFINE(HAVE_READLINE) 
284                CONS_LIBS="-lreadline -ltermcap"
285                got_readline="yes"   
286              ],
287              [ AC_MSG_ERROR([*** readline library missing]) 
288              ]
289           )
290           ;;
291         esac
292      ],[
293        # check for standard readline library
294        AC_CHECK_HEADER(/usr/include/readline/readline.h, 
295        [ AC_MSG_RESULT(yes)
296          AC_DEFINE(HAVE_READLINE)
297          got_readline="yes"
298          CONS_INC="-I/usr/include/readline"
299          CONS_LIBS="-lreadline -ltermcap"
300        ], [
301          # Did not find starndard library, so user our own
302          AC_MSG_RESULT(yes)
303          AC_DEFINE(HAVE_READLINE)
304          got_readline="yes"
305          CONS_INC="-I${TOP_DIR}/depkgs"
306          CONS_LIBS="-lreadline -lhistory -ltermcap"
307          CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
308          PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
309        ])
310      ]   
311    )
312 fi
313 AC_SUBST(CONS_INC)
314 AC_SUBST(CONS_LIBS)
315 AC_SUBST(CONS_LDFLAGS)
316 AC_SUBST(READLINE_SRC)
317
318 # Minimal stuff for readline Makefile configuration
319 MAKE_SHELL=/bin/sh
320 AC_SUBST(MAKE_SHELL)
321
322 AC_HEADER_STAT
323 AC_HEADER_DIRENT
324
325 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
326
327 #AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
328 #   [LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
329 #    EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
330
331 AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
332
333
334 AC_FUNC_STRCOLL
335
336 AC_CHECK_HEADERS(varargs.h \
337                 sys/ptem.h sys/pte.h sys/stream.h)      
338
339 # End of readline stuff
340 # -----------------------------------------------------------------------
341
342
343 # ---------------------------------------------------
344 # Check for GMP support/directory
345 # ---------------------------------------------------
346 #GMP_SRC=
347 #local_gmp="no"
348 #AC_ARG_WITH(gmp,
349 #  [  --with-gmp[=DIR]   Specify gmp library directory],
350 #  [
351 #     case "$with_gmp" in
352 #     no) : ;;
353 #     yes|*)
354 #       if test "$with_gmp" != "yes"; then
355 #         GMP_INC="-I$with_gmp"
356 #         GMP_LIBS="-lgmp"
357 #         GMP_LDFLAGS="-L$with_gmp"
358 #       else
359 #          with_gmp="/usr/include" 
360 #       fi
361 #       AC_CHECK_HEADER($with_gmp/gmp.h, 
362 #          [ AC_MSG_RESULT(yes)
363 #            AC_DEFINE(HAVE_GMP) 
364 #            GMP_LIBS="-lgmp"
365 #            got_gmp="yes"   
366 #          ],
367 #          [ AC_MSG_ERROR([*** gmp library missing]) 
368 #          ]
369 #       )
370 #       ;;
371 #     esac
372 #  ],[
373 #    # check for standard gmp library
374 #    AC_CHECK_HEADER(/usr/include/gmp.h,
375 #    [ AC_MSG_RESULT(yes)
376 #      AC_DEFINE(HAVE_GMP)
377 #      got_gmp="yes"
378 #      GMP_INC=
379 #      GMP_LIBS="-lgmp"
380 #    ], [
381 #      # Did not find standard library, so use our own
382 #      AC_MSG_RESULT(yes)
383 #      AC_DEFINE(HAVE_GMP)
384 #      got_gmp="yes"
385 #      local_gmp="yes"
386 #      GMP_INC="-I${TOP_DIR}/depkgs/gmp"
387 #      GMP_LIBS="-lgmp"
388 #      GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
389 #      GMP_SRC="${TOP_DIR}/depkgs/gmp"
390 #    ])
391 #  ]   
392 #)
393 #AC_SUBST(GMP_INC)
394 #AC_SUBST(GMP_LIBS)
395 #AC_SUBST(GMP_LDFLAGS)
396 #AC_SUBST(GMP_SRC)
397
398 # End of GMP stuff
399 # -----------------------------------------------------------------------
400
401
402 # ---------------------------------------------------
403 # Check for CWEB support/directory
404 # ---------------------------------------------------
405 #CWEB_SRC=
406 #CWEB=/bin
407 #local_cweb="no"
408 #AC_ARG_WITH(cweb,
409 #  [  --with-cweb[=DIR]   Specify cweb library directory],
410 #  [
411 #     case "$with_cweb" in
412 #     no) : ;;
413 #     yes|*)
414 #       if test "$with_cweb" != "yes"; then
415 #         CWEB_INC="-I$with_cweb"
416 #         CWEB_LIBS="-lcweb"
417 #         CWEB_LDFLAGS="-L$with_cweb"
418 #       else
419 #          with_cweb="/usr/include" 
420 #       fi
421 #       AC_CHECK_HEADER($with_cweb/cweb.h, 
422 #          [ AC_MSG_RESULT(yes)
423 #            AC_DEFINE(HAVE_CWEB) 
424 #            CWEB_LIBS="-lcweb"
425 #            got_cweb="yes"   
426 #          ],
427 #          [ AC_MSG_ERROR([*** cweb library missing]) 
428 #          ]
429 #       )
430 #       ;;
431 #     esac
432 #  ],[
433 #    # check for standard cweb library
434 #    AC_CHECK_HEADER(/usr/include/cweb.h,
435 #    [ AC_MSG_RESULT(yes)
436 #      AC_DEFINE(HAVE_CWEB)
437 #      got_cweb="yes"
438 #      CWEB_INC=
439 #      CWEB_LIBS="-lcweb"
440 #    ], [
441 #      # Did not find starndard library, so use our own
442 #      AC_MSG_RESULT(yes)
443 #      AC_DEFINE(HAVE_CWEB)
444 #      got_cweb="yes"
445 #      local_cweb="yes"
446 #      CWEB=${TOP_DIR}/depkgs/cweb
447 #      CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
448 #      CWEB_LIBS="-lcweb"
449 #      CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
450 #      CWEB_SRC="${TOP_DIR}/depkgs/cweb"
451 #    ])
452 #  ]   
453 #)
454 #AC_SUBST(CWEB)
455 #AC_SUBST(CWEB_INC)
456 #AC_SUBST(CWEB_LIBS)
457 #AC_SUBST(CWEB_LDFLAGS)
458 #AC_SUBST(CWEB_SRC)
459
460 # End of CWEB stuff
461 # -----------------------------------------------------------------------
462
463
464
465 # -----------------------------------------------------------
466 # Check whether user wants TCP wrappers support (default off)
467 # -----------------------------------------------------------
468 TCPW_MSG="no" 
469 AC_ARG_WITH(tcp-wrappers,
470   [  --with-tcp-wrappers=DIR Enable tcpwrappers support],
471   [
472     if test "x$withval" != "xno" ; then
473        saved_LIBS="$LIBS"
474        LIBS="$LIBS -lwrap -lnsl"
475        AC_MSG_CHECKING(for libwrap)
476        AC_TRY_LINK(
477           [ #include <tcpd.h>
478              int deny_severity = 0;
479              int allow_severity = 0;
480              struct request_info *req; ],
481           [ hosts_access(req); ],
482           [
483             AC_MSG_RESULT(yes)
484             AC_DEFINE(HAVE_LIBWRAP)
485             TCPW_MSG="yes" 
486           ],
487           [AC_MSG_ERROR([*** libwrap missing]) ]
488        )
489     fi
490   ]
491 )
492
493 # ------------------------------------------
494 # Where to place working dir
495 # ------------------------------------------
496 working_dir=`eval echo ${sysconfdir}/working`
497 AC_ARG_WITH(working-dir,
498    [  --with-working-dir=PATH Specify location of Bacula working files],
499    [
500        if test "x$withval" != "xno" ; then     
501               working_dir=$withval
502        fi
503    ]
504 )
505
506 AC_SUBST(working_dir)
507
508 # ------------------------------------------
509 # Where to send dump email
510 # ------------------------------------------
511 dump_email=root@localhost
512 AC_ARG_WITH(dump-email,
513    [  --with-dump-email=Dump email address],
514    [
515        if test "x$withval" != "xno" ; then     
516               dump_email=$withval
517        fi
518    ]
519 )
520
521 AC_SUBST(dump_email)
522
523 # ------------------------------------------
524 # Where to send job email
525 # ------------------------------------------
526 job_email=root@localhost
527 AC_ARG_WITH(job-email,
528    [  --with-job-email=Job output email address],
529    [
530        if test "x$withval" != "xno" ; then     
531               job_email=$withval
532        fi
533    ]
534 )
535
536 AC_SUBST(job_email)
537
538 # ------------------------------------------
539 # Where to find smtp host
540 # ------------------------------------------
541 smtp_host=localhost
542 AC_ARG_WITH(smtp_host,
543    [  --with-smtp-host=SMTP mail host address],
544    [
545        if test "x$withval" != "xno" ; then     
546               smtp_host=$withval
547        fi
548    ]
549 )
550
551 AC_SUBST(smtp_host)
552
553
554 # ------------------------------------
555 # Where to place pid files
556 # ------------------------------------
557 piddir=/var/run
558 AC_ARG_WITH(pid-dir,
559     [  --with-pid-dir=PATH    Specify location of Bacula pid files],
560     [
561         if test "x$withval" != "xno" ; then     
562             piddir=$withval
563         fi
564     ]
565 )
566
567 # make sure the pid directory exists
568 if test ! -d $piddir ; then     
569     piddir=`eval echo ${sysconfdir}`
570     case $piddir in
571           NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
572     esac
573 fi
574
575 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
576 AC_SUBST(piddir)
577
578
579 # ------------------------------------
580 # Where to place subsys "lock file"
581 # ------------------------------------
582 subsysdir=/var/run/subsys
583 AC_ARG_WITH(subsys-dir,
584     [  --with-subsys-dir=PATH    Specify location of Bacula subsys file],
585     [
586         if test "x$withval" != "xno" ; then     
587             subsysdir=$withval
588         fi
589     ]
590 )
591
592 # make sure the pid directory exists
593 if test ! -d $subsysdir ; then     
594     subsysdir=`eval echo ${sysconfdir}`
595     case $subsysdir in
596         NONE/*) subsysdir=`echo $subsysdir | sed "s~NONE~$ac_default_prefix~"` ;;
597     esac
598 fi
599
600 AC_SUBST(subsysdir)
601
602
603
604 # ------------------------------------
605 # Where to start assigning ports
606 # ------------------------------------
607 baseport=9101
608 AC_ARG_WITH(baseport,
609     [  --with-baseport=PORT    Specify base port address for daemons],
610     [
611         if test "x$withval" != "xno" ; then     
612              baseport=$withval
613         fi
614     ]
615 )
616
617 AC_SUBST(baseport)
618 dir_port=`expr $baseport`
619 fd_port=`expr $baseport + 1`
620 sd_port=`expr $fd_port + 1`
621
622 AC_SUBST(dir_port)
623 AC_SUBST(fd_port)
624 AC_SUBST(sd_port)
625
626
627 # ------------------------------------------
628 # Generate passwords
629 # ------------------------------------------
630 dir_password=
631 AC_ARG_WITH(dir-password,
632    [  --with-dir-password=PASSWORD Specify Director's password],
633    [
634        if test "x$withval" != "xno" ; then     
635            dir_password=$withval
636        fi
637    ]
638 )
639
640 if test "x$dir_password" = "x" ; then
641    if test "x$OPENSSL" = "xnone" ; then
642 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
643       key=`autoconf/randpass 33`
644    else
645       key=`openssl rand -base64 33`
646    fi
647    dir_password=$key
648 fi
649
650 fd_password=
651 AC_ARG_WITH(fd-password,
652    [  --with-fd-password=PASSWORD Specify Client's password],
653    [
654        if test "x$withval" != "xno" ; then     
655            fd_password=$withval
656        fi
657    ]
658 )
659
660 if test "x$fd_password" = "x" ; then
661    if test "x$OPENSSL" = "xnone" ; then
662 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
663       key=`autoconf/randpass 37`
664    else
665       key=`openssl rand -base64 33`
666    fi
667    fd_password=$key
668 fi
669
670 sd_password=
671 AC_ARG_WITH(sd-password,
672    [  --with-sd-password=PASSWORD Specify Storage daemon's password],
673    [
674        if test "x$withval" != "xno" ; then     
675            sd_password=$withval
676        fi
677    ]
678 )
679
680 if test "x$sd_password" = "x" ; then
681    if test "x$OPENSSL" = "xnone" ; then
682 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
683       key=`autocnf/randpass 41`
684    else
685       key=`openssl rand -base64 33`
686    fi
687    sd_password=$key
688 fi
689
690
691 AC_SUBST(dir_password)
692 AC_SUBST(fd_password)
693 AC_SUBST(sd_password)
694
695
696
697
698 # ------------------------------------------------
699 # Bacula check for various SQL database engines
700 # ------------------------------------------------
701 BA_CHECK_MYSQL_DB
702
703
704 # ------------------------------------------------
705 # Bacula check for various SQL database engines
706 # ------------------------------------------------
707 BA_CHECK_SQLITE_DB
708
709 AC_SUBST(cats)
710 AC_SUBST(DB_NAME)
711
712 AC_DEFINE(PROTOTYPES)
713
714 dnl# --------------------------------------------------------------------------
715 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
716 dnl#
717 if test -z "$CFLAGS"; then
718     if test -z "$CCOPTS"; then
719         CCOPTS='-g -O2'
720 dnl>    if test "x$GCC" = xyes; then
721 dnl>        if test x$system = xLinux; then
722 dnl>            CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce'
723 dnl>        fi
724 dnl>    fi
725     fi
726     CFLAGS="$CCOPTS"
727 fi
728
729
730 dnl A few others 
731 AC_EXEEXT
732
733 dnl See if we can use 64 bit file addresses
734 largefile_support="no"
735 AC_SYS_LARGEFILE
736
737
738 AC_PATH_XTRA
739
740 dnl# --------------------------------------------------------------------------
741 dnl# CHECKING FOR HEADER FILES
742 dnl# --------------------------------------------------------------------------
743 AC_CHECK_HEADERS( \
744         assert.h \
745         fcntl.h \
746         grp.h \
747         libc.h \
748         limits.h \
749         stdarg.h \
750         stdlib.h \
751         stdint.h \
752         string.h \
753         termios.h \
754         unistd.h \
755         sys/byteorder.h \
756         sys/ioctl.h \
757         sys/select.h \
758         sys/sockio.h \
759         sys/time.h \
760 )
761 AC_HEADER_STDC
762 AC_HEADER_MAJOR
763 AC_HEADER_DIRENT
764 AC_HEADER_STAT
765 AC_HEADER_SYS_WAIT
766 AC_HEADER_TIME
767 AC_STRUCT_ST_BLKSIZE
768 AC_STRUCT_ST_BLOCKS
769 AC_STRUCT_TIMEZONE
770
771 # It seems that that many machines where <utime.h> seems to be
772 # broken just require something like -D_XXX_SOURCE, where XXX might
773 # be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine.
774
775 AC_CACHE_CHECK(for utime.h, tar_cv_header_utime_h,
776   [AC_TRY_COMPILE([
777 #include <sys/types.h>
778 #include <utime.h>], [struct utimbuf foo],
779   tar_cv_header_utime_h=yes, tar_cv_header_utime_h=no)])
780 test $tar_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
781
782 AC_C_CONST
783
784
785 dnl# --------------------------------------------------------------------------
786 dnl# CHECKING FOR FILESYSTEM TYPE
787 dnl# --------------------------------------------------------------------------
788 AC_MSG_CHECKING(how to get filesystem type)
789 fstype=no
790 # The order of these tests is important.
791 AC_TRY_CPP([#include <sys/statvfs.h>
792 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
793 if test $fstype = no; then
794 AC_TRY_CPP([#include <sys/statfs.h>
795 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
796 fi
797 if test $fstype = no; then
798 AC_TRY_CPP([#include <sys/statfs.h>
799 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
800 fi
801 if test $fstype = no; then  
802 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
803 fi
804 if test $fstype = no; then  
805 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
806 fi
807 if test $fstype = no; then  
808 AC_TRY_CPP([#include <sys/mount.h>
809 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
810 fi
811 AC_MSG_RESULT($fstype)
812
813 dnl# --------------------------------------------------------------------------
814 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
815 dnl# --------------------------------------------------------------------------
816 AC_TYPE_SIGNAL
817 SIGNAL_CHECK
818 AC_TYPE_MODE_T
819 AC_TYPE_UID_T
820 AC_TYPE_SIZE_T
821 AC_TYPE_PID_T
822 AC_TYPE_OFF_T
823 AC_CHECK_TYPE(ino_t, unsigned long)
824 AC_CHECK_TYPE(dev_t, unsigned long)
825 AC_CHECK_TYPE(daddr_t, long)
826 AC_CHECK_TYPE(major_t, int)
827 AC_CHECK_TYPE(minor_t, int)
828 AC_CHECK_TYPE(ssize_t, int)
829 AC_STRUCT_ST_BLOCKS
830 AC_STRUCT_ST_RDEV
831 AC_STRUCT_TM
832 AC_C_CONST
833
834
835 AC_CHECK_SIZEOF(char, 1)
836 AC_CHECK_SIZEOF(short int, 2)
837 AC_CHECK_SIZEOF(int, 4)
838 AC_CHECK_SIZEOF(long int, 4)
839 AC_CHECK_SIZEOF(long long int, 8)
840 AC_CHECK_SIZEOF(int *, 4)
841
842 # Check for sys/types.h types
843 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
844     AC_TRY_COMPILE(
845         [ #include <sys/types.h> ], 
846         [ u_int a; a = 1;], 
847         [ ac_cv_have_u_int="yes" ],
848         [ ac_cv_have_u_int="no" ]
849     )
850 ])
851 if test "x$ac_cv_have_u_int" = "xyes" ; then
852    AC_DEFINE(HAVE_U_INT)
853    have_u_int=1
854 fi
855
856 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
857    AC_TRY_COMPILE(
858       [ #include <sys/types.h> ], 
859       [ intmax_t a; a = 1;], 
860       [ ac_cv_have_intmax_t="yes" ],
861       [ 
862          AC_TRY_COMPILE(
863             [ #include <stdint.h> ], 
864             [ intmax_t a; a = 1;], 
865             [ ac_cv_have_intmax_t="yes" ],
866             [ ac_cv_have_intmax_t="no" ]
867          )
868       ]
869    )        
870
871 ])
872 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
873    AC_DEFINE(HAVE_INTMAX_T)
874    have_intmax_t=1
875 fi
876
877
878 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
879    AC_TRY_COMPILE(
880       [ #include <sys/types.h> ], 
881       [ u_intmax_t a; a = 1;], 
882       [ ac_cv_have_u_intmax_t="yes" ],
883       [ 
884          AC_TRY_COMPILE(
885             [ #include <stdint.h> ], 
886             [ u_intmax_t a; a = 1;], 
887             [ ac_cv_have_u_intmax_t="yes" ],
888             [ ac_cv_have_u_intmax_t="no" ]
889          )
890       ]
891    )
892 ])
893 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
894    AC_DEFINE(HAVE_U_INTMAX_T)
895    have_u_intmax_t=1
896 fi
897
898
899 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
900    AC_TRY_COMPILE(
901       [ #include <sys/types.h> ], 
902       [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], 
903       [ ac_cv_have_intxx_t="yes" ],
904       [ ac_cv_have_intxx_t="no" ]
905    )
906 ])
907 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
908    AC_DEFINE(HAVE_INTXX_T)
909    have_intxx_t=1
910 fi
911         
912 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
913    AC_TRY_COMPILE(
914       [ #include <sys/types.h> ], 
915       [ int64_t a; a = 1;], 
916       [ ac_cv_have_int64_t="yes" ],
917       [ ac_cv_have_int64_t="no" ]
918    )
919 ])
920 if test "x$ac_cv_have_int64_t" = "xyes" ; then
921    AC_DEFINE(HAVE_INT64_T)
922    have_int64_t=1
923 fi
924         
925 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
926    AC_TRY_COMPILE(
927       [ #include <sys/types.h> ], 
928       [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], 
929       [ ac_cv_have_u_intxx_t="yes" ],
930       [ ac_cv_have_u_intxx_t="no" ]
931    )
932 ])
933 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
934    AC_DEFINE(HAVE_U_INTXX_T)
935    have_u_intxx_t=1
936 fi
937
938 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
939    AC_TRY_COMPILE(
940       [ #include <sys/types.h> ], 
941       [ u_int64_t a; a = 1;], 
942       [ ac_cv_have_u_int64_t="yes" ],
943       [ ac_cv_have_u_int64_t="no" ]
944    )
945 ])
946 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
947    AC_DEFINE(HAVE_U_INT64_T)
948    have_u_int64_t=1
949 fi
950
951 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
952            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
953 then
954    AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
955    AC_TRY_COMPILE(
956       [ #include <sys/bitypes.h>  ], 
957       [ int8_t a; int16_t b; int32_t c;
958         u_int8_t e; u_int16_t f; u_int32_t g;
959         a = b = c = e = f = g = 1;  ], 
960       [ AC_DEFINE(HAVE_U_INTXX_T)
961         AC_DEFINE(HAVE_INTXX_T)
962         AC_DEFINE(HAVE_SYS_BITYPES_H)
963         AC_MSG_RESULT(yes) ],
964       [ AC_MSG_RESULT(no)]
965    ) 
966 fi
967
968 if test -z "$have_u_intxx_t" ; then
969    AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
970       AC_TRY_COMPILE(
971          [ #include <sys/types.h> ], 
972          [ uint8_t a; uint16_t b; 
973            uint32_t c; a = b = c = 1; ], 
974          [ ac_cv_have_uintxx_t="yes" ],
975          [ ac_cv_have_uintxx_t="no" ]
976       )
977    ])
978    if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
979       AC_DEFINE(HAVE_UINTXX_T)
980    fi
981 fi
982
983
984 dnl# --------------------------------------------------------------------------
985 dnl# CHECKING FOR LIBRARY FUNCTIONS
986 dnl# --------------------------------------------------------------------------
987 AC_CHECK_FUNCS( \
988         fork \
989         getcwd \
990         gethostname \
991         getpid \
992         gettimeofday \
993         setpgid \
994         setpgrp \
995         setsid \
996         signal \
997         strerror \
998         strncmp \
999         strncpy \
1000         vfprintf \
1001         ,,
1002         [echo 'configure: cannot find needed function.'; exit 1]
1003 )
1004
1005 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1006
1007 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
1008
1009 dnl# --------------------------------------------------------------------------
1010 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1011 dnl# --------------------------------------------------------------------------
1012 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1013
1014 # If resolver functions are not in libc check for -lnsl or -lresolv.
1015 AC_CHECK_FUNC(gethostbyname_r,
1016     AC_MSG_RESULT(using libc's resolver),
1017     AC_CHECK_LIB(nsl,gethostbyname_r)
1018     AC_CHECK_LIB(resolv,gethostbyname_r))
1019
1020
1021 # Find where sockets are (especially for Solaris)
1022 AC_CHECK_FUNC(socket,
1023     AC_MSG_RESULT(using libc's socket),
1024     AC_CHECK_LIB(xnet,socket)
1025     AC_CHECK_LIB(socket,socket)
1026     AC_CHECK_LIB(inet,socket))
1027
1028 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1029
1030 AC_FUNC_STRFTIME
1031 AC_FUNC_VPRINTF
1032 AC_FUNC_ALLOCA
1033 AC_FUNC_GETMNTENT
1034 AC_FUNC_CLOSEDIR_VOID
1035 AC_FUNC_SETPGRP                       dnl check for BSD setpgrp.
1036 AC_FUNC_FNMATCH
1037
1038
1039 dnl# FreeBSD needs to link libxpg4
1040 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1041
1042
1043 AC_CHECK_LIB(sun, getpwnam)
1044
1045 AC_CHECK_HEADERS(zlib.h)
1046 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1047 have_zlib=no
1048 if test x$FDLIBS = x-lz; then
1049   AC_DEFINE(HAVE_LIBZ)
1050   have_zlib=yes
1051 fi
1052
1053 dnl Check for pthread libraries
1054 PTHREAD_LIB=""
1055 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1056         [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1057             [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1058                 [AC_CHECK_FUNC(pthread_create)]
1059             )]
1060         )]
1061 )
1062
1063 AC_SUBST(FDLIBS)
1064 AC_DEFINE(FDLIBS)
1065
1066
1067 CFLAGS=${CFLAGS--O}
1068 LDFLAGS=${LDFLAGS--O}
1069 DB_LIBS="${SQL_LFLAGS}"
1070
1071 CPPFLAGS="$CPPFLAGS"
1072 AC_SUBST(DEBUG)
1073 AC_SUBST(DINCLUDE)
1074 AC_SUBST(CFLAGS)
1075 AC_SUBST(CPPFLAGS)
1076 AC_SUBST(LDFLAGS)
1077 AC_SUBST(X_CFLAGS)
1078 AC_SUBST(LIBS)
1079 AC_SUBST(DLIB)
1080 AC_SUBST(DB_LIBS)
1081 AC_SUBST(X_LIBS)
1082 AC_SUBST(X_EXTRA_LIBS)
1083
1084 dnl# extra configurable objects
1085 OBJLIST=
1086 AC_SUBST(OBJLIST)
1087
1088 lld="lld"
1089 llu="llu"
1090
1091 #
1092 # Finally we set appropriate distribution specific
1093 #  variables and defaults
1094 #
1095 # PFILES are platform specific files
1096 PFILES="platforms/Makefile"
1097 PSCMD="ps -e"
1098 WIN32=
1099 hostname=`hostname`
1100 case "$DISTNAME" in
1101 alpha)
1102         DISTVER=`uname -r`
1103         PTHREAD_LIB="-lpthread -lexc"
1104         if test "${CC}" = "gcc" ; then
1105            lld="lld"
1106            llu="llu"
1107         else
1108            lld="ld"
1109            llu="lu"
1110         fi
1111         TAPEDRIVE="/dev/nrmt0"
1112   ;;
1113 bsdi)
1114         DISTVER=`uname -a |awk '{print $3}'`
1115         TAPEDRIVE="/dev/nrst0"
1116   ;;
1117 caldera)
1118         DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
1119         TAPEDRIVE="/dev/nrst0"
1120         PSCMD="ps -e -o pid,command"
1121         hostname=`hostname -s`
1122   ;;
1123 cygwin)
1124         DISTVER=`uname -a |awk '{print $3}'`
1125         TAPEDRIVE="/dev/nrst0"
1126         WIN32=win32
1127         CFLAGS="${CFLAGS} -mwindows"
1128         LDFLAGS="${LDFLAGS} -mwindows"
1129   ;;
1130 debian)
1131         DISTVER=`cat /etc/debian_version`
1132         TAPEDRIVE="/dev/nrst0"
1133         PSCMD="ps -e -o pid,command"
1134         hostname=`hostname -s`
1135   ;;
1136 freebsd)
1137         DISTVER=`uname -a |awk '{print $3}'`
1138         PTHREAD_LIB="-pthread"
1139         CFLAGS="${CFLAGS} -pthread"
1140         lld="qd"
1141         llu="qu"
1142         TAPEDRIVE="/dev/nrst0"
1143         PSCMD="ps -x -o pid,command"
1144         PFILES="${PFILES} \
1145             platforms/freebsd/Makefile \
1146             platforms/freebsd/bacula-fd \
1147             platforms/freebsd/bacula-sd \
1148             platforms/freebsd/bacula-dir"
1149         hostname=`hostname -s`
1150         largefile_support="yes"
1151   ;;
1152 hpux)
1153         DISTVER=`uname -r`
1154         TAPEDRIVE="/dev/rmt/0hnb"
1155   ;;
1156 irix)
1157         DISTVER=`uname -r`
1158         TAPEDRIVE="/dev/rmt/0cbn"
1159         PSCMD="ps -e -o pid,comm"
1160         hostname=`/usr/bsd/hostname -s`
1161         PFILES="${PFILES} \
1162             platforms/irix/Makefile \
1163             platforms/irix/bacula-fd \
1164             platforms/irix/bacula-sd \
1165             platforms/irix/bacula-dir"
1166   ;;
1167 netbsd)
1168         DISTVER=`uname -a |awk '{print $3}'`
1169         lld="qd"
1170         llu="qu"
1171         TAPEDRIVE="/dev/nrst0"
1172         PSCMD="ps -a -o pid,command"
1173         PTHREAD_LIB="-pthread"
1174         CFLAGS="${CFLAGS} -pthread"
1175   ;;
1176 openbsd)
1177         DISTVER=`uname -a |awk '{print $3}'`
1178         lld="qd"
1179         llu="qu"
1180         TAPEDRIVE="/dev/nrst0"
1181         PSCMD="ps -a -o pid,command"
1182         PTHREAD_LIB="-pthread"
1183         CFLAGS="${CFLAGS} -pthread"
1184         PFILES="${PFILES} \
1185             platforms/openbsd/Makefile \
1186             platforms/openbsd/bacula-fd \
1187             platforms/openbsd/bacula-sd \
1188             platforms/openbsd/bacula-dir"
1189   ;;
1190 redhat)
1191         DISTVER=`cat /etc/redhat-release | grep release |\
1192                                 cut -f 5 -d ' '`
1193         TAPEDRIVE="/dev/nst0"
1194         PSCMD="ps -e -o pid,command"
1195         PFILES="${PFILES} \
1196             platforms/redhat/Makefile \
1197             platforms/redhat/bacula-fd \
1198             platforms/redhat/bacula-sd \
1199             platforms/redhat/bacula-dir"
1200         hostname=`hostname -s`
1201   ;;
1202 slackware)
1203         DISTVER=`cat /etc/slackware-version`
1204         TAPEDRIVE="/dev/nst0"
1205         PSCMD="ps -e -o pid,command"
1206         hostname=`hostname -s`
1207   ;;
1208 solaris)
1209         DISTVER=Solaris
1210         TAPEDRIVE="/dev/rmt/0cbn"
1211         PSCMD="ps -e -o pid,comm"
1212         PFILES="${PFILES} \
1213             platforms/solaris/Makefile \
1214             platforms/solaris/bacula-fd \
1215             platforms/solaris/bacula-sd \
1216             platforms/solaris/bacula-dir"
1217   ;;
1218 suse)
1219         DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1220                                 cut -f 3 -d ' '`
1221         TAPEDRIVE="/dev/nst0"
1222         PSCMD="ps -e -o pid,command"
1223         hostname=`hostname -s`
1224   ;;
1225 suse5)
1226         DISTNAME=suse
1227         DISTVER=5.x
1228         TAPEDRIVE="/dev/nst0"
1229         PSCMD="ps -e -o pid,command"
1230         hostname=`hostname -s`
1231   ;;
1232 unknown)
1233         DISTVER=unknown
1234         TAPEDRIVE="/dev/nst0"
1235   ;;
1236 *)
1237   echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1238   ;;
1239 esac  
1240
1241 AC_SUBST(hostname)
1242
1243
1244 LIBS="$PTHREAD_LIB $LIBS"
1245
1246 AC_DEFINE_UNQUOTED(lld, "$lld")
1247 AC_DEFINE_UNQUOTED(llu, "$llu")
1248 AC_SUBST(TAPEDRIVE)
1249 AC_SUBST(PSCMD)
1250 AC_SUBST(WIN32)
1251 AC_SUBST(DISTNAME)
1252 AC_SUBST(DISTVER)
1253
1254
1255 dnl# common parts of the Makefile
1256 MCOMMON=./autoconf/Make.common
1257 AC_SUBST_FILE(MCOMMON)
1258
1259 AC_OUTPUT([autoconf/Make.common \
1260            Makefile \
1261            scripts/startmysql \
1262            scripts/stopmysql \
1263            scripts/btraceback \
1264            scripts/startit \
1265            scripts/stopit \
1266            scripts/console \
1267            scripts/gconsole \
1268            scripts/bacula \
1269            scripts/fd \
1270            scripts/Makefile \
1271            doc/Makefile \
1272            src/Makefile \
1273            src/console/Makefile \
1274            src/console/console.conf \
1275            src/gnome-console/Makefile \
1276            src/gnome-console/gnome-console.conf \
1277            src/dird/Makefile \
1278            src/dird/bacula-dir.conf \
1279            src/lib/Makefile \
1280            src/stored/Makefile \
1281            src/stored/bacula-sd.conf \
1282            src/filed/Makefile \
1283            src/filed/host.h \
1284            src/filed/bacula-fd.conf \
1285            src/filed/win32/Makefile \
1286            src/cats/Makefile \
1287            src/cats/alter_mysql_tables \
1288            src/cats/make_mysql_tables \
1289            src/cats/drop_mysql_tables \
1290            src/cats/create_mysql_database \
1291            src/cats/grant_mysql_privileges \
1292            src/cats/alter_sqlite_tables \
1293            src/cats/make_sqlite_tables \
1294            src/cats/drop_sqlite_tables \
1295            src/cats/create_sqlite_database \
1296            src/cats/sqlite \
1297            src/cats/mysql \
1298            src/cats/create_bdb_database \
1299            src/cats/make_bdb_tables \
1300            src/cats/drop_bdb_tables \
1301            src/cats/make_bacula_tables \
1302            src/cats/drop_bacula_tables \
1303            src/findlib/Makefile \
1304            src/tools/Makefile \
1305            $PFILES ],  
1306           [(echo "Doing make of dependencies"; make depend;) ]
1307 )
1308
1309 cd scripts
1310 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1311 chmod 755 console gconsole
1312 cd ..
1313 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
1314 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
1315 chmod 755 src/cats/create_mysql_database 
1316 chmod 755 src/cats/alter_mysql_tables
1317 chmod 755 src/cats/grant_mysql_privileges
1318 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables 
1319 chmod 755 src/cats/make_bacula_tables src/cats/drop_bacula_tables 
1320 chmod 755 src/cats/create_sqlite_database
1321 chmod 755 src/cats/alter_sqlite_tables
1322 chmod 755 src/cats/sqlite
1323 chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables 
1324 chmod 755 src/cats/create_bdb_database
1325
1326 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1327    largefile_support="yes"
1328 fi
1329
1330
1331 echo "
1332 Configuration on `date`:
1333
1334   Host:                       $host -- ${DISTNAME} ${DISTVER}
1335   Bacula version:             ${VERSION} (${DATE})
1336   Source code location:       ${srcdir}
1337   Install binaries:           ${sbindir}
1338   Install config files:       ${sysconfdir}
1339   C Compiler:                 ${CC}
1340   C++ Compiler:               ${CXX}
1341   Compiler flags:             ${CFLAGS} 
1342   Linker flags:               ${LDFLAGS}
1343   Libraries:                  ${LIBS}
1344   Statically Linked Tools:    ${support_static_tools}
1345   Statically Linked FD:       ${support_static_fd}
1346   Database type:              ${db_name}
1347   Database lib:               ${DB_LIBS}
1348
1349   Job Output Email:           ${job_email}
1350   Traceback Email:            ${dump_email}
1351   SMTP Host Address:          ${smtp_host}
1352   Director Port               ${dir_port}
1353   File daemon Port            ${fd_port}
1354   Storage daemon Port         ${sd_port}
1355   Working directory           ${working_dir}
1356   SQL binaries Directory      ${SQL_BINDIR}
1357
1358   Large file support:         $largefile_support
1359   readline support:           ${got_readline} ${PRTREADLINE_SRC}
1360   TCP Wrappers support:       ${TCPW_MSG}
1361   ZLIB support:               ${have_zlib}
1362   enable-smartalloc:          ${support_smartalloc} 
1363   enable-gnome:               ${support_gnome}
1364
1365   " > config.out
1366
1367 cat config.out
1368
1369 # old stuff
1370 # cweb support:               ${got_cweb} ${CWEB_SRC}
1371 # gmp support:                ${got_gmp} ${GMP_SRC}