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