update obsolete autoconf constructs

Part of #447.

* configure.ac, m4/debug.m4, m4/devel.m4, m4/gccoptim.m4,
m4/ndebug.m4: Replace AC_ERROR and AC_HELP_STRING by
by AC_MSG_ERROR and AS_HELP_STRING.
This commit is contained in:
Alexandre Duret-Lutz 2021-01-12 16:11:12 +01:00
parent 7efdd497a8
commit d779395db6
5 changed files with 13 additions and 13 deletions

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (C) 2008-2020, Laboratoire de Recherche et Développement # Copyright (C) 2008-2021, Laboratoire de Recherche et Développement
# de l'Epita (LRDE). # de l'Epita (LRDE).
# Copyright (C) 2003-2007 Laboratoire d'Informatique de Paris 6 # Copyright (C) 2003-2007 Laboratoire d'Informatique de Paris 6
# (LIP6), département Systèmes Répartis Coopératifs (SRC), Université # (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
@ -49,12 +49,12 @@ AM_SILENT_RULES([no])
# Option to activate C++17 # Option to activate C++17
AC_ARG_ENABLE([c++17], AC_ARG_ENABLE([c++17],
[AC_HELP_STRING([--enable-c++17], [AS_HELP_STRING([--enable-c++17],
[Compile in C++17 mode.])], [Compile in C++17 mode.])],
[enable_17=$enableval], [enable_17=no]) [enable_17=$enableval], [enable_17=no])
AC_ARG_ENABLE([doxygen], AC_ARG_ENABLE([doxygen],
[AC_HELP_STRING([--enable-doxygen]), [AS_HELP_STRING([--enable-doxygen]),
[enable generation of Doxygen documentation (requires Doxygen)])], [enable generation of Doxygen documentation (requires Doxygen)])],
[enable_doxygen=$enableval], [enable_doxygen=no]) [enable_doxygen=$enableval], [enable_doxygen=no])
AM_CONDITIONAL([ENABLE_DOXYGEN], [test "x${enable_doxygen:-no}" = xyes]) AM_CONDITIONAL([ENABLE_DOXYGEN], [test "x${enable_doxygen:-no}" = xyes])
@ -62,7 +62,7 @@ AM_CONDITIONAL([ENABLE_DOXYGEN], [test "x${enable_doxygen:-no}" = xyes])
# Option to indicate the maximal number of acceptance marks # Option to indicate the maximal number of acceptance marks
AC_COMPUTE_INT([default_max_accsets], [8*sizeof(unsigned)]) AC_COMPUTE_INT([default_max_accsets], [8*sizeof(unsigned)])
AC_ARG_ENABLE([max-accsets], AC_ARG_ENABLE([max-accsets],
[AC_HELP_STRING([--enable-max-accsets=N], [AS_HELP_STRING([--enable-max-accsets=N],
[Support up to N acceptance sets])], [Support up to N acceptance sets])],
[enable_max_accsets=$enableval], [enable_max_accsets=$enableval],
[enable_max_accsets=$default_max_accsets]) [enable_max_accsets=$default_max_accsets])
@ -71,7 +71,7 @@ then
AC_DEFINE_UNQUOTED([MAX_ACCSETS], [$enable_max_accsets], AC_DEFINE_UNQUOTED([MAX_ACCSETS], [$enable_max_accsets],
[The maximal number of acceptance sets supported (also known as acceptance marks)]) [The maximal number of acceptance sets supported (also known as acceptance marks)])
else else
AC_ERROR([The argument of --enable-max-accsets must be a multiple of $default_max_accsets]) AC_MSG_ERROR([The argument of --enable-max-accsets must be a multiple of $default_max_accsets])
fi fi
# Activate C11 for gnulib tests # Activate C11 for gnulib tests
@ -125,7 +125,7 @@ if test x"${enable_17}" = xyes; then
${stdpass-false} && break ${stdpass-false} && break
done done
if ! "${stdpass-false}"; then if ! "${stdpass-false}"; then
AC_ERROR([unable to turn on C++17 mode with this compiler]) AC_MSG_ERROR([unable to turn on C++17 mode with this compiler])
fi fi
else else
for f in -std=c++14 '-std=c++14 -stdlib=libc++' -std=c++1y for f in -std=c++14 '-std=c++14 -stdlib=libc++' -std=c++1y
@ -135,7 +135,7 @@ else
${stdpass-false} && break ${stdpass-false} && break
done done
if ! "${stdpass-false}"; then if ! "${stdpass-false}"; then
AC_ERROR([unable to turn on C++14 mode with this compiler]) AC_MSG_ERROR([unable to turn on C++14 mode with this compiler])
fi fi
fi fi
@ -151,7 +151,7 @@ LTDL_INIT([subproject convenience])
AX_BSYMBOLIC AX_BSYMBOLIC
AC_ARG_ENABLE([python], AC_ARG_ENABLE([python],
[AC_HELP_STRING([--disable-python], [AS_HELP_STRING([--disable-python],
[do not compile Python bindings])], [do not compile Python bindings])],
[], [enable_python=yes]) [], [enable_python=yes])

