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