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

remove the older infrastructure for CPPFLAGS-like configure substitutions deprecation

[[Imported from SVN: r5809]]
parent 799fde2c
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,6 @@ AC_CONFIG_FILES([Makefile
dune/common/Makefile
dune/common/test/Makefile
dune/common/exprtmpl/Makefile
dune/common/warnings/Makefile
doc/Makefile
doc/devel/Makefile
doc/layout/Makefile
......
# $Id$
SUBDIRS = . test exprtmpl warnings
SUBDIRS = . test exprtmpl
# the standard debug streams are put into the libdune
noinst_LTLIBRARIES = libcommon.la
......
Makefile
Makefile.in
# $Id$
warningsincludedir = $(includedir)/dune/common/warnings
warningsinclude_HEADERS = \
mpi_cppflags_deprecation.hh
include $(top_srcdir)/am/global-rules
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_MPI_CPPFLAGS_DEPRECATION
#define DUNE_MPI_CPPFLAGS_DEPRECATION
#warning The MPI_CPPFLAGS configure substitute is deprecated. Please change
#warning your Makefile.am to use DUNEMPICPPFLAGS instead. Note that it is a
#warning good idea to change any occurance of MPI_LDFLAGS into DUNEMPILIBS and
#warning DUNEMPILDFLAGS as apropriate, since it is not possible to issue a
#warning deprecation warning in that case.
#endif // DUNE_MPI_CPPFLAGS_DEPRECATION
......@@ -3,7 +3,6 @@
ALLM4S = acx_blas.m4 acx_lapack.m4 acx_mpi.m4 acx_pthread.m4 \
ax_check_gl.m4 ax_lang_compiler_ms.m4 dune_all.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 \
......
dnl -*- autoconf -*-
# Determine how to make the C preprocessor include a certain file before the
# main input file from the command line. Sets the following configure
# substitution:
#
# CPPINCLUDEOPT The include option. This is something like "-include " (note
# trailing space). If no such option could determined, this variable will
# be set to something like "-D DUMMY=". This means it must be used like
# CPPFLAGS="$CPPINCLUDEOPT$header" (note: no whitespace between
# $CPPINCLUDEOPT and $header).
#
# Sets the following automake conditional:
#
# HAVE_CPPINCLUDEOPT
AC_DEFUN([DUNE_CPPINCLUDEOPT],
[
AC_LANG_PUSH([C])
AC_REQUIRE([AC_PROG_CPP])
AC_MSG_CHECKING([for preprocessor option to preinclude a header])
cat >conftestpreinc.h <<EOF
#define PREINC_WORKS
EOF
ac_save_CPPFLAGS="$CPPFLAGS"
HAVE_CPPINCLUDEOPT=no
if ! test yes = "$HAVE_CPPINCLUDEOPT"; then
# check for -include
CPPINCLUDEOPT="-include "
CPPFLAGS="$ac_save_CPPFLAGS ${CPPINCLUDEOPT}conftestpreinc.h"
AC_COMPILE_IFELSE([
#ifdef PREINC_WORKS
/* OK */
#else
#error preinc does not work
#endif
],[HAVE_CPPINCLUDEOPT=yes])
fi
rm -f conftestpreinc.h
if ! test yes = "$HAVE_CPPINCLUDEOPT"; then
CPPINCLUDEOPT="-D DUMMY="
fi
AC_MSG_RESULT([$HAVE_CPPINCLUDEOPT (${CPPINCLUDEOPT}file.h)])
AC_SUBST([CPPINCLUDEOPT])
AM_CONDITIONAL([HAVE_CPPINCLUDEOPT], [test yes = "$HAVE_CPPINCLUDEOPT"])
CPPFLAGS="$ac_save_CPPFLAGS"
AC_LANG_POP([C])
])
......@@ -53,7 +53,6 @@ dnl -*- autoconf -*-
AC_DEFUN([DUNE_MPI],[
AC_PREREQ(2.50) dnl for AC_LANG_CASE
AC_REQUIRE([DUNE_CPPINCLUDEOPT])
# get compilation script
AC_LANG_CASE([C],[
......@@ -162,30 +161,22 @@ AC_DEFUN([DUNE_MPI],[
])
# set flags
AS_IF([test yes = "$HAVE_CPPINCLUDEOPT"],
[dune_mpicppflagswarn="${CPPINCLUDEOPT}dune/common/warnings/mpi_cppflags_deprecation.hh"],
[dune_mpicppflagswarn=""])
AS_IF([test "x$with_mpi" != "xno"],[
AC_SUBST(DUNEMPICPPFLAGS, $DUNEMPICPPFLAGS)
AC_SUBST(DUNEMPILDFLAGS, $DUNEMPILDFLAGS)
AC_SUBST(DUNEMPILIBS, $DUNEMPILIBS)
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)
MPI_LDFLAGS="$DUNEMPILDFLAGS $DUNEMPILIBS"
AC_DEFINE(HAVE_MPI,ENABLE_MPI,[Define if you have the MPI library.
This is only true if MPI was found by configure _and_ if the application
uses the DUNEMPICPPFLAGS (or the deprecated MPI_CPPFLAGS)])
This is only true if MPI was found by configure _and_ if the application
uses the DUNEMPICPPFLAGS (or the deprecated MPI_CPPFLAGS)])
],[
AC_SUBST(DUNEMPICPPFLAGS, "")
AC_SUBST(DUNEMPILDFLAGS, "")
AC_SUBST(DUNEMPILIBS, "")
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, "")
MPI_LDFLAGS=""
])
AC_SUBST(DUNEMPICPPFLAGS)
AC_SUBST(DUNEMPILDFLAGS)
AC_SUBST(DUNEMPILIBS)
AC_SUBST(MPI_VERSION, $dune_MPI_VERSION)
DUNE_DEPRECATED_CPPFLAGS(MPI_CPPFLAGS, "$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)
AM_CONDITIONAL(MPI, [test "x$with_mpi" != "xno"])
......
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