Skip to content
Snippets Groups Projects
Commit 799fde2c authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

More portable infrastructure for deprecating CPPFLAGS-like configure substitutes

[[Imported from SVN: r5808]]
parent 36bb8dbd
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ ALLM4S = acx_blas.m4 acx_lapack.m4 acx_mpi.m4 acx_pthread.m4 \
dune_autobuild.m4 dune_common.m4 dune_compiler.m4 \
dune_cppincludeopt.m4 \
dune_deprecated.m4 \
dune_deprecated_cppflags.m4 \
dune_docu.m4 dune_exprtmpl.m4 dune_linkcxx.m4 \
dune.m4 \
dune_mpi.m4 dune_streams.m4 \
......
dnl -*- autoconf -*-
# Define configure substitution SUBSTITUTION. Assign value to it but add an
# additional preprocessor define which may be detected by config.h. Add some
# text to config.h which detects that define and issues the warning in
# message.
#
# DUNE_DEPRECATED_CPPFLAGS(SUBSTITUTION, VALUE, MESSAGE)
AC_DEFUN([DUNE_DEPRECATED_CPPFLAGS],
[
AH_VERBATIM([DEPRECATED_$1_USED],
[#ifdef DEPRECATED_$1_USED
#warning $3
#endif])
AC_SUBST([$1], [$2" -D DEPRECATED_$1_USED"])
])
......@@ -170,7 +170,8 @@ AC_DEFUN([DUNE_MPI],[
AC_SUBST(DUNEMPILDFLAGS, $DUNEMPILDFLAGS)
AC_SUBST(DUNEMPILIBS, $DUNEMPILIBS)
AC_SUBST(MPI_CPPFLAGS, "$dune_mpicppflagswarn $DUNEMPICPPFLAGS")
DUNE_DEPRECATED_CPPFLAGS(MPI_CPPFLAGS, "$dune_mpicppflagswarn $DUNEMPICPPFLAGS",
[The MPI_CPPFLAGS configure substitute is deprecated. Please change your Makefile.am to use DUNEMPICPPFLAGS instead. Note that it is a good idea to change any occurance of MPI_LDFLAGS into DUNEMPILIBS and DUNEMPILDFLAGS as apropriate, since it is not possible to issue a deprecation warning in that case.])
AC_SUBST(MPI_LDFLAGS, "$DUNEMPILDFLAGS $DUNEMPILIBS")
AC_SUBST(MPI_VERSION, $dune_MPI_VERSION)
AC_DEFINE(HAVE_MPI,ENABLE_MPI,[Define if you have the MPI library.
......@@ -181,7 +182,8 @@ AC_DEFUN([DUNE_MPI],[
AC_SUBST(DUNEMPILDFLAGS, "")
AC_SUBST(DUNEMPILIBS, "")
AC_SUBST(MPI_CPPFLAGS, "$dune_mpicppflagswarn")
DUNE_DEPRECATED_CPPFLAGS(MPI_CPPFLAGS, "$dune_mpicppflagswarn",
[The MPI_CPPFLAGS configure substitute is deprecated. Please change your Makefile.am to use DUNEMPICPPFLAGS instead. Note that it is a good idea to change any occurance of MPI_LDFLAGS into DUNEMPILIBS and DUNEMPILDFLAGS as apropriate, since it is not possible to issue a deprecation warning in that case.])
AC_SUBST(MPI_LDFLAGS, "")
])
......
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