@@ -0,0 +1,39353 @@
+diff --git a/bacula/Makefile.in b/bacula/Makefile.in
+index 83681b6..7cb7e60 100755
+--- a/bacula/Makefile.in
++++ b/bacula/Makefile.in
+@@ -56,7 +56,7 @@ depend:
+ bacula-fd: Makefile
+ @for I in ${fd_subdirs}; \
+ do (cd $$I; echo "==>Entering directory `pwd`"; \
+- $(MAKE) DESTDIR=$(DESTDIR) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======; \
++ $(MAKE) DESTDIR=$(DESTDIR) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
+ echo ""; echo ""; exit 1;)); \
+ done
+
+diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in
+index 1c1791c..8417751 100644
+--- a/bacula/autoconf/config.h.in
++++ b/bacula/autoconf/config.h.in
+@@ -600,6 +600,9 @@
+ /* Define if the OpenSSL library is export-contrained to 128bit ciphers */
+ #undef HAVE_OPENSSL_EXPORT_LIBRARY
+
++/* Set if have OpenSSL version 1.x */
++#undef HAVE_OPENSSLv1
++
+ /* Define to 1 if you have the `posix_fadvise' function. */
+ #undef HAVE_POSIX_FADVISE
+
+@@ -612,9 +615,6 @@
+ /* Set if have PQputCopyData */
+ #undef HAVE_PQ_COPY
+
+-/* Set if have sqlite3_threadsafe */
+-#undef HAVE_SQLITE3_THREADSAFE
+-
+ /* Define to 1 if you have the `prctl' function. */
+ #undef HAVE_PRCTL
+
+@@ -672,6 +672,9 @@
+ /* Set if socklen_t exists */
+ #undef HAVE_SOCKLEN_T
+
++/* Set if have sqlite3_threadsafe */
++#undef HAVE_SQLITE3_THREADSAFE
++
+ /* Define to 1 if you have the <stdarg.h> header file. */
+ #undef HAVE_STDARG_H
+
+diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in
+index d44f152..b20d1f6 100644
+--- a/bacula/autoconf/configure.in
++++ b/bacula/autoconf/configure.in
+@@ -2,6 +2,8 @@ dnl
+ dnl
+ dnl Process this file with autoconf to produce a configure script.
+ dnl
++dnl require a recent autoconf
++AC_PREREQ(2.61)
+ AC_INIT(src/version.h)
+ BUILD_DIR=`pwd`
+ cd ..
+@@ -10,7 +12,7 @@ cd ${BUILD_DIR}
+ AC_SUBST(BUILD_DIR)
+ AC_SUBST(TOP_DIR)
+ AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
+-AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
++AC_CONFIG_HEADERS(src/config.h:autoconf/config.h.in)
+
+ dnl minimal Win32 stuff for "make clean"
+ WIN32BUILDDIR=${BUILD_DIR}/src/win32
+@@ -20,10 +22,6 @@ AC_SUBST(WIN32BUILDDIR)
+ AC_SUBST(WIN32MAINDIR)
+ AC_SUBST(WIN32TOPDIR)
+
+-dnl require a recent autoconf
+-AC_PREREQ(2.61)
+-
+-
+ dnl search for true and false programs.
+ AC_PATH_PROGS(TRUEPRG, true, :)
+ AC_PATH_PROGS(FALSEPRG, false, :)
+@@ -819,45 +817,33 @@ if test x$support_ipv6 = xyes; then
+ AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
+ fi
+
++TERM_LIB=""
++AC_CHECK_HEADER(termcap.h,
++ [ AC_CHECK_LIB(termcap, tgetent,
++ [ TERM_LIB="-ltermcap" ],
++ [ AC_CHECK_LIB(ncurses, tgetent, [ TERM_LIB="-lncurses" ])
++ ])
++ ],
++ [ AC_CHECK_HEADERS(curses.h)
++ AC_CHECK_HEADER(term.h,
++ [ AC_CHECK_LIB(curses, tgetent,
++ [ TERM_LIB="-lcurses" ] )
++ ])
++ ])
++
++
+ got_conio="no"
+ if test x$support_conio = xyes; then
+- AC_CHECK_HEADER(termcap.h,
+- [ AC_CHECK_LIB(termcap, tgetent,
+- [ CONS_LIBS="-ltermcap"
+- CONS_OBJ="conio.o"
+- CONS_SRC="conio.c"
+- got_conio="yes"
+- support_readline=no
+- AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
+- ],
+- [ AC_CHECK_LIB(ncurses, tgetent,
+- [ CONS_LIBS="-lncurses"
++ if test x$TERM_LIB != x; then
++ CONS_LIBS=$TERM_LIB
+ CONS_OBJ="conio.o"
+ CONS_SRC="conio.c"
+ got_conio="yes"
+ support_readline=no
+ AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
+- ])
+- ])
+- ],
+- [
+- AC_CHECK_HEADERS(curses.h)
+- AC_CHECK_HEADER(term.h,
+- [ AC_CHECK_LIB(curses, tgetent,
+- [ CONS_LIBS="-lcurses"
+- CONS_OBJ="conio.o"
+- CONS_SRC="conio.c"
+- got_conio="yes"
+- support_readline=no
+- AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
+- ])
+- ],
+- [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
+-[#if HAVE_CURSES_H
+-#include <curses.h>
+-#endif
+-])
+- ])
++ else
++ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
++ fi
+ fi
+
+
+@@ -873,6 +859,9 @@ AC_ARG_ENABLE(readline,
+ fi
+ ]
+ )
++if test x$TERM_LIB = x ; then
++ support_readline=no
++fi
+
+ got_readline="no"
+ READLINE_SRC=
+@@ -899,7 +888,7 @@ if test x$support_readline = xyes; then
+ AC_CHECK_HEADER(${with_readline}/readline.h,
+ [
+ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
+- CONS_LIBS="-lreadline -lhistory -ltermcap"
++ CONS_LIBS="-lreadline -lhistory $TERM_LIB"
+ got_readline="yes"
+ ], [
+ echo " "
+@@ -916,7 +905,7 @@ if test x$support_readline = xyes; then
+ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
+ got_readline="yes"
+ CONS_INC="-I/usr/include/readline"
+- CONS_LIBS="-lreadline -ltermcap"
++ CONS_LIBS="-lreadline $TERM_LIB"
+ ], [
+ dnl Did not find standard library, so try Bacula's default
+ AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
+@@ -924,7 +913,7 @@ if test x$support_readline = xyes; then
+ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
+ got_readline="yes"
+ CONS_INC="-I${TOP_DIR}/depkgs/readline"
+- CONS_LIBS="-lreadline -lhistory -ltermcap"
++ CONS_LIBS="-lreadline -lhistory $TERM_LIB"
+ CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
+ PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
+ ], [
+@@ -1219,6 +1208,8 @@ fi
+ if test "$support_crypto" = "no"; then
+ OPENSSL_LIBS=""
+ OPENSSL_INC=""
++else
++ AC_CHECK_LIB(ssl, EVP_PKEY_encrypt_old, AC_DEFINE(HAVE_OPENSSLv1, 1, [Set if have OpenSSL version 1.x]))
+ fi
+
+ AC_MSG_RESULT([$support_tls])
+@@ -2881,7 +2872,6 @@ mandrake)
+ platforms/mandrake/bacula-fd \
+ platforms/mandrake/bacula-sd \
+ platforms/mandrake/bacula-dir \
+- platforms/mandrake/bacula.spec \
+ "
+ ;;
|