3 # no-bogus-m4-defines - detect wrong m4 definitions
4 # -------------------------------------------------
5 # Try to catch the case where 'aclocal' pulls installed libtool
6 # macro file contents from another version of libtool into the
7 # current package 'aclocal.m4'. Currently used by 'make dist'
8 # and by ./bootstrap (bootstrap.conf).
10 # Copyright (C) 2015-2019, 2021-2024 Free Software Foundation, Inc.
12 # This file is part of GNU Libtool.
14 # GNU Libtool is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU General Public License as
16 # published by the Free Software Foundation; either version 2 of
17 # the License, or (at your option) any later version.
19 # GNU Libtool is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with GNU Libtool; see the file COPYING. If not, a copy
26 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
27 # or obtained by writing to the Free Software Foundation, Inc.,
28 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 # Please report bugs or propose patches to bug-libtool@gnu.org.
32 .
`echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh
33 # source this for "GNU m4" detection methods
34 .
`echo "$0" |${SED-sed} 's|[^/]*$||'`/extract-trace
38 bogus_macros
='LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL'
41 for macro
in $bogus_macros; do
42 func_append bogus_macros_grep
"/$macro/p;"
45 clean_false_alarms
="pushdef(\`AC_BEFORE', \`')"
47 bogus_macros_check_output
=`$ECHO "$clean_false_alarms" \
48 |$M4 - aclocal.m4 libltdl/aclocal.m4 \
49 |$SED -n "$bogus_macros_grep"`
52 for macro
in $bogus_macros; do
53 case $bogus_macros_check_output in
55 func_error
"Bogus $macro macro definition in an aclocal.m4 file"