View file

@ -1,6 +1,6 @@
AC_DEFUN([adl_ENABLE_DEBUG], AC_DEFUN([adl_ENABLE_DEBUG],
[AC_ARG_ENABLE([debug], [AC_ARG_ENABLE([debug],
[AC_HELP_STRING([--enable-debug],[enable debugging symbols])]) [AS_HELP_STRING([--enable-debug],[enable debugging symbols])])
case "${enable_debug}" in case "${enable_debug}" in
yes) yes)
AC_DEFINE([DEBUG],1,[Define if you want debugging code.]) AC_DEFINE([DEBUG],1,[Define if you want debugging code.])

View file

@ -1,6 +1,6 @@
AC_DEFUN([adl_ENABLE_DEVEL], AC_DEFUN([adl_ENABLE_DEVEL],
[AC_ARG_ENABLE([devel], [AC_ARG_ENABLE([devel],
[AC_HELP_STRING([--enable-devel], [AS_HELP_STRING([--enable-devel],
[turn on useful developer options])]) [turn on useful developer options])])
# Turn on devel options for development version, unless # Turn on devel options for development version, unless
@ -31,7 +31,7 @@ AC_DEFUN([adl_ENABLE_DEVEL],
AC_DEFUN([adl_ENABLE_GLIBCXX_DEBUG], AC_DEFUN([adl_ENABLE_GLIBCXX_DEBUG],
[AC_ARG_ENABLE([glibcxx-debug], [AC_ARG_ENABLE([glibcxx-debug],
[AC_HELP_STRING([--enable-glibcxx-debug], [AS_HELP_STRING([--enable-glibcxx-debug],
[turn on use the libstdc++ debug mode (see README)])]) [turn on use the libstdc++ debug mode (see README)])])
if test x$enable_glibcxx_debug = xyes; then if test x$enable_glibcxx_debug = xyes; then
CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG" CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG"

View file

@ -1,7 +1,7 @@
dnl Adapted from Akim Demaille <akim@epita.fr> ad_GCC_WARNINGS. dnl Adapted from Akim Demaille <akim@epita.fr> ad_GCC_WARNINGS.
AC_DEFUN([ad_GCC_OPTIM], AC_DEFUN([ad_GCC_OPTIM],
[AC_ARG_ENABLE([optimizations], [AC_ARG_ENABLE([optimizations],
[AC_HELP_STRING([--disable-optimizations], [AS_HELP_STRING([--disable-optimizations],
[turn off aggressive optimizations])]) [turn off aggressive optimizations])])
if test -n "$GCC" && test "${enable_optimizations-yes}" = "yes"; then if test -n "$GCC" && test "${enable_optimizations-yes}" = "yes"; then
AC_CACHE_CHECK([for gcc optimization options], ac_cv_prog_gcc_opt_flags, AC_CACHE_CHECK([for gcc optimization options], ac_cv_prog_gcc_opt_flags,

View file

@ -1,6 +1,6 @@
AC_DEFUN([adl_NDEBUG], AC_DEFUN([adl_NDEBUG],
[AC_ARG_ENABLE([assert], [AC_ARG_ENABLE([assert],
[AC_HELP_STRING([--enable-assert], [turn on assertions])]) [AS_HELP_STRING([--enable-assert], [turn on assertions])])
if test "$enable_assert" != yes; then if test "$enable_assert" != yes; then
CPPFLAGS="$CPPFLAGS -DNDEBUG" CPPFLAGS="$CPPFLAGS -DNDEBUG"
fi]) fi])