From: Matthew Newton Date: Thu, 29 Sep 2022 09:21:39 +0000 (+0100) Subject: add FR_INIT_MODULE autoconf macro X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fa115bf43b300e6860950e16636932df45ddf49;p=thirdparty%2Ffreeradius-server.git add FR_INIT_MODULE autoconf macro helps with consistency and saves duplication --- diff --git a/m4/fr_init_module.m4 b/m4/fr_init_module.m4 new file mode 100644 index 00000000000..36c43c2221d --- /dev/null +++ b/m4/fr_init_module.m4 @@ -0,0 +1,13 @@ +dnl Macro to set the module name and other useful common functions +dnl +dnl Usages: +dnl FR_INIT_MODULE([rlm_example]) +dnl FR_INIT_MODULE([rlm_example], [the example module]) +dnl +AC_DEFUN([FR_INIT_MODULE], +[ + AC_DEFUN([modname],$1) + + AC_ARG_WITH([$1], + [AS_HELP_STRING([--without-$1],[build without ]ifelse([$2],[],[$1],[$2]))]) +]) diff --git a/src/lib/curl/configure.ac b/src/lib/curl/configure.ac index ac01da3ff2b..fdbe204d54b 100644 --- a/src/lib/curl/configure.ac +++ b/src/lib/curl/configure.ac @@ -2,15 +2,11 @@ AC_PREREQ([2.71]) AC_INIT AC_CONFIG_SRCDIR([base.c]) AC_REVISION($Revision$) -AC_DEFUN(modname,[libfreeradius-curl]) -AC_DEFUN(modname_useropt,[m4_bpatsubst([]modname,[[-+.]],[_])]) +FR_INIT_MODULE([libfreeradius-curl], [libcurl support]) +AC_DEFUN([modname_useropt],[m4_bpatsubst([]modname,[[-+.]],[_])]) AC_CONFIG_HEADERS([config.h]) -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without libcurl support])] -) - if test x$with_[]modname_useropt != xno; then AC_PROG_CC diff --git a/src/lib/json/configure.ac b/src/lib/json/configure.ac index 6a85f351a79..bd50a787bd1 100644 --- a/src/lib/json/configure.ac +++ b/src/lib/json/configure.ac @@ -2,14 +2,10 @@ AC_PREREQ([2.71]) AC_INIT AC_CONFIG_SRCDIR([json.c]) AC_REVISION($Revision$) -AC_DEFUN(modname,[libfreeradius-json]) -AC_DEFUN(modname_useropt,[m4_bpatsubst([]modname,[[-+.]],[_])]) +FR_INIT_MODULE([libfreeradius-json], [JSON support from json-c]) +AC_DEFUN([modname_useropt],[m4_bpatsubst([]modname,[[-+.]],[_])]) AC_CONFIG_HEADERS([config.h]) -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without JSON support from json-c])] -) - if test x$with_[]modname_useropt != xno; then AC_PROG_CC diff --git a/src/lib/kafka/configure.ac b/src/lib/kafka/configure.ac index 0924d4dbd22..f51f68d1bef 100644 --- a/src/lib/kafka/configure.ac +++ b/src/lib/kafka/configure.ac @@ -2,15 +2,12 @@ AC_PREREQ([2.71]) AC_INIT AC_CONFIG_SRCDIR([base.c]) AC_REVISION($Revision$) -AC_DEFUN(modname,[libfreeradius-kafka]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without rdkafka support])] -) +FR_INIT_MODULE([libfreeradius-kafka], [rdkafka support]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname_useropt != xno; then dnl ############################################################ dnl # Check for command line options diff --git a/src/lib/ldap/configure.ac b/src/lib/ldap/configure.ac index c2416ea3e33..f09e88689aa 100644 --- a/src/lib/ldap/configure.ac +++ b/src/lib/ldap/configure.ac @@ -2,17 +2,14 @@ AC_PREREQ([2.71]) AC_INIT AC_CONFIG_SRCDIR([base.c]) AC_REVISION($Revision$) -AC_DEFUN(modname,[libfreeradius-ldap]) +FR_INIT_MODULE([libfreeradius-ldap], [LDAP support]) AC_DEFUN(modname_useropt,[m4_bpatsubst([]modname,[[-+.]],[_])]) -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without LDAP support])] -) - fail= SMART_LIBS= SMART_CLFAGS= SASL= + if test x$with_[]modname_useropt != xno; then dnl ############################################################ diff --git a/src/lib/redis/configure.ac b/src/lib/redis/configure.ac index ba925018f34..22b47d98895 100644 --- a/src/lib/redis/configure.ac +++ b/src/lib/redis/configure.ac @@ -2,16 +2,13 @@ AC_PREREQ([2.71]) AC_INIT AC_CONFIG_SRCDIR([redis.c]) AC_REVISION($Revision$) -AC_DEFUN(modname,[libfreeradius-redis]) +FR_INIT_MODULE([libfreeradius-redis], [redis support]) AC_DEFUN(modname_useropt,[m4_bpatsubst([]modname,[[-+.]],[_])]) -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without redis support])] -) - fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname_useropt != xno; then dnl ############################################################ dnl # Check for command line options diff --git a/src/modules/rlm_cache/configure.ac b/src/modules/rlm_cache/configure.ac index 979d8d6b961..d6b951f6ccc 100644 --- a/src/modules/rlm_cache/configure.ac +++ b/src/modules/rlm_cache/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.53]) AC_INIT(rlm_cache.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_cache]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_cache]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then AC_PROG_CC diff --git a/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure.ac b/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure.ac index af107025f11..9845f8396df 100644 --- a/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure.ac +++ b/src/modules/rlm_cache/drivers/rlm_cache_memcached/configure.ac @@ -1,11 +1,7 @@ AC_PREREQ([2.53]) AC_INIT(rlm_cache_memcached.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_cache_memcached]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_cache_memcached]) if test x$with_[]modname != xno; then diff --git a/src/modules/rlm_couchbase/configure.ac b/src/modules/rlm_couchbase/configure.ac index f3dc1df4f43..3145d1f5106 100644 --- a/src/modules/rlm_couchbase/configure.ac +++ b/src/modules/rlm_couchbase/configure.ac @@ -1,13 +1,9 @@ AC_PREREQ([2.53]) AC_INIT(rlm_couchbase.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_couchbase]) +FR_INIT_MODULE([rlm_couchbase]) AC_CONFIG_HEADER(config.h) -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) - if test x$with_[]modname != xno; then AC_PROG_CC diff --git a/src/modules/rlm_eap/configure.ac b/src/modules/rlm_eap/configure.ac index 19134729e70..0b96e1b6037 100644 --- a/src/modules/rlm_eap/configure.ac +++ b/src/modules/rlm_eap/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.53]) AC_INIT(rlm_eap.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_eap]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_eap]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then AC_PROG_CC diff --git a/src/modules/rlm_idn/configure.ac b/src/modules/rlm_idn/configure.ac index 070a1e504c5..832cb0b7524 100644 --- a/src/modules/rlm_idn/configure.ac +++ b/src/modules/rlm_idn/configure.ac @@ -1,10 +1,6 @@ AC_INIT(rlm_idn.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_idn]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_idn]) if test x$with_[]modname != xno; then diff --git a/src/modules/rlm_krb5/configure.ac b/src/modules/rlm_krb5/configure.ac index c7fac3584f8..173592719ff 100644 --- a/src/modules/rlm_krb5/configure.ac +++ b/src/modules/rlm_krb5/configure.ac @@ -1,11 +1,7 @@ AC_PREREQ([2.53]) AC_INIT(rlm_krb5.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_krb5]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_krb5]) if test x$with_[]modname != xno; then diff --git a/src/modules/rlm_lua/configure.ac b/src/modules/rlm_lua/configure.ac index 591ff57b9b3..1836f9a4c30 100644 --- a/src/modules/rlm_lua/configure.ac +++ b/src/modules/rlm_lua/configure.ac @@ -1,11 +1,7 @@ AC_PREREQ([2.53]) AC_INIT(rlm_lua.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_lua]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_lua], [lua support]) if test x$with_[]modname != xno; then AC_PROG_CC diff --git a/src/modules/rlm_mruby/configure.ac b/src/modules/rlm_mruby/configure.ac index d915d8d1ba1..a96a4921709 100644 --- a/src/modules/rlm_mruby/configure.ac +++ b/src/modules/rlm_mruby/configure.ac @@ -1,10 +1,6 @@ AC_INIT(rlm_mruby.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_mruby]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_mruby]) if test x$with_[]modname != xno; then AC_PROG_CC diff --git a/src/modules/rlm_mschap/configure.ac b/src/modules/rlm_mschap/configure.ac index ed999eeb07d..a15953e09f9 100644 --- a/src/modules/rlm_mschap/configure.ac +++ b/src/modules/rlm_mschap/configure.ac @@ -1,10 +1,6 @@ AC_INIT(rlm_mschap.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_mschap]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_mschap]) if test x$with_[]modname != xno; then diff --git a/src/modules/rlm_opendirectory/configure.ac b/src/modules/rlm_opendirectory/configure.ac index b68e6b17515..5ddb2f86fe3 100644 --- a/src/modules/rlm_opendirectory/configure.ac +++ b/src/modules/rlm_opendirectory/configure.ac @@ -1,10 +1,6 @@ AC_INIT(rlm_opendirectory.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_opendirectory]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_opendirectory]) if test x$with_[]modname != xno; then diff --git a/src/modules/rlm_pam/configure.ac b/src/modules/rlm_pam/configure.ac index ea48054b0d8..11962477981 100644 --- a/src/modules/rlm_pam/configure.ac +++ b/src/modules/rlm_pam/configure.ac @@ -1,13 +1,9 @@ AC_PREREQ([2.53]) AC_INIT(rlm_pam.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_pam]) +FR_INIT_MODULE([rlm_pam]) AC_DEFUN(modname_useropt,[m4_bpatsubst([]modname,[[-+.]],[_])]) -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) - if test x$with_[]modname != xno; then AC_PROG_CC diff --git a/src/modules/rlm_perl/configure.ac b/src/modules/rlm_perl/configure.ac index c5dc92bedf5..b2b7a7a8fd5 100644 --- a/src/modules/rlm_perl/configure.ac +++ b/src/modules/rlm_perl/configure.ac @@ -1,13 +1,7 @@ AC_PREREQ([2.53]) AC_INIT(rlm_perl.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_perl]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) - -m4_include([m4/ax_with_prog.m4]) +FR_INIT_MODULE([rlm_perl]) if test x$with_[]modname != xno; then AC_PROG_CC diff --git a/src/modules/rlm_python/configure.ac b/src/modules/rlm_python/configure.ac index f3bac5f08ed..182ce86a0cd 100644 --- a/src/modules/rlm_python/configure.ac +++ b/src/modules/rlm_python/configure.ac @@ -2,11 +2,7 @@ AC_PREREQ([2.71]) AC_INIT AC_CONFIG_SRCDIR([rlm_python.c]) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_python]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_python]) if test x$with_[]modname != xno; then diff --git a/src/modules/rlm_radutmp/configure.ac b/src/modules/rlm_radutmp/configure.ac index 88adc328e2b..00b73942d08 100644 --- a/src/modules/rlm_radutmp/configure.ac +++ b/src/modules/rlm_radutmp/configure.ac @@ -1,11 +1,7 @@ AC_PREREQ([2.53]) AC_INIT(rlm_radutmp.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_radutmp]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_radutmp]) if test x$with_[]modname != xno; then diff --git a/src/modules/rlm_securid/configure.ac b/src/modules/rlm_securid/configure.ac index 01c0d48c4e2..979951d0d27 100644 --- a/src/modules/rlm_securid/configure.ac +++ b/src/modules/rlm_securid/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.59]) AC_INIT(rlm_securid.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_securid]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_securid]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then dnl ############################################################ diff --git a/src/modules/rlm_sigtran/configure.ac b/src/modules/rlm_sigtran/configure.ac index 6bbe1722aef..c61814ae0d2 100644 --- a/src/modules/rlm_sigtran/configure.ac +++ b/src/modules/rlm_sigtran/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.61]) AC_INIT(rlm_sigtran.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sigtran]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sigtran]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then dnl ############################################################ dnl # Check for command line options diff --git a/src/modules/rlm_sql/configure.ac b/src/modules/rlm_sql/configure.ac index f50943367d7..b9c64a2c06d 100644 --- a/src/modules/rlm_sql/configure.ac +++ b/src/modules/rlm_sql/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.53]) AC_INIT(rlm_sql.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sql]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sql]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then AC_PROG_CC diff --git a/src/modules/rlm_sql/drivers/rlm_sql_cassandra/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_cassandra/configure.ac index 0377675ed0e..df537c4a6e1 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_cassandra/configure.ac +++ b/src/modules/rlm_sql/drivers/rlm_sql_cassandra/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.59]) AC_INIT(rlm_sql_cassandra.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sql_cassandra]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sql_cassandra]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then dnl ############################################################ diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac index 6931e4d2b55..d8e85a941a9 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac +++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.59]) AC_INIT(rlm_sql_db2.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sql_db2]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sql_db2]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then dnl extra argument: --with-ibmdb2-include-dir diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac index 5d6d3c42e6a..8a0aee5f33e 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac +++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.59]) AC_INIT(rlm_sql_firebird.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sql_firebird]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sql_firebird]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then dnl extra argument: --with-firebird-include-dir firebird_include_dir= diff --git a/src/modules/rlm_sql/drivers/rlm_sql_freetds/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_freetds/configure.ac index 005565983ec..7586984d1bb 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_freetds/configure.ac +++ b/src/modules/rlm_sql/drivers/rlm_sql_freetds/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.59]) AC_INIT(rlm_sql_freetds.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sql_freetds]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sql_freetds]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then dnl ############################################################ diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac index 2ff86feefb5..3963ef05dfc 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac +++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac @@ -1,16 +1,13 @@ AC_PREREQ([2.59]) AC_INIT(rlm_sql_mysql.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sql_mysql]) +FR_INIT_MODULE([rlm_sql_mysql]) AC_CONFIG_HEADER(config.h) -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) - fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then dnl ############################################################ dnl # Check for command line options diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac index dc864ddbfb1..bbbeab23973 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac +++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac @@ -1,15 +1,12 @@ AC_INIT(rlm_sql_oracle.c) AC_REVISION($Revision: 1.10 $) -AC_DEFUN(modname,[rlm_sql_oracle]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sql_oracle]) oracle_supported_versions="19 18 12 11" fail= mod_ldflags= mod_cflags= + if test x$with_[]modname != xno; then dnl ############################################################ diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac index 8fab1cfb9d4..1b840e0484b 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac +++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac @@ -1,14 +1,11 @@ AC_INIT(rlm_sql_postgresql.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sql_postgresql]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sql_postgresql]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then AC_PROG_CC diff --git a/src/modules/rlm_sql/drivers/rlm_sql_sqlite/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_sqlite/configure.ac index 0c0df798454..d761f728c74 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_sqlite/configure.ac +++ b/src/modules/rlm_sql/drivers/rlm_sql_sqlite/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.59]) AC_INIT(rlm_sql_sqlite.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sql_sqlite]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sql_sqlite]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then dnl ############################################################ diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac index bf398479849..318cf7d9e4c 100644 --- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac +++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac @@ -1,15 +1,12 @@ AC_PREREQ([2.59]) AC_INIT(rlm_sql_unixodbc.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_sql_unixodbc]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_sql_unixodbc]) fail= SMART_LIBS= SMART_CLFAGS= + if test x$with_[]modname != xno; then dnl extra argument: --with-unixodbc-include-dir diff --git a/src/modules/rlm_unbound/configure.ac b/src/modules/rlm_unbound/configure.ac index edca9c4c6f2..4c0cb69cc4f 100644 --- a/src/modules/rlm_unbound/configure.ac +++ b/src/modules/rlm_unbound/configure.ac @@ -1,11 +1,7 @@ AC_PREREQ([2.53]) AC_INIT(rlm_unbound.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_unbound]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_unbound]) if test x$with_[]modname != xno; then dnl extra argument: --with-rlm-unbound-lib-dir diff --git a/src/modules/rlm_unix/configure.ac b/src/modules/rlm_unix/configure.ac index 640b2e842de..73d35fdb2dc 100644 --- a/src/modules/rlm_unix/configure.ac +++ b/src/modules/rlm_unix/configure.ac @@ -1,11 +1,7 @@ AC_PREREQ([2.53]) AC_INIT(rlm_unix.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_unix]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_unix]) if test x$with_[]modname != xno; then diff --git a/src/modules/rlm_winbind/configure.ac b/src/modules/rlm_winbind/configure.ac index 9ed6de29dac..056747b430b 100644 --- a/src/modules/rlm_winbind/configure.ac +++ b/src/modules/rlm_winbind/configure.ac @@ -1,10 +1,6 @@ AC_INIT(rlm_winbind.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_winbind]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_winbind]) if test x$with_[]modname != xno; then diff --git a/src/modules/rlm_yubikey/configure.ac b/src/modules/rlm_yubikey/configure.ac index f086d002819..26eddb05859 100644 --- a/src/modules/rlm_yubikey/configure.ac +++ b/src/modules/rlm_yubikey/configure.ac @@ -1,11 +1,7 @@ AC_PREREQ([2.53]) AC_INIT(rlm_yubikey.c) AC_REVISION($Revision$) -AC_DEFUN(modname,[rlm_yubikey]) - -AC_ARG_WITH([]modname, -[AS_HELP_STRING([--without-[]modname],[build without module])] -) +FR_INIT_MODULE([rlm_yubikey]) if test x$with_[]modname != xno; then dnl ############################################################