--with-sd-group=GROUP specify group for Storage daemon
--with-fd-user=USER specify user for File daemon
--with-fd-group=GROUP specify group for File daemon
+ --with-postgresql=DIR Include PostgreSQL support. DIR is the PostgreSQL
+ base install directory, defaults to /usr/local/pgsql
Which DBMS do you want to use (please select only one):
--with-mysql=DIR Include MySQL support. DIR is the MySQL base
# ------------------------------------------------
# Bacula check for various SQL database engines
# ------------------------------------------------
-BA_CHECK_POSTGRESQL_DB
+
+db_found=no
+echo "$as_me:$LINENO: checking for PostgreSQL support" >&5
+echo $ECHO_N "checking for PostgreSQL support... $ECHO_C" >&6
+
+# Check whether --with-postgresql or --without-postgresql was given.
+if test "${with_postgresql+set}" = set; then
+ withval="$with_postgresql"
+
+ if test "$withval" != "no"; then
+ if test "$db_found" = "yes"; then
+ echo "$as_me:$LINENO: result: error" >&5
+echo "${ECHO_T}error" >&6
+ { { echo "$as_me:$LINENO: error: \"You can configure for only one database.\"" >&5
+echo "$as_me: error: \"You can configure for only one database.\"" >&2;}
+ { (exit 1); exit 1; }; };
+ fi
+ if test "$withval" = "yes"; then
+ if test -f /usr/local/include/libpq-fe.h; then
+ POSTGRESQL_INCDIR=/usr/local/include
+ POSTGRESQL_LIBDIR=/usr/local/lib
+ POSTGRESQL_BINDIR=/usr/local/bin
+ elif test -f /usr/include/libpq-fe.h; then
+ POSTGRESQL_INCDIR=/usr/include
+ POSTGRESQL_LIBDIR=/usr/lib
+ POSTGRESQL_BINDIR=/usr/bin
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: Unable to find libpq-fe.h in standard locations" >&5
+echo "$as_me: error: Unable to find libpq-fe.h in standard locations" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ elif test -f $withval/libpq-fe.h; then
+ POSTGRESQL_INCDIR=$withval
+ POSTGRESQL_LIBDIR=$withval
+ POSTGRESQL_BINDIR=$withval
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: Invalid SQLite directory $withval - unable to find libpq-fe.h under $withval" >&5
+echo "$as_me: error: Invalid SQLite directory $withval - unable to find libpq-fe.h under $withval" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ POSTGRESQL_LFLAGS="-L$POSTGRESQL_LIBDIR -lpq"
+ echo "$as_me:$LINENO: checking for crypt" >&5
+echo $ECHO_N "checking for crypt... $ECHO_C" >&6
+if test "${ac_cv_func_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char crypt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_crypt) || defined (__stub___crypt)
+choke me
+#else
+char (*f) () = crypt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != crypt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_crypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_crypt" >&5
+echo "${ECHO_T}$ac_cv_func_crypt" >&6
+if test $ac_cv_func_crypt = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5
+echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6
+if test "${ac_cv_lib_crypt_crypt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypt $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char crypt ();
+int
+main ()
+{
+crypt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_crypt_crypt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_crypt_crypt=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5
+echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6
+if test $ac_cv_lib_crypt_crypt = yes; then
+ POSTGRESQL_LFLAGS="-lcrypt $POSTGRESQL_LFLAGS"
+fi
+
+fi
+
+ SQL_INCLUDE=-I$POSTGRESQL_INCDIR
+ SQL_LFLAGS=$POSTGRSQL_LFLAGS
+ SQL_BINDIR=$POSTGRESQL_BINDIR
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSTGRESQL 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ db_found=yes
+ support_postgresql=yes
+ db_name=PostgreSQL
+ DB_NAME=postgresql
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+
+else
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi;
+
+
+
+
+
db_found=no
exit 1
fi
- ac_config_files="$ac_config_files autoconf/Make.common Makefile rescue/Makefile rescue/linux/Makefile rescue/freebsd/Makefile rescue/solaris/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/fd scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/mtx-changer doc/Makefile src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome-console/Makefile src/gnome-console/gnome-console.conf src/gnome2-console/Makefile src/gnome2-console/gnome-console.conf src/tconsole/Makefile src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/filed/win32/Makefile src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/make_postgresql_tables src/cats/drop_postgresql_tables src/cats/create_postgresql_database src/cats/grant_postgresql_privileges src/cats/make_mysql_tables src/cats/drop_mysql_tables src/cats/update_mysql_tables src/cats/create_mysql_database src/cats/grant_mysql_privileges src/cats/make_sqlite_tables src/cats/drop_sqlite_tables src/cats/update_sqlite_tables src/cats/create_sqlite_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/make_bdb_tables src/cats/drop_bdb_tables src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/update_bacula_tables src/cats/grant_bacula_privileges src/findlib/Makefile src/tools/Makefile $PFILES"
+ ac_config_files="$ac_config_files autoconf/Make.common Makefile rescue/Makefile rescue/linux/Makefile rescue/freebsd/Makefile rescue/solaris/Makefile scripts/startmysql scripts/stopmysql scripts/btraceback scripts/startit scripts/stopit scripts/bconsole scripts/gconsole scripts/bacula scripts/fd scripts/Makefile scripts/logrotate scripts/bacula.desktop.gnome1 scripts/bacula.desktop.gnome2 scripts/mtx-changer doc/Makefile src/Makefile src/host.h src/console/Makefile src/console/bconsole.conf src/gnome-console/Makefile src/gnome-console/gnome-console.conf src/gnome2-console/Makefile src/gnome2-console/gnome-console.conf src/tconsole/Makefile src/dird/Makefile src/dird/bacula-dir.conf src/lib/Makefile src/stored/Makefile src/stored/bacula-sd.conf src/filed/Makefile src/filed/bacula-fd.conf src/filed/win32/Makefile src/cats/Makefile src/cats/make_catalog_backup src/cats/delete_catalog_backup src/cats/create_postgresql_database src/cats/update_postgresql_tables src/cats/make_postgresql_tables src/cats/grant_postgresql_privileges src/cats/drop_postgresql_tables src/cats/drop_postgresql_database src/cats/create_mysql_database src/cats/update_mysql_tables src/cats/make_mysql_tables src/cats/grant_mysql_privileges src/cats/drop_mysql_tables src/cats/drop_mysql_database src/cats/create_sqlite_database src/cats/update_sqlite_tables src/cats/make_sqlite_tables src/cats/grant_sqlite_privileges src/cats/drop_sqlite_tables src/cats/drop_sqlite_database src/cats/sqlite src/cats/mysql src/cats/create_bdb_database src/cats/update_bdb_tables src/cats/make_bdb_tables src/cats/grant_bdb_privileges src/cats/drop_bdb_tables src/cats/drop_bdb_database src/cats/create_bacula_database src/cats/update_bacula_tables src/cats/make_bacula_tables src/cats/drop_bacula_tables src/cats/drop_bacula_database src/findlib/Makefile src/tools/Makefile $PFILES"
ac_config_commands="$ac_config_commands default"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
"src/cats/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/cats/Makefile" ;;
"src/cats/make_catalog_backup" ) CONFIG_FILES="$CONFIG_FILES src/cats/make_catalog_backup" ;;
"src/cats/delete_catalog_backup" ) CONFIG_FILES="$CONFIG_FILES src/cats/delete_catalog_backup" ;;
- "src/cats/make_postgresql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/make_postgresql_tables" ;;
- "src/cats/drop_postgresql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_postgresql_tables" ;;
"src/cats/create_postgresql_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/create_postgresql_database" ;;
+ "src/cats/update_postgresql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/update_postgresql_tables" ;;
+ "src/cats/make_postgresql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/make_postgresql_tables" ;;
"src/cats/grant_postgresql_privileges" ) CONFIG_FILES="$CONFIG_FILES src/cats/grant_postgresql_privileges" ;;
- "src/cats/make_mysql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/make_mysql_tables" ;;
- "src/cats/drop_mysql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_mysql_tables" ;;
- "src/cats/update_mysql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/update_mysql_tables" ;;
+ "src/cats/drop_postgresql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_postgresql_tables" ;;
+ "src/cats/drop_postgresql_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_postgresql_database" ;;
"src/cats/create_mysql_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/create_mysql_database" ;;
+ "src/cats/update_mysql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/update_mysql_tables" ;;
+ "src/cats/make_mysql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/make_mysql_tables" ;;
"src/cats/grant_mysql_privileges" ) CONFIG_FILES="$CONFIG_FILES src/cats/grant_mysql_privileges" ;;
+ "src/cats/drop_mysql_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_mysql_tables" ;;
+ "src/cats/drop_mysql_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_mysql_database" ;;
+ "src/cats/create_sqlite_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/create_sqlite_database" ;;
+ "src/cats/update_sqlite_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/update_sqlite_tables" ;;
"src/cats/make_sqlite_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/make_sqlite_tables" ;;
+ "src/cats/grant_sqlite_privileges" ) CONFIG_FILES="$CONFIG_FILES src/cats/grant_sqlite_privileges" ;;
"src/cats/drop_sqlite_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_sqlite_tables" ;;
- "src/cats/update_sqlite_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/update_sqlite_tables" ;;
- "src/cats/create_sqlite_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/create_sqlite_database" ;;
+ "src/cats/drop_sqlite_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_sqlite_database" ;;
"src/cats/sqlite" ) CONFIG_FILES="$CONFIG_FILES src/cats/sqlite" ;;
"src/cats/mysql" ) CONFIG_FILES="$CONFIG_FILES src/cats/mysql" ;;
"src/cats/create_bdb_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/create_bdb_database" ;;
+ "src/cats/update_bdb_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/update_bdb_tables" ;;
"src/cats/make_bdb_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/make_bdb_tables" ;;
+ "src/cats/grant_bdb_privileges" ) CONFIG_FILES="$CONFIG_FILES src/cats/grant_bdb_privileges" ;;
"src/cats/drop_bdb_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bdb_tables" ;;
+ "src/cats/drop_bdb_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bdb_database" ;;
+ "src/cats/create_bacula_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/create_bacula_database" ;;
+ "src/cats/update_bacula_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/update_bacula_tables" ;;
"src/cats/make_bacula_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/make_bacula_tables" ;;
"src/cats/drop_bacula_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bacula_tables" ;;
- "src/cats/update_bacula_tables" ) CONFIG_FILES="$CONFIG_FILES src/cats/update_bacula_tables" ;;
- "src/cats/grant_bacula_privileges" ) CONFIG_FILES="$CONFIG_FILES src/cats/grant_bacula_privileges" ;;
+ "src/cats/drop_bacula_database" ) CONFIG_FILES="$CONFIG_FILES src/cats/drop_bacula_database" ;;
"src/findlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/findlib/Makefile" ;;
"src/tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/tools/Makefile" ;;
"$PFILES" ) CONFIG_FILES="$CONFIG_FILES $PFILES" ;;
chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
chmod 755 bconsole gconsole mtx-changer
cd ..
-chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
-chmod 755 src/cats/make_postgresql_tables src/cats/drop_postgresql_tables
-chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
-chmod 755 src/cats/create_postgresql_database
-chmod 755 src/cats/create_mysql_database
+
+chmod 755 create_bacula_database update_bacula_tables make_bacula_tables
+chmod 755 grant_bacula_privileges drop_bacula_tables drop_bacula_database
+
+chmod 755 create_bdb_database update_bdb_tables make_bdb_tables
+chmod 755 grant_bdb_privileges drop_bdb_tables drop_bdb_database
+
+chmod 755 create_mysql_database update_mysql_tables make_mysql_tables
+chmod 755 grant_mysql_privileges drop_mysql_tables drop_mysql_database
+
+chmod 755 create_postgresql_database update_postgresql_tables make_postgresql_tables
+chmod 755 grant_postgresql_privileges drop_postgresql_tables drop_postgresql_database
+
+chmod 755 create_sqlite_database update_sqlite_tables make_sqlite_tables
+chmod 755 grant_sqlite_privileges drop_sqlite_tables drop_sqlite_database
+
chmod 755 src/cats/make_catalog_backup src/cats/delete_catalog_backup
-chmod 755 src/cats/grant_postgresql_privileges
-chmod 755 src/cats/grant_mysql_privileges
-chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables
-chmod 755 src/cats/update_sqlite_tables
-chmod 755 src/cats/make_bacula_tables src/cats/drop_bacula_tables
-chmod 755 src/cats/update_mysql_tables
-chmod 755 src/cats/update_bacula_tables src/cats/update_mysql_tables
-chmod 755 src/cats/grant_bacula_privileges
-chmod 755 src/cats/create_sqlite_database
chmod 755 src/cats/sqlite
-chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables
-chmod 755 src/cats/create_bdb_database
+chmod 755 src/cats/mysql
if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
largefile_support="yes"