Skip to content
Snippets Groups Projects
Commit abef4a9e authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Make configure.ac compatible with Autoconf 2.70+

parent 98d2a854
No related branches found
No related tags found
1 merge request!12Cleanup license
# Copyright (c) 2013-2024 MPI-M, Luis Kornblueh, Rahul Sinha and DWD, Florian Prill. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
AC_PREREQ([2.69])
AC_INIT([libmtime], [1.0.11-rc2], [luis.kornblueh@zmaw.de])
......@@ -22,7 +27,17 @@ dnl Clean up after Libtool checks for C compiler (e.g. Intel compiler
dnl behind an MPI compiler wrapper):
rm -f a.out
AC_PROG_CC_C99
dnl Fix a bug in Autoconf 2.70 (see https://savannah.gnu.org/support/?110396):
m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.70]), [0],
[m4_pushdef([_AC_PROG_CC_C99],
m4_bpatsubst(m4_dquote(m4_defn([_AC_PROG_CC_C99])),
[\[ac_c_conftest_c89_program\]], [[ac_c_conftest_c99_program]]))dnl
AC_PROG_CC
m4_popdef([_AC_PROG_CC_C99])],
[AC_PROG_CC])
dnl Expand the legacy macro for older version of Autoconf (2.69 and older):
m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.70]), [-1],
[AC_PROG_CC_C99])
AS_VAR_IF([ac_cv_prog_cc_c99], [no],
[AC_MSG_FAILURE([C compiler does not support ISO C99])])
......@@ -48,7 +63,7 @@ AM_PATH_PYTHON([2.6])
AC_SEARCH_LIBS([roundf], [m])
AC_ARG_ENABLE([openmp],
[AC_HELP_STRING([--enable-openmp],
[AS_HELP_STRING([--enable-openmp],
[ensure compatibility with OpenMP applications @<:@default=no@:>@])], [],
[enable_openmp=no])
......@@ -60,13 +75,13 @@ AS_VAR_IF([enable_openmp], [yes],
AM_CONDITIONAL([ENABLE_OPENMP], [test x"$enable_openmp" = xyes])
AC_ARG_ENABLE([examples],
[AC_HELP_STRING([--enable-examples],
[AS_HELP_STRING([--enable-examples],
[build examples @<:@default=yes@:>@])], [],
[enable_examples=yes])
AM_CONDITIONAL([ENABLE_EXAMPLES], [test x"$enable_examples" = xyes])
AC_ARG_ENABLE([check],
[AC_HELP_STRING([--enable-check],
[AS_HELP_STRING([--enable-check],
[enable unit testing with check library @<:@default=auto@:>@])], [],
[enable_check=auto])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment