* Copyright (C) 2000-2020 Kern Sibbald
* License: BSD 2-Clause; see file LICENSE-FOSS
*/
-
+
/* Define if you want to use MySQL as Catalog database */
#undef USE_MYSQL_DB
#undef HAVE_U_INT64_T
#undef HAVE_INTMAX_T
#undef HAVE_U_INTMAX_T
-
+
/* Define if you want TCP Wrappers support */
#undef HAVE_LIBWRAP
/* Define if you have sys/bitypes.h */
#undef HAVE_SYS_BITYPES_H
-
+
/* Directory for PID files */
#undef _PATH_BACULA_PIDDIR
#undef lld
#undef llu
-#undef HAVE_READLINE
+#undef HAVE_READLINE
#undef HAVE_GMP
#undef HAVE_OLD_SOCKOPT
#undef USE_THR_SETCONCURRENCY
-
+
/* Defined if Gtk+-2.4 or greater is present */
#undef HAVE_GTK_2_4
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
+/* Define to 1 if you have working ldap libraries */
+#undef HAVE_LDAP
+
+/* Define to 1 if you have ldap_start_tls() in ldap libraries */
+#undef HAVE_LDAP_START_TLS
+
/* Define to 1 if you have the `__argz_count' function. */
#undef HAVE___ARGZ_COUNT
LIBTOOL_CLEAN_TARGET="libtool-clean"
QMAKE_LIBTOOL="${BUILD_DIR}/libtool"
FD_PLUGIN_DIR="src/plugins/fd"
+ DIR_PLUGIN_DIR="src/plugins/dir"
have_plugins=yes
else
DEFAULT_OBJECT_TYPE=".o"
LIBTOOL_CLEAN_TARGET=""
QMAKE_LIBTOOL="# ${BUILD_DIR}/libtool"
FD_PLUGIN_DIR=""
+ DIR_PLUGIN_DIR=""
have_plugins=no
fi
DIRD_DIR="src/dird"
DIR_TOOLS="DIRTOOLS"
+DIR_PLUGIN_DIR="src/plugins/dir"
+
+if test x$build_dird = xyes; then
+ DIRD_DIR="src/dird"
+ DIR_TOOLS="DIRTOOLS"
+else
+ DIRD_DIR=""
+ DIR_TOOLS="NODIRTOOLS"
+fi
AC_SUBST(DIRD_DIR)
AC_SUBST(DIR_TOOLS)
+AC_SUBST(DIR_PLUGIN_DIR)
dnl -------------------------------------------
dnl stored (default on)
AC_SUBST(FD_PLUGIN_DIR)
dnl
+dnl Check for LDAP libraries
+dnl
+LDAP_LIBS=""
+LDAP_LDFLAGS=""
+LDAP_INC=""
+LDAP_TARGET=""
+LDAP_TARGET_INSTALL=""
+ldap_support=no
+ldap_start_tls_support=no
+AC_ARG_WITH(ldap,
+ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@], [enable LDAP support]),
+ [
+ case "$with_ldap" in
+ no)
+ :
+ ;;
+ yes|*)
+ if test -f ${with_ldap}/include/ldap.h; then
+ LDAP_INC="-I${with_ldap}/include"
+ LDAP_LDFLAGS="-L${with_ldap}/lib"
+ with_ldap="${with_ldap}/include"
+ else
+ with_ldap="/usr/include"
+ fi
+ AC_CHECK_HEADER(${with_ldap}/ldap.h,
+ [
+ AC_DEFINE(HAVE_LDAP, 1, [Define to 1 if you have ldap])
+ AC_CHECK_LIB(ldap, ldap_init,
+ [ AC_CHECK_LIB(lber, ber_bvfree,
+ [
+ ldap_support=yes
+ LDAP_LIBS="-lldap -llber"
+ ],
+ [ AC_CHECK_FUNC(ber_bvfree,
+ [
+ ldap_support=yes
+ LDAP_LIBS="-lldap -llber"
+ ]
+ )]
+ )], [ AC_CHECK_FUNC(ldap_init) ])
+ AC_CHECK_FUNC(ldap_start_tls,
+ [ ldap_start_tls_support=yes ],
+ [ AC_CHECK_LIB(ldap, ldap_start_tls,
+ [
+ ldap_start_tls_support=yes
+ AC_DEFINE(HAVE_LDAP_START_TLS, 1, [Define to 1 if you have ldap_start_tls])
+ ])
+ ])
+ ], [ AC_MSG_NOTICE("ldap.h not found. LDAP turned off ...") ])
+ ;;
+ esac
+ ]
+)
+AC_SUBST(LDAP_LDFLAGS)
+AC_SUBST(LDAP_INC)
+AC_SUBST(LDAP_LIBS)
+
+dnl
+
+dnl Enable/Disable plugin support
+dnl
+
+PLUGCONFILES=""
+
+dnl
+dnl Bacula Pluggable Authentication Modules - Director Plugins
+dnl
+
+dnl Director LDAP Auth Plugin
+support_ldap_bpam=auto
+AC_ARG_ENABLE(ldap-bpam,
+ AC_HELP_STRING([--disable-ldap-bpam], [disable LDAP BPAM support @<:@default=auto@:>@]),
+ [
+ if test x$enableval = xyes; then
+ support_ldap_bpam=yes
+ elif test x$enableval = xno; then
+ support_ldap_bpam=disabled
+ fi
+ ]
+)
+if test x$support_ldap_bpam = xyes -o x$support_ldap_bpam = xauto; then
+ if test x$ldap_support = xyes; then
+ support_ldap_bpam=yes
+ BPAM_LDAP_TARGET="ldap-dir.la ldaptest"
+ BPAM_LDAP_TARGET_INSTALL="all install-ldap install-ldaptest"
+ else
+ if test x$support_ldap_bpam = xyes; then
+ AC_MSG_ERROR("Director LDAP Plugin enabled but no required libraries found. Please check for LDAP library support and set a proper --with-ldap=... parameter.")
+ fi
+ support_ldap_bpam=no
+ fi
+fi
+if test x$support_ldap_bpam = xyes; then
+ DIR_PLUGIN_DIR="$DIR_PLUGIN_DIR src/plugins/dir/ldap/src"
+ PLUGCONFILES="${PLUGCONFILES} src/plugins/dir/ldap/src/Makefile"
+fi
+
+AC_SUBST(BPAM_LDAP_TARGET)
+AC_SUBST(BPAM_LDAP_TARGET_INSTALL)
+
+AC_SUBST(DIR_PLUGIN_DIR)
+
dnl Check for headers, functions and libraries required to support
dnl keeping readall capabilities
dnl
build-dird: ${build_dird}
build-stored: ${build_stored}
Plugin support: ${have_plugins}
+ LDAP support: ${ldap_support}
+ LDAP StartTLS support: ${ldap_start_tls_support}
AFS support: ${have_afs}
ACL support: ${have_acl}
XATTR support: ${have_xattr}
Plugins:
- Docker: ${support_docker}
-
+ - LDAP BPAM: ${support_ldap_bpam}
" > config.out
# create a small shell script useful for support with