# Configure template for GNU M4. -*-Autoconf-*-
-# Copyright (C) 1991, 1993-1994, 2004-2013 Free Software Foundation,
-# Inc.
+# Copyright (C) 1991, 1993-1994, 2004-2014, 2016-2017, 2020-2021 Free
+# Software Foundation, Inc.
#
# This file is part of GNU M4.
#
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
-AC_PREREQ([2.62])
+AC_PREREQ([2.64])
AC_INIT([GNU M4], m4_esyscmd([build-aux/git-version-gen .tarball-version]),
[bug-m4@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests parallel-tests
silent-rules subdir-objects gnu])
+AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
m4_pattern_forbid([^M4_[A-Z]])
# M4 is single-threaded; so we can optimize gnulib code by using this:
gl_DISABLE_THREADS
+AC_DEFINE([GNULIB_REGEX_SINGLE_THREAD], [1], [Define to optimize regex.])
+AC_DEFINE([GNULIB_MBRTOWC_SINGLE_THREAD], [1], [Define to optimize mbrtowc.])
+AC_DEFINE([GNULIB_WCHAR_SINGLE_LOCALE], [1], [Define to optimize mbrtowc.])
AC_ARG_ENABLE([gcc-warnings],
[AS_HELP_STRING([--enable-gcc-warnings],
*) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
esac
gl_gcc_warnings=$enableval],
- [if test -d "$srcdir"/.git; then
- gl_gcc_warnings=yes
- else
+ [if test -f "$srcdir"/.tarball-version; then
gl_gcc_warnings=no
+ else
+ gl_gcc_warnings=yes
fi]
)
nw="$nw -Wundef" # K&R is anachronistic
nw="$nw -Wtraditional" # K&R is anachronistic
nw="$nw -Wlong-long" # C90 is anachronistic
+ nw="$nw -Wvla" # gettext's use of VLAs is safe
nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
nw="$nw -Wpadded" # Our structs are not packed
nw="$nw -Wconversion" # Too many warnings for now
gl_WARN_ADD([-Wno-format-nonliteral])
fi
- gl_WARN_ADD([-fdiagnostics-show-option])
- gl_WARN_ADD([-funit-at-a-time])
-
AC_SUBST([WARN_CFLAGS])
AH_VERBATIM([FORTIFY_SOURCE],
with_syscmd_shell=/bin/sh
if test "$cross_compiling" != yes ; then
dnl Give mingw a default that is more likely to be available.
- AS_IF([AS_EXECUTABLE_P([/bin/sh])], [],
+ AS_IF([AS_EXECUTABLE_P([/bin/sh$EXEEXT])], [],
[if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi])
dnl Too bad _AS_PATH_WALK is not public.
M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
AC_CONFIG_COMMANDS([stamp-h], [[test -z "$CONFIG_HEADERS" || date > stamp-h]])
+AS_CASE([$host], [*-*-os2*], [OS2_LDFLAGS="-Zargs-resp"])
+AC_SUBST([OS2_LDFLAGS])
+
+AM_GNU_GETTEXT([external], [need-formatstring-macros])
+AM_GNU_GETTEXT_VERSION([0.19.2])
+
AC_CONFIG_FILES([Makefile
doc/Makefile
lib/Makefile
+ po/Makefile.in
src/Makefile
tests/Makefile
checks/Makefile