FR_MODULE_START_TESTS
- AC_PROG_CC
-
- mysubdirs=
- if test "x$EXPERIMENTAL" = "xyes"; then
- for foo in `find ./drivers -name configure -print`; do
- bar=`echo $foo | sed 's%/configure$%%g'`
- mysubdirs="$mysubdirs $bar"
- done
- else
- for foo in `cat stable`; do
- mysubdirs="$mysubdirs ./drivers/$foo"
- done
- fi
-
- dnl # don't ask... this is done to avoid autoconf stupidities.
- ln -s ../../../install-sh install-sh
-
- dnl #
- dnl # Don't change the variable name here. Autoconf goes bonkers
- dnl # if you do.
- dnl #
- AC_CONFIG_SUBDIRS($mysubdirs)
- rm install-sh
-
- dnl #
- dnl # Don't bother looking for errors in the child directories
- dnl #
+AC_PROG_CC
+
+mysubdirs=
+if test "x$EXPERIMENTAL" = "xyes"; then
+ for foo in `find ./drivers -name configure -print`; do
+ bar=`echo $foo | sed 's%/configure$%%g'`
+ mysubdirs="$mysubdirs $bar"
+ done
+else
+ for foo in `cat stable`; do
+ mysubdirs="$mysubdirs ./drivers/$foo"
+ done
+fi
+
+dnl # don't ask... this is done to avoid autoconf stupidities.
+ln -s ../../../install-sh install-sh
+
+AC_CONFIG_SUBDIRS($mysubdirs)
+rm install-sh
FR_MODULE_END_TESTS([nostrict])
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
-
- dnl put configuration checks here.
- dnl set $fail to what's missing, on fatal errors.
- dnl use AC_MSG_WARN() on important messages.
-
- dnl ############################################################
- dnl # Check for libmemcached
- dnl ############################################################
-
- dnl extra argument: --with-libmemcached-include-dir=DIR
- libmemcached_include_dir=
- AC_ARG_WITH(libmemcached-include-dir,
- [AS_HELP_STRING([--with-libmemcached-include-dir=DIR],
- [Directory where the libmemcached includes may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need libmemcached-include-dir)
- ;;
- yes)
- ;;
- *)
- libmemcached_include_dir="$withval"
- ;;
- esac])
-
- dnl extra argument: --with-libmemcached-lib-dir=DIR
- libmemcached_lib_dir=
- AC_ARG_WITH(libmemcached-lib-dir,
- [AS_HELP_STRING([--with-libmemcached-lib-dir=DIR],
- [Directory where the libmemcached libraries may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need libmemcached-lib-dir)
- ;;
- yes)
- ;;
- *)
- libmemcached_lib_dir="$withval"
- ;;
- esac])
-
- dnl extra argument: --with-libmemcached-dir=DIR
- AC_ARG_WITH(libmemcached-dir,
- [AS_HELP_STRING([--with-libmemcached-dir=DIR],
- [Base directory where libmemcached is installed])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need libmemcached-dir)
- ;;
- yes)
- ;;
- *)
- libmemcached_lib_dir="$withval/lib"
- libmemcached_include_dir="$withval/include"
- ;;
- esac])
-
-
- dnl ############################################################
- dnl # Check for libmemcached header files
- dnl ############################################################
-
- have_json="yes"
- smart_try_dir="$libmemcached_include_dir"
- FR_SMART_CHECK_INCLUDE([libmemcached/memcached.h])
- if test "x$ac_cv_header_libmemcached_memcached_h" != "xyes"; then
- AC_MSG_WARN([libmemcached headers not found. Use --with-libmemcached-include-dir=<path>.])
- fail='memcached.h'
- fi
-
- dnl ############################################################
- dnl # Check for libmemcached libraries
- dnl ############################################################
-
- dnl # Check if libpthread is available. Should add -lpthread
- dnl # to CFLAGS when checking for memcached.
- FR_SMART_CHECK_LIB([pthread], [pthread_once])
-
- smart_try_dir="$libmemcached_lib_dir"
- dnl # Use a libmemcached specific function which is only
- dnl # available in newer versions.
- FR_SMART_CHECK_LIB([memcached], [memcached])
- if test "x$ac_cv_lib_memcached_memcached" != "xyes"
- then
- AC_MSG_WARN([libmemcached libraries not found. Use --with-libmemcached-lib-dir=<path>.])
- fail="libmemcached $fail"
- else
- AC_CHECK_FUNCS(\
- memcached \
- memcached_free \
- memcached_get \
- memcached_set \
- memcached_delete \
- libmemcached_check_configuration \
- ,, [fail="memached functions"])
- fi
+AC_PROG_CC
+AC_PROG_CPP
+
+dnl ############################################################
+dnl # Check for libmemcached
+dnl ############################################################
+
+dnl extra argument: --with-libmemcached-include-dir=DIR
+libmemcached_include_dir=
+AC_ARG_WITH(libmemcached-include-dir,
+ [AS_HELP_STRING([--with-libmemcached-include-dir=DIR],
+ [Directory where the libmemcached includes may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need libmemcached-include-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ libmemcached_include_dir="$withval"
+ ;;
+ esac])
+
+dnl extra argument: --with-libmemcached-lib-dir=DIR
+libmemcached_lib_dir=
+AC_ARG_WITH(libmemcached-lib-dir,
+[AS_HELP_STRING([--with-libmemcached-lib-dir=DIR],
+ [Directory where the libmemcached libraries may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need libmemcached-lib-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ libmemcached_lib_dir="$withval"
+ ;;
+ esac])
+
+dnl extra argument: --with-libmemcached-dir=DIR
+AC_ARG_WITH(libmemcached-dir,
+[AS_HELP_STRING([--with-libmemcached-dir=DIR],
+ [Base directory where libmemcached is installed])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need libmemcached-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ libmemcached_lib_dir="$withval/lib"
+ libmemcached_include_dir="$withval/include"
+ ;;
+ esac])
+
+
+dnl ############################################################
+dnl # Check for libmemcached header files
+dnl ############################################################
+
+have_json="yes"
+smart_try_dir="$libmemcached_include_dir"
+FR_SMART_CHECK_INCLUDE([libmemcached/memcached.h])
+if test "x$ac_cv_header_libmemcached_memcached_h" != "xyes"; then
+ AC_MSG_WARN([libmemcached headers not found. Use --with-libmemcached-include-dir=<path>.])
+ fail='memcached.h'
+fi
+
+dnl ############################################################
+dnl # Check for libmemcached libraries
+dnl ############################################################
+
+dnl # Check if libpthread is available. Should add -lpthread
+dnl # to CFLAGS when checking for memcached.
+FR_SMART_CHECK_LIB([pthread], [pthread_once])
+
+smart_try_dir="$libmemcached_lib_dir"
+dnl # Use a libmemcached specific function which is only
+dnl # available in newer versions.
+FR_SMART_CHECK_LIB([memcached], [memcached])
+if test "x$ac_cv_lib_memcached_memcached" != "xyes"
+then
+ AC_MSG_WARN([libmemcached libraries not found. Use --with-libmemcached-lib-dir=<path>.])
+ fail="libmemcached $fail"
+else
+ AC_CHECK_FUNCS(\
+ memcached \
+ memcached_free \
+ memcached_get \
+ memcached_set \
+ memcached_delete \
+ libmemcached_check_configuration \
+ ,, [fail="memached functions"])
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
-
- dnl put configuration checks here.
- dnl set $fail to what's missing, on fatal errors.
- dnl use AC_MSG_WARN() on important messages.
-
- dnl ############################################################
- dnl # Check for libcouchbase
- dnl ############################################################
-
- dnl extra argument: --with-libcouchbase-include-dir=DIR
- libcouchbase_include_dir=
- AC_ARG_WITH(libcouchbase-include-dir,
- [AS_HELP_STRING([--with-libcouchbase-include-dir=DIR],
- [Directory where the libcouchbase includes may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need libcouchbase-include-dir)
- ;;
- yes)
- ;;
- *)
- libcouchbase_include_dir="$withval"
- ;;
- esac])
-
- dnl extra argument: --with-libcouchbase-lib-dir=DIR
- libcouchbase_lib_dir=
- AC_ARG_WITH(libcouchbase-lib-dir,
- [AS_HELP_STRING([--with-libcouchbase-lib-dir=DIR],
- [Directory where the libcouchbase libraries may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need libcouchbase-lib-dir)
- ;;
- yes)
- ;;
- *)
- libcouchbase_lib_dir="$withval"
- ;;
- esac])
-
- dnl extra argument: --with-libcouchbase-dir=DIR
- AC_ARG_WITH(libcouchbase-dir,
- [AS_HELP_STRING([--with-libcouchbase-dir=DIR],
- [Base directory where libcouchbase is installed])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need libcouchbase-dir)
- ;;
- yes)
- ;;
- *)
- libcouchbase_lib_dir="$withval/lib"
- libcouchbase_include_dir="$withval/include"
- ;;
- esac])
-
- dnl ############################################################
- dnl # Check for libcouchbase header files
- dnl ############################################################
-
- have_couchbase="yes"
- smart_try_dir="$libcouchbase_include_dir"
- FR_SMART_CHECK_INCLUDE([libcouchbase/couchbase.h])
- if test "x$ac_cv_header_libcouchbase_couchbase_h" != "xyes"; then
- have_couchbase="no"
- AC_MSG_WARN([libcouchbase headers not found. Use --with-libcouchbase-include-dir=<path>.])
- fi
-
- dnl ############################################################
- dnl # Check for libcouchbase libraries
- dnl ############################################################
-
- smart_try_dir="$libcouchbase_lib_dir"
- FR_SMART_CHECK_LIB([couchbase], [lcb_get_version])
- if test "x$ac_cv_lib_couchbase_lcb_get_version" != "xyes"; then
- have_couchbase="no"
- AC_MSG_WARN([libcouchbase libraries not found. Use --with-libcouchbase-lib-dir=<path>.])
- fi
-
- if test x"$have_couchbase" != x"yes"; then
- fail="$fail libcouchbase"
- fi
+AC_PROG_CC
+AC_PROG_CPP
+
+dnl ############################################################
+dnl # Check for libcouchbase
+dnl ############################################################
+
+dnl extra argument: --with-libcouchbase-include-dir=DIR
+libcouchbase_include_dir=
+AC_ARG_WITH(libcouchbase-include-dir,
+ [AS_HELP_STRING([--with-libcouchbase-include-dir=DIR],
+ [Directory where the libcouchbase includes may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need libcouchbase-include-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ libcouchbase_include_dir="$withval"
+ ;;
+ esac])
+
+dnl extra argument: --with-libcouchbase-lib-dir=DIR
+libcouchbase_lib_dir=
+AC_ARG_WITH(libcouchbase-lib-dir,
+[AS_HELP_STRING([--with-libcouchbase-lib-dir=DIR],
+ [Directory where the libcouchbase libraries may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need libcouchbase-lib-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ libcouchbase_lib_dir="$withval"
+ ;;
+ esac])
+
+dnl extra argument: --with-libcouchbase-dir=DIR
+AC_ARG_WITH(libcouchbase-dir,
+[AS_HELP_STRING([--with-libcouchbase-dir=DIR],
+ [Base directory where libcouchbase is installed])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need libcouchbase-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ libcouchbase_lib_dir="$withval/lib"
+ libcouchbase_include_dir="$withval/include"
+ ;;
+ esac])
+
+dnl ############################################################
+dnl # Check for libcouchbase header files
+dnl ############################################################
+
+have_couchbase="yes"
+
+smart_try_dir="$libcouchbase_include_dir"
+FR_SMART_CHECK_INCLUDE([libcouchbase/couchbase.h])
+if test "x$ac_cv_header_libcouchbase_couchbase_h" != "xyes"; then
+ have_couchbase="no"
+ AC_MSG_WARN([libcouchbase headers not found. Use --with-libcouchbase-include-dir=<path>.])
+fi
+
+dnl ############################################################
+dnl # Check for libcouchbase libraries
+dnl ############################################################
+
+smart_try_dir="$libcouchbase_lib_dir"
+FR_SMART_CHECK_LIB([couchbase], [lcb_get_version])
+if test "x$ac_cv_lib_couchbase_lcb_get_version" != "xyes"; then
+ have_couchbase="no"
+ AC_MSG_WARN([libcouchbase libraries not found. Use --with-libcouchbase-lib-dir=<path>.])
+fi
+
+if test x"$have_couchbase" != x"yes"; then
+ fail="$fail libcouchbase"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
+AC_PROG_CC
- for foo in `find ./types -name configure -print`; do
- bar=`echo $foo | sed 's%/configure$%%g'`
- eapsubdirs="$eapsubdirs $bar"
- done
+for foo in `find ./types -name configure -print`; do
+ bar=`echo $foo | sed 's%/configure$%%g'`
+ eapsubdirs="$eapsubdirs $bar"
+done
- dnl # don't ask... this is done to avoid autoconf stupidities.
- ln -s ../../../install-sh install-sh
+dnl # don't ask... this is done to avoid autoconf stupidities.
+ln -s ../../../install-sh install-sh
- dnl #
- dnl # Don't change the variable name here. Autoconf goes bonkers
- dnl # if you do.
- dnl #
- AC_CONFIG_SUBDIRS($eapsubdirs)
- rm install-sh
-
- dnl #
- dnl # Don't bother looking for errors in the child directories
- dnl #
+AC_CONFIG_SUBDIRS($eapsubdirs)
+rm install-sh
FR_MODULE_END_TESTS
AC_SUBST(eaptypes)
AC_SUBST(mod_ldflags)
AC_SUBST(mod_cflags)
+
AC_OUTPUT
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
-
- FR_SMART_CHECK_LIB(idn, idna_to_ascii_8z)
- if test "x$ac_cv_lib_idn_idna_to_ascii_8z" != "xyes"; then
- fail="$fail libidn"
- fi
-
- FR_SMART_CHECK_INCLUDE(idna.h)
- if test "$ac_cv_header_idna_h" != "yes"; then
- fail="$fail idna.h"
- fi
+AC_PROG_CC
+AC_PROG_CPP
+
+FR_SMART_CHECK_LIB(idn, idna_to_ascii_8z)
+if test "x$ac_cv_lib_idn_idna_to_ascii_8z" != "xyes"; then
+ fail="$fail libidn"
+fi
+
+FR_SMART_CHECK_INCLUDE(idna.h)
+if test "$ac_cv_header_idna_h" != "yes"; then
+ fail="$fail idna.h"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
+AC_PROG_CC
+AC_PROG_CPP
- dnl extra argument: --with-rlm-krb5-dir
- rlm_krb5_dir=
- AC_ARG_WITH(rlm-krb5-dir,
- [ --with-rlm-krb5-dir=DIR Directory for krb5 files []],
+dnl extra argument: --with-rlm-krb5-dir
+rlm_krb5_dir=
+AC_ARG_WITH(rlm-krb5-dir,
+ [ --with-rlm-krb5-dir=DIR Directory for krb5 files []],
[ case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need rlm-krb5-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
rlm_krb5_dir="$withval"
;;
- esac ]
- )
-
- AC_PATH_PROG(krb5_config, krb5-config, not-found, [${rlm_krb5_dir}/bin:${PATH}:/usr/bin:/usr/local/bin])
- dnl #
- dnl # If we can find krb5-config we can get the version of the library and determine
- dnl # whether it's safe to enable threading.
- dnl #
- if test "$krb5_config" != 'not-found'; then
- AC_MSG_CHECKING([krb5-config CFLAGS])
- SMART_CPPFLAGS=$($krb5_config --cflags)
- SMART_CPPFLAGS=[$(echo "$SMART_CPPFLAGS" | sed 's/-I[ ]*/-isystem /g')]
- AC_MSG_RESULT("$SMART_CPPFLAGS")
-
- AC_MSG_CHECKING([krb5-config LDFLAGS])
- SMART_LIBS=$($krb5_config --libs)
- AC_MSG_RESULT(${SMART_LIBS})
-
- AC_MSG_CHECKING([krb5-config reported version])
- krb5_version_raw=$($krb5_config --version)
-
- dnl # AWK originally from from https://github.com/hpc/lustre
- krb5_version=$(echo "$krb5_version_raw" | head -n 1 | \
- awk '{split($(4),v,"."); if (v@<:@"3"@:>@ == "") v@<:@"3"@:>@ = "0"; print v@<:@"1"@:>@v@<:@"2"@:>@v@<:@"3"@:>@ }')
- AC_MSG_RESULT([${krb5_version_raw} ($krb5_version)])
-
- AC_MSG_CHECKING([krb5-config reported vendor])
- krb5_vendor=$($krb5_config --vendor)
- AC_MSG_RESULT([${krb5_vendor}])
-
- AC_MSG_CHECKING([canonical API type])
- if test "$krb5_vendor" = "Massachusetts Institute of Technology" || \
- echo "$krb5_vendor" | grep -i 'MIT' > /dev/null 2>&1 || \
- echo "$krb5_version_raw" | grep -i 'MIT' > /dev/null 2>&1 ; then
- AC_MSG_RESULT([MIT])
- krb5_api_type='mit'
- else
- AC_MSG_RESULT([HEIMDAL])
- krb5_api_type='heimdal'
- fi
+ esac ]
+)
+
+AC_PATH_PROG(krb5_config, krb5-config, not-found, [${rlm_krb5_dir}/bin:${PATH}:/usr/bin:/usr/local/bin])
+dnl #
+dnl # If we can find krb5-config we can get the version of the library and determine
+dnl # whether it's safe to enable threading.
+dnl #
+if test "$krb5_config" != 'not-found'; then
+ AC_MSG_CHECKING([krb5-config CFLAGS])
+ SMART_CPPFLAGS=$($krb5_config --cflags)
+ SMART_CPPFLAGS=[$(echo "$SMART_CPPFLAGS" | sed 's/-I[ ]*/-isystem /g')]
+ AC_MSG_RESULT("$SMART_CPPFLAGS")
+
+ AC_MSG_CHECKING([krb5-config LDFLAGS])
+ SMART_LIBS=$($krb5_config --libs)
+ AC_MSG_RESULT(${SMART_LIBS})
+
+ AC_MSG_CHECKING([krb5-config reported version])
+ krb5_version_raw=$($krb5_config --version)
+
+ dnl # AWK originally from from https://github.com/hpc/lustre
+ krb5_version=$(echo "$krb5_version_raw" | head -n 1 | \
+ awk '{split($(4),v,"."); if (v@<:@"3"@:>@ == "") v@<:@"3"@:>@ = "0"; print v@<:@"1"@:>@v@<:@"2"@:>@v@<:@"3"@:>@ }')
+ AC_MSG_RESULT([${krb5_version_raw} ($krb5_version)])
+
+ AC_MSG_CHECKING([krb5-config reported vendor])
+ krb5_vendor=$($krb5_config --vendor)
+ AC_MSG_RESULT([${krb5_vendor}])
+
+ AC_MSG_CHECKING([canonical API type])
+ if test "$krb5_vendor" = "Massachusetts Institute of Technology" || \
+ echo "$krb5_vendor" | grep -i 'MIT' > /dev/null 2>&1 || \
+ echo "$krb5_version_raw" | grep -i 'MIT' > /dev/null 2>&1 ; then
+ AC_MSG_RESULT([MIT])
+ krb5_api_type='mit'
else
- smart_try_dir="$rlm_krb5_dir/include"
- FR_SMART_CHECK_INCLUDE(krb5.h)
- if test "$ac_cv_header_krb5_h" != "yes"; then
- fail="$fail krb5.h"
- fi
-
- krb5libcrypto=
- smart_try_dir="$rlm_krb5_dir/lib"
- FR_SMART_CHECK_LIB(k5crypto, krb5_encrypt_data)
- if test "x$ac_cv_lib_k5crypto_krb5_encrypt_data" = xyes; then
- krb5libcrypto="-lk5crypto"
- fi
-
- if test "x$krb5libcrypto" = x; then
- FR_SMART_CHECK_LIB(crypto, DH_new)
- if test "x$ac_cv_lib_crypto_DH_new" = xyes; then
- krb5libcrypto="-lcrypto"
- fi
- fi
+ AC_MSG_RESULT([HEIMDAL])
+ krb5_api_type='heimdal'
+ fi
+else
+ smart_try_dir="$rlm_krb5_dir/include"
+ FR_SMART_CHECK_INCLUDE(krb5.h)
+ if test "$ac_cv_header_krb5_h" != "yes"; then
+ fail="$fail krb5.h"
+ fi
- if test "x$krb5libcrypto" = x; then
- AC_MSG_WARN([neither krb5 'k5crypto' nor 'crypto' libraries are found!])
- fi
+ krb5libcrypto=
+ smart_try_dir="$rlm_krb5_dir/lib"
+ FR_SMART_CHECK_LIB(k5crypto, krb5_encrypt_data)
+ if test "x$ac_cv_lib_k5crypto_krb5_encrypt_data" = xyes; then
+ krb5libcrypto="-lk5crypto"
+ fi
- FR_SMART_CHECK_LIB(com_err, set_com_err_hook)
- if test "x$ac_cv_lib_com_err_set_com_err_hook" != xyes; then
- AC_MSG_WARN([the comm_err library isn't found!])
+ if test "x$krb5libcrypto" = x; then
+ FR_SMART_CHECK_LIB(crypto, DH_new)
+ if test "x$ac_cv_lib_crypto_DH_new" = xyes; then
+ krb5libcrypto="-lcrypto"
fi
+ fi
- dnl #
- dnl # Only the heimdal version of the library has this function
- dnl #
- FR_SMART_CHECK_LIB(krb5, krb5_verify_user_opt)
- if test "x$ac_cv_lib_krb5_krb5_verify_user_opt" = xyes; then
- krb5_api_type='heimdal'
- else
- krb5_api_type='mit'
-
- FR_SMART_CHECK_LIB(krb5, krb5_get_init_creds_password)
- if test "x$ac_cv_lib_krb5_krb5_get_init_creds_password" != xyes; then
- fail="$fail krb5"
- fi
- fi
+ if test "x$krb5libcrypto" = x; then
+ AC_MSG_WARN([neither krb5 'k5crypto' nor 'crypto' libraries are found!])
+ fi
+ FR_SMART_CHECK_LIB(com_err, set_com_err_hook)
+ if test "x$ac_cv_lib_com_err_set_com_err_hook" != xyes; then
+ AC_MSG_WARN([the comm_err library isn't found!])
fi
dnl #
- dnl # Need to ensure the test program(s) link against the right library
+ dnl # Only the heimdal version of the library has this function
dnl #
- LDFLAGS="${LDFLAGS} ${SMART_LIBS}"
- CFLAGS="${CFLAGS} ${SMART_CPPFLAGS}"
+ FR_SMART_CHECK_LIB(krb5, krb5_verify_user_opt)
+ if test "x$ac_cv_lib_krb5_krb5_verify_user_opt" = xyes; then
+ krb5_api_type='heimdal'
+ else
+ krb5_api_type='mit'
- dnl #
- dnl # Check how to free things returned by krb5_get_error_message
- dnl #
- AC_CHECK_FUNCS([krb5_get_error_message krb5_free_error_string krb5_free_error_message])
- if test "x$ac_cv_func_krb5_get_error_message" = xyes; then
- krb5mod_cflags="${krb5mod_cflags} -DHAVE_KRB5_GET_ERROR_MESSAGE"
- fi
- if test "x$ac_cv_func_krb5_free_error_message" = xyes; then
- krb5mod_cflags="${krb5mod_cflags} -DHAVE_KRB5_FREE_ERROR_MESSAGE"
+ FR_SMART_CHECK_LIB(krb5, krb5_get_init_creds_password)
+ if test "x$ac_cv_lib_krb5_krb5_get_init_creds_password" != xyes; then
+ fail="$fail krb5"
+ fi
fi
- if test "x$ac_cv_func_krb5_free_error_string" = xyes; then
- krb5mod_cflags="${krb5mod_cflags} -DHAVE_KRB5_FREE_ERROR_STRING"
+
+fi
+
+dnl #
+dnl # Need to ensure the test program(s) link against the right library
+dnl #
+LDFLAGS="${LDFLAGS} ${SMART_LIBS}"
+CFLAGS="${CFLAGS} ${SMART_CPPFLAGS}"
+
+dnl #
+dnl # Check how to free things returned by krb5_get_error_message
+dnl #
+AC_CHECK_FUNCS([krb5_get_error_message krb5_free_error_string krb5_free_error_message])
+if test "x$ac_cv_func_krb5_get_error_message" = xyes; then
+ krb5mod_cflags="${krb5mod_cflags} -DHAVE_KRB5_GET_ERROR_MESSAGE"
+fi
+if test "x$ac_cv_func_krb5_free_error_message" = xyes; then
+ krb5mod_cflags="${krb5mod_cflags} -DHAVE_KRB5_FREE_ERROR_MESSAGE"
+fi
+if test "x$ac_cv_func_krb5_free_error_string" = xyes; then
+ krb5mod_cflags="${krb5mod_cflags} -DHAVE_KRB5_FREE_ERROR_STRING"
+fi
+
+dnl #
+dnl # Only check if version checks have not found kerberos to be thread unsafe
+dnl #
+if test "$krb5threadsafe" != "no"; then
+ krb5threadsafe=
+
+ FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe)
+ if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" = xyes; then
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])],
+ [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])],
+ [AC_MSG_WARN(cross compiling: not checking)])
fi
+else
+ krb5threadsafe=""
+fi
+if test "$krb5_api_type" = "mit"; then
dnl #
- dnl # Only check if version checks have not found kerberos to be thread unsafe
+ dnl # This lives in different places depending on the distro
dnl #
- if test "$krb5threadsafe" != "no"; then
- krb5threadsafe=
-
- FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe)
- if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" = xyes; then
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])],
- [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])],
- [AC_MSG_WARN(cross compiling: not checking)])
- fi
- else
- krb5threadsafe=""
- fi
-
- if test "$krb5_api_type" = "mit"; then
- dnl #
- dnl # This lives in different places depending on the distro
- dnl #
- FR_SMART_CHECK_INCLUDE([com_err.h])
- if test "$ac_cv_header_com_err_h" != "yes"; then
- FR_SMART_CHECK_INCLUDE([et/com_err.h])
- if test "$ac_cv_header_et_com_err_h" != "yes"; then
- fail="$fail com_err.h"
- else
- krb5mod_cflags="$krb5mod_cflags -DET_COMM_ERR "
- fi
+ FR_SMART_CHECK_INCLUDE([com_err.h])
+ if test "$ac_cv_header_com_err_h" != "yes"; then
+ FR_SMART_CHECK_INCLUDE([et/com_err.h])
+ if test "$ac_cv_header_et_com_err_h" != "yes"; then
+ fail="$fail com_err.h"
+ else
+ krb5mod_cflags="$krb5mod_cflags -DET_COMM_ERR "
fi
- else
- krb5mod_cflags="$krb5mod_cflags -DHEIMDAL_KRB5"
fi
+else
+ krb5mod_cflags="$krb5mod_cflags -DHEIMDAL_KRB5"
+fi
FR_MODULE_END_TESTS(strict)
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
-
- dnl extra argument: --with-lua-include-dir=DIR
- AC_ARG_WITH(lua-include-dir,
- [AS_HELP_STRING([--with-lua-include-dir=DIR],
- [Directory where the lua includes may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need lua-include-dir)
- ;;
- yes)
- ;;
- *)
- lua_include_dir="$withval"
- ;;
- esac])
-
- if test "x$lua_include_dir" != "x"; then
- LUA_INCLUDE="-I$lua_include_dir"
- fi
-
- dnl extra argument: --with-lua-lib-dir=DIR
- AC_ARG_WITH(lua-lib-dir,
- [AS_HELP_STRING([--with-lua-lib-dir=DIR],
- [Directory where the lua libraries may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need lua-lib-dir)
- ;;
- yes)
- ;;
- *)
- lua_lib_dir="$withval"
- ;;
- esac])
-
- if test "x$lua_lib_dir" != "x"; then
- LDFLAGS="-L$lua_lib_dir"
- fi
-
- dnl #
- dnl # This is the version of Lua we expect to be returned by the Lua headers/Lua libs
- dnl #
- LUA_COMPAT_VERSION=5.1
-
- dnl #
- dnl # First look in the directory structure for LuaJIT 2.0
- dnl #
- LUA_VERSION=jit-2.0
+AC_PROG_CC
+AC_PROG_CPP
+
+dnl extra argument: --with-lua-include-dir=DIR
+AC_ARG_WITH(lua-include-dir,
+ [AS_HELP_STRING([--with-lua-include-dir=DIR],
+ [Directory where the lua includes may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need lua-include-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ lua_include_dir="$withval"
+ ;;
+ esac])
+
+if test "x$lua_include_dir" != "x"; then
+ LUA_INCLUDE="-I$lua_include_dir"
+fi
+
+dnl extra argument: --with-lua-lib-dir=DIR
+AC_ARG_WITH(lua-lib-dir,
+[AS_HELP_STRING([--with-lua-lib-dir=DIR],
+ [Directory where the lua libraries may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need lua-lib-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ lua_lib_dir="$withval"
+ ;;
+ esac])
+
+if test "x$lua_lib_dir" != "x"; then
+ LDFLAGS="-L$lua_lib_dir"
+fi
+
+dnl #
+dnl # This is the version of Lua we expect to be returned by the Lua headers/Lua libs
+dnl #
+LUA_COMPAT_VERSION=5.1
+
+dnl #
+dnl # First look in the directory structure for LuaJIT 2.0
+dnl #
+LUA_VERSION=jit-2.0
+AX_LUA_HEADERS
+dnl #
+dnl # ... then fall back to standard Lua if we can't find LuaJIT
+dnl #
+if test "x$ac_cv_header_lua_h" = "xno"; then
+ LUA_VERSION=5.2
AX_LUA_HEADERS
- dnl #
- dnl # ... then fall back to standard Lua if we can't find LuaJIT
- dnl #
- if test "x$ac_cv_header_lua_h" = "xno"; then
- LUA_VERSION=5.2
- AX_LUA_HEADERS
- fi
+fi
- if test "x$ac_cv_header_lua_h" = "xno"; then
- fail="lua.h"
+if test "x$ac_cv_header_lua_h" = "xno"; then
+ fail="lua.h"
+else
+ if test "x$ax_header_version_match" = "xno"; then
+ fail="lua.h version"
else
- if test "x$ax_header_version_match" = "xno"; then
- fail="lua.h version"
+ AC_CACHE_CHECK([ldflags], [_cv_lua_ldflags],
+ [
+ if test "x$ac_cv_header_luajit_h" = "xno"; then
+ AC_MSG_NOTICE([Falling back to Lua 5.2, for optimal performance rebuild with LuaJIT 2.x.x])
else
- AC_CACHE_CHECK([ldflags], [_cv_lua_ldflags],
- [
- if test "x$ac_cv_header_luajit_h" = "xno"; then
- AC_MSG_NOTICE([Falling back to Lua 5.2, for optimal performance rebuild with LuaJIT 2.x.x])
- else
- AC_MSG_NOTICE([Found LuaJIT headers, module will perform optimally])
- LUA_VERSION=jit-5.1
- fi
+ AC_MSG_NOTICE([Found LuaJIT headers, module will perform optimally])
+ LUA_VERSION=jit-5.1
+ fi
+
+ AX_LUA_LIBS
+ if test "x$_ax_found_lua_libs" = 'xno' && test "x$lua_lib_dir" = "x"; then
+ AS_UNSET([ac_cv_search_dlopen])
+ AS_UNSET([ac_cv_search_exp])
+ AS_UNSET([ac_cv_search_lua_load])
+ LDFLAGS="-L/usr/local/lib/"
AX_LUA_LIBS
- if test "x$_ax_found_lua_libs" = 'xno' && test "x$lua_lib_dir" = "x"; then
- AS_UNSET([ac_cv_search_dlopen])
- AS_UNSET([ac_cv_search_exp])
- AS_UNSET([ac_cv_search_lua_load])
-
- LDFLAGS="-L/usr/local/lib/"
- AX_LUA_LIBS
- fi
-
- if test "x$_ax_found_lua_libs" != 'xyes'; then
- fail="Lua libs"
- fi
- _cv_lua_ldflags="$LUA_LIB $LDFLAGS"
- ])
fi
+
+ if test "x$_ax_found_lua_libs" != 'xyes'; then
+ fail="Lua libs"
+ fi
+ _cv_lua_ldflags="$LUA_LIB $LDFLAGS"
+ ])
fi
+fi
- lua_cflags="$LUA_INCLUDE"
- lua_ldflags="$_cv_lua_ldflags"
+lua_cflags="$LUA_INCLUDE"
+lua_ldflags="$_cv_lua_ldflags"
- if test "x$_ax_found_lua_libs" = 'xyes'; then
- AC_MSG_NOTICE([Lua Library:])
- AC_MSG_NOTICE([ Using Lua version.......... : $ax_cv_lua_version])
- AC_MSG_NOTICE([ Using Lua header version... : $ax_cv_lua_header_version])
- AC_MSG_NOTICE([ Using Lua headers.......... : $lua_cflags])
- AC_MSG_NOTICE([ Using Lua lib.............. : $lua_ldflags])
- fi
+if test "x$_ax_found_lua_libs" = 'xyes'; then
+ AC_MSG_NOTICE([Lua Library:])
+ AC_MSG_NOTICE([ Using Lua version.......... : $ax_cv_lua_version])
+ AC_MSG_NOTICE([ Using Lua header version... : $ax_cv_lua_header_version])
+ AC_MSG_NOTICE([ Using Lua headers.......... : $lua_cflags])
+ AC_MSG_NOTICE([ Using Lua lib.............. : $lua_ldflags])
+fi
FR_MODULE_END_TESTS
AC_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([all.mk rlm_lua.mk libfreeradius-lua.mk])
-AC_OUTPUT # keep this! Don't change!
+AC_OUTPUT
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
-
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
-
- dnl extra argument: --with-mruby-include-dir=DIR
- mruby_include_dir=
- AC_ARG_WITH(mruby-incude-dir,
- [AS_HELP_STRING([--with-mruby-include-dir=DIR],
- [Directory where the mruby includes may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need mruby-include-dir)
- ;;
- yes)
- ;;
- *)
- mruby_include_dir="$withval"
- ;;
- esac])
-
- dnl extra argument: --with-mruby-lib-dir=DIR
- mruby_lib_dir=
- AC_ARG_WITH(mruby-lib-dir,
- [AS_HELP_STRING([--with-mruby-lib-dir=DIR],
- [Directory where the mruby libraries may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need mruby-lib-dir)
- ;;
- yes)
- ;;
- *)
- mruby_lib_dir="$withval"
+AC_PROG_CC
+AC_PROG_CPP
+
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
+
+dnl extra argument: --with-mruby-include-dir=DIR
+mruby_include_dir=
+AC_ARG_WITH(mruby-incude-dir,
+ [AS_HELP_STRING([--with-mruby-include-dir=DIR],
+ [Directory where the mruby includes may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need mruby-include-dir)
;;
- esac])
-
- dnl extra argument: --with-mruby-dir=DIR
- AC_ARG_WITH(mruby-dir,
- [AS_HELP_STRING([--with-mruby-dir=DIR],
- [Base directory where mruby is installed])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need mruby-dir)
- ;;
- yes)
- ;;
- *)
- mruby_lib_dir="$withval/lib"
- mruby_include_dir="$withval/include"
- ;;
- esac])
-
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
-
- smart_try_dir="$mruby_include_dir /usr/include"
- FR_SMART_CHECK_INCLUDE(mruby.h, [])
- if test "x$ac_cv_header_mruby_h" != "xyes"; then
- AC_MSG_WARN([mruby.h not found. Use --with-mruby-include-dir=<path>.])
- fail="$fail mruby.h"
- fi
-
- FR_SMART_CHECK_INCLUDE(mruby/compile.h, [#include <mruby.h>])
- if test "x$ac_cv_header_mruby_compile_h" != "xyes"; then
- AC_MSG_WARN([mruby/compile.h not found. Use --with-mruby-include-dir=<path>.])
- fail="$fail mruby/compile.h"
- fi
-
- FR_SMART_CHECK_INCLUDE(mruby/array.h, [#include <mruby.h>])
- if test "x$ac_cv_header_mruby_array_h" != "xyes"; then
- AC_MSG_WARN([mruby/array.h not found. Use --with-mruby-include-dir=<path>.])
- fail="$fail mruby/array.h"
- fi
-
- old_LIBS=$LIBS
- LIBS="$LIBS -lmruby -lm"
- smart_try_dir="$mruby_lib_dir /usr/lib"
- FR_SMART_CHECK_LIB(mruby, mrb_run)
- LIBS=$old_LIBS
- if test "x$ac_cv_lib_mruby_mrb_run" = "xyes"; then
- mod_ldflags="${SMART_LIBS}"
- else
- AC_MSG_WARN([mruby libraries not found. Use --with-mruby-lib-dir=<path>.])
- fail="$fail libmruby"
- fi
-
- FR_SMART_CHECK_LIB(m, fmod)
- if test "x$ac_cv_lib_m_fmod" = "xyes"; then
- mod_ldflags="${mod_ldflags} ${SMART_LIBS}"
- else
- AC_MSG_WARN([m library not found.])
- fail="$fail libm"
- fi
+ yes)
+ ;;
+ *)
+ mruby_include_dir="$withval"
+ ;;
+ esac])
+
+dnl extra argument: --with-mruby-lib-dir=DIR
+mruby_lib_dir=
+AC_ARG_WITH(mruby-lib-dir,
+ [AS_HELP_STRING([--with-mruby-lib-dir=DIR],
+ [Directory where the mruby libraries may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need mruby-lib-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ mruby_lib_dir="$withval"
+ ;;
+ esac])
+
+dnl extra argument: --with-mruby-dir=DIR
+AC_ARG_WITH(mruby-dir,
+ [AS_HELP_STRING([--with-mruby-dir=DIR],
+ [Base directory where mruby is installed])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need mruby-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ mruby_lib_dir="$withval/lib"
+ mruby_include_dir="$withval/include"
+ ;;
+ esac])
+
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
+
+smart_try_dir="$mruby_include_dir /usr/include"
+FR_SMART_CHECK_INCLUDE(mruby.h, [])
+if test "x$ac_cv_header_mruby_h" != "xyes"; then
+ AC_MSG_WARN([mruby.h not found. Use --with-mruby-include-dir=<path>.])
+ fail="$fail mruby.h"
+fi
+
+FR_SMART_CHECK_INCLUDE(mruby/compile.h, [#include <mruby.h>])
+if test "x$ac_cv_header_mruby_compile_h" != "xyes"; then
+ AC_MSG_WARN([mruby/compile.h not found. Use --with-mruby-include-dir=<path>.])
+ fail="$fail mruby/compile.h"
+fi
+
+FR_SMART_CHECK_INCLUDE(mruby/array.h, [#include <mruby.h>])
+if test "x$ac_cv_header_mruby_array_h" != "xyes"; then
+ AC_MSG_WARN([mruby/array.h not found. Use --with-mruby-include-dir=<path>.])
+ fail="$fail mruby/array.h"
+fi
+
+old_LIBS=$LIBS
+LIBS="$LIBS -lmruby -lm"
+smart_try_dir="$mruby_lib_dir /usr/lib"
+FR_SMART_CHECK_LIB(mruby, mrb_run)
+LIBS=$old_LIBS
+if test "x$ac_cv_lib_mruby_mrb_run" = "xyes"; then
+ mod_ldflags="${SMART_LIBS}"
+else
+ AC_MSG_WARN([mruby libraries not found. Use --with-mruby-lib-dir=<path>.])
+ fail="$fail libmruby"
+fi
+
+FR_SMART_CHECK_LIB(m, fmod)
+if test "x$ac_cv_lib_m_fmod" = "xyes"; then
+ mod_ldflags="${mod_ldflags} ${SMART_LIBS}"
+else
+ AC_MSG_WARN([m library not found.])
+ fail="$fail libm"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
-
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
-
- dnl extra argument: --with-winbind-include-dir=DIR
- winbind_include_dir=
- AC_ARG_WITH(winbind-include-dir,
- [AS_HELP_STRING([--with-winbind-include-dir=DIR],
- [Directory where the winbind includes may be found])],
+AC_PROG_CC
+AC_PROG_CPP
+
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
+
+dnl extra argument: --with-winbind-include-dir=DIR
+winbind_include_dir=
+AC_ARG_WITH(winbind-include-dir,
+[AS_HELP_STRING([--with-winbind-include-dir=DIR],
+ [Directory where the winbind includes may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need winbind-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
winbind_include_dir="$withval"
;;
esac])
- dnl extra argument: --with-winbind-lib-dir=DIR
- winbind_lib_dir=
- AC_ARG_WITH(winbind-lib-dir,
- [AS_HELP_STRING([--with-winbind-lib-dir=DIR],
- [Directory where the winbind libraries may be found])],
+dnl extra argument: --with-winbind-lib-dir=DIR
+winbind_lib_dir=
+AC_ARG_WITH(winbind-lib-dir,
+[AS_HELP_STRING([--with-winbind-lib-dir=DIR],
+ [Directory where the winbind libraries may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need winbind-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
winbind_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-winbind-dir=DIR
- AC_ARG_WITH(winbind-dir,
- [AS_HELP_STRING([--with-winbind-dir=DIR],
- [Base directory where winbind is installed])],
+dnl extra argument: --with-winbind-dir=DIR
+AC_ARG_WITH(winbind-dir,
+[AS_HELP_STRING([--with-winbind-dir=DIR],
+ [Base directory where winbind is installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need winbind-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
winbind_lib_dir="$withval/lib"
winbind_include_dir="$withval/include"
;;
esac])
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
-
- mschap_sources=
- FR_SMART_CHECK_INCLUDE(membership.h)
- if test "x$ac_cv_header_membership_h" = "xyes"; then
- AC_DEFINE([HAVE_MEMBERSHIP_H],[1],[Build with Apple Open Directory support])
- mschap_sources="$mschap_sources opendir.c"
- mod_ldflags="-F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService"
- fi
-
- smart_try_dir="$winbind_include_dir /usr/include/samba-4.0"
- FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h>
- #include <stdbool.h>])
- if test "x$ac_cv_header_wbclient_h" != "xyes"; then
- AC_MSG_WARN([wbclient.h not found. Use --with-winbind-include-dir=<path>.])
- AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
- fi
-
- FR_SMART_CHECK_INCLUDE(core/ntstatus.h, [#include <stdint.h>
- #include <stdbool.h>])
- if test "x$ac_cv_header_core_ntstatus_h" != "xyes"; then
- AC_MSG_WARN([core/ntstatus.h not found. Use --with-winbind-include-dir=<path>.])
- AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
- fi
-
- dnl ############################################################
- dnl # Check for libraries
- dnl ############################################################
-
- if test "x$ac_cv_header_wbclient_h" = "xyes" && \
- test "x$ac_cv_header_core_ntstatus_h" = "xyes"; then
-
- smart_try_dir="$winbind_lib_dir"
- FR_SMART_CHECK_LIB(wbclient, wbcCtxAuthenticateUserEx)
- if test "x$ac_cv_lib_wbclient_wbcCtxAuthenticateUserEx" != "xyes"; then
- AC_MSG_WARN([winbind libraries not found. Use --with-winbind-lib-dir=<path>.])
- AC_MSG_WARN([Samba must be version 4.2.1 or higher to use this feature.])
- else
- mschap_sources="$mschap_sources auth_wbclient.c"
- AC_DEFINE([WITH_AUTH_WINBIND],[1],[Build with direct winbind auth support])
- fi
- fi
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
+
+mschap_sources=
+FR_SMART_CHECK_INCLUDE(membership.h)
+if test "x$ac_cv_header_membership_h" = "xyes"; then
+ AC_DEFINE([HAVE_MEMBERSHIP_H],[1],[Build with Apple Open Directory support])
+ mschap_sources="$mschap_sources opendir.c"
+ mod_ldflags="-F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService"
+fi
+
+smart_try_dir="$winbind_include_dir /usr/include/samba-4.0"
+FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h>
+ #include <stdbool.h>])
+if test "x$ac_cv_header_wbclient_h" != "xyes"; then
+ AC_MSG_WARN([wbclient.h not found. Use --with-winbind-include-dir=<path>.])
+ AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
+fi
+
+FR_SMART_CHECK_INCLUDE(core/ntstatus.h, [#include <stdint.h>
+ #include <stdbool.h>])
+if test "x$ac_cv_header_core_ntstatus_h" != "xyes"; then
+ AC_MSG_WARN([core/ntstatus.h not found. Use --with-winbind-include-dir=<path>.])
+ AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
+fi
+
+dnl ############################################################
+dnl # Check for libraries
+dnl ############################################################
+
+if test "x$ac_cv_header_wbclient_h" = "xyes" && \
+ test "x$ac_cv_header_core_ntstatus_h" = "xyes"; then
+
+ smart_try_dir="$winbind_lib_dir"
+ FR_SMART_CHECK_LIB(wbclient, wbcCtxAuthenticateUserEx)
+ if test "x$ac_cv_lib_wbclient_wbcCtxAuthenticateUserEx" != "xyes"; then
+ AC_MSG_WARN([winbind libraries not found. Use --with-winbind-lib-dir=<path>.])
+ AC_MSG_WARN([Samba must be version 4.2.1 or higher to use this feature.])
+ else
+ mschap_sources="$mschap_sources auth_wbclient.c"
+ AC_DEFINE([WITH_AUTH_WINBIND],[1],[Build with direct winbind auth support])
+ fi
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
-
- mod_ldflags="${mod_ldflags} -F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService"
-
- FR_SMART_CHECK_INCLUDE(membership.h)
- if test "$ac_cv_header_membership_h" != "yes"; then
- fail="$fail membership.h"
- else
- AC_CHECK_DECLS(mbr_check_service_membership,
- [mod_cflags="${mod_cflags} -DHAVE_DECL_MBR_CHECK_SERVICE_MEMBERSHIP"],
- [],[#include <membership.h>])
- AC_CHECK_DECLS(mbr_check_membership_refresh,
- [mod_cflags="${mod_cflags} -DHAVE_DECL_MBR_CHECK_MEMBERSHIP_REFRESH"],
- [],[#include <membership.h>])
- fi
+AC_PROG_CC
+AC_PROG_CPP
+
+mod_ldflags="${mod_ldflags} -F /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks -framework DirectoryService"
+
+FR_SMART_CHECK_INCLUDE(membership.h)
+if test "$ac_cv_header_membership_h" != "yes"; then
+ fail="$fail membership.h"
+else
+ AC_CHECK_DECLS(mbr_check_service_membership,
+ [mod_cflags="${mod_cflags} -DHAVE_DECL_MBR_CHECK_SERVICE_MEMBERSHIP"],
+ [],[#include <membership.h>])
+ AC_CHECK_DECLS(mbr_check_membership_refresh,
+ [mod_cflags="${mod_cflags} -DHAVE_DECL_MBR_CHECK_MEMBERSHIP_REFRESH"],
+ [],[#include <membership.h>])
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
+AC_PROG_CC
+AC_PROG_CPP
- AC_CHECK_LIB(dl, dlopen,
- [ mod_ldflags="-ldl" ]
- )
+AC_CHECK_LIB(dl, dlopen,
+ [ mod_ldflags="-ldl" ]
+)
- AC_CHECK_LIB(pam, pam_start,
- [ mod_ldflags="-lpam $mod_ldflags" ],
- [ fail=$fail" libpam" ],
- [ $mod_ldflags ]
- )
+AC_CHECK_LIB(pam, pam_start,
+ [ mod_ldflags="-lpam $mod_ldflags" ],
+ [ fail=$fail" libpam" ],
+ [ $mod_ldflags ]
+)
dnl #
dnl # Yes, these DO have to be on separate lines,
dnl # otherwise autoheader won't pick them up.
dnl #
- AC_CHECK_HEADERS( \
- security/pam_appl.h \
- pam/pam_appl.h \
- )
- mod_cflags="-I."
+AC_CHECK_HEADERS( \
+ security/pam_appl.h \
+ pam/pam_appl.h \
+)
+mod_cflags="-I."
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
-
- dnl put configuration checks here.
- dnl set $fail to what's missing, on fatal errors.
- dnl use AC_MSG_WARN() on important messages.
-
- AX_WITH_PROG([PERL],[perl],[not-found],[${PATH}:/usr/bin:/usr/local/bin])
- if test "$PERL" = "not-found" -o ! -x "$PERL"; then
- fail=$fail" perl"
- else
- old_CFLAGS="${CFLAGS}"
- old_LIBS="${LIBS}"
-
- dnl ############################################################
- dnl # Call ExtUtils::Embed to get compiler flags
- dnl ############################################################
- AC_MSG_NOTICE([Calling ExtUtils::Embed to get 'ccopts'])
- perl_cflags=$($PERL -MExtUtils::Embed -e ccopts)
-
- AC_MSG_NOTICE([ExtUtil's ccopts were \"${perl_cflags}\"])
-
- mod_cflags=`echo $perl_cflags | sed -e '\
- s/-I[ ]*/-isystem /g;\
- s/-arch [^ ]*//g;\
- s/ / /g;\
- s/^ *//;\
- s/ *$//;\
- s/-fstack-clash-protection[[[:blank:]]]*//g; \
- '`
-
- AC_MSG_NOTICE([Sanitized ccopts are \"${mod_cflags}\"])
-
- CFLAGS="${mod_cflags} ${CFLAGS}"
-
- dnl ############################################################
- dnl # Call ExtUtils::Embed to get linker flags
- dnl ############################################################
- AC_MSG_NOTICE([Calling ExtUtils::Embed to get 'ldflags'])
- perl_ldflags=$($PERL -MExtUtils::Embed -e ldopts)
-
- AC_MSG_NOTICE([ExtUtil's ldopts were \"${perl_ldflags}\"])
-
- mod_ldflags=`echo $perl_ldflags | sed -e '\
- s/-arch [^ ]*//g;\
- s/ / /g;\
- s/^ *//;\
- s/ *$//;\
- '`
-
- AC_MSG_NOTICE([Sanitized ldopts are \"${mod_ldflags}\"])
-
- LIBS="${mod_ldflags} ${LIBS}"
-
- dnl ############################################################
- dnl # Check required headers are available
- dnl ############################################################
- smart_try_dir=
- FR_SMART_CHECK_INCLUDE(EXTERN.h)
- if test "x$ac_cv_header_EXTERN_h" != "xyes"; then
- fail="$fail EXTERN.h"
- fi
-
- FR_SMART_CHECK_INCLUDE(perl.h, [#include <EXTERN.h>])
- if test "x$ac_cv_header_perl_h" != "xyes"; then
- fail="$fail EXTERN.h"
- fi
-
- dnl ############################################################
- dnl # Link test functions
- dnl ############################################################
- AC_MSG_CHECKING([we can link to boot_DynaLoader])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
- extern char boot_DynaLoader();
- boot_DynaLoader();
- ]])],[LINKS="yes"],[LINKS="no"])
-
- AC_MSG_RESULT($LINKS)
- if test "x$LINKS" = "xno"; then
- fail="$fail libperl.so"
- fi
-
- AC_MSG_CHECKING([we can link to Perl_hv_store()])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
- extern char Perl_hv_store();
- Perl_hv_store();
- ]])],[LINKS="yes"],[LINKS="no"])
-
- AC_MSG_RESULT($LINKS)
- if test "x$LINKS" = "xno"; then
- fail="$fail libperl.so"
- fi
-
- CFLAGS="$old_CFLAGS"
- LIBS="$old_LIBS"
+AC_PROG_CC
+AC_PROG_CPP
+
+AX_WITH_PROG([PERL],[perl],[not-found],[${PATH}:/usr/bin:/usr/local/bin])
+if test "$PERL" = "not-found" -o ! -x "$PERL"; then
+ fail=$fail" perl"
+else
+ old_CFLAGS="${CFLAGS}"
+ old_LIBS="${LIBS}"
+
+ dnl ############################################################
+ dnl # Call ExtUtils::Embed to get compiler flags
+ dnl ############################################################
+ AC_MSG_NOTICE([Calling ExtUtils::Embed to get 'ccopts'])
+ perl_cflags=$($PERL -MExtUtils::Embed -e ccopts)
+
+ AC_MSG_NOTICE([ExtUtil's ccopts were \"${perl_cflags}\"])
+
+ mod_cflags=`echo $perl_cflags | sed -e '\
+ s/-I[ ]*/-isystem /g;\
+ s/-arch [^ ]*//g;\
+ s/ / /g;\
+ s/^ *//;\
+ s/ *$//;\
+ s/-fstack-clash-protection[[[:blank:]]]*//g; \
+ '`
+
+ AC_MSG_NOTICE([Sanitized ccopts are \"${mod_cflags}\"])
+
+ CFLAGS="${mod_cflags} ${CFLAGS}"
+
+ dnl ############################################################
+ dnl # Call ExtUtils::Embed to get linker flags
+ dnl ############################################################
+ AC_MSG_NOTICE([Calling ExtUtils::Embed to get 'ldflags'])
+ perl_ldflags=$($PERL -MExtUtils::Embed -e ldopts)
+
+ AC_MSG_NOTICE([ExtUtil's ldopts were \"${perl_ldflags}\"])
+
+ mod_ldflags=`echo $perl_ldflags | sed -e '\
+ s/-arch [^ ]*//g;\
+ s/ / /g;\
+ s/^ *//;\
+ s/ *$//;\
+ '`
+
+ AC_MSG_NOTICE([Sanitized ldopts are \"${mod_ldflags}\"])
+
+ LIBS="${mod_ldflags} ${LIBS}"
+
+ dnl ############################################################
+ dnl # Check required headers are available
+ dnl ############################################################
+ smart_try_dir=
+ FR_SMART_CHECK_INCLUDE(EXTERN.h)
+ if test "x$ac_cv_header_EXTERN_h" != "xyes"; then
+ fail="$fail EXTERN.h"
fi
+ FR_SMART_CHECK_INCLUDE(perl.h, [#include <EXTERN.h>])
+ if test "x$ac_cv_header_perl_h" != "xyes"; then
+ fail="$fail EXTERN.h"
+ fi
+
+ dnl ############################################################
+ dnl # Link test functions
+ dnl ############################################################
+ AC_MSG_CHECKING([we can link to boot_DynaLoader])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
+ extern char boot_DynaLoader();
+ boot_DynaLoader();
+ ]])],[LINKS="yes"],[LINKS="no"])
+
+ AC_MSG_RESULT($LINKS)
+ if test "x$LINKS" = "xno"; then
+ fail="$fail libperl.so"
+ fi
+
+ AC_MSG_CHECKING([we can link to Perl_hv_store()])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
+ extern char Perl_hv_store();
+ Perl_hv_store();
+ ]])],[LINKS="yes"],[LINKS="no"])
+
+ AC_MSG_RESULT($LINKS)
+ if test "x$LINKS" = "xno"; then
+ fail="$fail libperl.so"
+ fi
+
+ CFLAGS="$old_CFLAGS"
+ LIBS="$old_LIBS"
+fi
+
FR_MODULE_END_TESTS
AC_SUBST(mod_cflags)
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
+AC_PROG_CC
+AC_PROG_CPP
- dnl extra argument: --with-rlm-python-config-bin
- PYHTON_BIN=
- AC_ARG_WITH(rlm-python-config-bin,
- [ --with-rlm-python-config-bin=PATH Path to python-config binary []],
+dnl extra argument: --with-rlm-python-config-bin
+PYHTON_BIN=
+AC_ARG_WITH(rlm-python-config-bin,
+ [ --with-rlm-python-config-bin=PATH Path to python-config binary []],
[ case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need rlm-python-config-bin)
;;
- yes)
+ yes)
;;
- *)
+ *)
PYTHON_CONFIG_BIN="$withval"
;;
- esac ]
+ esac ]
+)
+
+if test "x$PYTHON_CONFIG_BIN" = x; then
+ AC_CHECK_PROGS(PYTHON_CONFIG_BIN, [ python3-config ], not-found, [${PATH}:/usr/bin:/usr/local/bin])
+fi
+
+if test "x$PYTHON_CONFIG_BIN" = "xnot-found"; then
+ fail="python-config"
+else
+ dnl #
+ dnl # It is necessary due to a weird behavior with 'python-config'
+ dnl #
+ old_CFLAGS="$CFLAGS"
+ old_LDFLAGS="$LDFLAGS"
+
+ unset CFLAGS
+ unset LDFLAGS
+
+ dnl #
+ dnl # Not all python3-config versions have --embed. If doesn't
+ dnl # the utility throws an error, and if it does, it omits the
+ dnl # linker argument to link to Python.
+ dnl #
+ if ${PYTHON_CONFIG_BIN} --help 2>&1 | grep '\-\-embed'; then
+ PYTHON_CONFIG_EMBED="--embed"
+ else
+ PYTHON_CONFIG_EMBED=""
+ fi
+
+ python_cflags=`${PYTHON_CONFIG_BIN} --cflags ${PYTHON_CONFIG_EMBED}`
+ AC_MSG_NOTICE([${PYTHON_CONFIG_BIN}'s cflags were "${python_cflags}"])
+
+ dnl # Convert -I to -isystem to get rid of warnings about issues in Python headers
+ dnl # Strip -systemroot
+ dnl # Strip optimisation flags (-O[0-9]?). We decide our optimisation level, not python.
+ dnl # -D_FORTIFY_SOURCE needs -O.
+ dnl # Strip debug symbol flags (-g[0-9]?). We decide on debugging symbols, not python
+ dnl # Strip -W*, we decide what warnings are important
+ dnl # Strip -DNDEBUG
+ dnl # Strip -frecord-gcc-switches, We decide if we need that. not python.
+ dnl # Strip -stack-clash-protection. We don't need it for our module and it's not
+ dnl # supported by clang < 11.
+ dnl # Strip -frecord-gcc-switches. We decide if this needs recording, not python.
+ dnl # Strip specs as they're only supported by GCC and cause warnings under clang
+ dnl # Strip -ffat-lto-objects, We decide if we need that, not python.
+ mod_cflags=`echo " $python_cflags" | sed -e '\
+ s/ -I/ -isystem/g;\
+ s/ -isysroot[[ =]]\{0,1\}[[^-]]*/ /g;\
+ s/ -O[[^[[:blank:]]]]*/ /g;\
+ s/ -Wp,-D_FORTIFY_SOURCE=[[[:digit:]]]/ /g;\
+ s/ -g[[^ ]]*/ /g;\
+ s/ -W[[^ ]]*/ /g;\
+ s/ -DNDEBUG[[[:blank:]]]*/ /g;\
+ s/ -frecord-gcc-switches/ /g;\
+ s/ -fstack-clash-protection[[[:blank:]]]*/ /g;\
+ s/ -specs=[[^ ]]*/ /g;\
+ s/ -ffat-lto-objects/ /g;
+ '`
+ AC_MSG_NOTICE([Sanitized cflags were "${mod_cflags}"])
+
+ python_ldflags=`${PYTHON_CONFIG_BIN} --ldflags ${PYTHON_CONFIG_EMBED}`
+ AC_MSG_NOTICE([${PYTHON_CONFIG_BIN}'s ldflags were "${python_ldflags}"])
+
+ dnl # Strip -Wl,-O1... Is -O even a valid linker flag??
+ dnl # Strip -Wl,-Bsymbolic-functions as thats not always supported or required
+ dnl # Strip -Xlinker -export-dynamic as it causes weird linking issues on Linux
+ dnl # See: https://bugs.python.org/issue36508
+ mod_ldflags=`echo $python_ldflags | sed -e '\
+ s/-Wl,-O[[[:digit:]]][[[:blank:]]]*//g;\
+ s/-Wl,-Bsymbolic-functions[[[:blank:]]]*//g;\
+ s/-Xlinker -export-dynamic//g;\
+ s/-Wl,-stack_size,[[[:digit:]]]*[[[:blank:]]]//g;
+ '`
+ AC_MSG_NOTICE([Sanitized ldflags were "${mod_ldflags}"])
+
+ python_lib=`echo "${mod_ldflags}" | grep -o -E '\-lpython[[0-9.]]+' | sed -e 's/-l//'`
+
+ AC_MSG_NOTICE([Python library is "${python_lib}"])
+
+ AC_MSG_CHECKING([we can link to python libraries])
+
+ CFLAGS=${mod_cflags}
+ LDFLAGS=${mod_ldflags}
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <Python.h>
+ ]],
+ [[
+ Py_SetProgramName("test")
+ ]])],
+ [LINKS="yes"],
+ [LINKS="no"]
)
- if test "x$PYTHON_CONFIG_BIN" = x; then
- AC_CHECK_PROGS(PYTHON_CONFIG_BIN, [ python3-config ], not-found, [${PATH}:/usr/bin:/usr/local/bin])
+ AC_MSG_RESULT($LINKS)
+ if test "x$LINKS" = "xno"; then
+ fail="$fail working python libraries"
fi
- if test "x$PYTHON_CONFIG_BIN" = "xnot-found"; then
- fail="python-config"
- else
- dnl #
- dnl # It is necessary due to a weird behavior with 'python-config'
- dnl #
- old_CFLAGS="$CFLAGS"
- old_LDFLAGS="$LDFLAGS"
-
- unset CFLAGS
- unset LDFLAGS
-
- dnl #
- dnl # Not all python3-config versions have --embed. If doesn't
- dnl # the utility throws an error, and if it does, it omits the
- dnl # linker argument to link to Python.
- dnl #
- if ${PYTHON_CONFIG_BIN} --help 2>&1 | grep '\-\-embed'; then
- PYTHON_CONFIG_EMBED="--embed"
- else
- PYTHON_CONFIG_EMBED=""
- fi
-
- python_cflags=`${PYTHON_CONFIG_BIN} --cflags ${PYTHON_CONFIG_EMBED}`
- AC_MSG_NOTICE([${PYTHON_CONFIG_BIN}'s cflags were "${python_cflags}"])
-
- dnl # Convert -I to -isystem to get rid of warnings about issues in Python headers
- dnl # Strip -systemroot
- dnl # Strip optimisation flags (-O[0-9]?). We decide our optimisation level, not python.
- dnl # -D_FORTIFY_SOURCE needs -O.
- dnl # Strip debug symbol flags (-g[0-9]?). We decide on debugging symbols, not python
- dnl # Strip -W*, we decide what warnings are important
- dnl # Strip -DNDEBUG
- dnl # Strip -frecord-gcc-switches, We decide if we need that. not python.
- dnl # Strip -stack-clash-protection. We don't need it for our module and it's not
- dnl # supported by clang < 11.
- dnl # Strip -frecord-gcc-switches. We decide if this needs recording, not python.
- dnl # Strip specs as they're only supported by GCC and cause warnings under clang
- dnl # Strip -ffat-lto-objects, We decide if we need that, not python.
- mod_cflags=`echo " $python_cflags" | sed -e '\
- s/ -I/ -isystem/g;\
- s/ -isysroot[[ =]]\{0,1\}[[^-]]*/ /g;\
- s/ -O[[^[[:blank:]]]]*/ /g;\
- s/ -Wp,-D_FORTIFY_SOURCE=[[[:digit:]]]/ /g;\
- s/ -g[[^ ]]*/ /g;\
- s/ -W[[^ ]]*/ /g;\
- s/ -DNDEBUG[[[:blank:]]]*/ /g;\
- s/ -frecord-gcc-switches/ /g;\
- s/ -fstack-clash-protection[[[:blank:]]]*/ /g;\
- s/ -specs=[[^ ]]*/ /g;\
- s/ -ffat-lto-objects/ /g;
- '`
- AC_MSG_NOTICE([Sanitized cflags were "${mod_cflags}"])
-
- python_ldflags=`${PYTHON_CONFIG_BIN} --ldflags ${PYTHON_CONFIG_EMBED}`
- AC_MSG_NOTICE([${PYTHON_CONFIG_BIN}'s ldflags were "${python_ldflags}"])
-
- dnl # Strip -Wl,-O1... Is -O even a valid linker flag??
- dnl # Strip -Wl,-Bsymbolic-functions as thats not always supported or required
- dnl # Strip -Xlinker -export-dynamic as it causes weird linking issues on Linux
- dnl # See: https://bugs.python.org/issue36508
- mod_ldflags=`echo $python_ldflags | sed -e '\
- s/-Wl,-O[[[:digit:]]][[[:blank:]]]*//g;\
- s/-Wl,-Bsymbolic-functions[[[:blank:]]]*//g;\
- s/-Xlinker -export-dynamic//g;\
- s/-Wl,-stack_size,[[[:digit:]]]*[[[:blank:]]]//g;
- '`
- AC_MSG_NOTICE([Sanitized ldflags were "${mod_ldflags}"])
-
- python_lib=`echo "${mod_ldflags}" | grep -o -E '\-lpython[[0-9.]]+' | sed -e 's/-l//'`
-
- AC_MSG_NOTICE([Python library is "${python_lib}"])
-
- AC_MSG_CHECKING([we can link to python libraries])
-
- CFLAGS=${mod_cflags}
- LDFLAGS=${mod_ldflags}
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[
- #include <Python.h>
- ]],
- [[
- Py_SetProgramName("test")
- ]])],
- [LINKS="yes"],
- [LINKS="no"]
- )
-
- AC_MSG_RESULT($LINKS)
- if test "x$LINKS" = "xno"; then
- fail="$fail working python libraries"
- fi
-
- CFLAGS=$old_CFLAGS
- LDFLAGS=$old_LDFLAGS
- fi
+ CFLAGS=$old_CFLAGS
+ LDFLAGS=$old_LDFLAGS
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
- dnl extra argument: --with-rlm-securid-include-dir=DIR
- securid_include_dir=
- AC_ARG_WITH(rlm-securid-include-dir,
- [AS_HELP_STRING([--with-rlm-securid-include-dir=DIR],
- [Directory where the securid includes may be found])],
+dnl extra argument: --with-rlm-securid-include-dir=DIR
+securid_include_dir=
+AC_ARG_WITH(rlm-securid-include-dir,
+[AS_HELP_STRING([--with-rlm-securid-include-dir=DIR],
+ [Directory where the securid includes may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need rlm-securid-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
securid_include_dir="$withval"
;;
esac])
- dnl extra argument: --with-rlm-securid-lib-dir=DIR
- securid_lib_dir=
- AC_ARG_WITH(rlm-securid-lib-dir,
- [AS_HELP_STRING([--with-rlm-securid-lib-dir=DIR],
- [Directory where the securid libraries may be found])],
+dnl extra argument: --with-rlm-securid-lib-dir=DIR
+securid_lib_dir=
+AC_ARG_WITH(rlm-securid-lib-dir,
+[AS_HELP_STRING([--with-rlm-securid-lib-dir=DIR],
+ [Directory where the securid libraries may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need rlm-securid-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
securid_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-rlm-securid-dir=DIR
- AC_ARG_WITH(rlm-securid-dir,
- [AS_HELP_STRING([--with-rlm-securid-dir=DIR],
- [Base directory where securid is installed])],
+dnl extra argument: --with-rlm-securid-dir=DIR
+AC_ARG_WITH(rlm-securid-dir,
+[AS_HELP_STRING([--with-rlm-securid-dir=DIR],
+ [Base directory where securid is installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need rlm-securid-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
securid_lib_dir="$withval/lib"
securid_include_dir="$withval/inc"
- ;;
+ ;;
esac])
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
-
- smart_try_dir="$securid_include_dir"
- FR_SMART_CHECK_INCLUDE(acexport.h)
- if test "x$ac_cv_header_acexport_h" != "xyes"; then
- AC_MSG_WARN([securid headers not found. Use --with-rlm-securid-include-dir=<path>.])
- fail="$fail acexport.h"
- fi
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
+
+smart_try_dir="$securid_include_dir"
+FR_SMART_CHECK_INCLUDE(acexport.h)
+if test "x$ac_cv_header_acexport_h" != "xyes"; then
+ AC_MSG_WARN([securid headers not found. Use --with-rlm-securid-include-dir=<path>.])
+ fail="$fail acexport.h"
+fi
- dnl ############################################################
- dnl # Check for libraries
- dnl ############################################################
+dnl ############################################################
+dnl # Check for libraries
+dnl ############################################################
- dnl try to link to securid
- smart_try_dir="$securid_lib_dir"
- FR_SMART_CHECK_LIB(aceclnt, SD_Init)
- if test "x$ac_cv_lib_aceclnt_SD_Init" != "xyes"
- then
- AC_MSG_WARN([securid libraries not found. Use --with-rlm-securid-lib-dir=<path>.])
- fail="$fail libaceclnt"
- fi
+dnl try to link to securid
+smart_try_dir="$securid_lib_dir"
+FR_SMART_CHECK_LIB(aceclnt, SD_Init)
+if test "x$ac_cv_lib_aceclnt_SD_Init" != "xyes"
+then
+ AC_MSG_WARN([securid libraries not found. Use --with-rlm-securid-lib-dir=<path>.])
+ fail="$fail libaceclnt"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
- dnl extra argument: --with-sigtran-include-dir=DIR
- sigtran_include_dir=
- AC_ARG_WITH(sigtran-include-dir,
+dnl extra argument: --with-sigtran-include-dir=DIR
+sigtran_include_dir=
+AC_ARG_WITH(sigtran-include-dir,
[AS_HELP_STRING([--with-sigtran-include-dir=DIR],
[Directory where osmocore and osmosccp may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need sigtran-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
sigtran_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-sigtran-dir=DIR
- AC_ARG_WITH(sigtran-dir,
+dnl extra argument: --with-sigtran-dir=DIR
+AC_ARG_WITH(sigtran-dir,
[AS_HELP_STRING([--with-sigtran-dir=DIR],
[Base directory where osmocore and osmosccp are installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need sigtran-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
sigtran_lib_dir="$withval/lib"
sigtran_include_dir="$withval/include"
;;
esac])
- dnl ############################################################
- dnl # Check for programs
- dnl ############################################################
-
- AC_PROG_CC
-
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
-
- FR_SMART_PKGCONFIG_INCLUDE([libosmocore], "${sigtran_include_dir}")
- FR_SMART_CHECK_INCLUDE([osmocom/core/msgb.h])
- if test "x$ac_cv_header_osmocom_core_msgb_h" != "xyes"; then
- AC_MSG_WARN([libosmocomcore headers not found. Use --with-sigtran-include-dir=<path>.])
- fail="$fail osmocom/core/msgb.h"
- fi
-
- FR_SMART_PKGCONFIG_INCLUDE([libosmo-sccp], "${sigtran_include_dir}")
- old_cflags="$CFLAGS"
- CFLAGS="${CFLAGS} -include stdint.h -include osmocom/core/linuxlist.h"
- FR_SMART_CHECK_INCLUDE([osmocom/sccp/sccp.h])
- if test "x$ac_cv_header_osmocom_sccp_sccp_h" != "xyes"; then
- AC_MSG_WARN([libosmocom-sccp headers not found. Use --with-sigtran-include-dir=<path>.])
- fail="$fail osmocom/sccp/sccp.h"
- fi
- CFLAGS="$old_cflags"
-
- dnl ############################################################
- dnl # Check for libraries
- dnl ############################################################
-
- FR_SMART_PKGCONFIG_LIB([libosmocore], "${sigtran_lib_dir}")
- FR_SMART_CHECK_LIB([osmocore], msgb_alloc)
- if test "x$ac_cv_lib_osmocore_msgb_alloc" != "xyes"
- then
- AC_MSG_WARN([libosmocore libraries not found. Use --with-sigtran-lib-dir=<path>.])
- fail="$fail libosmocore"
- fi
-
- FR_SMART_PKGCONFIG_LIB([libosmo-sccp], "${sigtran_lib_dir}")
- FR_SMART_CHECK_LIB([osmo-sccp], sccp_connection_connect)
- if test "x$ac_cv_lib_sccp_sccp_connection_connect" != "xyes" -a "x$ac_cv_lib_osmo_sccp_sccp_connection_connect" != "xyes"
- then
- AC_MSG_WARN([libsccp libraries not found. Use --with-sigtran-lib-dir=<path>.])
- fail="$fail libsccp"
- fi
-
- FR_SMART_PKGCONFIG_LIB([libosmo-xua], "${sigtran_lib_dir}")
- FR_SMART_CHECK_LIB([osmo-xua], xua_msg_alloc)
- if test "x$ac_cv_lib_xua_xua_msg_alloc" != "xyes" -a "x$ac_cv_lib_osmo_xua_xua_msg_alloc" != "xyes"
- then
- AC_MSG_WARN([libxua libraries not found. Use --with-sigtran-lib-dir=<path>.])
- fail="$fail libxua"
- fi
-
- FR_SMART_PKGCONFIG_LIB([libosmo-mtp], "${sigtran_lib_dir}")
- FR_SMART_CHECK_LIB([osmo-mtp], mtp_pcap_write_header)
- if test "x$ac_cv_lib_mtp_mtp_pcap_write_header" != "xyes" -a "x$ac_cv_lib_osmo_mtp_mtp_pcap_write_header" != "xyes"
- then
- AC_MSG_WARN([libmtp libraries not found. Use --with-sigtran-lib-dir=<path>.])
- fail="$fail libmtp"
- fi
+dnl ############################################################
+dnl # Check for programs
+dnl ############################################################
+
+AC_PROG_CC
+
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
+
+FR_SMART_PKGCONFIG_INCLUDE([libosmocore], "${sigtran_include_dir}")
+FR_SMART_CHECK_INCLUDE([osmocom/core/msgb.h])
+if test "x$ac_cv_header_osmocom_core_msgb_h" != "xyes"; then
+ AC_MSG_WARN([libosmocomcore headers not found. Use --with-sigtran-include-dir=<path>.])
+ fail="$fail osmocom/core/msgb.h"
+fi
+
+FR_SMART_PKGCONFIG_INCLUDE([libosmo-sccp], "${sigtran_include_dir}")
+old_cflags="$CFLAGS"
+CFLAGS="${CFLAGS} -include stdint.h -include osmocom/core/linuxlist.h"
+FR_SMART_CHECK_INCLUDE([osmocom/sccp/sccp.h])
+if test "x$ac_cv_header_osmocom_sccp_sccp_h" != "xyes"; then
+ AC_MSG_WARN([libosmocom-sccp headers not found. Use --with-sigtran-include-dir=<path>.])
+ fail="$fail osmocom/sccp/sccp.h"
+fi
+CFLAGS="$old_cflags"
+
+dnl ############################################################
+dnl # Check for libraries
+dnl ############################################################
+
+FR_SMART_PKGCONFIG_LIB([libosmocore], "${sigtran_lib_dir}")
+FR_SMART_CHECK_LIB([osmocore], msgb_alloc)
+if test "x$ac_cv_lib_osmocore_msgb_alloc" != "xyes"
+then
+ AC_MSG_WARN([libosmocore libraries not found. Use --with-sigtran-lib-dir=<path>.])
+ fail="$fail libosmocore"
+fi
+
+FR_SMART_PKGCONFIG_LIB([libosmo-sccp], "${sigtran_lib_dir}")
+FR_SMART_CHECK_LIB([osmo-sccp], sccp_connection_connect)
+if test "x$ac_cv_lib_sccp_sccp_connection_connect" != "xyes" -a "x$ac_cv_lib_osmo_sccp_sccp_connection_connect" != "xyes"
+then
+ AC_MSG_WARN([libsccp libraries not found. Use --with-sigtran-lib-dir=<path>.])
+ fail="$fail libsccp"
+fi
+
+FR_SMART_PKGCONFIG_LIB([libosmo-xua], "${sigtran_lib_dir}")
+FR_SMART_CHECK_LIB([osmo-xua], xua_msg_alloc)
+if test "x$ac_cv_lib_xua_xua_msg_alloc" != "xyes" -a "x$ac_cv_lib_osmo_xua_xua_msg_alloc" != "xyes"
+then
+ AC_MSG_WARN([libxua libraries not found. Use --with-sigtran-lib-dir=<path>.])
+ fail="$fail libxua"
+fi
+
+FR_SMART_PKGCONFIG_LIB([libosmo-mtp], "${sigtran_lib_dir}")
+FR_SMART_CHECK_LIB([osmo-mtp], mtp_pcap_write_header)
+if test "x$ac_cv_lib_mtp_mtp_pcap_write_header" != "xyes" -a "x$ac_cv_lib_osmo_mtp_mtp_pcap_write_header" != "xyes"
+then
+ AC_MSG_WARN([libmtp libraries not found. Use --with-sigtran-lib-dir=<path>.])
+ fail="$fail libmtp"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
-
- mysubdirs=
- if test "x$EXPERIMENTAL" = "xyes"; then
- for foo in `find ./drivers -name configure -print`; do
- bar=`echo $foo | sed 's%/configure$%%g'`
- mysubdirs="$mysubdirs $bar"
- done
- else
- for foo in `cat stable`; do
- mysubdirs="$mysubdirs ./drivers/$foo"
- done
- fi
-
- dnl # don't ask... this is done to avoid autoconf stupidities.
- ln -s ../../../install-sh install-sh
-
- dnl #
- dnl # Don't change the variable name here. Autoconf goes bonkers
- dnl # if you do.
- dnl #
- AC_CONFIG_SUBDIRS($mysubdirs)
- rm install-sh
-
- dnl #
- dnl # Don't bother looking for errors in the child directories
- dnl #
+AC_PROG_CC
+
+mysubdirs=
+if test "x$EXPERIMENTAL" = "xyes"; then
+ for foo in `find ./drivers -name configure -print`; do
+ bar=`echo $foo | sed 's%/configure$%%g'`
+ mysubdirs="$mysubdirs $bar"
+ done
+else
+ for foo in `cat stable`; do
+ mysubdirs="$mysubdirs ./drivers/$foo"
+ done
+fi
+
+dnl # don't ask... this is done to avoid autoconf stupidities.
+ln -s ../../../install-sh install-sh
+
+AC_CONFIG_SUBDIRS($mysubdirs)
+rm install-sh
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
- dnl extra argument: --with-cassandra-include-dir=DIR
- cassandra_include_dir=
- AC_ARG_WITH(cassandra-include-dir,
+dnl extra argument: --with-cassandra-include-dir=DIR
+cassandra_include_dir=
+AC_ARG_WITH(cassandra-include-dir,
[AS_HELP_STRING([--with-cassandra-include-dir=DIR],
[Directory where the cassandra includes may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need cassandra-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
cassandra_include_dir="$withval"
;;
esac])
- dnl extra argument: --with-cassandra-lib-dir=DIR
- cassandra_lib_dir=
- AC_ARG_WITH(cassandra-lib-dir,
+dnl extra argument: --with-cassandra-lib-dir=DIR
+cassandra_lib_dir=
+AC_ARG_WITH(cassandra-lib-dir,
[AS_HELP_STRING([--with-cassandra-lib-dir=DIR],
[Directory where the cassandra libraries may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need cassandra-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
cassandra_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-cassandra-dir=DIR
- AC_ARG_WITH(cassandra-dir,
+dnl extra argument: --with-cassandra-dir=DIR
+AC_ARG_WITH(cassandra-dir,
[AS_HELP_STRING([--with-cassandra-dir=DIR],
[Base directory where cassandra is installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need cassandra-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
cassandra_lib_dir="$withval/lib"
cassandra_include_dir="$withval/include"
;;
esac])
- dnl ############################################################
- dnl # Check for programs
- dnl ############################################################
+dnl ############################################################
+dnl # Check for programs
+dnl ############################################################
- AC_PROG_CC
+AC_PROG_CC
- dnl ############################################################
- dnl # Check for libraries
- dnl ############################################################
+dnl ############################################################
+dnl # Check for libraries
+dnl ############################################################
- dnl # try to link to libcassandra
- smart_try_dir="$cassandra_lib_dir"
- FR_SMART_CHECK_LIB(cassandra, cass_statement_new_n)
- dnl # Ensure we use the library we just found the rest of the checks
- LDFLAGS="$SMART_LIBS"
- if test "x$ac_cv_lib_cassandra_cass_statement_new_n" != "xyes"
- then
+dnl # try to link to libcassandra
+smart_try_dir="$cassandra_lib_dir"
+FR_SMART_CHECK_LIB(cassandra, cass_statement_new_n)
+dnl # Ensure we use the library we just found the rest of the checks
+LDFLAGS="$SMART_LIBS"
+if test "x$ac_cv_lib_cassandra_cass_statement_new_n" != "xyes"
+then
AC_MSG_WARN([Cassandra libraries not found. Use --with-cassandra-lib-dir=<path>.])
fail="$fail libcassandra (>= 2.0)"
- fi
+fi
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
- smart_try_dir="$cassandra_include_dir"
- FR_SMART_CHECK_INCLUDE(cassandra.h)
- if test "x$ac_cv_header_cassandra_h" != "xyes"; then
+smart_try_dir="$cassandra_include_dir"
+FR_SMART_CHECK_INCLUDE(cassandra.h)
+if test "x$ac_cv_header_cassandra_h" != "xyes"; then
AC_MSG_WARN([Cassandra headers not found. Use --with-cassandra-include-dir=<path>.])
fail="$fail cassandra.h"
- fi
- CFLAGS="$SMART_CPPFLAGS"
+fi
+CFLAGS="$SMART_CPPFLAGS"
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl extra argument: --with-ibmdb2-include-dir
- ibmdb2_include_dir=
- AC_ARG_WITH(ibmdb2-include-dir,
- [AS_HELP_STRING([--with-ibmdb2-include-dir=DIR],
- [Directory where the IBM-DB2 includes may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need ibmdb2-include-dir)
- ;;
- yes)
- ;;
- *)
- ibmdb2_include_dir="$withval"
- ;;
- esac])
+dnl extra argument: --with-ibmdb2-include-dir
+ibmdb2_include_dir=
+AC_ARG_WITH(ibmdb2-include-dir,
+ [AS_HELP_STRING([--with-ibmdb2-include-dir=DIR],
+ [Directory where the IBM-DB2 includes may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need ibmdb2-include-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ ibmdb2_include_dir="$withval"
+ ;;
+ esac])
- dnl extra argument: --with-ibmdb2-lib-dir
- ibmdb2_lib_dir=
- AC_ARG_WITH(ibmdb2-lib-dir,
- [AS_HELP_STRING([--with-ibmdb2-lib-dir=DIR],
- [Directory where the IBM-DB2 libraries may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need ibmdb2-lib-dir)
- ;;
- yes)
- ;;
- *)
- ibmdb2_lib_dir="$withval"
- ;;
- esac])
+dnl extra argument: --with-ibmdb2-lib-dir
+ibmdb2_lib_dir=
+AC_ARG_WITH(ibmdb2-lib-dir,
+ [AS_HELP_STRING([--with-ibmdb2-lib-dir=DIR],
+ [Directory where the IBM-DB2 libraries may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need ibmdb2-lib-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ ibmdb2_lib_dir="$withval"
+ ;;
+ esac])
- dnl extra argument: --with-ibmdb2-dir
- AC_ARG_WITH(ibmdb2-dir,
- [AS_HELP_STRING([--with-ibmdb2-dir=DIR],
- [Base directory where IBM-DB2 is installed])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need ibmdb2-dir)
- ;;
- yes)
- ;;
- *)
- ibmdb2_lib_dir="$withval/lib"
- ibmdb2_include_dir="$withval/include"
- ;;
- esac])
+dnl extra argument: --with-ibmdb2-dir
+AC_ARG_WITH(ibmdb2-dir,
+ [AS_HELP_STRING([--with-ibmdb2-dir=DIR],
+ [Base directory where IBM-DB2 is installed])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need ibmdb2-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ ibmdb2_lib_dir="$withval/lib"
+ ibmdb2_include_dir="$withval/include"
+ ;;
+ esac])
- dnl Check for SQLConnect in -ldb2
- smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib"
- FR_SMART_CHECK_LIB(db2, SQLConnect)
- if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then
- fail="$fail libdb2"
- fi
+dnl Check for SQLConnect in -ldb2
+smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib"
+FR_SMART_CHECK_LIB(db2, SQLConnect)
+if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then
+ fail="$fail libdb2"
+fi
- dnl Check for sqlcli.h
- smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include"
- FR_SMART_CHECK_INCLUDE(sqlcli.h)
- if test "x$ac_cv_header_sqlcli_h" != xyes; then
- fail="$fail sqlcli.h"
- fi
+dnl Check for sqlcli.h
+smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include"
+FR_SMART_CHECK_INCLUDE(sqlcli.h)
+if test "x$ac_cv_header_sqlcli_h" != xyes; then
+ fail="$fail sqlcli.h"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl extra argument: --with-firebird-include-dir
- firebird_include_dir=
- AC_ARG_WITH(firebird-include-dir,
- [AS_HELP_STRING([--with-firebird-include-dir=DIR],
- [Directory where the firebird includes may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need firebird-include-dir)
- ;;
- yes)
- ;;
- *)
- firebird_include_dir="$withval"
- ;;
- esac])
+dnl extra argument: --with-firebird-include-dir
+firebird_include_dir=
+AC_ARG_WITH(firebird-include-dir,
+ [AS_HELP_STRING([--with-firebird-include-dir=DIR],
+ [Directory where the firebird includes may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need firebird-include-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ firebird_include_dir="$withval"
+ ;;
+ esac])
- dnl extra argument: --with-firebird-lib-dir
- firebird_lib_dir=
- AC_ARG_WITH(firebird-lib-dir,
- [AS_HELP_STRING([--with-firebird-lib-dir=DIR],
- [Directory where the firebird libraries may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need firebird-lib-dir)
- ;;
- yes)
- ;;
- *)
- firebird_lib_dir="$withval"
- ;;
- esac])
+dnl extra argument: --with-firebird-lib-dir
+firebird_lib_dir=
+AC_ARG_WITH(firebird-lib-dir,
+ [AS_HELP_STRING([--with-firebird-lib-dir=DIR],
+ [Directory where the firebird libraries may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need firebird-lib-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ firebird_lib_dir="$withval"
+ ;;
+ esac])
- dnl extra argument: --with-firebird-dir
- AC_ARG_WITH(firebird-dir,
- [AS_HELP_STRING([--with-firebird-dir=DIR],
- [Base directory where firebird is installed])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need firebird-dir)
- ;;
- yes)
- ;;
- *)
- firebird_lib_dir="$withval/lib"
- firebird_include_dir="$withval/include"
- ;;
- esac])
+dnl extra argument: --with-firebird-dir
+AC_ARG_WITH(firebird-dir,
+ [AS_HELP_STRING([--with-firebird-dir=DIR],
+ [Base directory where firebird is installed])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need firebird-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ firebird_lib_dir="$withval/lib"
+ firebird_include_dir="$withval/include"
+ ;;
+ esac])
- dnl Check for isc_attach_database in -lfbclient
- smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib"
- FR_SMART_CHECK_LIB(fbclient, isc_attach_database)
- if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then
- fail="$fail libfbclient"
- fi
+dnl Check for isc_attach_database in -lfbclient
+smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib"
+FR_SMART_CHECK_LIB(fbclient, isc_attach_database)
+if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then
+ fail="$fail libfbclient"
+fi
- dnl Check for ibase.h
- smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include"
- FR_SMART_CHECK_INCLUDE(ibase.h)
- if test "x$ac_cv_header_ibase_h" != xyes; then
- fail="$fail ibase.h"
- fi
+dnl Check for ibase.h
+smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include"
+FR_SMART_CHECK_INCLUDE(ibase.h)
+if test "x$ac_cv_header_ibase_h" != xyes; then
+ fail="$fail ibase.h"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
- dnl extra argument: --with-freetds-include-dir=DIR
- freetds_include_dir=
- AC_ARG_WITH(freetds-include-dir,
- [AS_HELP_STRING([--with-freetds-include-dir=DIR],
- [Directory where the freetds includes may be found])],
+dnl extra argument: --with-freetds-include-dir=DIR
+freetds_include_dir=
+AC_ARG_WITH(freetds-include-dir,
+[AS_HELP_STRING([--with-freetds-include-dir=DIR],
+ [Directory where the freetds includes may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need freetds-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
freetds_include_dir="$withval"
;;
esac])
- dnl extra argument: --with-freetds-lib-dir=DIR
- freetds_lib_dir=
- AC_ARG_WITH(freetds-lib-dir,
- [AS_HELP_STRING([--with-freetds-lib-dir=DIR],
- [Directory where the freetds libraries may be found])],
+dnl extra argument: --with-freetds-lib-dir=DIR
+freetds_lib_dir=
+AC_ARG_WITH(freetds-lib-dir,
+[AS_HELP_STRING([--with-freetds-lib-dir=DIR],
+ [Directory where the freetds libraries may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need freetds-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
freetds_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-freetds-dir=DIR
- AC_ARG_WITH(freetds-dir,
- [AS_HELP_STRING([--with-freetds-dir=DIR],
- [Base directory where freetds is installed])],
+dnl extra argument: --with-freetds-dir=DIR
+AC_ARG_WITH(freetds-dir,
+[AS_HELP_STRING([--with-freetds-dir=DIR],
+ [Base directory where freetds is installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need freetds-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
freetds_lib_dir="$withval/lib"
freetds_include_dir="$withval/include"
;;
esac])
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
- smart_try_dir="$freetds_include_dir"
- FR_SMART_CHECK_INCLUDE(ctpublic.h)
- if test "x$ac_cv_header_ctpublic_h" != "xyes"; then
- AC_MSG_WARN([freetds headers not found. Use --with-freetds-include-dir=<path>.])
- fail="$fail ctpublic.h"
- fi
+smart_try_dir="$freetds_include_dir"
+FR_SMART_CHECK_INCLUDE(ctpublic.h)
+if test "x$ac_cv_header_ctpublic_h" != "xyes"; then
+ AC_MSG_WARN([freetds headers not found. Use --with-freetds-include-dir=<path>.])
+ fail="$fail ctpublic.h"
+fi
- dnl ############################################################
- dnl # Check for libraries
- dnl ############################################################
+dnl ############################################################
+dnl # Check for libraries
+dnl ############################################################
- dnl try to link to freetds
- smart_try_dir="$freetds_lib_dir"
- FR_SMART_CHECK_LIB(ct, ct_command)
- if test "x$ac_cv_lib_ct_ct_command" != "xyes"
- then
- AC_MSG_WARN([freetds libraries not found. Use --with-freetds-lib-dir=<path>.])
- fail="$fail libct"
- fi
+dnl try to link to freetds
+smart_try_dir="$freetds_lib_dir"
+FR_SMART_CHECK_LIB(ct, ct_command)
+if test "x$ac_cv_lib_ct_ct_command" != "xyes"
+then
+ AC_MSG_WARN([freetds libraries not found. Use --with-freetds-lib-dir=<path>.])
+ fail="$fail libct"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
-
- dnl extra argument: --with-mysql-include-dir=DIR
- mysql_include_dir=
- AC_ARG_WITH(mysql-include-dir,
- [AS_HELP_STRING([--with-mysql-include-dir=DIR],
- [Directory where the mysql includes may be found])],
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
+
+dnl extra argument: --with-mysql-include-dir=DIR
+mysql_include_dir=
+AC_ARG_WITH(mysql-include-dir,
+[AS_HELP_STRING([--with-mysql-include-dir=DIR],
+ [Directory where the mysql includes may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need mysql-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
mysql_include_dir="$withval"
;;
esac])
- dnl extra argument: --with-mysql-lib-dir=DIR
- mysql_lib_dir=
- AC_ARG_WITH(mysql-lib-dir,
- [AS_HELP_STRING([--with-mysql-lib-dir=DIR],
- [Directory where the mysql libraries may be found])],
+dnl extra argument: --with-mysql-lib-dir=DIR
+mysql_lib_dir=
+AC_ARG_WITH(mysql-lib-dir,
+[AS_HELP_STRING([--with-mysql-lib-dir=DIR],
+ [Directory where the mysql libraries may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need mysql-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
mysql_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-mysql-dir=DIR
- AC_ARG_WITH(mysql-dir,
- [AS_HELP_STRING([--with-mysql-dir=DIR],
- [Base directory where mysql is installed])],
+dnl extra argument: --with-mysql-dir=DIR
+AC_ARG_WITH(mysql-dir,
+[AS_HELP_STRING([--with-mysql-dir=DIR],
+ [Base directory where mysql is installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need mysql-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
mysql_lib_dir="$withval/lib"
mysql_include_dir="$withval/include"
;;
esac])
- dnl extra argument: --with-threads
- mysql_with_threads=yes
- AC_ARG_WITH(threads,
- [AS_HELP_STRING([--with-threads],
- [use threads, if available. (default=yes)])],
+dnl extra argument: --with-threads
+mysql_with_threads=yes
+AC_ARG_WITH(threads,
+[AS_HELP_STRING([--with-threads],
+ [use threads, if available. (default=yes)])],
[case "$withval" in
- no)
+ no)
mysql_with_threads=no
;;
- *)
+ *)
;;
esac])
- dnl ############################################################
- dnl # Check for programs
- dnl ############################################################
-
- AC_PROG_CC
- AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, yes, no)
-
- dnl ############################################################
- dnl # Check for libraries
- dnl ############################################################
-
- dnl # Older versions of mysqlclient packages had two variants libmysqlclient
- dnl # and libmysqlclient_r. libmysqlclient_r is the threadsafe variant that
- dnl # is per-connection threadsafe. If that is available on the system it
- dnl # should be used in preference to libmysqlclient.
- dnl # More recent versions >~ 5.6 have stopped including libmyqlclient_r
- dnl # however (as libmysqlclient is now threadsafe), so we should fall back
- dnl # to libmysqlclient if it is the only one available on the system.
-
- dnl # Use linker arguments from mysql_config if available, then fallback
- dnl # to hunting around if we can't find the client library.
- if test "x$MYSQL_CONFIG" = "xyes"; then
- mysql_libs="$(mysql_config --libs_r)"
+dnl ############################################################
+dnl # Check for programs
+dnl ############################################################
+
+AC_PROG_CC
+AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, yes, no)
+
+dnl ############################################################
+dnl # Check for libraries
+dnl ############################################################
+
+dnl # Older versions of mysqlclient packages had two variants libmysqlclient
+dnl # and libmysqlclient_r. libmysqlclient_r is the threadsafe variant that
+dnl # is per-connection threadsafe. If that is available on the system it
+dnl # should be used in preference to libmysqlclient.
+dnl # More recent versions >~ 5.6 have stopped including libmyqlclient_r
+dnl # however (as libmysqlclient is now threadsafe), so we should fall back
+dnl # to libmysqlclient if it is the only one available on the system.
+
+dnl # Use linker arguments from mysql_config if available, then fallback
+dnl # to hunting around if we can't find the client library.
+if test "x$MYSQL_CONFIG" = "xyes"; then
+ mysql_libs="$(mysql_config --libs_r)"
+ old_LIBS="$LIBS"
+ LIBS="$mysql_libs $LIBS"
+
+ dnl # First check for libmysqlclient_r
+ AC_MSG_CHECKING([for mysql_init in -lmysqlclient_r (using mysql_config)])
+ AC_TRY_LINK_FUNC([mysql_init], [have_libmysqlclient_r=yes])
+
+ LIBS="$old_LIBS"
+ if test "x$have_libmysqlclient_r" = "xyes"; then
+ AC_MSG_RESULT(yes)
+
+ have_a_libmysqlclient='yes'
+ SMART_LIBS="$mysql_libs $SMART_LIBS"
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ dnl # If that's not available check for libmysqlclient
+ if test "x$have_a_libmysqlclient" != "xyes"; then
+ mysql_libs="$(mysql_config --libs)"
old_LIBS="$LIBS"
LIBS="$mysql_libs $LIBS"
- dnl # First check for libmysqlclient_r
- AC_MSG_CHECKING([for mysql_init in -lmysqlclient_r (using mysql_config)])
- AC_TRY_LINK_FUNC([mysql_init], [have_libmysqlclient_r=yes])
+ AC_MSG_CHECKING([for mysql_init in -lmysqlclient (using mysql_config)])
+ AC_TRY_LINK_FUNC([mysql_init], [have_libmysqlclient=yes])
LIBS="$old_LIBS"
- if test "x$have_libmysqlclient_r" = "xyes"; then
+ if test "x$have_libmysqlclient" = "xyes"; then
AC_MSG_RESULT(yes)
- have_a_libmysqlclient='yes'
+ have_a_libmysqlclient=yes
SMART_LIBS="$mysql_libs $SMART_LIBS"
else
AC_MSG_RESULT(no)
fi
-
- dnl # If that's not available check for libmysqlclient
- if test "x$have_a_libmysqlclient" != "xyes"; then
- mysql_libs="$(mysql_config --libs)"
- old_LIBS="$LIBS"
- LIBS="$mysql_libs $LIBS"
-
- AC_MSG_CHECKING([for mysql_init in -lmysqlclient (using mysql_config)])
- AC_TRY_LINK_FUNC([mysql_init], [have_libmysqlclient=yes])
-
- LIBS="$old_LIBS"
- if test "x$have_libmysqlclient" = "xyes"; then
- AC_MSG_RESULT(yes)
-
- have_a_libmysqlclient=yes
- SMART_LIBS="$mysql_libs $SMART_LIBS"
- else
- AC_MSG_RESULT(no)
- fi
- fi
fi
-
- dnl # Check for libmysqlclient_r
- if test "x$have_a_libmysqlclient" != "xyes"; then
- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
- FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init)
- if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then
- have_a_libmysqlclient='yes'
- fi
+fi
+
+dnl # Check for libmysqlclient_r
+if test "x$have_a_libmysqlclient" != "xyes"; then
+ smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
+ FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init)
+ if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then
+ have_a_libmysqlclient='yes'
fi
-
- dnl # Check for libmysqlclient
- if test "x$have_a_libmysqlclient" != "xyes"; then
- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
- FR_SMART_CHECK_LIB(mysqlclient, mysql_init)
- if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then
- have_a_libmysqlclient='yes'
- fi
+fi
+
+dnl # Check for libmysqlclient
+if test "x$have_a_libmysqlclient" != "xyes"; then
+ smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql"
+ FR_SMART_CHECK_LIB(mysqlclient, mysql_init)
+ if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then
+ have_a_libmysqlclient='yes'
fi
-
- if test "x$have_a_libmysqlclient" != "xyes"; then
- AC_MSG_WARN([MySQL libraries not found. Use --with-mysql-lib-dir=<path>.])
- fail="$fail libmysqlclient || libmysqlclient_r"
- fi
-
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
- if test "x$MYSQL_CONFIG" = "xyes"; then
- mod_cflags="$(mysql_config --cflags)"
- old_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $mod_cflags"
- AC_MSG_CHECKING([for mysql.h (using mysql_config --cflags)])
+fi
+
+if test "x$have_a_libmysqlclient" != "xyes"; then
+ AC_MSG_WARN([MySQL libraries not found. Use --with-mysql-lib-dir=<path>.])
+ fail="$fail libmysqlclient || libmysqlclient_r"
+fi
+
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
+if test "x$MYSQL_CONFIG" = "xyes"; then
+ mod_cflags="$(mysql_config --cflags)"
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $mod_cflags"
+ AC_MSG_CHECKING([for mysql.h (using mysql_config --cflags)])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mysql.h>]], [[int a = 1;]])],[have_mysql_h=yes],[])
+ if test "x$have_mysql_h" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_MYSQL_H, [], [Define if you have <mysql.h>])
+ SMART_CPPFLAGS="$SMART_CPPFLAGS $mod_cflags"
+ else
+ AC_MSG_RESULT(no)
+
+ mod_cflags="$(mysql_config --include)"
+ CFLAGS="$old_CFLAGS $mod_cflags"
+ AC_MSG_CHECKING([for mysql.h (using mysql_config --include)])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mysql.h>]], [[int a = 1;]])],[have_mysql_h=yes],[])
if test "x$have_mysql_h" = "xyes"; then
AC_MSG_RESULT(yes)
SMART_CPPFLAGS="$SMART_CPPFLAGS $mod_cflags"
else
AC_MSG_RESULT(no)
-
- mod_cflags="$(mysql_config --include)"
- CFLAGS="$old_CFLAGS $mod_cflags"
- AC_MSG_CHECKING([for mysql.h (using mysql_config --include)])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mysql.h>]], [[int a = 1;]])],[have_mysql_h=yes],[])
- if test "x$have_mysql_h" = "xyes"; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_MYSQL_H, [], [Define if you have <mysql.h>])
- SMART_CPPFLAGS="$SMART_CPPFLAGS $mod_cflags"
- else
- AC_MSG_RESULT(no)
- fi
- fi
- CFLAGS="$old_CFLAGS"
- fi
-
- if test "x$have_mysql_h" != "xyes"; then
- smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include"
- FR_SMART_CHECK_INCLUDE(mysql/mysql.h)
- if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then
- AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>])
- else
- AC_MSG_WARN([MySQL headers not found. Use --with-mysql-include-dir=<path>.])
- fail="$fail mysql.h"
fi
- fi
+ fi
+ CFLAGS="$old_CFLAGS"
+fi
+
+if test "x$have_mysql_h" != "xyes"; then
+ smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include"
+ FR_SMART_CHECK_INCLUDE(mysql/mysql.h)
+ if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then
+ AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>])
+ else
+ AC_MSG_WARN([MySQL headers not found. Use --with-mysql-include-dir=<path>.])
+ fail="$fail mysql.h"
+ fi
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
- dnl extra argument: --with-oracle-include-dir=DIR
- oracle_include_dir=
- AC_ARG_WITH(oracle-include-dir,
+dnl extra argument: --with-oracle-include-dir=DIR
+oracle_include_dir=
+AC_ARG_WITH(oracle-include-dir,
[AS_HELP_STRING([--with-oracle-include-dir=DIR],
[Directory where the oracle includes may be found])],
[case "$withval" in
- no)
- AC_MSG_ERROR(Need oracle-include-dir)
- ;;
- yes)
- ;;
- *)
- oracle_include_dir="$withval"
- ;;
+ no)
+ AC_MSG_ERROR(Need oracle-include-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ oracle_include_dir="$withval"
+ ;;
esac])
- dnl extra argument: --with-oracle-lib-dir=DIR
- oracle_lib_dir=
- AC_ARG_WITH(oracle-lib-dir,
+dnl extra argument: --with-oracle-lib-dir=DIR
+oracle_lib_dir=
+AC_ARG_WITH(oracle-lib-dir,
[AS_HELP_STRING([--with-oracle-lib-dir=DIR],
[Directory where the oracle libraries may be found])],
[case "$withval" in
- no)
- AC_MSG_ERROR(Need oracle-lib-dir)
- ;;
- yes)
- ;;
- *)
- oracle_lib_dir="$withval"
- ;;
+ no)
+ AC_MSG_ERROR(Need oracle-lib-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ oracle_lib_dir="$withval"
+ ;;
esac])
- dnl extra argument: --with-oracle-dir=DIR
- AC_ARG_WITH(oracle-dir,
+dnl extra argument: --with-oracle-dir=DIR
+AC_ARG_WITH(oracle-dir,
[AS_HELP_STRING([--with-oracle-dir=DIR],
[Base directory where oracle is installed])],
[case "$withval" in
- no)
- AC_MSG_ERROR(Need oracle-dir)
- ;;
- yes)
- ;;
- *)
- oracle_lib_dir="$withval/lib"
- oracle_include_dir="$withval/include"
- ;;
+ no)
+ AC_MSG_ERROR(Need oracle-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ oracle_lib_dir="$withval/lib"
+ oracle_include_dir="$withval/include"
+ ;;
esac])
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
- smart_try_dir="$oracle_include_dir /usr/local/instaclient/include"
+smart_try_dir="$oracle_include_dir /usr/local/instaclient/include"
- if test "x$ORACLE_HOME" != "x"; then
+if test "x$ORACLE_HOME" != "x"; then
smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include"
- fi
+fi
- FR_SMART_CHECK_INCLUDE(oci.h)
- if test "x$ac_cv_header_oci_h" != "xyes"; then
+FR_SMART_CHECK_INCLUDE(oci.h)
+if test "x$ac_cv_header_oci_h" != "xyes"; then
AC_MSG_WARN([oracle headers not found. Use --with-oracle-include-dir=<path> or set ORACLE_HOME.])
fail="$fail oci.h"
- fi
+fi
- dnl ############################################################
- dnl # Check for libraries
- dnl ############################################################
+dnl ############################################################
+dnl # Check for libraries
+dnl ############################################################
- old_LIBS="$LIBS"
+old_LIBS="$LIBS"
- if test "x$oracle_lib_dir" != "x" ; then
+if test "x$oracle_lib_dir" != "x" ; then
lib_path="${oracle_lib_dir} "
- elif test "x$ORACLE_HOME" != "x" ; then
+elif test "x$ORACLE_HOME" != "x" ; then
lib_path="${ORACLE_HOME}/lib "
- fi
+fi
- AC_MSG_WARN([Oracle supported versions: ${oracle_supported_versions}])
- AC_MSG_WARN([Oracle version >= 12 needs -laio])
+AC_MSG_WARN([Oracle supported versions: ${oracle_supported_versions}])
+AC_MSG_WARN([Oracle version >= 12 needs -laio])
- for path in $lib_path "/usr/local/instaclient/lib" "" "/opt/lib"; do
+for path in $lib_path "/usr/local/instaclient/lib" "" "/opt/lib"; do
for oracle_version in ${oracle_supported_versions} ""; do
- if test "$path" != ""; then
- AC_MSG_CHECKING([for OCIInitialize in nnz${oracle_version} in $path])
- else
- AC_MSG_CHECKING([for OCIInitialize in nnz${oracle_version}])
- fi
-
- LIBS="$old_LIBS -L$path -Wl,-rpath,$path -lclntsh -lnnz${oracle_version}"
-
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <oci.h>
-
- static OCIEnv *p_env;
- static OCIError *p_err;
- static OCISvcCtx *p_svc;
- static OCIStmt *p_sql;
- static OCIDefine *p_dfn = (OCIDefine *) 0;
- static OCIBind *p_bnd = (OCIBind *) 0;
- ]], [[
- int p_bvi;
- char p_sli[20];
- int rc;
- char errbuf[100];
- int errcode;
-
- rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0, /* Initialize OCI */
- (dvoid * (*)(dvoid *, size_t)) 0,
- (dvoid * (*)(dvoid *, dvoid *, size_t))0,
- (void (*)(dvoid *, dvoid *)) 0 );
-
- ]])],[mod_ldflags="$LIBS"],[])
- if test "x$mod_ldflags" != "x"; then
- AC_MSG_RESULT(yes)
- break
- fi
- AC_MSG_RESULT(no)
+ if test "$path" != ""; then
+ AC_MSG_CHECKING([for OCIInitialize in nnz${oracle_version} in $path])
+ else
+ AC_MSG_CHECKING([for OCIInitialize in nnz${oracle_version}])
+ fi
+
+ LIBS="$old_LIBS -L$path -Wl,-rpath,$path -lclntsh -lnnz${oracle_version}"
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <oci.h>
+
+ static OCIEnv *p_env;
+ static OCIError *p_err;
+ static OCISvcCtx *p_svc;
+ static OCIStmt *p_sql;
+ static OCIDefine *p_dfn = (OCIDefine *) 0;
+ static OCIBind *p_bnd = (OCIBind *) 0;
+ ]], [[
+ int p_bvi;
+ char p_sli[20];
+ int rc;
+ char errbuf[100];
+ int errcode;
+
+ rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0, /* Initialize OCI */
+ (dvoid * (*)(dvoid *, size_t)) 0,
+ (dvoid * (*)(dvoid *, dvoid *, size_t))0,
+ (void (*)(dvoid *, dvoid *)) 0 );
+
+ ]])],[mod_ldflags="$LIBS"],[])
+
+ if test "x$mod_ldflags" != "x"; then
+ AC_MSG_RESULT(yes)
+ break
+ fi
+
+ AC_MSG_RESULT(no)
done
if test "x$mod_ldflags" != "x"; then
break
fi
- done
+done
- LIBS="$old_LIBS"
+LIBS="$old_LIBS"
- if test "x$mod_ldflags" = "x"; then
+if test "x$mod_ldflags" = "x"; then
AC_MSG_WARN([oracle libraries not found. Use --with-oracle-lib-dir=<path> or set ORACLE_HOME.])
fail=["$fail libclntsh libnnz[9-12]"]
- fi
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
+AC_PROG_CC
- dnl extra argument: --with-rlm-sql-postgresql-lib-dir
- rlm_sql_postgresql_lib_dir=
- AC_ARG_WITH(rlm-sql-postgresql-lib-dir,
- [ --with-rlm-sql-postgresql-lib-dir=DIR Directory for PostgreSQL library files []],
- [ case "$withval" in
- no)
+dnl extra argument: --with-rlm-sql-postgresql-lib-dir
+rlm_sql_postgresql_lib_dir=
+AC_ARG_WITH(rlm-sql-postgresql-lib-dir,
+ [ --with-rlm-sql-postgresql-lib-dir=DIR Directory for PostgreSQL library files []],
+ [case "$withval" in
+ no)
AC_MSG_ERROR(Need rlm-sql-postgresql-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
rlm_sql_postgresql_lib_dir="$withval"
;;
- esac ]
- )
+ esac])
- dnl extra argument: --with-rlm-sql-postgresql-include-dir
- rlm_sql_postgresql_include_dir=
- AC_ARG_WITH(rlm-sql-postgresql-include-dir,
- [ --with-rlm-sql-postgresql-include-dir=DIR Directory for PostgreSQL include files []],
- [ case "$withval" in
- no)
+dnl extra argument: --with-rlm-sql-postgresql-include-dir
+rlm_sql_postgresql_include_dir=
+AC_ARG_WITH(rlm-sql-postgresql-include-dir,
+ [ --with-rlm-sql-postgresql-include-dir=DIR Directory for PostgreSQL include files []],
+ [case "$withval" in
+ no)
AC_MSG_ERROR(Need rlm-sql-postgresql-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
rlm_sql_postgresql_include_dir="$withval"
;;
- esac ]
- )
+ esac])
- smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql"
- FR_SMART_CHECK_INCLUDE(libpq-fe.h)
- if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then
- fail="$fail libpq-fe.h"
- else
- CPPFLAGS="$SMART_CPPFLAGS"
- AC_MSG_CHECKING([for PGRES_SINGLE_TUPLE])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([#include <libpq-fe.h>], [[
- if (PGRES_SINGLE_TUPLE) return 0;
- return 1;
- ]])],
- [
- AC_DEFINE([HAVE_PGRES_SINGLE_TUPLE], [1], [Whether the PGRES_SINGLE_TUPLE constant is defined])
- AC_MSG_RESULT(yes)
- ],
- [
- AC_MSG_RESULT(no)
- ])
+smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql"
+FR_SMART_CHECK_INCLUDE(libpq-fe.h)
+if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then
+ fail="$fail libpq-fe.h"
+else
+ CPPFLAGS="$SMART_CPPFLAGS"
+ AC_MSG_CHECKING([for PGRES_SINGLE_TUPLE])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <libpq-fe.h>], [[
+ if (PGRES_SINGLE_TUPLE) return 0;
+ return 1;
+ ]])],
+ [
+ AC_DEFINE([HAVE_PGRES_SINGLE_TUPLE], [1], [Whether the PGRES_SINGLE_TUPLE constant is defined])
+ AC_MSG_RESULT(yes)
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ])
- AC_MSG_CHECKING([for PGRES_COPY_BOTH])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([#include <libpq-fe.h>], [[
- if (PGRES_COPY_BOTH) return 0;
- return 1;
- ]])],
- [
- AC_DEFINE([HAVE_PGRES_COPY_BOTH], [1], [Whether the PGRES_COPY_BOTH constant is defined])
- AC_MSG_RESULT(yes)
- ],
- [
- AC_MSG_RESULT(no)
- ])
+ AC_MSG_CHECKING([for PGRES_COPY_BOTH])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <libpq-fe.h>], [[
+ if (PGRES_COPY_BOTH) return 0;
+ return 1;
+ ]])],
+ [
+ AC_DEFINE([HAVE_PGRES_COPY_BOTH], [1], [Whether the PGRES_COPY_BOTH constant is defined])
+ AC_MSG_RESULT(yes)
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ])
- AC_MSG_CHECKING([for PGRES_PIPELINE_SYNC])
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([#include <libpq-fe.h>], [[
- if (PGRES_PIPELINE_SYNC) return 0;
- return 1;
- ]])],
- [
- AC_DEFINE([HAVE_PGRES_PIPELINE_SYNC], [1], [Whether the PGRES_PIPELINE_SYNC constant is defined])
- AC_MSG_RESULT(yes)
- ],
- [
- AC_MSG_RESULT(no)
- ])
- fi
+ AC_MSG_CHECKING([for PGRES_PIPELINE_SYNC])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <libpq-fe.h>], [[
+ if (PGRES_PIPELINE_SYNC) return 0;
+ return 1;
+ ]])],
+ [
+ AC_DEFINE([HAVE_PGRES_PIPELINE_SYNC], [1], [Whether the PGRES_PIPELINE_SYNC constant is defined])
+ AC_MSG_RESULT(yes)
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ])
+fi
- smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib"
- FR_SMART_CHECK_LIB(pq, PQconnectdb)
- if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then
- fail="$fail libpq"
- fi
- AC_CHECK_FUNCS(\
- PQinitOpenSSL \
- PQinitSSL \
- )
+smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib"
+FR_SMART_CHECK_LIB(pq, PQconnectdb)
+if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then
+ fail="$fail libpq"
+fi
+AC_CHECK_FUNCS(\
+ PQinitOpenSSL \
+ PQinitSSL \
+)
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
- dnl extra argument: --with-sqlite-include-dir=DIR
- sqlite_include_dir=
- AC_ARG_WITH(sqlite-include-dir,
+dnl extra argument: --with-sqlite-include-dir=DIR
+sqlite_include_dir=
+AC_ARG_WITH(sqlite-include-dir,
[AS_HELP_STRING([--with-sqlite-include-dir=DIR],
[Directory where the sqlite includes may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need sqlite-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
sqlite_include_dir="$withval"
;;
esac])
- dnl extra argument: --with-sqlite-lib-dir=DIR
- sqlite_lib_dir=
- AC_ARG_WITH(sqlite-lib-dir,
+dnl extra argument: --with-sqlite-lib-dir=DIR
+sqlite_lib_dir=
+AC_ARG_WITH(sqlite-lib-dir,
[AS_HELP_STRING([--with-sqlite-lib-dir=DIR],
[Directory where the sqlite libraries may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need sqlite-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
sqlite_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-sqlite-dir=DIR
- AC_ARG_WITH(sqlite-dir,
+dnl extra argument: --with-sqlite-dir=DIR
+AC_ARG_WITH(sqlite-dir,
[AS_HELP_STRING([--with-sqlite-dir=DIR],
[Base directory where sqlite is installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need sqlite-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
sqlite_lib_dir="$withval/lib"
sqlite_include_dir="$withval/include"
;;
esac])
- dnl ############################################################
- dnl # Check for programs
- dnl ############################################################
+dnl ############################################################
+dnl # Check for programs
+dnl ############################################################
- AC_PROG_CC
+AC_PROG_CC
- dnl ############################################################
- dnl # Check for libraries
- dnl ############################################################
+dnl ############################################################
+dnl # Check for libraries
+dnl ############################################################
- dnl try to link to libsqlite3
- smart_try_dir="$sqlite_lib_dir"
- FR_SMART_CHECK_LIB(sqlite3, sqlite3_open)
- dnl # Ensure we use the library we just found the rest of the checks
- LDFLAGS="$SMART_LIBS"
- if test "x$ac_cv_lib_sqlite3_sqlite3_open" != "xyes"
- then
+dnl try to link to libsqlite3
+smart_try_dir="$sqlite_lib_dir"
+FR_SMART_CHECK_LIB(sqlite3, sqlite3_open)
+
+dnl # Ensure we use the library we just found the rest of the checks
+LDFLAGS="$SMART_LIBS"
+if test "x$ac_cv_lib_sqlite3_sqlite3_open" != "xyes"
+then
AC_MSG_WARN([Sqlite libraries not found. Use --with-sqlite-lib-dir=<path>.])
fail="$fail libsqlite3"
- else
+else
dnl # Add any v2 variants here
AC_CHECK_FUNCS(\
sqlite3_prepare_v2 \
sqlite3_errstr \
sqlite3_extended_result_codes \
)
- fi
+fi
+
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
+smart_try_dir="$sqlite_include_dir"
+FR_SMART_CHECK_INCLUDE(sqlite3.h)
- smart_try_dir="$sqlite_include_dir"
- FR_SMART_CHECK_INCLUDE(sqlite3.h)
- if test "x$ac_cv_header_sqlite3_h" != "xyes"; then
+if test "x$ac_cv_header_sqlite3_h" != "xyes"; then
AC_MSG_WARN([Sqlite headers not found. Use --with-sqlite-include-dir=<path>.])
fail="$fail sqlite.h"
- fi
- CFLAGS="$SMART_CPPFLAGS"
- AC_CHECK_TYPES([sqlite3_int64], [], [], [[#include <sqlite3.h>]])
+fi
+
+CFLAGS="$SMART_CPPFLAGS"
+AC_CHECK_TYPES([sqlite3_int64], [], [], [[#include <sqlite3.h>]])
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl extra argument: --with-unixodbc-include-dir
- unixodbc_include_dir=
- AC_ARG_WITH(unixodbc-include-dir,
- [AS_HELP_STRING([--with-unixodbc-include-dir=DIR],
- [Directory where the unixODBC includes may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need unixodbc-include-dir)
- ;;
- yes)
- ;;
- *)
- unixodbc_include_dir="$withval"
- ;;
- esac])
+dnl extra argument: --with-unixodbc-include-dir
+unixodbc_include_dir=
+AC_ARG_WITH(unixodbc-include-dir,
+ [AS_HELP_STRING([--with-unixodbc-include-dir=DIR],
+ [Directory where the unixODBC includes may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need unixodbc-include-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ unixodbc_include_dir="$withval"
+ ;;
+ esac])
- dnl extra argument: --with-unixodbc-lib-dir
- unixodbc_lib_dir=
- AC_ARG_WITH(unixodbc-lib-dir,
- [AS_HELP_STRING([--with-unixodbc-lib-dir=DIR],
- [Directory where the unixODBC libraries may be found])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need unixodbc-lib-dir)
- ;;
- yes)
- ;;
- *)
- unixodbc_lib_dir="$withval"
- ;;
- esac])
+dnl extra argument: --with-unixodbc-lib-dir
+unixodbc_lib_dir=
+AC_ARG_WITH(unixodbc-lib-dir,
+ [AS_HELP_STRING([--with-unixodbc-lib-dir=DIR],
+ [Directory where the unixODBC libraries may be found])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need unixodbc-lib-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ unixodbc_lib_dir="$withval"
+ ;;
+ esac])
- dnl extra argument: --with-unixodbc-dir
- AC_ARG_WITH(unixodbc-dir,
- [AS_HELP_STRING([--with-unixodbc-dir=DIR],
- [Base directory where unixODBC is installed])],
- [case "$withval" in
- no)
- AC_MSG_ERROR(Need unixodbc-dir)
- ;;
- yes)
- ;;
- *)
- unixodbc_lib_dir="$withval/lib"
- unixodbc_include_dir="$withval/include"
- ;;
- esac])
+dnl extra argument: --with-unixodbc-dir
+AC_ARG_WITH(unixodbc-dir,
+ [AS_HELP_STRING([--with-unixodbc-dir=DIR],
+ [Base directory where unixODBC is installed])],
+ [case "$withval" in
+ no)
+ AC_MSG_ERROR(Need unixodbc-dir)
+ ;;
+ yes)
+ ;;
+ *)
+ unixodbc_lib_dir="$withval/lib"
+ unixodbc_include_dir="$withval/include"
+ ;;
+ esac])
- dnl Check for SQLConnect in -lodbc
- smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib"
- FR_SMART_CHECK_LIB(odbc, SQLConnect)
- if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then
- fail="$fail libodbc"
- fi
+dnl Check for SQLConnect in -lodbc
+smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib"
+FR_SMART_CHECK_LIB(odbc, SQLConnect)
+if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then
+ fail="$fail libodbc"
+fi
- dnl Check for sql.h
- smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include"
- FR_SMART_CHECK_INCLUDE(sql.h)
- if test "x$ac_cv_header_sql_h" != xyes; then
- fail="$fail sql.h"
- fi
+dnl Check for sql.h
+smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include"
+FR_SMART_CHECK_INCLUDE(sql.h)
+if test "x$ac_cv_header_sql_h" != xyes; then
+ fail="$fail sql.h"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl extra argument: --with-rlm-unbound-lib-dir
- rlm_unbound_lib_dir=
- AC_ARG_WITH(rlm-unbound-lib-dir,
- [ --with-rlm-unbound-lib-dir=DIR directory for libunbound library files []],
+dnl extra argument: --with-rlm-unbound-lib-dir
+rlm_unbound_lib_dir=
+AC_ARG_WITH(rlm-unbound-lib-dir,
+ [ --with-rlm-unbound-lib-dir=DIR directory for libunbound library files []],
[ case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need rlm-unbound-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
rlm_unbound_lib_dir="$withval"
;;
- esac ]
- )
+ esac ])
- dnl extra argument: --with-rlm-unbound-include-dir
- rlm_unbound_include_dir=
- AC_ARG_WITH(rlm-unbound-include-dir,
- [ --with-rlm-unbound-include-dir=DIR directory for libunbound include files []],
+dnl extra argument: --with-rlm-unbound-include-dir
+rlm_unbound_include_dir=
+AC_ARG_WITH(rlm-unbound-include-dir,
+ [ --with-rlm-unbound-include-dir=DIR directory for libunbound include files []],
[ case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need rlm-unbound-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
rlm_unbound_include_dir="$withval"
;;
- esac ]
- )
+ esac ])
- smart_try_dir=$rlm_unbound_lib_dir
- FR_SMART_CHECK_LIB(unbound, ub_ctx_create_ub_event)
- if test "x$ac_cv_lib_unbound_ub_ctx_create_ub_event" != "xyes"; then
- fail="$fail libunbound"
- fi
+smart_try_dir=$rlm_unbound_lib_dir
+FR_SMART_CHECK_LIB(unbound, ub_ctx_create_ub_event)
+if test "x$ac_cv_lib_unbound_ub_ctx_create_ub_event" != "xyes"; then
+ fail="$fail libunbound"
+fi
- smart_try_dir=$rlm_unbound_include_dir
- FR_SMART_CHECK_INCLUDE(unbound.h)
- if test "$ac_cv_header_unbound_h" != "yes"; then
- fail="$fail unbound.h"
- fi
+smart_try_dir=$rlm_unbound_include_dir
+FR_SMART_CHECK_INCLUDE(unbound.h)
+if test "$ac_cv_header_unbound_h" != "yes"; then
+ fail="$fail unbound.h"
+fi
- smart_try_dir=$rlm_unbound_include_dir
- FR_SMART_CHECK_INCLUDE(unbound-event.h)
- if test "$ac_cv_header_unboundmevent_h" != "yes"; then
- fail="$fail unbound-event.h"
- fi
+smart_try_dir=$rlm_unbound_include_dir
+FR_SMART_CHECK_INCLUDE(unbound-event.h)
+if test "$ac_cv_header_unboundmevent_h" != "yes"; then
+ fail="$fail unbound-event.h"
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
-
- AC_MSG_CHECKING(for system password file)
- if test -f /etc/passwd; then
- AC_MSG_RESULT(/etc/passwd)
- else
- AC_MSG_RESULT(no /etc/passwd file.)
- [ fail=$fail" /etc/passwd" ]
- fi
-
- dnl useless?
- AC_MSG_CHECKING(for system shadow password file)
- if test -f /etc/shadow; then
- AC_MSG_RESULT(/etc/shadow)
- else
- AC_MSG_RESULT(no /etc/shadow file.)
- fi
-
- AC_CHECK_HEADERS(shadow.h pwd.h grp.h)
- AC_CHECK_FUNCS(getspnam getusershell getpwnam)
-
- if test "$ac_cv_func_getpwnam" != "yes"; then
- AC_MSG_RESULT(no getpwnam)
- [ fail=$fail" getpwnam" ]
- fi
-
- if test "$ac_cv_header_pwd_h" != "yes"; then
- AC_MSG_RESULT(no pwd.h)
- [ fail=$fail" pwd.h" ]
- fi
-
- AC_CHECK_LIB(shadow, getspnam,
- [
- mod_ldflags="${mod_ldflags} -lshadow"
- AC_DEFINE(HAVE_GETSPNAM)
- ]
- )
+AC_PROG_CC
+AC_PROG_CPP
+
+AC_MSG_CHECKING(for system password file)
+if test -f /etc/passwd; then
+ AC_MSG_RESULT(/etc/passwd)
+else
+ AC_MSG_RESULT(no /etc/passwd file.)
+ [ fail=$fail" /etc/passwd" ]
+fi
+
+dnl useless?
+AC_MSG_CHECKING(for system shadow password file)
+if test -f /etc/shadow; then
+ AC_MSG_RESULT(/etc/shadow)
+else
+ AC_MSG_RESULT(no /etc/shadow file.)
+fi
+
+AC_CHECK_HEADERS(shadow.h pwd.h grp.h)
+AC_CHECK_FUNCS(getspnam getusershell getpwnam)
+
+if test "$ac_cv_func_getpwnam" != "yes"; then
+ AC_MSG_RESULT(no getpwnam)
+ [ fail=$fail" getpwnam" ]
+fi
+
+if test "$ac_cv_header_pwd_h" != "yes"; then
+ AC_MSG_RESULT(no pwd.h)
+ [ fail=$fail" pwd.h" ]
+fi
+
+AC_CHECK_LIB(shadow, getspnam,
+ [
+ mod_ldflags="${mod_ldflags} -lshadow"
+ AC_DEFINE(HAVE_GETSPNAM)
+ ]
+)
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- AC_PROG_CC
- AC_PROG_CPP
+AC_PROG_CC
+AC_PROG_CPP
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
- dnl extra argument: --with-winbind-include-dir=DIR
- winbind_include_dir=
- AC_ARG_WITH(winbind-include-dir,
+dnl extra argument: --with-winbind-include-dir=DIR
+winbind_include_dir=
+AC_ARG_WITH(winbind-include-dir,
[AS_HELP_STRING([--with-winbind-include-dir=DIR],
[Directory where the winbind includes may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need winbind-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
winbind_include_dir="$withval"
;;
esac])
- dnl extra argument: --with-winbind-lib-dir=DIR
- winbind_lib_dir=
- AC_ARG_WITH(winbind-lib-dir,
+dnl extra argument: --with-winbind-lib-dir=DIR
+winbind_lib_dir=
+AC_ARG_WITH(winbind-lib-dir,
[AS_HELP_STRING([--with-winbind-lib-dir=DIR],
[Directory where the winbind libraries may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need winbind-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
winbind_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-winbind-dir=DIR
- AC_ARG_WITH(winbind-dir,
+dnl extra argument: --with-winbind-dir=DIR
+AC_ARG_WITH(winbind-dir,
[AS_HELP_STRING([--with-winbind-dir=DIR],
[Base directory where winbind is installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need winbind-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
winbind_lib_dir="$withval/lib"
winbind_include_dir="$withval/include"
;;
esac])
- dnl ############################################################
- dnl # Check for header files
- dnl ############################################################
+dnl ############################################################
+dnl # Check for header files
+dnl ############################################################
- smart_try_dir="$winbind_include_dir /usr/include/samba-4.0"
- FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h>
- #include <stdbool.h>])
- if test "x$ac_cv_header_wbclient_h" != "xyes"; then
- AC_MSG_WARN([wbclient.h not found. Use --with-winbind-include-dir=<path>.])
- AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
+smart_try_dir="$winbind_include_dir /usr/include/samba-4.0"
+FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h>
+ #include <stdbool.h>])
+if test "x$ac_cv_header_wbclient_h" != "xyes"; then
+ AC_MSG_WARN([wbclient.h not found. Use --with-winbind-include-dir=<path>.])
+ AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
fail="$fail wbclient.h"
- fi
+fi
- FR_SMART_CHECK_INCLUDE(core/ntstatus.h, [#include <stdint.h>
- #include <stdbool.h>])
- if test "x$ac_cv_header_core_ntstatus_h" != "xyes"; then
- AC_MSG_WARN([core/ntstatus.h not found. Use --with-winbind-include-dir=<path>.])
- AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
+FR_SMART_CHECK_INCLUDE(core/ntstatus.h, [#include <stdint.h>
+ #include <stdbool.h>])
+if test "x$ac_cv_header_core_ntstatus_h" != "xyes"; then
+ AC_MSG_WARN([core/ntstatus.h not found. Use --with-winbind-include-dir=<path>.])
+ AC_MSG_WARN([silently building without support for direct authentication via winbind. requires: libwbclient])
fail="$fail core/ntstatus.h"
- fi
-
- dnl ############################################################
- dnl # Check for libraries
- dnl ############################################################
-
- if test "x$ac_cv_header_wbclient_h" = "xyes" && \
- test "x$ac_cv_header_core_ntstatus_h" = "xyes"; then
-
- smart_try_dir="$winbind_lib_dir"
- FR_SMART_CHECK_LIB(wbclient, wbcCtxAuthenticateUserEx)
- if test "x$ac_cv_lib_wbclient_wbcCtxAuthenticateUserEx" != "xyes"; then
- AC_MSG_WARN([winbind libraries not found. Use --with-winbind-lib-dir=<path>.])
- AC_MSG_WARN([Samba must be version 4.2.1 or higher to use this feature.])
- fail="$fail libwbclient"
- fi
- fi
+fi
+
+dnl ############################################################
+dnl # Check for libraries
+dnl ############################################################
+
+if test "x$ac_cv_header_wbclient_h" = "xyes" && \
+ test "x$ac_cv_header_core_ntstatus_h" = "xyes"; then
+
+ smart_try_dir="$winbind_lib_dir"
+ FR_SMART_CHECK_LIB(wbclient, wbcCtxAuthenticateUserEx)
+ if test "x$ac_cv_lib_wbclient_wbcCtxAuthenticateUserEx" != "xyes"; then
+ AC_MSG_WARN([winbind libraries not found. Use --with-winbind-lib-dir=<path>.])
+ AC_MSG_WARN([Samba must be version 4.2.1 or higher to use this feature.])
+ fail="$fail libwbclient"
+ fi
+fi
FR_MODULE_END_TESTS
FR_MODULE_START_TESTS
- dnl ############################################################
- dnl # Check for command line options
- dnl ############################################################
+dnl ############################################################
+dnl # Check for command line options
+dnl ############################################################
- dnl ############################################################
- dnl # Yubikey options
- dnl ############################################################
+dnl ############################################################
+dnl # Yubikey options
+dnl ############################################################
- dnl extra argument: --with-yubikey-include-dir=DIR
- yubikey_include_dir=
- AC_ARG_WITH(yubikey-include-dir,
+dnl extra argument: --with-yubikey-include-dir=DIR
+yubikey_include_dir=
+AC_ARG_WITH(yubikey-include-dir,
[AS_HELP_STRING([--with-yubikey-include-dir=DIR],
[Directory where the yubikey includes may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need yubikey-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
yubikey_include_dir="$withval"
;;
esac])
- dnl extra argument: --with-yubikey-lib-dir=DIR
- yubikey_lib_dir=
- AC_ARG_WITH(yubikey-lib-dir,
+dnl extra argument: --with-yubikey-lib-dir=DIR
+yubikey_lib_dir=
+AC_ARG_WITH(yubikey-lib-dir,
[AS_HELP_STRING([--with-yubikey-lib-dir=DIR],
[Directory where the yubikey libraries may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need yubikey-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
yubikey_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-yubikey-dir=DIR
- AC_ARG_WITH(yubikey-dir,
+dnl extra argument: --with-yubikey-dir=DIR
+AC_ARG_WITH(yubikey-dir,
[AS_HELP_STRING([--with-yubikey-dir=DIR],
[Base directory where yubikey is installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need yubikey-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
yubikey_lib_dir="$withval/lib"
yubikey_include_dir="$withval/include"
;;
esac])
- dnl ############################################################
- dnl # Ykclient options
- dnl ############################################################
+dnl ############################################################
+dnl # Ykclient options
+dnl ############################################################
- dnl extra argument: --with-ykclient-include-dir=DIR
- ykclient_include_dir=
- AC_ARG_WITH(ykclient-include-dir,
+dnl extra argument: --with-ykclient-include-dir=DIR
+ykclient_include_dir=
+AC_ARG_WITH(ykclient-include-dir,
[AS_HELP_STRING([--with-ykclient-include-dir=DIR],
[Directory where the ykclient includes may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need ykclient-include-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
ykclient_include_dir="$withval"
;;
esac])
- dnl extra argument: --with-ykclient-lib-dir=DIR
- ykclient_lib_dir=
- AC_ARG_WITH(ykclient-lib-dir,
+dnl extra argument: --with-ykclient-lib-dir=DIR
+ykclient_lib_dir=
+AC_ARG_WITH(ykclient-lib-dir,
[AS_HELP_STRING([--with-ykclient-lib-dir=DIR],
[Directory where the ykclient libraries may be found])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need ykclient-lib-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
ykclient_lib_dir="$withval"
;;
esac])
- dnl extra argument: --with-ykclient-dir=DIR
- AC_ARG_WITH(ykclient-dir,
+dnl extra argument: --with-ykclient-dir=DIR
+AC_ARG_WITH(ykclient-dir,
[AS_HELP_STRING([--with-ykclient-dir=DIR],
[Base directory where ykclient is installed])],
[case "$withval" in
- no)
+ no)
AC_MSG_ERROR(Need ykclient-dir)
;;
- yes)
+ yes)
;;
- *)
+ *)
ykclient_lib_dir="$withval/lib"
ykclient_include_dir="$withval/include"
;;
esac])
- dnl ############################################################
- dnl # Check for yubikey header files (optional)
- dnl ############################################################
+dnl ############################################################
+dnl # Check for yubikey header files (optional)
+dnl ############################################################
- have_yubikey="yes"
- smart_try_dir="$yubikey_include_dir"
- FR_SMART_CHECK_INCLUDE(yubikey.h)
- if test "x$ac_cv_header_yubikey_h" != "xyes"; then
+have_yubikey="yes"
+smart_try_dir="$yubikey_include_dir"
+FR_SMART_CHECK_INCLUDE(yubikey.h)
+if test "x$ac_cv_header_yubikey_h" != "xyes"; then
have_ykclient="no"
AC_MSG_WARN([yubikey headers not found. Use --with-yubikey-include-dir=<path>.])
- fi
+fi
- dnl ############################################################
- dnl # Check for yubikey libraries (optional)
- dnl ############################################################
+dnl ############################################################
+dnl # Check for yubikey libraries (optional)
+dnl ############################################################
- dnl try to link to yubikey
- smart_try_dir="$yubikey_lib_dir"
- FR_SMART_CHECK_LIB(yubikey, yubikey_aes_decrypt)
- if test "x$ac_cv_lib_yubikey_yubikey_aes_decrypt" != "xyes"; then
+dnl try to link to yubikey
+smart_try_dir="$yubikey_lib_dir"
+FR_SMART_CHECK_LIB(yubikey, yubikey_aes_decrypt)
+if test "x$ac_cv_lib_yubikey_yubikey_aes_decrypt" != "xyes"; then
have_yubikey="no"
AC_MSG_WARN([yubikey libraries not found. Use --with-yubikey-lib-dir=<path>.])
- fi
+fi
- if test "x$have_yubikey" = "xyes"; then
+if test "x$have_yubikey" = "xyes"; then
AC_DEFINE([HAVE_YUBIKEY],[1],[Build with yubikey token decryption support support from yubikey])
- else
+else
AC_MSG_WARN([silently building without yubikey token decryption support. requires: yubikey])
- fi
+fi
- dnl ############################################################
- dnl # Check for ykclient header files (optional)
- dnl ############################################################
+dnl ############################################################
+dnl # Check for ykclient header files (optional)
+dnl ############################################################
- have_ykclient="yes"
- smart_try_dir="$ykclient_include_dir"
- FR_SMART_CHECK_INCLUDE([ykclient.h])
- if test "x$ac_cv_header_ykclient_h" != "xyes"; then
+have_ykclient="yes"
+smart_try_dir="$ykclient_include_dir"
+FR_SMART_CHECK_INCLUDE([ykclient.h])
+if test "x$ac_cv_header_ykclient_h" != "xyes"; then
have_ykclient="no"
AC_MSG_WARN([ykclient headers not found. Use --with-ykclient-include-dir=<path>.])
- fi
+fi
- dnl ############################################################
- dnl # Check for ykclient libraries (optional)
- dnl ############################################################
+dnl ############################################################
+dnl # Check for ykclient libraries (optional)
+dnl ############################################################
- smart_try_dir="$ykclient_lib_dir"
- FR_SMART_CHECK_LIB([ykclient], [ykclient_request_process])
- if test "x$ac_cv_lib_ykclient_ykclient_request_process" != "xyes"; then
+smart_try_dir="$ykclient_lib_dir"
+FR_SMART_CHECK_LIB([ykclient], [ykclient_request_process])
+if test "x$ac_cv_lib_ykclient_ykclient_request_process" != "xyes"; then
have_ykclient="no"
FR_SMART_CHECK_LIB([ykclient], [ykclient_request])
if test "x$ac_cv_lib_ykclient_ykclient_request" = "xyes"; then
- AC_MSG_WARN([libykclient missing ykclient_request_process. A later version of libykclient is required.])
+ AC_MSG_WARN([libykclient missing ykclient_request_process. A later version of libykclient is required.])
else
- AC_MSG_WARN([ykclient libraries not found. Use --with-ykclient-lib-dir=<path>.])
+ AC_MSG_WARN([ykclient libraries not found. Use --with-ykclient-lib-dir=<path>.])
fi
- fi
+fi
- if test "x$have_ykclient" = "xyes"; then
+if test "x$have_ykclient" = "xyes"; then
AC_DEFINE([HAVE_YKCLIENT],[1],[Build with yubicloud support from ykclient])
- else
+else
AC_MSG_WARN([silently building without yubicloud support. requires: ykclient])
- fi
+fi
FR_MODULE_END_TESTS