]> git.sur5r.net Git - bacula/bacula/blob - bacula/autoconf/configure.in
- Set WANT_AUTOCONF to 2.5 before running autoconf and autoheader in the main Makefil...
[bacula/bacula] / bacula / autoconf / configure.in
1 lal#
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]*BDATE.*"\(.*\)"$/\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 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
63 AC_PATH_PROG(OPENSSL, openssl, none)
64 AC_PATH_PROG(MTX, mtx, mtx)
65 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
66 AC_PATH_PROG(WXCONFIG, wx-config, wx-config)
67
68 test -n "$ARFLAG" || ARFLAGS="cr"
69 AC_SUBST(ARFLAGS)
70
71 MAKE_SHELL=/bin/sh
72 AC_SUBST(MAKE_SHELL)
73
74 AC_SUBST(LOCAL_LIBS)
75 AC_SUBST(LOCAL_CFLAGS)
76 AC_SUBST(LOCAL_LDFLAGS)
77 AC_SUBST(LOCAL_DEFS)
78
79
80
81 dnl --------------------------------------------------
82 dnl Bacula OP Sys determination (see aclocal.m4)
83 dnl --------------------------------------------------
84 BA_CHECK_OPSYS
85
86 # -----------------------------------------------------------
87 dnl Bacula OPSys Distribution determination (see aclocal.m4)
88 # ----------------------------------------------------------
89 BA_CHECK_OPSYS_DISTNAME
90
91 # -----------------------------------------------------------
92 dnl Check for gnome stuff for gnome-console
93 # ----------------------------------------------------------
94 AM_ACLOCAL_INCLUDE(gnome-macros)
95
96 # ------------------------------------------------------------------
97 #  If the user has not set --prefix, we set our default to nothing.
98 #  In this case, if the user has not set --sysconfdir, we set it
99 #  to the package default of /etc/bacula.  If either --prefix or
100 #  --sysconfdir is set, we leave sysconfdir alone except to eval it.
101 # ------------------------------------------------------------------
102 if test x${prefix} = xNONE ; then
103     if test `eval echo ${sysconfdir}` = NONE/etc ; then
104         sysconfdir=/etc/bacula
105     fi
106     prefix=
107 fi
108 sysconfdir=`eval echo ${sysconfdir}`
109
110 # -------------------------------------------------------------------------
111 #  If the user has not set --exec-prefix, we default to ${prefix}
112 # -------------------------------------------------------------------------
113 if test x${exec_prefix} = xNONE ; then
114     exec_prefix=${prefix}
115 fi
116
117 # ------------------------------------------------------------------
118 # If the user has not set --sbindir, we set our default as /sbin
119 # ------------------------------------------------------------------
120 if test x$sbindir = x'${exec_prefix}/sbin' ; then
121     sbindir=${exec_prefix}/sbin
122 fi
123 sbindir=`eval echo ${sbindir}`
124                       
125 # ------------------------------------------------------------------
126 # All list of languages for which a translation exist. Each
127 #  language is separated by a space.
128 # ------------------------------------------------------------------
129 ALL_LINGUAS=""
130
131 AC_PATH_PROGS(MSGFMT, msgfmt, no)
132 if test "$MSGFMT" = "no"
133 then
134    echo 'msgfmt program not found, disabling NLS !'
135    USE_NLS=no
136    USE_INCLUDED_LIBINTL=no
137 #else
138 #   AM_GNU_GETTEXT
139 fi
140
141
142 support_mysql=no
143 support_sqlite=no
144 support_postgresql=no
145 support_smartalloc=yes
146 support_readline=yes
147 support_conio=yes
148 support_gnome=no
149 support_wx_console=no
150 gnome_version=
151 support_static_tools=no
152 support_static_fd=no
153 support_static_sd=no
154 support_static_dir=no
155 support_static_cons=no
156 build_client_only=no
157 cats=
158 db_name=Internal
159 DB_NAME=bdb
160
161 dnl# --------------------------------------------------------------------------
162 dnl# CHECKING COMMAND LINE OPTIONS
163 dnl# --------------------------------------------------------------------------
164
165 # -------------------------------------------
166 # gnome (default off)
167 # -------------------------------------------
168 AC_ARG_ENABLE(gnome,
169   [  --enable-gnome       enable build of gnome-console GUI [disabled]],
170   [if test x$enableval = xyes; then
171     support_gnome=yes
172   fi])
173
174 GNOME_DIR=
175 if test x$support_gnome = xyes; then
176   abc=`$PKGCONFIG --exists libgnomeui-2.0`
177   pkg=$?
178   if test $pkg = 0; then
179      GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
180      GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
181      GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
182      GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
183      AC_SUBST(GNOME_INCLUDEDIR)
184      AC_SUBST(GNOMEUI_LIBS)
185      AC_SUBST(GNOME_LIBDIR)
186      AC_SUBST(GNOME_LIBS)
187      GNOME_DIR=src/gnome2-console
188      gnome_version="Version 2.x"
189   else
190 dnl do 1.4 stuff
191      GNOME_INIT
192      GNOME_DIR=src/gnome-console
193      gnome_version="Version 1.4"
194   fi
195 fi
196 AC_SUBST(GNOME_DIR)
197
198
199 # -------------------------------------------
200 # wx-console (default off)
201 # -------------------------------------------
202 AC_ARG_ENABLE(wx-console,
203   [  --enable-wx-console     enable build of wxWidgets console [disabled]],
204   [if test x$enableval = xyes; then
205     support_wx_console=yes
206   fi])
207
208 WX_DIR=
209 if test x$support_wx_console = xyes; then
210   abc=`$WXCONFIG --cppflags`
211   pkg=$?
212   if test $pkg = 0; then
213      WXCONS_CPPFLAGS=`$WXCONFIG --cppflags`
214      WXCONS_LDFLAGS=`$WXCONFIG --libs`
215      AC_SUBST(WXCONS_CPPFLAGS)
216      AC_SUBST(WXCONS_LDFLAGS)
217      WX_DIR=src/wx-console
218   else
219      echo " "
220      echo "wx-config program not found. wx-console disabled."
221      echo " "
222      support_wx_console=no
223   fi
224 fi
225 AC_SUBST(WX_DIR)
226
227
228 # -------------------------------------------
229 # tray-monitor (default off)
230 # -------------------------------------------
231 AC_ARG_ENABLE(tray-monitor,
232   [  --enable-tray-monitor   enable build of Gnome tray monitor (compatible with KDE) [disabled]],
233   [if test x$enableval = xyes; then
234     support_tray_monitor=yes
235   fi])
236
237 TRAY_MONITOR_DIR=
238 if test x$support_tray_monitor = xyes; then
239   abc=`$PKGCONFIG --exists gtk+-2.0`
240   pkg=$?
241   if test $pkg = 0; then
242      TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
243      TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
244      AC_SUBST(TRAY_MONITOR_CPPFLAGS)
245      AC_SUBST(TRAY_MONITOR_LDFLAGS)
246      TRAY_MONITOR_DIR=src/tray-monitor
247      abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
248      pkg=$?
249      if test $pkg = 0; then
250         AC_DEFINE(HAVE_GTK_2_4)
251      fi
252   fi
253 fi
254 AC_SUBST(TRAY_MONITOR_DIR)
255
256 # -------------------------------------------
257 # smartalloc (default off)
258 # -------------------------------------------
259 AC_ARG_ENABLE(smartalloc,
260   [  --enable-smartalloc     enable smartalloc debugging support [disabled]],
261   [if test x$enableval = xno; then
262     support_smartalloc=no
263   fi])
264
265 if test x$support_smartalloc = xyes; then
266    AC_DEFINE(SMARTALLOC)
267 fi
268
269 # -------------------------------------------
270 # static-tools (default off)
271 # -------------------------------------------
272 AC_ARG_ENABLE(static-tools,
273    [  --enable-static-tools   enable static tape tools [disabled]],
274    [if test x$enableval = xyes; then
275      support_static_tools=yes
276    fi])
277
278 TTOOL_LDFLAGS=
279 if test x$support_static_tools = xyes; then
280    TTOOL_LDFLAGS="-static"
281 fi
282 AC_SUBST(TTOOL_LDFLAGS)
283
284 # -------------------------------------------
285 # static-fd    (default off)
286 # -------------------------------------------
287 AC_ARG_ENABLE(static-fd,
288    [  --enable-static-fd      enable static File daemon [disabled]],
289    [if test x$enableval = xyes; then
290      support_static_fd=yes
291    fi])
292
293 STATIC_FD=
294 if test x$support_static_fd = xyes; then
295    STATIC_FD="static-bacula-fd"
296 fi
297 AC_SUBST(STATIC_FD)
298
299 # -------------------------------------------
300 # static-sd    (default off)
301 # -------------------------------------------
302 AC_ARG_ENABLE(static-sd,
303    [  --enable-static-sd      enable static Storage daemon [disabled]],
304    [if test x$enableval = xyes; then
305      support_static_sd=yes
306    fi])
307
308 STATIC_SD=
309 if test x$support_static_sd = xyes; then
310    STATIC_SD="static-bacula-sd"
311 fi
312 AC_SUBST(STATIC_SD)
313
314 # -------------------------------------------
315 # static-dir   (default off)
316 # -------------------------------------------
317 AC_ARG_ENABLE(static-dir,
318    [  --enable-static-dir     enable static Director [disabled]],
319    [if test x$enableval = xyes; then
320      support_static_dir=yes
321    fi])
322
323 STATIC_DIR=
324 if test x$support_static_dir = xyes; then
325    STATIC_DIR="static-bacula-dir"
326 fi
327 AC_SUBST(STATIC_DIR)
328
329 # -------------------------------------------
330 # static-cons  (default off)
331 # -------------------------------------------
332 AC_ARG_ENABLE(static-cons,
333    [  --enable-static-cons    enable static Console [disabled]],
334    [if test x$enableval = xyes; then
335      support_static_cons=yes
336    fi])
337
338 STATIC_CONS=
339 STATIC_GNOME_CONS=
340 STATIC_WX_CONS=
341 if test x$support_static_cons = xyes; then
342    STATIC_CONS="static-bconsole"
343    STATIC_GNOME_CONS="static-gnome-console"
344    STATIC_WX_CONS="static-wx-console"
345 fi
346 AC_SUBST(STATIC_CONS)
347 AC_SUBST(STATIC_GNOME_CONS)
348 AC_SUBST(STATIC_WX_CONS)
349
350 # -------------------------------------------
351 # client_only  (default off)
352 # -------------------------------------------
353 AC_ARG_ENABLE(client-only,
354    [  --enable-client-only    build client (File daemon) only [disabled]],
355    [if test x$enableval = xyes; then
356      build_client_only=yes
357     db_name=None
358     DB_NAME=none
359    fi])
360 if test x$build_client_only = xno; then
361    ALL_DIRS="subdirs"
362 else
363    ALL_DIRS=""
364 fi
365 AC_SUBST(ALL_DIRS)
366
367 # ---------------------------------------------------
368 # Check for conio (Bacula readline substitute)(
369 # ---------------------------------------------------
370 # this allows you to turn it completely off
371 AC_ARG_ENABLE(conio,   
372   [  --disable-conio         disable conio support [enabled]
373                                                       ],
374   [if test x$enableval = xno; then
375     support_conio=no
376   fi])
377
378 got_conio="no"
379 if test x$support_conio = xyes; then
380    AC_CHECK_HEADER(termcap.h, 
381      [ AC_CHECK_LIB(termcap, tgetent, 
382        [ CONS_LIBS="-ltermcap"
383          CONS_OBJ="conio.o"
384          CONS_SRC="conio.c"
385          got_conio="yes"
386          support_readline=no
387          AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled]) 
388        ],   
389        [ AC_CHECK_LIB(ncurses, tgetent,
390          [ CONS_LIBS="-lncurses"
391            CONS_OBJ="conio.o"
392            CONS_SRC="conio.c"
393            got_conio="yes"
394            support_readline=no
395            AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled]) 
396          ],   
397          [ echo " "; echo "Neither termcap nor ncurses library found. CONIO turned off ..."; echo " "])
398        ])
399     ],[echo " "; echo "termcap.h not found. CONIO turned off ..."; echo " "])
400 fi
401
402
403 # ---------------------------------------------------
404 # Check for readline support/directory (default off)
405 # ---------------------------------------------------
406 # this allows you to turn it completely off
407 AC_ARG_ENABLE(readline,
408   [  --disable-readline      disable readline support [disable]
409                                                       ],
410   [if test x$enableval = xno; then
411     support_readline=no
412   fi])
413
414 got_readline="no"
415 READLINE_SRC=
416 if test x$support_readline = xyes; then
417    AC_ARG_WITH(readline,
418      [ --with-readline=DIR               specify readline library directory],
419      [
420         case "$with_readline" in
421         no) : ;;
422         yes|*)
423           if test "$with_readline" != "yes"; then
424             CONS_INC="-I${with_readline}"
425             CONS_LDFLAGS="-L$with_readline"
426           else
427              with_readline="/usr/include/readline" 
428           fi
429           AC_CHECK_HEADER(${with_readline}/readline.h, 
430              [ AC_DEFINE(HAVE_READLINE) 
431                CONS_LIBS="-lreadline -ltermcap"
432                got_readline="yes"   
433              ],
434              [ echo " "
435                echo "readline.h not found. readline turned off ..."
436                echo " "
437              ]
438           )
439           ;;
440         esac
441      ],[
442        # check for standard readline library
443        AC_CHECK_HEADER(/usr/include/readline/readline.h, 
444          [ AC_DEFINE(HAVE_READLINE)
445            got_readline="yes"
446            CONS_INC="-I/usr/include/readline"
447            CONS_LIBS="-lreadline -ltermcap"
448          ], [
449            # Did not find standard library, so try Bacula's default
450             AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h, 
451               [ AC_DEFINE(HAVE_READLINE) 
452                  got_readline="yes"   
453                  CONS_INC="-I${TOP_DIR}/depkgs/readline"
454                  CONS_LIBS="-lreadline -lhistory -ltermcap"
455                  CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
456                  PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
457               ],
458               [ echo " "
459                 echo "readline.h not found. readline turned off ..."
460                 echo " "
461               ]
462             )
463          ]
464        )
465      ]   
466    )
467 fi
468
469
470
471 AC_SUBST(CONS_INC)
472 AC_SUBST(CONS_OBJ)
473 AC_SUBST(CONS_SRC)
474 AC_SUBST(CONS_LIBS)
475 AC_SUBST(CONS_LDFLAGS)
476 AC_SUBST(READLINE_SRC)
477
478 # Minimal stuff for readline Makefile configuration
479 MAKE_SHELL=/bin/sh
480 AC_SUBST(MAKE_SHELL)
481 AC_HEADER_STAT
482 AC_HEADER_DIRENT
483 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
484 AC_CHECK_FUNCS(nanosleep nl_langinfo)
485 AC_CHECK_HEADERS(varargs.h)
486
487 # End of readline/conio stuff
488 # -----------------------------------------------------------------------
489
490
491 # ---------------------------------------------------
492 # Check for GMP support/directory
493 # ---------------------------------------------------
494 #GMP_SRC=
495 #local_gmp="no"
496 #AC_ARG_WITH(gmp,
497 #  [  --with-gmp[=DIR]   Specify gmp library directory],
498 #  [
499 #     case "$with_gmp" in
500 #     no) : ;;
501 #     yes|*)
502 #       if test "$with_gmp" != "yes"; then
503 #         GMP_INC="-I$with_gmp"
504 #         GMP_LIBS="-lgmp"
505 #         GMP_LDFLAGS="-L$with_gmp"
506 #       else
507 #          with_gmp="/usr/include" 
508 #       fi
509 #       AC_CHECK_HEADER($with_gmp/gmp.h, 
510 #          [ AC_MSG_RESULT(yes)
511 #            AC_DEFINE(HAVE_GMP) 
512 #            GMP_LIBS="-lgmp"
513 #            got_gmp="yes"   
514 #          ],
515 #          [ AC_MSG_ERROR([*** gmp library missing]) 
516 #          ]
517 #       )
518 #       ;;
519 #     esac
520 #  ],[
521 #    # check for standard gmp library
522 #    AC_CHECK_HEADER(/usr/include/gmp.h,
523 #    [ AC_MSG_RESULT(yes)
524 #      AC_DEFINE(HAVE_GMP)
525 #      got_gmp="yes"
526 #      GMP_INC=
527 #      GMP_LIBS="-lgmp"
528 #    ], [
529 #      # Did not find standard library, so use our own
530 #      AC_MSG_RESULT(yes)
531 #      AC_DEFINE(HAVE_GMP)
532 #      got_gmp="yes"
533 #      local_gmp="yes"
534 #      GMP_INC="-I${TOP_DIR}/depkgs/gmp"
535 #      GMP_LIBS="-lgmp"
536 #      GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
537 #      GMP_SRC="${TOP_DIR}/depkgs/gmp"
538 #    ])
539 #  ]   
540 #)
541 #AC_SUBST(GMP_INC)
542 #AC_SUBST(GMP_LIBS)
543 #AC_SUBST(GMP_LDFLAGS)
544 #AC_SUBST(GMP_SRC)
545
546 # End of GMP stuff
547 # -----------------------------------------------------------------------
548
549
550 # ---------------------------------------------------
551 # Check for CWEB support/directory
552 # ---------------------------------------------------
553 #CWEB_SRC=
554 #CWEB=/bin
555 #local_cweb="no"
556 #AC_ARG_WITH(cweb,
557 #  [  --with-cweb[=DIR]   Specify cweb library directory],
558 #  [
559 #     case "$with_cweb" in
560 #     no) : ;;
561 #     yes|*)
562 #       if test "$with_cweb" != "yes"; then
563 #         CWEB_INC="-I$with_cweb"
564 #         CWEB_LIBS="-lcweb"
565 #         CWEB_LDFLAGS="-L$with_cweb"
566 #       else
567 #          with_cweb="/usr/include" 
568 #       fi
569 #       AC_CHECK_HEADER($with_cweb/cweb.h, 
570 #          [ AC_MSG_RESULT(yes)
571 #            AC_DEFINE(HAVE_CWEB) 
572 #            CWEB_LIBS="-lcweb"
573 #            got_cweb="yes"   
574 #          ],
575 #          [ AC_MSG_ERROR([*** cweb library missing]) 
576 #          ]
577 #       )
578 #       ;;
579 #     esac
580 #  ],[
581 #    # check for standard cweb library
582 #    AC_CHECK_HEADER(/usr/include/cweb.h,
583 #    [ AC_MSG_RESULT(yes)
584 #      AC_DEFINE(HAVE_CWEB)
585 #      got_cweb="yes"
586 #      CWEB_INC=
587 #      CWEB_LIBS="-lcweb"
588 #    ], [
589 #      # Did not find starndard library, so use our own
590 #      AC_MSG_RESULT(yes)
591 #      AC_DEFINE(HAVE_CWEB)
592 #      got_cweb="yes"
593 #      local_cweb="yes"
594 #      CWEB=${TOP_DIR}/depkgs/cweb
595 #      CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
596 #      CWEB_LIBS="-lcweb"
597 #      CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
598 #      CWEB_SRC="${TOP_DIR}/depkgs/cweb"
599 #    ])
600 #  ]   
601 #)
602 #AC_SUBST(CWEB)
603 #AC_SUBST(CWEB_INC)
604 #AC_SUBST(CWEB_LIBS)
605 #AC_SUBST(CWEB_LDFLAGS)
606 #AC_SUBST(CWEB_SRC)
607
608 # End of CWEB stuff
609 # -----------------------------------------------------------------------
610
611
612
613 # -----------------------------------------------------------
614 # Check whether user wants TCP wrappers support (default off)
615 # -----------------------------------------------------------
616 TCPW_MSG="no" 
617 AC_ARG_WITH(tcp-wrappers,
618   [  --with-tcp-wrappers=DIR     enable tcpwrappers support],
619   [
620     if test "x$withval" != "xno" ; then
621        saved_LIBS="$LIBS"
622        LIBS="$saved_LIBS -lwrap"
623        AC_MSG_CHECKING(for libwrap)
624        AC_TRY_LINK(
625           [ #include <tcpd.h>
626              int deny_severity = 0;
627              int allow_severity = 0;
628              struct request_info *req; ],
629           [ hosts_access(req); ],
630           [
631             AC_MSG_RESULT(yes)
632             AC_DEFINE(HAVE_LIBWRAP)
633             TCPW_MSG="yes" 
634           ], [
635             LIBS="$saved_LIBS -lwrap -lnsl"
636             AC_TRY_LINK(
637               [ #include <tcpd.h>
638                  int deny_severity = 0;
639                  int allow_severity = 0;
640                  struct request_info *req; ],
641               [ hosts_access(req); ],
642               [
643                  AC_MSG_RESULT(yes)
644                  AC_DEFINE(HAVE_LIBWRAP)
645                  TCPW_MSG="yes" 
646               ],
647               [AC_MSG_ERROR([*** libwrap missing]) ] ]
648             )
649        )
650     fi
651   ]
652 )
653
654 # ------------------------------------------
655 # Where to place working dir
656 # ------------------------------------------
657 working_dir=`eval echo ${prefix}/var/bacula/working`
658 AC_ARG_WITH(working-dir,
659    [  --with-working-dir=PATH    specify path of Bacula working directory],
660    [
661        if test "x$withval" != "xno" ; then     
662               working_dir=$withval
663        fi
664    ]
665 )
666
667 AC_SUBST(working_dir)
668
669
670 # ------------------------------------------
671 # Where to place scriptdir (script files)
672 # ------------------------------------------
673 scriptdir=`eval echo ${sysconfdir}`
674 AC_ARG_WITH(scriptdir,
675    [  --with-scriptdir=PATH    specify path of Bacula scripts directory],
676    [
677        if test "x$withval" != "xno" ; then     
678               scriptdir=$withval
679        fi
680    ]
681 )
682
683 AC_SUBST(scriptdir)
684
685
686 # ------------------------------------------
687 # Where to send dump email
688 # ------------------------------------------
689 dump_email=root@localhost
690 AC_ARG_WITH(dump-email,
691    [  --with-dump-email=EMAIL    dump email address],
692    [
693        if test "x$withval" != "xno" ; then     
694               dump_email=$withval
695        fi
696    ]
697 )
698
699 AC_SUBST(dump_email)
700
701 # ------------------------------------------
702 # Where to send job email
703 # ------------------------------------------
704 job_email=root@localhost
705 AC_ARG_WITH(job-email,
706    [  --with-job-email=EMAIL     job output email address],
707    [
708        if test "x$withval" != "xno" ; then     
709               job_email=$withval
710        fi
711    ]
712 )
713
714 AC_SUBST(job_email)
715
716 # ------------------------------------------
717 # Where to find smtp host
718 # ------------------------------------------
719 smtp_host=localhost
720 AC_ARG_WITH(smtp_host,
721    [  --with-smtp-host=HOST              SMTP mail host address],
722    [
723        if test "x$withval" != "xno" ; then     
724               smtp_host=$withval
725        fi
726    ]
727 )
728
729 AC_SUBST(smtp_host)
730
731
732 # ------------------------------------
733 # Where to place pid files
734 # ------------------------------------
735 piddir=/var/run
736 AC_ARG_WITH(pid-dir,
737     [  --with-pid-dir=PATH               specify location of Bacula pid files],
738     [
739         if test "x$withval" != "xno" ; then     
740             piddir=$withval
741         fi
742     ]
743 )
744
745 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
746 AC_SUBST(piddir)
747
748
749 # ------------------------------------
750 # Where to place subsys "lock file"
751 # ------------------------------------
752 subsysdir=/var/run/subsys
753 AC_ARG_WITH(subsys-dir,
754     [  --with-subsys-dir=PATH    specify location of Bacula subsys file],
755     [
756         if test "x$withval" != "xno" ; then     
757             subsysdir=$withval
758         fi
759     ]
760 )
761
762 AC_SUBST(subsysdir)
763
764
765
766 # ------------------------------------
767 # Where to start assigning ports
768 # ------------------------------------
769 baseport=9101
770 AC_ARG_WITH(baseport,
771     [  --with-baseport=PORT              specify base port address for daemons],
772     [
773         if test "x$withval" != "xno" ; then     
774              baseport=$withval
775         fi
776     ]
777 )
778
779 AC_SUBST(baseport)
780 dir_port=`expr $baseport`
781 fd_port=`expr $baseport + 1`
782 sd_port=`expr $fd_port + 1`
783
784 AC_SUBST(dir_port)
785 AC_SUBST(fd_port)
786 AC_SUBST(sd_port)
787
788
789 # ------------------------------------------
790 # Generate passwords
791 # ------------------------------------------
792 dir_password=
793 AC_ARG_WITH(dir-password,
794    [  --with-dir-password=PASSWORD   specify Director's password],
795    [
796        if test "x$withval" != "xno" ; then     
797            dir_password=$withval
798        fi
799    ]
800 )
801
802 if test "x$dir_password" = "x" ; then
803    if test "x$OPENSSL" = "xnone" ; then
804 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
805       key=`autoconf/randpass 33`
806    else
807       key=`openssl rand -base64 33`
808    fi
809    dir_password=$key
810 fi
811
812 fd_password=
813 AC_ARG_WITH(fd-password,
814    [  --with-fd-password=PASSWORD    specify Client's password],
815    [
816        if test "x$withval" != "xno" ; then     
817            fd_password=$withval
818        fi
819    ]
820 )
821
822 if test "x$fd_password" = "x" ; then
823    if test "x$OPENSSL" = "xnone" ; then
824 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
825       key=`autoconf/randpass 37`
826    else
827       key=`openssl rand -base64 33`
828    fi
829    fd_password=$key
830 fi
831
832 sd_password=
833 AC_ARG_WITH(sd-password,
834    [  --with-sd-password=PASSWORD    specify Storage daemon's password],
835    [
836        if test "x$withval" != "xno" ; then     
837            sd_password=$withval
838        fi
839    ]
840 )
841
842 if test "x$sd_password" = "x" ; then
843    if test "x$OPENSSL" = "xnone" ; then
844 #     key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
845       key=`autoconf/randpass 41`
846    else
847       key=`openssl rand -base64 33`
848    fi
849    sd_password=$key
850 fi
851
852
853 AC_SUBST(dir_password)
854 AC_SUBST(fd_password)
855 AC_SUBST(sd_password)
856
857
858 #
859 # Handle users and groups for each daemon
860 #
861 dir_user=
862 AC_ARG_WITH(dir_user,
863     [  --with-dir-user=USER              specify user for Director daemon],
864     [
865         if test "x$withval" != "x" ; then       
866              dir_user=$withval
867         fi
868     ]
869 )
870
871 dir_group=
872 AC_ARG_WITH(dir_group,
873     [  --with-dir-group=GROUP            specify group for Director daemon],
874     [
875         if test "x$withval" != "x" ; then       
876              dir_group=$withval
877         fi
878     ]
879 )
880
881 sd_user=
882 AC_ARG_WITH(sd_user,
883     [  --with-sd-user=USER               specify user for Storage daemon],
884     [
885         if test "x$withval" != "x" ; then       
886              sd_user=$withval
887         fi
888     ]
889 )
890
891 sd_group=
892 AC_ARG_WITH(sd_group,
893     [  --with-sd-group=GROUP             specify group for Storage daemon],
894     [
895         if test "x$withval" != "x" ; then       
896              sd_group=$withval
897         fi
898     ]
899 )
900
901 fd_user=
902 AC_ARG_WITH(fd_user,
903     [  --with-fd-user=USER               specify user for File daemon],
904     [
905         if test "x$withval" != "x" ; then       
906              fd_user=$withval
907         fi
908     ]
909 )
910
911 fd_group=
912 AC_ARG_WITH(fd_group,
913     [  --with-fd-group=GROUP             specify group for File daemon],
914     [
915         if test "x$withval" != "x" ; then       
916              fd_group=$withval
917         fi
918     ]
919 )
920
921
922
923
924 AC_SUBST(dir_user)
925 AC_SUBST(dir_group)
926 AC_SUBST(sd_user)
927 AC_SUBST(sd_group)
928 AC_SUBST(fd_user)
929 AC_SUBST(fd_group)
930
931 #
932 # allow setting default executable permissions
933 #
934 SBINPERM=0754
935 AC_ARG_WITH(sbin-perm,
936     [  --with-sbin-perm=MODE             specify permissions for sbin binaries (0754)],
937     [
938         if test "x$withval" != "x" ; then       
939             SBINPERM=$withval
940         fi
941     ]
942 )
943
944 AC_SUBST(SBINPERM)
945
946 # ------------------------------------------------
947 # Bacula check for various SQL database engines
948 # ------------------------------------------------
949 BA_CHECK_POSTGRESQL_DB
950
951 BA_CHECK_MYSQL_DB
952
953 BA_CHECK_SQLITE_DB
954
955 AC_SUBST(cats)
956 AC_SUBST(DB_NAME)
957
958 AC_DEFINE(PROTOTYPES)
959
960 dnl# --------------------------------------------------------------------------
961 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
962 dnl#
963 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
964     if test -z "$CCOPTS"; then
965         CCOPTS='-g -O2 -Wall'
966     fi
967     CFLAGS="$CCOPTS"
968 fi
969
970
971 dnl A few others 
972 AC_EXEEXT
973
974 dnl See if we can use 64 bit file addresses
975 largefile_support="no"
976 AC_BAC_LARGEFILE
977
978
979 AC_PATH_XTRA
980
981 dnl# --------------------------------------------------------------------------
982 dnl# CHECKING FOR HEADER FILES
983 dnl# --------------------------------------------------------------------------
984 AC_CHECK_HEADERS( \
985         assert.h \
986         fcntl.h \
987         grp.h \
988         pwd.h \
989         libc.h \
990         limits.h \
991         stdarg.h \
992         stdlib.h \
993         stdint.h \
994         string.h \
995         termios.h \
996         termcap.h \
997         unistd.h \
998         sys/bitypes.h \
999         sys/byteorder.h \
1000         sys/ioctl.h \
1001         sys/select.h \
1002         sys/sockio.h \
1003         sys/time.h \
1004         sys/socket.h \
1005         arpa/nameser.h \
1006         resolv.h \
1007         mtio.h \
1008         sys/mtio.h \
1009         sys/tape.h \
1010         regex.h \
1011 )
1012 AC_HEADER_STDC
1013 AC_HEADER_MAJOR
1014 AC_HEADER_DIRENT
1015 AC_HEADER_STAT
1016 AC_HEADER_SYS_WAIT
1017 AC_HEADER_TIME
1018 AC_STRUCT_ST_BLKSIZE
1019 AC_STRUCT_ST_BLOCKS
1020 AC_STRUCT_TIMEZONE
1021
1022 dnl# --------------------------------------------------------------------------
1023 dnl# Check for utime.h structure 
1024 dnl# --------------------------------------------------------------------------
1025 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1026   [AC_TRY_COMPILE([
1027 #include <sys/types.h>
1028 #include <utime.h>], [struct utimbuf foo],
1029   ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1030 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1031
1032 dnl# --------------------------------------------------------------------------
1033 dnl# Check for socklen_t
1034 dnl# --------------------------------------------------------------------------
1035 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1036   [AC_TRY_COMPILE([
1037 #include <sys/types.h>
1038 #include <sys/socket.h>],
1039   [socklen_t x],
1040   ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1041 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1042
1043 dnl# --------------------------------------------------------------------------
1044 dnl# Check for bigendian
1045 dnl# --------------------------------------------------------------------------
1046 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1047   [AC_TRY_RUN(
1048     [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1049     [ba_cv_bigendian=yes], 
1050     [ba_cv_bigendian=no], 
1051     [ba_cv_bigendian=no])])
1052 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1053
1054
1055 AC_C_CONST
1056
1057
1058 dnl# --------------------------------------------------------------------------
1059 dnl# CHECKING FOR FILESYSTEM TYPE
1060 dnl# --------------------------------------------------------------------------
1061 AC_MSG_CHECKING(how to get filesystem type)
1062 fstype=no
1063 # The order of these tests is important.
1064 AC_TRY_CPP([#include <sys/statvfs.h>
1065 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1066 if test $fstype = no; then
1067 AC_TRY_CPP([#include <sys/statfs.h>
1068 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1069 fi
1070 if test $fstype = no; then
1071 AC_TRY_CPP([#include <sys/statfs.h>
1072 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1073 fi
1074 if test $fstype = no; then  
1075 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1076 fi
1077 if test $fstype = no; then  
1078 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1079 fi
1080 if test $fstype = no; then  
1081 AC_TRY_CPP([#include <sys/mount.h>
1082 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1083 fi
1084 AC_MSG_RESULT($fstype)
1085
1086 dnl# --------------------------------------------------------------------------
1087 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1088 dnl# --------------------------------------------------------------------------
1089 AC_TYPE_SIGNAL
1090 SIGNAL_CHECK
1091 AC_TYPE_MODE_T
1092 AC_TYPE_UID_T
1093 AC_TYPE_SIZE_T
1094 AC_TYPE_PID_T
1095 AC_TYPE_OFF_T
1096 AC_CHECK_TYPE(ino_t, unsigned long)
1097 AC_CHECK_TYPE(dev_t, unsigned long)
1098 AC_CHECK_TYPE(daddr_t, long)
1099 AC_CHECK_TYPE(major_t, int)
1100 AC_CHECK_TYPE(minor_t, int)
1101 AC_CHECK_TYPE(ssize_t, int)
1102 AC_STRUCT_ST_BLOCKS
1103 AC_STRUCT_ST_RDEV
1104 AC_STRUCT_TM
1105 AC_C_CONST
1106
1107
1108 AC_CHECK_SIZEOF(char, 1)
1109 AC_CHECK_SIZEOF(short int, 2)
1110 AC_CHECK_SIZEOF(int, 4)
1111 AC_CHECK_SIZEOF(long int, 4)
1112 AC_CHECK_SIZEOF(long long int, 8)
1113 AC_CHECK_SIZEOF(int *, 4)
1114
1115 # Check for sys/types.h types
1116 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1117     AC_TRY_COMPILE(
1118         [ #include <sys/types.h> ], 
1119         [ u_int a; a = 1;], 
1120         [ ac_cv_have_u_int="yes" ],
1121         [ ac_cv_have_u_int="no" ]
1122     )
1123 ])
1124 if test "x$ac_cv_have_u_int" = "xyes" ; then
1125    AC_DEFINE(HAVE_U_INT)
1126    have_u_int=1
1127 fi
1128
1129 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1130    AC_TRY_COMPILE(
1131       [ #include <sys/types.h> ], 
1132       [ intmax_t a; a = 1;], 
1133       [ ac_cv_have_intmax_t="yes" ],
1134       [ 
1135          AC_TRY_COMPILE(
1136             [ #include <stdint.h> ], 
1137             [ intmax_t a; a = 1;], 
1138             [ ac_cv_have_intmax_t="yes" ],
1139             [ ac_cv_have_intmax_t="no" ]
1140          )
1141       ]
1142    )        
1143
1144 ])
1145 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1146    AC_DEFINE(HAVE_INTMAX_T)
1147    have_intmax_t=1
1148 fi
1149
1150
1151 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1152    AC_TRY_COMPILE(
1153       [ #include <sys/types.h> ], 
1154       [ u_intmax_t a; a = 1;], 
1155       [ ac_cv_have_u_intmax_t="yes" ],
1156       [ 
1157          AC_TRY_COMPILE(
1158             [ #include <stdint.h> ], 
1159             [ u_intmax_t a; a = 1;], 
1160             [ ac_cv_have_u_intmax_t="yes" ],
1161             [ ac_cv_have_u_intmax_t="no" ]
1162          )
1163       ]
1164    )
1165 ])
1166 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1167    AC_DEFINE(HAVE_U_INTMAX_T)
1168    have_u_intmax_t=1
1169 fi
1170
1171
1172 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1173    AC_TRY_COMPILE(
1174       [ #include <sys/types.h> ], 
1175       [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], 
1176       [ ac_cv_have_intxx_t="yes" ],
1177       [ ac_cv_have_intxx_t="no" ]
1178    )
1179 ])
1180 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1181    AC_DEFINE(HAVE_INTXX_T)
1182    have_intxx_t=1
1183 fi
1184         
1185 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1186    AC_TRY_COMPILE(
1187       [ #include <sys/types.h> ], 
1188       [ int64_t a; a = 1;], 
1189       [ ac_cv_have_int64_t="yes" ],
1190       [ ac_cv_have_int64_t="no" ]
1191    )
1192 ])
1193 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1194    AC_DEFINE(HAVE_INT64_T)
1195    have_int64_t=1
1196 fi
1197         
1198 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1199    AC_TRY_COMPILE(
1200       [ #include <sys/types.h> ], 
1201       [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], 
1202       [ ac_cv_have_u_intxx_t="yes" ],
1203       [ ac_cv_have_u_intxx_t="no" ]
1204    )
1205 ])
1206 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1207    AC_DEFINE(HAVE_U_INTXX_T)
1208    have_u_intxx_t=1
1209 fi
1210
1211 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1212    AC_TRY_COMPILE(
1213       [ #include <sys/types.h> ], 
1214       [ u_int64_t a; a = 1;], 
1215       [ ac_cv_have_u_int64_t="yes" ],
1216       [ ac_cv_have_u_int64_t="no" ]
1217    )
1218 ])
1219 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1220    AC_DEFINE(HAVE_U_INT64_T)
1221    have_u_int64_t=1
1222 fi
1223
1224 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1225            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1226 then
1227    AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1228    AC_TRY_COMPILE(
1229       [ #include <sys/bitypes.h>  ], 
1230       [ int8_t a; int16_t b; int32_t c;
1231         u_int8_t e; u_int16_t f; u_int32_t g;
1232         a = b = c = e = f = g = 1;  ], 
1233       [ AC_DEFINE(HAVE_U_INTXX_T)
1234         AC_DEFINE(HAVE_INTXX_T)
1235         AC_DEFINE(HAVE_SYS_BITYPES_H)
1236         AC_MSG_RESULT(yes) ],
1237       [ AC_MSG_RESULT(no)]
1238    ) 
1239 fi
1240
1241 if test -z "$have_u_intxx_t" ; then
1242    AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1243       AC_TRY_COMPILE(
1244          [ #include <sys/types.h> ], 
1245          [ uint8_t a; uint16_t b; 
1246            uint32_t c; a = b = c = 1; ], 
1247          [ ac_cv_have_uintxx_t="yes" ],
1248          [ ac_cv_have_uintxx_t="no" ]
1249       )
1250    ])
1251    if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1252       AC_DEFINE(HAVE_UINTXX_T)
1253    fi
1254 fi
1255
1256 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1257           test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1258 then
1259    AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1260    AC_TRY_COMPILE(
1261       [ #include <sys/bitypes.h>  ], 
1262       [ int64_t a; u_int64_t b; 
1263        a = b = 1;  ], 
1264       [ AC_DEFINE(HAVE_U_INT64_T)
1265        AC_DEFINE(HAVE_INT64_T)
1266        AC_MSG_RESULT(yes) ],
1267       [ AC_MSG_RESULT(no)]
1268    ) 
1269 fi
1270
1271 if (test -z "$have_uintxx_t" && \
1272           test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1273 then
1274    AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1275    AC_TRY_COMPILE(
1276       [ #include <sys/bitypes.h>  ], 
1277         [ uint8_t a; uint16_t b; 
1278           uint32_t c; a = b = c = 1; ], 
1279       [ AC_DEFINE(HAVE_UINTXX_T)
1280        AC_MSG_RESULT(yes) ],
1281       [ AC_MSG_RESULT(no)]
1282    ) 
1283
1284 fi
1285
1286
1287
1288
1289 dnl# --------------------------------------------------------------------------
1290 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1291 dnl# --------------------------------------------------------------------------
1292 AC_CHECK_FUNCS( \
1293         fork \
1294         getcwd \
1295         gethostname \
1296         getpid \
1297         gettimeofday \
1298         setpgid \
1299         setpgrp \
1300         setsid \
1301         signal \
1302         strerror \
1303         strncmp \
1304         strncpy \
1305         vfprintf \
1306         ,,
1307         [echo 'configure: cannot find needed function.'; exit 1]
1308 )
1309
1310 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1311 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1312
1313 AC_CHECK_FUNCS(chflags) 
1314
1315 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
1316
1317 dnl# --------------------------------------------------------------------------
1318 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1319 dnl# --------------------------------------------------------------------------
1320 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1321
1322 # If resolver functions are not in libc check for -lnsl or -lresolv.
1323 AC_CHECK_FUNC(gethostbyname_r,
1324     AC_MSG_RESULT(using libc's resolver),
1325     AC_CHECK_LIB(nsl,gethostbyname_r)
1326     AC_CHECK_LIB(resolv,gethostbyname_r))
1327
1328
1329 # Find where sockets are (especially for Solaris)
1330 AC_CHECK_FUNC(socket,
1331     AC_MSG_RESULT(using libc's socket),
1332     AC_CHECK_LIB(xnet,socket)
1333     AC_CHECK_LIB(socket,socket)
1334     AC_CHECK_LIB(inet,socket))
1335
1336 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1337 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1338 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1339
1340 dnl ----------------------------
1341 dnl check sa_len of sockaddr
1342 dnl ----------------------------
1343 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1344   [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1345   ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1346
1347  if test $ac_cv_struct_sockaddr_sa_len = yes; then
1348   AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1349  fi
1350
1351
1352 dnl Check for IPv6 support
1353 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1354 [AC_TRY_LINK([ #include <sys/types.h>
1355 #include <sys/socket.h>
1356 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1357  0;],
1358   [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1359
1360 if test "$ac_cv_ipv6_support" = yes; then
1361   AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1362 fi
1363
1364
1365
1366 AC_FUNC_STRFTIME
1367 AC_FUNC_VPRINTF
1368 AC_FUNC_ALLOCA
1369 AC_FUNC_GETMNTENT
1370 AC_FUNC_CLOSEDIR_VOID
1371 AC_FUNC_SETPGRP                       dnl check for BSD setpgrp.
1372 AC_FUNC_FNMATCH
1373
1374
1375 dnl# FreeBSD needs to link libxpg4
1376 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1377
1378
1379 AC_CHECK_LIB(sun, getpwnam)
1380
1381 AC_CHECK_HEADERS(zlib.h)
1382 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1383 have_zlib=no
1384 if test x$FDLIBS = x-lz; then
1385   AC_DEFINE(HAVE_LIBZ)
1386   have_zlib=yes
1387 fi
1388
1389 AC_CHECK_HEADER(sys/acl.h)
1390 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1391 have_acl=no
1392 if test $ac_cv_lib_acl_acl_get_file = yes; then
1393    AC_DEFINE(HAVE_ACL)
1394    have_acl=yes
1395 fi
1396
1397 dnl Check for pthread libraries
1398 PTHREAD_LIB=""
1399 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1400         [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1401             [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1402                 [AC_CHECK_FUNC(pthread_create)]
1403             )]
1404         )]
1405 )
1406
1407 AC_SUBST(FDLIBS)
1408 AC_DEFINE(FDLIBS)
1409
1410
1411 CFLAGS=${CFLAGS--O}
1412 LDFLAGS=${LDFLAGS--O}
1413 DB_LIBS="${SQL_LFLAGS}"
1414
1415 CPPFLAGS="$CPPFLAGS"
1416 AC_SUBST(DEBUG)
1417 AC_SUBST(DINCLUDE)
1418 AC_SUBST(CFLAGS)
1419 AC_SUBST(CPPFLAGS)
1420 AC_SUBST(LDFLAGS)
1421 AC_SUBST(X_CFLAGS)
1422 AC_SUBST(LIBS)
1423 AC_SUBST(DLIB)
1424 AC_SUBST(DB_LIBS)
1425 AC_SUBST(X_LIBS)
1426 AC_SUBST(X_EXTRA_LIBS)
1427 AC_SUBST(WCFLAGS)
1428 AC_SUBST(WLDFLAGS)
1429
1430 dnl# extra configurable objects
1431 OBJLIST=
1432 AC_SUBST(OBJLIST)
1433
1434 lld="lld"
1435 llu="llu"
1436
1437 WCFLAGS=
1438 WLDFLAGS=
1439
1440 #
1441 # Finally we set appropriate distribution specific
1442 #  variables and defaults
1443 #
1444 # PFILES are platform specific files
1445 PFILES="platforms/Makefile"
1446 PSCMD="ps -e"
1447 WIN32=
1448 MACOSX=
1449 hostname=`uname -n | cut -d '.' -f 1`
1450 case "$DISTNAME" in
1451 aix)
1452         DISTVER=`uname -r`
1453         PSCMD="ps -e -o pid,comm"
1454         PFILES="${PFILES} \
1455            platforms/aix/Makefile"
1456         TAPEDRIVE="/dev/rmt0.1" 
1457   ;;      
1458 alpha)
1459         DISTVER=`uname -r`
1460         PTHREAD_LIB="-lpthread -lexc"
1461         if test "${CC}" = "gcc" ; then
1462            lld="lld"
1463            llu="llu"
1464         else
1465            lld="ld"
1466            llu="lu"
1467         fi
1468         TAPEDRIVE="/dev/nrmt0"
1469   ;;
1470 bsdi)
1471         DISTVER=`uname -a |awk '{print $3}'`
1472         TAPEDRIVE="/dev/nrmt0"
1473         PTHREAD_LIB="-pthread"
1474         CFLAGS="${CFLAGS} -pthread"
1475         PSCMD="ps -x -o pid,command"
1476         lld="qd"
1477         llu="qu"
1478         PFILES="${PFILES} \
1479             platforms/bsdi/Makefile \
1480             platforms/bsdi/bacula-fd \
1481             platforms/bsdi/bacula-sd \
1482             platforms/bsdi/bacula-dir"
1483         largefile_support="yes"
1484   ;;
1485 cygwin)
1486         DISTVER=`uname -a |awk '{print $3}'`
1487         TAPEDRIVE="/dev/nrst0"
1488         WIN32=win32
1489         WCFLAGS="-mwindows"
1490         WLDFLAGS="-mwindows"
1491   ;;
1492 darwin)
1493         DISTVER=`uname -r`
1494         TAPEDRIVE="/dev/nst0"
1495         PSCMD="ps -e -o pid,command"
1496         MACOSX=macosx
1497         PFILES="${PFILES} \
1498            platforms/darwin/Makefile"
1499   ;;
1500 debian)
1501         DISTVER=`cat /etc/debian_version`
1502         TAPEDRIVE="/dev/nrst0"
1503         PSCMD="ps -e -o pid,command"
1504   ;;
1505 freebsd)
1506         DISTVER=`uname -a |awk '{print $3}'`
1507         VER=`echo $DISTVER | cut -c 1`
1508         if test x$VER = x4 ; then
1509            PTHREAD_LIB="-pthread"
1510            CFLAGS="${CFLAGS} -pthread"
1511         fi
1512         lld="qd"
1513         llu="qu"
1514         TAPEDRIVE="/dev/nrsa0"
1515         PSCMD="ps -x -o pid,command"
1516         PFILES="${PFILES} \
1517             platforms/freebsd/Makefile \
1518             platforms/freebsd/bacula-fd \
1519             platforms/freebsd/bacula-sd \
1520             platforms/freebsd/bacula-dir"
1521         largefile_support="yes"
1522   ;;
1523 hpux)
1524         PSCMD="UNIX95=1 ps -e -o pid,comm"
1525         CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1526         DISTVER=`uname -r`
1527         TAPEDRIVE="/dev/rmt/0hnb"
1528   ;;
1529 irix)
1530         DISTVER=`uname -r`
1531         TAPEDRIVE="/dev/rmt/0cbn"
1532         PSCMD="ps -e -o pid,comm"
1533         PFILES="${PFILES} \
1534             platforms/irix/Makefile \
1535             platforms/irix/bacula-fd \
1536             platforms/irix/bacula-sd \
1537             platforms/irix/bacula-dir"
1538   ;;
1539 netbsd)
1540         DISTVER=`uname -a |awk '{print $3}'`
1541         lld="qd"
1542         llu="qu"
1543         TAPEDRIVE="/dev/nrst0"
1544         PSCMD="ps -a -o pid,command"
1545         PTHREAD_LIB="-pthread"
1546         CFLAGS="${CFLAGS} -pthread"
1547   ;;
1548 openbsd)
1549         DISTVER=`uname -a |awk '{print $3}'`
1550         lld="qd"
1551         llu="qu"
1552         TAPEDRIVE="/dev/nrst0"
1553         PSCMD="ps -a -o pid,command"
1554         PTHREAD_LIB="-pthread"
1555         CFLAGS="${CFLAGS} -pthread"
1556         PFILES="${PFILES} \
1557             platforms/openbsd/Makefile \
1558             platforms/openbsd/bacula-fd \
1559             platforms/openbsd/bacula-sd \
1560             platforms/openbsd/bacula-dir"
1561   ;;
1562 redhat)
1563         if test -f /etc/whitebox-release ; then
1564            f=/etc/whitebox-release
1565         else
1566            f=/etc/redhat-release
1567         fi
1568         if test `cat $f | grep release |\
1569                    cut -f 3 -d ' '`x = "Enterprise"x ; then
1570            DISTVER="Enterprise "`cat $f | grep release |\
1571                     cut -f 6 -d ' '`
1572         else
1573             DISTVER=`cat /etc/redhat-release | grep release |\
1574                      cut -f 5 -d ' '`
1575         fi
1576         TAPEDRIVE="/dev/nst0"
1577         PSCMD="ps -e -o pid,command"
1578         PFILES="${PFILES} \
1579             platforms/redhat/Makefile \
1580             platforms/redhat/bacula-fd \
1581             platforms/redhat/bacula-sd \
1582             platforms/redhat/bacula-dir \
1583             platforms/redhat/bacula.spec \
1584             "
1585         hostname=`hostname -s`
1586   ;;
1587 mandrake)
1588         DISTVER=`cat /etc/mandrake-release | grep release |\
1589            cut -f 5 -d ' '`
1590         TAPEDRIVE="/dev/nst0"
1591         PSCMD="ps -e -o pid,command"
1592         PFILES="${PFILES} \
1593             platforms/mandrake/Makefile \
1594             platforms/mandrake/bacula-fd \
1595             platforms/mandrake/bacula-sd \
1596             platforms/mandrake/bacula-dir \
1597             platforms/mandrake/bacula.spec \
1598             "
1599   ;;
1600 gentoo)
1601         DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1602         TAPEDRIVE="/dev/nst0"
1603         PSCMD="ps -e -o pid,command"
1604         PFILES="${PFILES} \
1605             platforms/gentoo/Makefile \
1606             platforms/gentoo/bacula-fd \
1607             platforms/gentoo/bacula-sd \
1608             platforms/gentoo/bacula-dir"
1609   ;;
1610 slackware)
1611         DISTVER=`cat /etc/slackware-version`
1612         TAPEDRIVE="/dev/nst0"
1613         PSCMD="ps -e -o pid,command"
1614         PFILES="${PFILES} \
1615             platforms/slackware/Makefile \
1616             platforms/slackware/rc.bacula-fd \
1617             platforms/slackware/rc.bacula-sd \
1618             platforms/slackware/rc.bacula-dir\
1619             platforms/slackware/functions.bacula"
1620   ;;
1621 solaris)
1622         DISTVER=`uname -r`
1623         TAPEDRIVE="/dev/rmt/0cbn"
1624         PSCMD="ps -e -o pid,comm"
1625         PFILES="${PFILES} \
1626             platforms/solaris/Makefile \
1627             platforms/solaris/bacula-fd \
1628             platforms/solaris/bacula-sd \
1629             platforms/solaris/bacula-dir"
1630         if test x$DISTVER = x5.6 ; then
1631             AC_DEFINE(HAVE_OLD_SOCKOPT)
1632         fi
1633   ;;
1634 suse)
1635         DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1636             cut -f 3 -d ' '`
1637         TAPEDRIVE="/dev/nst0"
1638         PSCMD="ps -e -o pid,command"
1639         PFILES="${PFILES} \
1640             platforms/suse/Makefile \
1641             platforms/suse/bacula-fd \
1642             platforms/suse/bacula-sd \
1643             platforms/suse/bacula-dir \
1644             platforms/suse/bacula \
1645             platforms/suse/bacula.spec"
1646   ;;
1647 suse5)
1648         DISTNAME=suse
1649         DISTVER=5.x
1650         TAPEDRIVE="/dev/nst0"
1651         PSCMD="ps -e -o pid,command"
1652         PFILES="${PFILES} \
1653             platforms/suse/Makefile \
1654             platforms/suse/bacula-fd \
1655             platforms/suse/bacula-sd \
1656             platforms/suse/bacula-dir"
1657   ;;
1658 unknown)
1659         DISTVER=unknown
1660         TAPEDRIVE="/dev/nst0"
1661   ;;
1662 *)
1663   echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1664   ;;
1665 esac  
1666
1667 AC_SUBST(hostname)
1668
1669 LIBS="$PTHREAD_LIB $LIBS"
1670
1671 AC_DEFINE_UNQUOTED(lld, "$lld")
1672 AC_DEFINE_UNQUOTED(llu, "$llu")
1673 AC_SUBST(TAPEDRIVE)
1674 AC_SUBST(PSCMD)
1675 AC_SUBST(WIN32)
1676 AC_SUBST(MACOSX)
1677 AC_SUBST(DISTNAME)
1678 AC_SUBST(DISTVER)
1679
1680 dnl# common parts of the Makefile
1681 MCOMMON=./autoconf/Make.common
1682 AC_SUBST_FILE(MCOMMON)
1683
1684 dnl# Insanity check
1685 if test "x${subsysdir}" = "x${sbindir}" ; then
1686    echo " "
1687    echo " "
1688    echo "You have set both --sbindir and --with-subsys-dir"
1689    echo "  equal to: ${subsysdir} "
1690    echo "This is not permitted. Please reconfigure."
1691    echo " "
1692    echo "Aborting configuration ..."
1693    echo " "
1694    echo " "
1695    exit 1
1696 fi 
1697
1698 AC_OUTPUT([autoconf/Make.common \
1699            Makefile \
1700            rescue/Makefile \
1701            rescue/linux/Makefile \
1702            rescue/freebsd/Makefile \
1703            rescue/solaris/Makefile \
1704            scripts/startmysql \
1705            scripts/stopmysql \
1706            scripts/btraceback \
1707            scripts/startit \
1708            scripts/stopit \
1709            scripts/bconsole \
1710            scripts/gconsole \
1711            scripts/bacula \
1712            scripts/devel_bacula \
1713            scripts/Makefile \
1714            scripts/logrotate \
1715            scripts/bacula.desktop.gnome1 \
1716            scripts/bacula.desktop.gnome2 \
1717            scripts/bacula.desktop.gnome1.consolehelper \
1718            scripts/bacula.desktop.gnome2.consolehelper \
1719            scripts/bacula.desktop.gnome1.xsu \
1720            scripts/bacula.desktop.gnome2.xsu \
1721            scripts/gnome-console.console_apps \
1722            scripts/mtx-changer \
1723            doc/Makefile \
1724            src/Makefile \
1725            src/host.h \
1726            src/console/Makefile \
1727            src/console/bconsole.conf \
1728            src/gnome-console/Makefile \
1729            src/gnome-console/gnome-console.conf \
1730            src/gnome2-console/Makefile \
1731            src/gnome2-console/gnome-console.conf \
1732            src/wx-console/Makefile \
1733            src/wx-console/wx-console.conf \
1734            src/tray-monitor/Makefile \
1735            src/tray-monitor/tray-monitor.conf \
1736            src/dird/Makefile \
1737            src/dird/bacula-dir.conf \
1738            src/lib/Makefile \
1739            src/stored/Makefile \
1740            src/stored/bacula-sd.conf \
1741            src/filed/Makefile \
1742            src/filed/bacula-fd.conf \
1743            src/filed/win32/Makefile \
1744            src/cats/Makefile \
1745            src/cats/make_catalog_backup \
1746            src/cats/delete_catalog_backup \
1747            src/cats/create_postgresql_database \
1748            src/cats/update_postgresql_tables \
1749            src/cats/make_postgresql_tables \
1750            src/cats/grant_postgresql_privileges \
1751            src/cats/drop_postgresql_tables \
1752            src/cats/drop_postgresql_database \
1753            src/cats/create_mysql_database \
1754            src/cats/update_mysql_tables \
1755            src/cats/make_mysql_tables \
1756            src/cats/grant_mysql_privileges \
1757            src/cats/drop_mysql_tables \
1758            src/cats/drop_mysql_database \
1759            src/cats/create_sqlite_database \
1760            src/cats/update_sqlite_tables \
1761            src/cats/make_sqlite_tables \
1762            src/cats/grant_sqlite_privileges \
1763            src/cats/drop_sqlite_tables \
1764            src/cats/drop_sqlite_database \
1765            src/cats/sqlite \
1766            src/cats/mysql \
1767            src/cats/create_bdb_database \
1768            src/cats/update_bdb_tables \
1769            src/cats/make_bdb_tables \
1770            src/cats/grant_bdb_privileges \
1771            src/cats/drop_bdb_tables \
1772            src/cats/drop_bdb_database \
1773            src/cats/create_bacula_database \
1774            src/cats/update_bacula_tables \
1775            src/cats/grant_bacula_privileges \
1776            src/cats/make_bacula_tables \
1777            src/cats/drop_bacula_tables \
1778            src/cats/drop_bacula_database \
1779            src/findlib/Makefile \
1780            src/tools/Makefile \
1781            src/win32/winbacula.nsi \
1782            src/win32/baculafd/bacula-fd.conf \
1783            src/win32/Makefile \
1784            src/win32/console/bconsole.conf \
1785            src/win32/wx-console/wx-console.conf \
1786            $PFILES ],  
1787           [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1788 )
1789
1790 cd scripts
1791 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1792 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1793 cd ..
1794
1795 c=src/cats
1796
1797 chmod 755 $c/create_bacula_database   $c/update_bacula_tables  $c/make_bacula_tables
1798 chmod 755 $c/grant_bacula_privileges  $c/drop_bacula_tables    $c/drop_bacula_database
1799
1800 chmod 755 $c/create_bdb_database      $c/update_bdb_tables     $c/make_bdb_tables
1801 chmod 755 $c/grant_bdb_privileges     $c/drop_bdb_tables       $c/drop_bdb_database
1802
1803 chmod 755 $c/create_mysql_database    $c/update_mysql_tables   $c/make_mysql_tables
1804 chmod 755 $c/grant_mysql_privileges   $c/drop_mysql_tables     $c/drop_mysql_database
1805
1806 chmod 755 $c/create_sqlite_database   $c/update_sqlite_tables  $c/make_sqlite_tables
1807 chmod 755 $c/grant_sqlite_privileges  $c/drop_sqlite_tables    $c/drop_sqlite_database
1808
1809 chmod 755 $c/create_postgresql_database  $c/update_postgresql_tables $c/make_postgresql_tables
1810 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables   $c/drop_postgresql_database
1811
1812 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1813 chmod 755 $c/sqlite
1814 chmod 755 $c/mysql
1815
1816 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1817    largefile_support="yes"
1818 fi
1819
1820 #
1821 # A whole lot of hand springs to get the compiler version.
1822 #  This is because gcc changed the output in version 3.0
1823 #
1824 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1825 if test "x${CCVERSION}" = "x" ; then
1826   CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1827 fi
1828 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1829 if test x"${CXXVERSION}" = x ; then
1830   CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1831 fi
1832
1833 if test "x${subsysdir}" = "x${sbindir}" ; then
1834    echo " "
1835    echo " "
1836    echo "You have set --sbindir and --with-subsys-dir"
1837    echo "  both equal to: ${subsysdir} "
1838    echo "  This is not permitted. Please reconfigure."
1839    echo " "
1840    echo "Aborting configuration ..."
1841    echo " "
1842    echo " "
1843    exit 1
1844 fi 
1845
1846 if test "x${db_name}" = "xInternal" ; then
1847    echo " "
1848    echo " "
1849    echo "You have not specified either --enable-client-only or one of the"
1850    echo "  supported databases: MySQL, PostgreSQL, or SQLite".
1851    echo "  This is not permitted. Please reconfigure."
1852    echo " "
1853    echo "Aborting the configuration ..."
1854    echo " "
1855    echo " "
1856    exit 1
1857 fi
1858
1859 echo "
1860 Configuration on `date`:
1861
1862   Host:                       $host -- ${DISTNAME} ${DISTVER}
1863   Bacula version:             ${VERSION} (${DATE})
1864   Source code location:       ${srcdir}
1865   Install binaries:           ${sbindir}
1866   Install config files:       ${sysconfdir}
1867   Scripts directory:          ${scriptdir}
1868   Working directory:          ${working_dir}
1869   PID directory:              ${piddir}
1870   Subsys directory:           ${subsysdir}
1871   C Compiler:                 ${CC} ${CCVERSION}
1872   C++ Compiler:               ${CXX} ${CXXVERSION}
1873   Compiler flags:             ${WCFLAGS} ${CFLAGS} 
1874   Linker flags:               ${WLDFLAGS} ${LDFLAGS}
1875   Libraries:                  ${LIBS}
1876   Statically Linked Tools:    ${support_static_tools}
1877   Statically Linked FD:       ${support_static_fd}
1878   Statically Linked SD:       ${support_static_sd}
1879   Statically Linked DIR:      ${support_static_dir}
1880   Statically Linked CONS:     ${support_static_cons}
1881   Database type:              ${db_name}
1882   Database lib:               ${DB_LIBS}
1883
1884   Job Output Email:           ${job_email}
1885   Traceback Email:            ${dump_email}
1886   SMTP Host Address:          ${smtp_host}
1887
1888   Director Port:              ${dir_port}
1889   File daemon Port:           ${fd_port}
1890   Storage daemon Port:        ${sd_port}
1891
1892   Director User:              ${dir_user}
1893   Director Group:             ${dir_group}
1894   Storage Daemon User:        ${sd_user}
1895   Storage DaemonGroup:        ${sd_group}
1896   File Daemon User:           ${fd_user}
1897   File Daemon Group:          ${fd_group}
1898
1899   SQL binaries Directory      ${SQL_BINDIR}
1900
1901   Large file support:         $largefile_support
1902   Bacula conio support:       ${got_conio} ${CONS_LIBS}
1903   readline support:           ${got_readline} ${PRTREADLINE_SRC}
1904   TCP Wrappers support:       ${TCPW_MSG}
1905   ZLIB support:               ${have_zlib}
1906   enable-smartalloc:          ${support_smartalloc} 
1907   enable-gnome:               ${support_gnome} ${gnome_version}
1908   enable-wx-console:          ${support_wx_console}
1909   enable-tray-monitor:        ${support_tray_monitor}
1910   client-only:                ${build_client_only}
1911   ACL support:                ${have_acl}
1912
1913   " > config.out
1914
1915 cat config.out
1916
1917 # old stuff
1918 # cweb support:               ${got_cweb} ${CWEB_SRC}
1919   # gmp support:                      ${got_gmp} ${GMP_SRC}