From: Matthew Newton Date: Thu, 29 Sep 2022 09:08:57 +0000 (+0100) Subject: use aclocal to regenerate aclocal.m4 on the fly X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75e62880a3233256c108bfed574429ee29cb8119;p=thirdparty%2Ffreeradius-server.git use aclocal to regenerate aclocal.m4 on the fly this means we can also remove m4_include, as aclocal will search for all required macros --- diff --git a/.gitignore b/.gitignore index 8db76c98b84..1e4f9c5ab68 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,7 @@ config.status Make.inc libtool autom4te.cache +aclocal.m4 config.guess config.sub config.h diff --git a/Makefile b/Makefile index 9aac7895125..2a20887b469 100644 --- a/Makefile +++ b/Makefile @@ -282,7 +282,9 @@ ifeq "$(CONFIGURE_FILES)" "1" # If there are headers, run auto-header, too. src/%configure: src/%configure.ac acinclude.m4 aclocal.m4 $(wildcard $(dir $@)m4/*m4) | src/freeradius-devel @echo AUTOCONF $(dir $@) - cd $(dir $@) && $(AUTOCONF) -I $(top_builddir) -I $(top_builddir)/m4 -I $(top_builddir)/$(dir $@)m4 + @cd $(dir $@) && \ + $(ACLOCAL) -I $(top_builddir)/m4 && \ + $(AUTOCONF) @if grep AC_CONFIG_HEADERS $@ >/dev/null; then\ echo AUTOHEADER $@ \ cd $(dir $@) && $(AUTOHEADER); \ @@ -292,6 +294,7 @@ src/%configure: src/%configure.ac acinclude.m4 aclocal.m4 $(wildcard $(dir $@)m4 # "%configure" doesn't match "configure" configure: configure.ac $(wildcard ac*.m4) $(wildcard m4/*.m4) @echo AUTOCONF $@ + @$(ACLOCAL) -I $(top_builddir)/m4 @$(AUTOCONF) src/include/autoconf.h.in: configure.ac diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index 440da76b075..00000000000 --- a/aclocal.m4 +++ /dev/null @@ -1,106 +0,0 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- - -# Copyright (C) 1996-2013 Free Software Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to -# '$srcdir', '$srcdir/..', or '$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is '.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997-2013 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it is modern enough. -# If it is, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -m4_include([acinclude.m4]) diff --git a/configure.ac b/configure.ac index 8e6614f3492..49ef47df296 100644 --- a/configure.ac +++ b/configure.ac @@ -26,13 +26,6 @@ export CFLAGS LIBS LDFLAGS CPPFLAGS AC_INIT([freeradius],[$]Id[$],[http://bugs.freeradius.org],,[http://www.freeradius.org]) AC_CONFIG_SRCDIR([src/bin/radiusd.c]) AC_CONFIG_HEADER([src/include/autoconf.h]) -m4_include([m4/ax_cc.m4]) -m4_include([m4/ax_smart_try.m4]) -m4_include([m4/ax_thread_local.m4]) -m4_include([m4/ax_type.m4]) -m4_include([m4/ax_with_feature_args.m4]) -m4_include([m4/ax_with_lib_args.m4]) -m4_include([m4/ax_prog_perl_modules.m4]) dnl ############################################################# dnl # diff --git a/src/lib/curl/configure.ac b/src/lib/curl/configure.ac index 3298bcd7290..ac01da3ff2b 100644 --- a/src/lib/curl/configure.ac +++ b/src/lib/curl/configure.ac @@ -6,8 +6,6 @@ AC_DEFUN(modname,[libfreeradius-curl]) AC_DEFUN(modname_useropt,[m4_bpatsubst([]modname,[[-+.]],[_])]) AC_CONFIG_HEADERS([config.h]) -m4_include([m4/ax_smart_try.m4]) -m4_include([m4/libcurl_check_config.m4]) AC_ARG_WITH([]modname, [AS_HELP_STRING([--without-[]modname],[build without libcurl support])] diff --git a/src/lib/json/configure.ac b/src/lib/json/configure.ac index 254e3f9aeaa..6a85f351a79 100644 --- a/src/lib/json/configure.ac +++ b/src/lib/json/configure.ac @@ -6,8 +6,6 @@ AC_DEFUN(modname,[libfreeradius-json]) AC_DEFUN(modname_useropt,[m4_bpatsubst([]modname,[[-+.]],[_])]) AC_CONFIG_HEADERS([config.h]) -m4_include([m4/ax_smart_try.m4]) - AC_ARG_WITH([]modname, [AS_HELP_STRING([--without-[]modname],[build without JSON support from json-c])] ) diff --git a/src/lib/kafka/configure.ac b/src/lib/kafka/configure.ac index f72b2399d57..0924d4dbd22 100644 --- a/src/lib/kafka/configure.ac +++ b/src/lib/kafka/configure.ac @@ -4,8 +4,6 @@ AC_CONFIG_SRCDIR([base.c]) AC_REVISION($Revision$) AC_DEFUN(modname,[libfreeradius-kafka]) -m4_include([m4/ax_smart_try.m4]) - AC_ARG_WITH([]modname, [AS_HELP_STRING([--without-[]modname],[build without rdkafka support])] ) diff --git a/src/lib/ldap/configure.ac b/src/lib/ldap/configure.ac index 22fede4d535..c2416ea3e33 100644 --- a/src/lib/ldap/configure.ac +++ b/src/lib/ldap/configure.ac @@ -5,8 +5,6 @@ AC_REVISION($Revision$) AC_DEFUN(modname,[libfreeradius-ldap]) AC_DEFUN(modname_useropt,[m4_bpatsubst([]modname,[[-+.]],[_])]) -m4_include([m4/ax_smart_try.m4]) - AC_ARG_WITH([]modname, [AS_HELP_STRING([--without-[]modname],[build without LDAP support])] ) diff --git a/src/lib/redis/configure.ac b/src/lib/redis/configure.ac index 2081486fb18..ba925018f34 100644 --- a/src/lib/redis/configure.ac +++ b/src/lib/redis/configure.ac @@ -5,8 +5,6 @@ AC_REVISION($Revision$) AC_DEFUN(modname,[libfreeradius-redis]) AC_DEFUN(modname_useropt,[m4_bpatsubst([]modname,[[-+.]],[_])]) -m4_include([m4/ax_smart_try.m4]) - AC_ARG_WITH([]modname, [AS_HELP_STRING([--without-[]modname],[build without redis support])] ) diff --git a/src/modules/rlm_lua/configure.ac b/src/modules/rlm_lua/configure.ac index a5f305dee62..591ff57b9b3 100644 --- a/src/modules/rlm_lua/configure.ac +++ b/src/modules/rlm_lua/configure.ac @@ -2,7 +2,6 @@ AC_PREREQ([2.53]) AC_INIT(rlm_lua.c) AC_REVISION($Revision$) AC_DEFUN(modname,[rlm_lua]) -m4_include([m4/ax_lua.m4]) AC_ARG_WITH([]modname, [AS_HELP_STRING([--without-[]modname],[build without module])]