]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rework all whitespace in module configure.ac files
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>
Sat, 1 Oct 2022 10:41:49 +0000 (11:41 +0100)
committerMatthew Newton <matthew-git@newtoncomputing.co.uk>
Sun, 2 Oct 2022 17:08:23 +0000 (18:08 +0100)
29 files changed:
src/modules/rlm_cache/configure.ac
src/modules/rlm_cache/drivers/rlm_cache_memcached/configure.ac
src/modules/rlm_couchbase/configure.ac
src/modules/rlm_eap/configure.ac
src/modules/rlm_idn/configure.ac
src/modules/rlm_krb5/configure.ac
src/modules/rlm_lua/configure.ac
src/modules/rlm_mruby/configure.ac
src/modules/rlm_mschap/configure.ac
src/modules/rlm_opendirectory/configure.ac
src/modules/rlm_pam/configure.ac
src/modules/rlm_perl/configure.ac
src/modules/rlm_python/configure.ac
src/modules/rlm_securid/configure.ac
src/modules/rlm_sigtran/configure.ac
src/modules/rlm_sql/configure.ac
src/modules/rlm_sql/drivers/rlm_sql_cassandra/configure.ac
src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac
src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac
src/modules/rlm_sql/drivers/rlm_sql_freetds/configure.ac
src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac
src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac
src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac
src/modules/rlm_sql/drivers/rlm_sql_sqlite/configure.ac
src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac
src/modules/rlm_unbound/configure.ac
src/modules/rlm_unix/configure.ac
src/modules/rlm_winbind/configure.ac
src/modules/rlm_yubikey/configure.ac

index a4197f5ab9db9f315f77fc4197fa67881c1ebdc2..800728333f9a373d8eb3927845bf87d1318426c3 100644 (file)
@@ -9,33 +9,25 @@ SMART_CLFAGS=
 
 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])
 
index d6b2dac806ee9a9b2634422ccdd07abab2a9713c..045ef40538d630aeb55bfd009fd3f0e79c360762 100644 (file)
@@ -6,104 +6,100 @@ FR_INIT_MODULE([rlm_cache_memcached])
 
 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
 
index 6127be12247b05b5c5d720cf2877fa5902635516..e52d9a4c48d04a1f684a90c703aef8c12369261d 100644 (file)
@@ -6,91 +6,88 @@ FR_INIT_MODULE([rlm_couchbase])
 
 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
 
index 130c563a071b2994a4d6c6b37a553dd83b127256..9f29d328edc86fffef50ce373877314292e59631 100644 (file)
@@ -10,26 +10,18 @@ eapsubdirs=
 
 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
 
@@ -46,4 +38,5 @@ mod_cflags="$SMART_CPPFLAGS"
 AC_SUBST(eaptypes)
 AC_SUBST(mod_ldflags)
 AC_SUBST(mod_cflags)
+
 AC_OUTPUT
index a4069af6cf1b4db4a7480287ec43b3e4bca58a74..6dad024c3c9afe2aa7988216be2a4d5118a10e61 100644 (file)
@@ -5,18 +5,18 @@ FR_INIT_MODULE([rlm_idn])
 
 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
 
index ed84f82fc6094412ce28066165bcb0b2d8e8cdd8..c520e8575d01d3bcd02e5dba03b14e5070145440 100644 (file)
@@ -6,161 +6,161 @@ FR_INIT_MODULE([rlm_krb5])
 
 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)
 
index ee561b2c468304ee35accd7df838ce8f0bcf3f05..7c4f04dac5331d2afe41d3b4b7fadf81fb976ffc 100644 (file)
@@ -6,108 +6,108 @@ FR_INIT_MODULE([rlm_lua], [lua support])
 
 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
@@ -117,4 +117,4 @@ AC_SUBST(lua_ldflags)
 
 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
index 0d134723c0ba2c8d69f71fe6f0179fb76a9ef5c0..1288faa58c3f819ede7ea920c2f9170a8e926224 100644 (file)
@@ -5,103 +5,103 @@ FR_INIT_MODULE([rlm_mruby])
 
 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
 
index 3551630cf0b8db7b352e8dc022b0e62a4625b354..13bc5c5d29aae00c96123682baa2f3f849fbe2a7 100644 (file)
@@ -5,106 +5,106 @@ FR_INIT_MODULE([rlm_mschap])
 
 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
 
index 443af53cde526097fade607cdc6c9b0c3087c303..7632b93d538a70b75707b852927e3feca22dea93 100644 (file)
@@ -5,22 +5,22 @@ FR_INIT_MODULE([rlm_opendirectory])
 
 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
 
index 6aa41af21d503426df4e34312dc82d9fae7fda2d..228c63a0e8c1ffd7c37735807507895bbf05dfb7 100644 (file)
@@ -6,28 +6,28 @@ FR_INIT_MODULE([rlm_pam])
 
 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
 
