]> git.sur5r.net Git - bacula/bacula/blob - bacula/autoconf/configure.in
Fix conio.h problem on Solaris
[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         termcap.h \
992         unistd.h \
993         sys/bitypes.h \
994         sys/byteorder.h \
995         sys/ioctl.h \
996         sys/select.h \
997         sys/sockio.h \
998         sys/time.h \
999         sys/socket.h \
1000         arpa/nameser.h \
1001         resolv.h \
1002         mtio.h \
1003         sys/mtio.h \
1004         sys/tape.h \
1005         regex.h \
1006 )
1007 AC_HEADER_STDC
1008 AC_HEADER_MAJOR
1009 AC_HEADER_DIRENT
1010 AC_HEADER_STAT
1011 AC_HEADER_SYS_WAIT
1012 AC_HEADER_TIME
1013 AC_STRUCT_ST_BLKSIZE
1014 AC_STRUCT_ST_BLOCKS
1015 AC_STRUCT_TIMEZONE
1016
1017 dnl# --------------------------------------------------------------------------
1018 dnl# Check for utime.h structure 
1019 dnl# --------------------------------------------------------------------------
1020 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1021   [AC_TRY_COMPILE([
1022 #include <sys/types.h>
1023 #include <utime.h>], [struct utimbuf foo],
1024   ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1025 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1026
1027 dnl# --------------------------------------------------------------------------
1028 dnl# Check for socklen_t
1029 dnl# --------------------------------------------------------------------------
1030 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1031   [AC_TRY_COMPILE([
1032 #include <sys/types.h>
1033 #include <sys/socket.h>],
1034   [socklen_t x],
1035   ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1036 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1037
1038 dnl# --------------------------------------------------------------------------
1039 dnl# Check for bigendian
1040 dnl# --------------------------------------------------------------------------
1041 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1042   [AC_TRY_RUN(
1043     [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1044     [ba_cv_bigendian=yes], 
1045     [ba_cv_bigendian=no], 
1046     [ba_cv_bigendian=no])])
1047 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1048
1049
1050 AC_C_CONST
1051
1052
1053 dnl# --------------------------------------------------------------------------
1054 dnl# CHECKING FOR FILESYSTEM TYPE
1055 dnl# --------------------------------------------------------------------------
1056 AC_MSG_CHECKING(how to get filesystem type)
1057 fstype=no
1058 # The order of these tests is important.
1059 AC_TRY_CPP([#include <sys/statvfs.h>
1060 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1061 if test $fstype = no; then
1062 AC_TRY_CPP([#include <sys/statfs.h>
1063 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1064 fi
1065 if test $fstype = no; then
1066 AC_TRY_CPP([#include <sys/statfs.h>
1067 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1068 fi
1069 if test $fstype = no; then  
1070 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1071 fi
1072 if test $fstype = no; then  
1073 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1074 fi
1075 if test $fstype = no; then  
1076 AC_TRY_CPP([#include <sys/mount.h>
1077 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1078 fi
1079 AC_MSG_RESULT($fstype)
1080
1081 dnl# --------------------------------------------------------------------------
1082 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1083 dnl# --------------------------------------------------------------------------
1084 AC_TYPE_SIGNAL
1085 SIGNAL_CHECK
1086 AC_TYPE_MODE_T
1087 AC_TYPE_UID_T
1088 AC_TYPE_SIZE_T
1089 AC_TYPE_PID_T
1090 AC_TYPE_OFF_T
1091 AC_CHECK_TYPE(ino_t, unsigned long)
1092 AC_CHECK_TYPE(dev_t, unsigned long)
1093 AC_CHECK_TYPE(daddr_t, long)
1094 AC_CHECK_TYPE(major_t, int)
1095 AC_CHECK_TYPE(minor_t, int)
1096 AC_CHECK_TYPE(ssize_t, int)
1097 AC_STRUCT_ST_BLOCKS
1098 AC_STRUCT_ST_RDEV
1099 AC_STRUCT_TM
1100 AC_C_CONST
1101
1102
1103 AC_CHECK_SIZEOF(char, 1)
1104 AC_CHECK_SIZEOF(short int, 2)
1105 AC_CHECK_SIZEOF(int, 4)
1106 AC_CHECK_SIZEOF(long int, 4)
1107 AC_CHECK_SIZEOF(long long int, 8)
1108 AC_CHECK_SIZEOF(int *, 4)
1109
1110 # Check for sys/types.h types
1111 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1112     AC_TRY_COMPILE(
1113         [ #include <sys/types.h> ], 
1114         [ u_int a; a = 1;], 
1115         [ ac_cv_have_u_int="yes" ],
1116         [ ac_cv_have_u_int="no" ]
1117     )
1118 ])
1119 if test "x$ac_cv_have_u_int" = "xyes" ; then
1120    AC_DEFINE(HAVE_U_INT)
1121    have_u_int=1
1122 fi
1123
1124 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1125    AC_TRY_COMPILE(
1126       [ #include <sys/types.h> ], 
1127       [ intmax_t a; a = 1;], 
1128       [ ac_cv_have_intmax_t="yes" ],
1129       [ 
1130          AC_TRY_COMPILE(
1131             [ #include <stdint.h> ], 
1132             [ intmax_t a; a = 1;], 
1133             [ ac_cv_have_intmax_t="yes" ],
1134             [ ac_cv_have_intmax_t="no" ]
1135          )
1136       ]
1137    )        
1138
1139 ])
1140 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1141    AC_DEFINE(HAVE_INTMAX_T)
1142    have_intmax_t=1
1143 fi
1144
1145
1146 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1147    AC_TRY_COMPILE(
1148       [ #include <sys/types.h> ], 
1149       [ u_intmax_t a; a = 1;], 
1150       [ ac_cv_have_u_intmax_t="yes" ],
1151       [ 
1152          AC_TRY_COMPILE(
1153             [ #include <stdint.h> ], 
1154             [ u_intmax_t a; a = 1;], 
1155             [ ac_cv_have_u_intmax_t="yes" ],
1156             [ ac_cv_have_u_intmax_t="no" ]
1157          )
1158       ]
1159    )
1160 ])
1161 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1162    AC_DEFINE(HAVE_U_INTMAX_T)
1163    have_u_intmax_t=1
1164 fi
1165
1166
1167 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1168    AC_TRY_COMPILE(
1169       [ #include <sys/types.h> ], 
1170       [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], 
1171       [ ac_cv_have_intxx_t="yes" ],
1172       [ ac_cv_have_intxx_t="no" ]
1173    )
1174 ])
1175 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1176    AC_DEFINE(HAVE_INTXX_T)
1177    have_intxx_t=1
1178 fi
1179         
1180 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1181    AC_TRY_COMPILE(
1182       [ #include <sys/types.h> ], 
1183       [ int64_t a; a = 1;], 
1184       [ ac_cv_have_int64_t="yes" ],
1185       [ ac_cv_have_int64_t="no" ]
1186    )
1187 ])
1188 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1189    AC_DEFINE(HAVE_INT64_T)
1190    have_int64_t=1
1191 fi
1192         
1193 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1194    AC_TRY_COMPILE(
1195       [ #include <sys/types.h> ], 
1196       [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], 
1197       [ ac_cv_have_u_intxx_t="yes" ],
1198       [ ac_cv_have_u_intxx_t="no" ]
1199    )
1200 ])
1201 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1202    AC_DEFINE(HAVE_U_INTXX_T)
1203    have_u_intxx_t=1
1204 fi
1205
1206 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1207    AC_TRY_COMPILE(
1208       [ #include <sys/types.h> ], 
1209       [ u_int64_t a; a = 1;], 
1210       [ ac_cv_have_u_int64_t="yes" ],
1211       [ ac_cv_have_u_int64_t="no" ]
1212    )
1213 ])
1214 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1215    AC_DEFINE(HAVE_U_INT64_T)
1216    have_u_int64_t=1
1217 fi
1218
1219 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1220            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1221 then
1222    AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1223    AC_TRY_COMPILE(
1224       [ #include <sys/bitypes.h>  ], 
1225       [ int8_t a; int16_t b; int32_t c;
1226         u_int8_t e; u_int16_t f; u_int32_t g;
1227         a = b = c = e = f = g = 1;  ], 
1228       [ AC_DEFINE(HAVE_U_INTXX_T)
1229         AC_DEFINE(HAVE_INTXX_T)
1230         AC_DEFINE(HAVE_SYS_BITYPES_H)
1231         AC_MSG_RESULT(yes) ],
1232       [ AC_MSG_RESULT(no)]
1233    ) 
1234 fi
1235
1236 if test -z "$have_u_intxx_t" ; then
1237    AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1238       AC_TRY_COMPILE(
1239          [ #include <sys/types.h> ], 
1240          [ uint8_t a; uint16_t b; 
1241            uint32_t c; a = b = c = 1; ], 
1242          [ ac_cv_have_uintxx_t="yes" ],
1243          [ ac_cv_have_uintxx_t="no" ]
1244       )
1245    ])
1246    if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1247       AC_DEFINE(HAVE_UINTXX_T)
1248    fi
1249 fi
1250
1251 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1252           test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1253 then
1254    AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1255    AC_TRY_COMPILE(
1256       [ #include <sys/bitypes.h>  ], 
1257       [ int64_t a; u_int64_t b; 
1258        a = b = 1;  ], 
1259       [ AC_DEFINE(HAVE_U_INT64_T)
1260        AC_DEFINE(HAVE_INT64_T)
1261        AC_MSG_RESULT(yes) ],
1262       [ AC_MSG_RESULT(no)]
1263    ) 
1264 fi
1265
1266 if (test -z "$have_uintxx_t" && \
1267           test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1268 then
1269    AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1270    AC_TRY_COMPILE(
1271       [ #include <sys/bitypes.h>  ], 
1272         [ uint8_t a; uint16_t b; 
1273           uint32_t c; a = b = c = 1; ], 
1274       [ AC_DEFINE(HAVE_UINTXX_T)
1275        AC_MSG_RESULT(yes) ],
1276       [ AC_MSG_RESULT(no)]
1277    ) 
1278
1279 fi
1280
1281
1282
1283
1284 dnl# --------------------------------------------------------------------------
1285 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1286 dnl# --------------------------------------------------------------------------
1287 AC_CHECK_FUNCS( \
1288         fork \
1289         getcwd \
1290         gethostname \
1291         getpid \
1292         gettimeofday \
1293         setpgid \
1294         setpgrp \
1295         setsid \
1296         signal \
1297         strerror \
1298         strncmp \
1299         strncpy \
1300         vfprintf \
1301         ,,
1302         [echo 'configure: cannot find needed function.'; exit 1]
1303 )
1304
1305 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1306 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1307
1308 AC_CHECK_FUNCS(chflags) 
1309
1310 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
1311
1312 dnl# --------------------------------------------------------------------------
1313 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1314 dnl# --------------------------------------------------------------------------
1315 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1316
1317 # If resolver functions are not in libc check for -lnsl or -lresolv.
1318 AC_CHECK_FUNC(gethostbyname_r,
1319     AC_MSG_RESULT(using libc's resolver),
1320     AC_CHECK_LIB(nsl,gethostbyname_r)
1321     AC_CHECK_LIB(resolv,gethostbyname_r))
1322
1323
1324 # Find where sockets are (especially for Solaris)
1325 AC_CHECK_FUNC(socket,
1326     AC_MSG_RESULT(using libc's socket),
1327     AC_CHECK_LIB(xnet,socket)
1328     AC_CHECK_LIB(socket,socket)
1329     AC_CHECK_LIB(inet,socket))
1330
1331 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1332 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1333 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1334
1335 dnl ----------------------------
1336 dnl check sa_len of sockaddr
1337 dnl ----------------------------
1338 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1339   [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1340   ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1341
1342  if test $ac_cv_struct_sockaddr_sa_len = yes; then
1343   AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1344  fi
1345
1346
1347 dnl Check for IPv6 support
1348 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1349 [AC_TRY_LINK([ #include <sys/types.h>
1350 #include <sys/socket.h>
1351 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1352  0;],
1353   [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1354
1355 if test "$ac_cv_ipv6_support" = yes; then
1356   AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1357 fi
1358
1359
1360
1361 AC_FUNC_STRFTIME
1362 AC_FUNC_VPRINTF
1363 AC_FUNC_ALLOCA
1364 AC_FUNC_GETMNTENT
1365 AC_FUNC_CLOSEDIR_VOID
1366 AC_FUNC_SETPGRP                       dnl check for BSD setpgrp.
1367 AC_FUNC_FNMATCH
1368
1369
1370 dnl# FreeBSD needs to link libxpg4
1371 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1372
1373
1374 AC_CHECK_LIB(sun, getpwnam)
1375
1376 AC_CHECK_HEADERS(zlib.h)
1377 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1378 have_zlib=no
1379 if test x$FDLIBS = x-lz; then
1380   AC_DEFINE(HAVE_LIBZ)
1381   have_zlib=yes
1382 fi
1383
1384 AC_CHECK_HEADER(sys/acl.h)
1385 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1386 have_acl=no
1387 if test $ac_cv_lib_acl_acl_get_file = yes; then
1388    AC_DEFINE(HAVE_ACL)
1389    have_acl=yes
1390 fi
1391
1392 dnl Check for pthread libraries
1393 PTHREAD_LIB=""
1394 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1395         [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1396             [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1397                 [AC_CHECK_FUNC(pthread_create)]
1398             )]
1399         )]
1400 )
1401
1402 AC_SUBST(FDLIBS)
1403 AC_DEFINE(FDLIBS)
1404
1405
1406 CFLAGS=${CFLAGS--O}
1407 LDFLAGS=${LDFLAGS--O}
1408 DB_LIBS="${SQL_LFLAGS}"
1409
1410 CPPFLAGS="$CPPFLAGS"
1411 AC_SUBST(DEBUG)
1412 AC_SUBST(DINCLUDE)
1413 AC_SUBST(CFLAGS)
1414 AC_SUBST(CPPFLAGS)
1415 AC_SUBST(LDFLAGS)
1416 AC_SUBST(X_CFLAGS)
1417 AC_SUBST(LIBS)
1418 AC_SUBST(DLIB)
1419 AC_SUBST(DB_LIBS)
1420 AC_SUBST(X_LIBS)
1421 AC_SUBST(X_EXTRA_LIBS)
1422 AC_SUBST(WCFLAGS)
1423 AC_SUBST(WLDFLAGS)
1424
1425 dnl# extra configurable objects
1426 OBJLIST=
1427 AC_SUBST(OBJLIST)
1428
1429 lld="lld"
1430 llu="llu"
1431
1432 WCFLAGS=
1433 WLDFLAGS=
1434
1435 #
1436 # Finally we set appropriate distribution specific
1437 #  variables and defaults
1438 #
1439 # PFILES are platform specific files
1440 PFILES="platforms/Makefile"
1441 PSCMD="ps -e"
1442 WIN32=
1443 MACOSX=
1444 hostname=`uname -n | cut -d '.' -f 1`
1445 case "$DISTNAME" in
1446 aix)
1447         DISTVER=`uname -r`
1448         PSCMD="ps -e -o pid,comm"
1449         PFILES="${PFILES} \
1450            platforms/aix/Makefile"
1451         TAPEDRIVE="/dev/rmt0.1" 
1452   ;;      
1453 alpha)
1454         DISTVER=`uname -r`
1455         PTHREAD_LIB="-lpthread -lexc"
1456         if test "${CC}" = "gcc" ; then
1457            lld="lld"
1458            llu="llu"
1459         else
1460            lld="ld"
1461            llu="lu"
1462         fi
1463         TAPEDRIVE="/dev/nrmt0"
1464   ;;
1465 bsdi)
1466         DISTVER=`uname -a |awk '{print $3}'`
1467         TAPEDRIVE="/dev/nrmt0"
1468         PTHREAD_LIB="-pthread"
1469         CFLAGS="${CFLAGS} -pthread"
1470         PSCMD="ps -x -o pid,command"
1471         lld="qd"
1472         llu="qu"
1473         PFILES="${PFILES} \
1474             platforms/bsdi/Makefile \
1475             platforms/bsdi/bacula-fd \
1476             platforms/bsdi/bacula-sd \
1477             platforms/bsdi/bacula-dir"
1478         largefile_support="yes"
1479   ;;
1480 cygwin)
1481         DISTVER=`uname -a |awk '{print $3}'`
1482         TAPEDRIVE="/dev/nrst0"
1483         WIN32=win32
1484         WCFLAGS="-mwindows"
1485         WLDFLAGS="-mwindows"
1486   ;;
1487 darwin)
1488         DISTVER=`uname -r`
1489         TAPEDRIVE="/dev/nst0"
1490         PSCMD="ps -e -o pid,command"
1491         MACOSX=macosx
1492         PFILES="${PFILES} \
1493            platforms/darwin/Makefile"
1494   ;;
1495 debian)
1496         DISTVER=`cat /etc/debian_version`
1497         TAPEDRIVE="/dev/nrst0"
1498         PSCMD="ps -e -o pid,command"
1499   ;;
1500 freebsd)
1501         DISTVER=`uname -a |awk '{print $3}'`
1502         VER=`echo $DISTVER | cut -c 1`
1503         if test x$VER = x4 ; then
1504            PTHREAD_LIB="-pthread"
1505            CFLAGS="${CFLAGS} -pthread"
1506         fi
1507         lld="qd"
1508         llu="qu"
1509         TAPEDRIVE="/dev/nrsa0"
1510         PSCMD="ps -x -o pid,command"
1511         PFILES="${PFILES} \
1512             platforms/freebsd/Makefile \
1513             platforms/freebsd/bacula-fd \
1514             platforms/freebsd/bacula-sd \
1515             platforms/freebsd/bacula-dir"
1516         largefile_support="yes"
1517   ;;
1518 hpux)
1519         PSCMD="UNIX95=1 ps -e -o pid,comm"
1520         CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1521         DISTVER=`uname -r`
1522         TAPEDRIVE="/dev/rmt/0hnb"
1523   ;;
1524 irix)
1525         DISTVER=`uname -r`
1526         TAPEDRIVE="/dev/rmt/0cbn"
1527         PSCMD="ps -e -o pid,comm"
1528         PFILES="${PFILES} \
1529             platforms/irix/Makefile \
1530             platforms/irix/bacula-fd \
1531             platforms/irix/bacula-sd \
1532             platforms/irix/bacula-dir"
1533   ;;
1534 netbsd)
1535         DISTVER=`uname -a |awk '{print $3}'`
1536         lld="qd"
1537         llu="qu"
1538         TAPEDRIVE="/dev/nrst0"
1539         PSCMD="ps -a -o pid,command"
1540         PTHREAD_LIB="-pthread"
1541         CFLAGS="${CFLAGS} -pthread"
1542   ;;
1543 openbsd)
1544         DISTVER=`uname -a |awk '{print $3}'`
1545         lld="qd"
1546         llu="qu"
1547         TAPEDRIVE="/dev/nrst0"
1548         PSCMD="ps -a -o pid,command"
1549         PTHREAD_LIB="-pthread"
1550         CFLAGS="${CFLAGS} -pthread"
1551         PFILES="${PFILES} \
1552             platforms/openbsd/Makefile \
1553             platforms/openbsd/bacula-fd \
1554             platforms/openbsd/bacula-sd \
1555             platforms/openbsd/bacula-dir"
1556   ;;
1557 redhat)
1558         if test -f /etc/whitebox-release ; then
1559            f=/etc/whitebox-release
1560         else
1561            f=/etc/redhat-release
1562         fi
1563         if test `cat $f | grep release |\
1564                    cut -f 3 -d ' '`x = "Enterprise"x ; then
1565            DISTVER="Enterprise "`cat $f | grep release |\
1566                     cut -f 6 -d ' '`
1567         else
1568             DISTVER=`cat /etc/redhat-release | grep release |\
1569                      cut -f 5 -d ' '`
1570         fi
1571         TAPEDRIVE="/dev/nst0"
1572         PSCMD="ps -e -o pid,command"
1573         PFILES="${PFILES} \
1574             platforms/redhat/Makefile \
1575             platforms/redhat/bacula-fd \
1576             platforms/redhat/bacula-sd \
1577             platforms/redhat/bacula-dir \
1578             platforms/redhat/bacula.spec \
1579             "
1580         hostname=`hostname -s`
1581   ;;
1582 mandrake)
1583         DISTVER=`cat /etc/mandrake-release | grep release |\
1584            cut -f 5 -d ' '`
1585         TAPEDRIVE="/dev/nst0"
1586         PSCMD="ps -e -o pid,command"
1587         PFILES="${PFILES} \
1588             platforms/mandrake/Makefile \
1589             platforms/mandrake/bacula-fd \
1590             platforms/mandrake/bacula-sd \
1591             platforms/mandrake/bacula-dir \
1592             platforms/mandrake/bacula.spec \
1593             "
1594   ;;
1595 gentoo)
1596         DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1597         TAPEDRIVE="/dev/nst0"
1598         PSCMD="ps -e -o pid,command"
1599         PFILES="${PFILES} \
1600             platforms/gentoo/Makefile \
1601             platforms/gentoo/bacula-fd \
1602             platforms/gentoo/bacula-sd \
1603             platforms/gentoo/bacula-dir"
1604   ;;
1605 slackware)
1606         DISTVER=`cat /etc/slackware-version`
1607         TAPEDRIVE="/dev/nst0"
1608         PSCMD="ps -e -o pid,command"
1609         PFILES="${PFILES} \
1610             platforms/slackware/Makefile \
1611             platforms/slackware/rc.bacula-fd \
1612             platforms/slackware/rc.bacula-sd \
1613             platforms/slackware/rc.bacula-dir\
1614             platforms/slackware/functions.bacula"
1615   ;;
1616 solaris)
1617         DISTVER=`uname -r`
1618         TAPEDRIVE="/dev/rmt/0cbn"
1619         PSCMD="ps -e -o pid,comm"
1620         PFILES="${PFILES} \
1621             platforms/solaris/Makefile \
1622             platforms/solaris/bacula-fd \
1623             platforms/solaris/bacula-sd \
1624             platforms/solaris/bacula-dir"
1625         if test x$DISTVER = x5.6 ; then
1626             AC_DEFINE(HAVE_OLD_SOCKOPT)
1627         fi
1628   ;;
1629 suse)
1630         DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1631             cut -f 3 -d ' '`
1632         TAPEDRIVE="/dev/nst0"
1633         PSCMD="ps -e -o pid,command"
1634         PFILES="${PFILES} \
1635             platforms/suse/Makefile \
1636             platforms/suse/bacula-fd \
1637             platforms/suse/bacula-sd \
1638             platforms/suse/bacula-dir \
1639             platforms/suse/bacula \
1640             platforms/suse/bacula.spec"
1641   ;;
1642 suse5)
1643         DISTNAME=suse
1644         DISTVER=5.x
1645         TAPEDRIVE="/dev/nst0"
1646         PSCMD="ps -e -o pid,command"
1647         PFILES="${PFILES} \
1648             platforms/suse/Makefile \
1649             platforms/suse/bacula-fd \
1650             platforms/suse/bacula-sd \
1651             platforms/suse/bacula-dir"
1652   ;;
1653 unknown)
1654         DISTVER=unknown
1655         TAPEDRIVE="/dev/nst0"
1656   ;;
1657 *)
1658   echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1659   ;;
1660 esac  
1661
1662 AC_SUBST(hostname)
1663
1664 LIBS="$PTHREAD_LIB $LIBS"
1665
1666 AC_DEFINE_UNQUOTED(lld, "$lld")
1667 AC_DEFINE_UNQUOTED(llu, "$llu")
1668 AC_SUBST(TAPEDRIVE)
1669 AC_SUBST(PSCMD)
1670 AC_SUBST(WIN32)
1671 AC_SUBST(MACOSX)
1672 AC_SUBST(DISTNAME)
1673 AC_SUBST(DISTVER)
1674
1675 dnl# common parts of the Makefile
1676 MCOMMON=./autoconf/Make.common
1677 AC_SUBST_FILE(MCOMMON)
1678
1679 dnl# Insanity check
1680 if test "x${subsysdir}" = "x${sbindir}" ; then
1681    echo " "
1682    echo " "
1683    echo "You have set both --sbindir and --with-subsys-dir"
1684    echo "  equal to: ${subsysdir} "
1685    echo "This is not permitted. Please reconfigure."
1686    echo " "
1687    echo "Aborting configuration ..."
1688    echo " "
1689    echo " "
1690    exit 1
1691 fi 
1692
1693 AC_OUTPUT([autoconf/Make.common \
1694            Makefile \
1695            rescue/Makefile \
1696            rescue/linux/Makefile \
1697            rescue/freebsd/Makefile \
1698            rescue/solaris/Makefile \
1699            scripts/startmysql \
1700            scripts/stopmysql \
1701            scripts/btraceback \
1702            scripts/startit \
1703            scripts/stopit \
1704            scripts/bconsole \
1705            scripts/gconsole \
1706            scripts/bacula \
1707            scripts/devel_bacula \
1708            scripts/Makefile \
1709            scripts/logrotate \
1710            scripts/bacula.desktop.gnome1 \
1711            scripts/bacula.desktop.gnome2 \
1712            scripts/bacula.desktop.gnome1.consolehelper \
1713            scripts/bacula.desktop.gnome2.consolehelper \
1714            scripts/bacula.desktop.gnome1.xsu \
1715            scripts/bacula.desktop.gnome2.xsu \
1716            scripts/gnome-console.console_apps \
1717            scripts/mtx-changer \
1718            doc/Makefile \
1719            src/Makefile \
1720            src/host.h \
1721            src/console/Makefile \
1722            src/console/bconsole.conf \
1723            src/gnome-console/Makefile \
1724            src/gnome-console/gnome-console.conf \
1725            src/gnome2-console/Makefile \
1726            src/gnome2-console/gnome-console.conf \
1727            src/wx-console/Makefile \
1728            src/wx-console/wx-console.conf \
1729            src/tray-monitor/Makefile \
1730            src/tray-monitor/tray-monitor.conf \
1731            src/dird/Makefile \
1732            src/dird/bacula-dir.conf \
1733            src/lib/Makefile \
1734            src/stored/Makefile \
1735            src/stored/bacula-sd.conf \
1736            src/filed/Makefile \
1737            src/filed/bacula-fd.conf \
1738            src/filed/win32/Makefile \
1739            src/cats/Makefile \
1740            src/cats/make_catalog_backup \
1741            src/cats/delete_catalog_backup \
1742            src/cats/create_postgresql_database \
1743            src/cats/update_postgresql_tables \
1744            src/cats/make_postgresql_tables \
1745            src/cats/grant_postgresql_privileges \
1746            src/cats/drop_postgresql_tables \
1747            src/cats/drop_postgresql_database \
1748            src/cats/create_mysql_database \
1749            src/cats/update_mysql_tables \
1750            src/cats/make_mysql_tables \
1751            src/cats/grant_mysql_privileges \
1752            src/cats/drop_mysql_tables \
1753            src/cats/drop_mysql_database \
1754            src/cats/create_sqlite_database \
1755            src/cats/update_sqlite_tables \
1756            src/cats/make_sqlite_tables \
1757            src/cats/grant_sqlite_privileges \
1758            src/cats/drop_sqlite_tables \
1759            src/cats/drop_sqlite_database \
1760            src/cats/sqlite \
1761            src/cats/mysql \
1762            src/cats/create_bdb_database \
1763            src/cats/update_bdb_tables \
1764            src/cats/make_bdb_tables \
1765            src/cats/grant_bdb_privileges \
1766            src/cats/drop_bdb_tables \
1767            src/cats/drop_bdb_database \
1768            src/cats/create_bacula_database \
1769            src/cats/update_bacula_tables \
1770            src/cats/grant_bacula_privileges \
1771            src/cats/make_bacula_tables \
1772            src/cats/drop_bacula_tables \
1773            src/cats/drop_bacula_database \
1774            src/findlib/Makefile \
1775            src/tools/Makefile \
1776            src/win32/winbacula.nsi \
1777            src/win32/baculafd/bacula-fd.conf \
1778            src/win32/Makefile \
1779            src/win32/console/bconsole.conf \
1780            src/win32/wx-console/wx-console.conf \
1781            $PFILES ],  
1782           [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1783 )
1784
1785 cd scripts
1786 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1787 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1788 cd ..
1789
1790 c=src/cats
1791
1792 chmod 755 $c/create_bacula_database   $c/update_bacula_tables  $c/make_bacula_tables
1793 chmod 755 $c/grant_bacula_privileges  $c/drop_bacula_tables    $c/drop_bacula_database
1794
1795 chmod 755 $c/create_bdb_database      $c/update_bdb_tables     $c/make_bdb_tables
1796 chmod 755 $c/grant_bdb_privileges     $c/drop_bdb_tables       $c/drop_bdb_database
1797
1798 chmod 755 $c/create_mysql_database    $c/update_mysql_tables   $c/make_mysql_tables
1799 chmod 755 $c/grant_mysql_privileges   $c/drop_mysql_tables     $c/drop_mysql_database
1800
1801 chmod 755 $c/create_sqlite_database   $c/update_sqlite_tables  $c/make_sqlite_tables
1802 chmod 755 $c/grant_sqlite_privileges  $c/drop_sqlite_tables    $c/drop_sqlite_database
1803
1804 chmod 755 $c/create_postgresql_database  $c/update_postgresql_tables $c/make_postgresql_tables
1805 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables   $c/drop_postgresql_database
1806
1807 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1808 chmod 755 $c/sqlite
1809 chmod 755 $c/mysql
1810
1811 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1812    largefile_support="yes"
1813 fi
1814
1815 #
1816 # A whole lot of hand springs to get the compiler version.
1817 #  This is because gcc changed the output in version 3.0
1818 #
1819 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1820 if test "x${CCVERSION}" = "x" ; then
1821   CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1822 fi
1823 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1824 if test x"${CXXVERSION}" = x ; then
1825   CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1826 fi
1827
1828 if test "x${subsysdir}" = "x${sbindir}" ; then
1829    echo " "
1830    echo " "
1831    echo "You have set --sbindir and --with-subsys-dir"
1832    echo "  both equal to: ${subsysdir} "
1833    echo "  This is not permitted. Please reconfigure."
1834    echo " "
1835    echo "Aborting configuration ..."
1836    echo " "
1837    echo " "
1838    exit 1
1839 fi 
1840
1841 if test "x${db_name}" = "xInternal" ; then
1842    echo " "
1843    echo " "
1844    echo "You have not specified either --enable-client-only or one of the"
1845    echo "  supported databases: MySQL, PostgreSQL, or SQLite".
1846    echo "  This is not permitted. Please reconfigure."
1847    echo " "
1848    echo "Aborting the configuration ..."
1849    echo " "
1850    echo " "
1851    exit 1
1852 fi
1853
1854 echo "
1855 Configuration on `date`:
1856
1857   Host:                       $host -- ${DISTNAME} ${DISTVER}
1858   Bacula version:             ${VERSION} (${DATE})
1859   Source code location:       ${srcdir}
1860   Install binaries:           ${sbindir}
1861   Install config files:       ${sysconfdir}
1862   Scripts directory:          ${scriptdir}
1863   Working directory:          ${working_dir}
1864   PID directory:              ${piddir}
1865   Subsys directory:           ${subsysdir}
1866   C Compiler:                 ${CC} ${CCVERSION}
1867   C++ Compiler:               ${CXX} ${CXXVERSION}
1868   Compiler flags:             ${WCFLAGS} ${CFLAGS} 
1869   Linker flags:               ${WLDFLAGS} ${LDFLAGS}
1870   Libraries:                  ${LIBS}
1871   Statically Linked Tools:    ${support_static_tools}
1872   Statically Linked FD:       ${support_static_fd}
1873   Statically Linked SD:       ${support_static_sd}
1874   Statically Linked DIR:      ${support_static_dir}
1875   Statically Linked CONS:     ${support_static_cons}
1876   Database type:              ${db_name}
1877   Database lib:               ${DB_LIBS}
1878
1879   Job Output Email:           ${job_email}
1880   Traceback Email:            ${dump_email}
1881   SMTP Host Address:          ${smtp_host}
1882
1883   Director Port:              ${dir_port}
1884   File daemon Port:           ${fd_port}
1885   Storage daemon Port:        ${sd_port}
1886
1887   Director User:              ${dir_user}
1888   Director Group:             ${dir_group}
1889   Storage Daemon User:        ${sd_user}
1890   Storage DaemonGroup:        ${sd_group}
1891   File Daemon User:           ${fd_user}
1892   File Daemon Group:          ${fd_group}
1893
1894   SQL binaries Directory      ${SQL_BINDIR}
1895
1896   Large file support:         $largefile_support
1897   Bacula conio support:       ${got_conio} ${CONS_LIBS}
1898   readline support:           ${got_readline} ${PRTREADLINE_SRC}
1899   TCP Wrappers support:       ${TCPW_MSG}
1900   ZLIB support:               ${have_zlib}
1901   enable-smartalloc:          ${support_smartalloc} 
1902   enable-gnome:               ${support_gnome} ${gnome_version}
1903   enable-wx-console:          ${support_wx_console}
1904   enable-tray-monitor:        ${support_tray_monitor}
1905   client-only:                ${build_client_only}
1906   ACL support:                ${have_acl}
1907
1908   " > config.out
1909
1910 cat config.out
1911
1912 # old stuff
1913 # cweb support:               ${got_cweb} ${CWEB_SRC}
1914   # gmp support:                      ${got_gmp} ${GMP_SRC}