index 36c511175812c14900a9631306bd306fdecfa351..38e42083b7b28d887094002fecb4177d2a1ef533 100644 (file)
@@ -6,103 +6,99 @@ FR_INIT_MODULE([rlm_perl])
 
 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)
index 9e855e23fdcdd17238e28c3dc2ff8490d281bc28..0294ab7536b93d05c3ff50f2309408272a1ae444 100644 (file)
@@ -6,125 +6,125 @@ FR_INIT_MODULE([rlm_python])
 
 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
 
index e3aebd732eba2231fbf9230e0aaea24a11414003..d5f7dd963bf89889003f3429ffa591d96aceef2e 100644 (file)
@@ -8,81 +8,81 @@ SMART_CLFAGS=
 
 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
 
index 5ca3f2de7c671557a78015472bf85d8432286f8c..696ce1876b42ccb280a0067133313c3373d854fa 100644 (file)
@@ -9,104 +9,104 @@ SMART_CLFAGS=
 
 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
 
index 8f4078e0b8ad48df379740cd7301d927d965081f..259a2e40dedd9679a25999db9e7055c1eb5201ae 100644 (file)
@@ -9,33 +9,25 @@ SMART_CLFAGS=
 
 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
 
index 7af997d74269797aafd7e2abf7431df809989e88..347c7482efa2cba1b59a54e2059647127262622b 100644 (file)
@@ -9,90 +9,90 @@ SMART_CLFAGS=
 
 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
 
index dd36b19b089dfbbc76efa7d4720ba8c0551f90be..654f0faa8db167738dec64242608dad01d1ef52d 100644 (file)
@@ -9,67 +9,67 @@ SMART_CLFAGS=
 
 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
 
index 23ae99d73ea8e88cf4ef58e29a574e49a278417d..c1aaa8121d3d607bb19bda6475ffb3fb76b298c7 100644 (file)
@@ -9,67 +9,67 @@ SMART_CLFAGS=
 
 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
 
index ab8f4e1a919e14afca10ff6c6c640d842d777e63..902f1f5baef09e77d7800fab4f125f40202988eb 100644 (file)
@@ -9,81 +9,81 @@ SMART_CLFAGS=
 
 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
 
index 56a40d6c35475b6e67e310888f5d80e3d7e6a089..a2f80c73fe59d2c8337ab760bd99b7692784f491 100644 (file)
@@ -9,163 +9,174 @@ SMART_CLFAGS=
 
 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)
@@ -173,32 +184,21 @@ FR_MODULE_START_TESTS
                        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
 
index 20d43ad72ab22289fd02fe9fbe9a1325fdb8f6a7..92de1e2f07b780dcb2d6899958151ddaed83c866 100644 (file)
@@ -10,138 +10,140 @@ mod_cflags=
 
 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
 
index 0d795bf655c203f8b010f87c7b94018005801dc3..c67c21599cc3ea516f4a955dbbb734315fd65452 100644 (file)
@@ -8,98 +8,96 @@ SMART_CLFAGS=
 
 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
 
index 4d907698cd9d023662cc11c5b3765f01b630374a..85426ef5fd7bb0c7ea116e4d7a2e58fa97d43409 100644 (file)
@@ -9,78 +9,79 @@ SMART_CLFAGS=
 
 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 \
@@ -89,20 +90,22 @@ FR_MODULE_START_TESTS
                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
 
index c7d6cda0eded56194ead44f527a3f808cc72e10a..145361bdeb0a05372adcd71e83781bdbf78d3261 100644 (file)
@@ -9,67 +9,67 @@ SMART_CLFAGS=
 
 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
 
index f7888b7be7f687ea49a09bf23ffa43f1e97368af..6c7a0e549a4177fa042e36c25cb554539ae89651 100644 (file)
@@ -6,55 +6,53 @@ FR_INIT_MODULE([rlm_unbound])
 
 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
 
index 04c0f2f4f19d218c5bff326a9edfeeab53db1590..cdcb9ebdb68f2648aa163203e1b7fe82b231109a 100644 (file)
@@ -6,44 +6,44 @@ FR_INIT_MODULE([rlm_unix])
 
 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
 
index 519f0bc581824db4b8a6b4b772aa243a9424395a..232749471dc2d144e246234d0a9255bb9aba2cfd 100644 (file)
@@ -5,98 +5,98 @@ FR_INIT_MODULE([rlm_winbind])
 
 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
 
index 20ed4d59d803dac4c164fe44e1391d6cc01093a7..076faaded41782e386305ae310ad72549dd49547 100644 (file)
@@ -6,177 +6,177 @@ FR_INIT_MODULE([rlm_yubikey])
 
 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