autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.68-64-g


From: Ralf Wildenhues
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.68-64-g8c2db1c
Date: Sat, 02 Apr 2011 13:39:33 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=8c2db1c128fbcee77530b813f45a575c37a0f10f

The branch, master has been updated
       via  8c2db1c128fbcee77530b813f45a575c37a0f10f (commit)
      from  1c3373c5f06e4c2d2551354f03b8da5c0f831040 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8c2db1c128fbcee77530b813f45a575c37a0f10f
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Apr 2 15:20:48 2011 +0200

    New macro AC_FC_PP_DEFINE for the preprocessor define flag.
    
    * lib/autoconf/fortran.m4 (AC_FC_PP_DEFINE): New macro.
    * lib/autom4te.in (Automake-preselections): Preselect it.
    * doc/autoconf.texi (Fortran Compiler): Document it.
    * tests/local.at (_AT_CHECK_ENV): Do not complain about
    FCFLAGS_F nor FC_DEFINE.
    * NEWS: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |    8 +++++++
 NEWS                    |    1 +
 doc/autoconf.texi       |   19 +++++++++++++++++
 lib/autoconf/fortran.m4 |   50 +++++++++++++++++++++++++++++++++++++++++++++++
 lib/autom4te.in         |    1 +
 tests/local.at          |    2 +-
 6 files changed, 80 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5eb695d..19238e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-04-02  Ralf Wildenhues  <address@hidden>
 
+       New macro AC_FC_PP_DEFINE for the preprocessor define flag.
+       * lib/autoconf/fortran.m4 (AC_FC_PP_DEFINE): New macro.
+       * lib/autom4te.in (Automake-preselections): Preselect it.
+       * doc/autoconf.texi (Fortran Compiler): Document it.
+       * tests/local.at (_AT_CHECK_ENV): Do not complain about
+       FCFLAGS_F nor FC_DEFINE.
+       * NEWS: Update.
+
        New macro AC_FC_PP_SRCEXT for preprocessed file extensions.
        * lib/autoconf/fortran.m4 (AC_FC_PP_SRCEXT): New macro.
        * lib/autom4te.in (Automake-preselections): Preselect it.
diff --git a/NEWS b/NEWS
index d09e0f4..c44678d 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,7 @@ GNU Autoconf NEWS - User visible changes.
     AC_FC_MODULE_FLAG for the Fortran 90 module search path flag
     AC_FC_MODULE_OUTPUT_FLAG for the Fortran 90 module output directory flag
     AC_FC_PP_SRCEXT for preprocessed Fortran source files extensions
+    AC_FC_PP_DEFINE for the Fortran preprocessor define flag
 
 * Noteworthy changes in release 2.68 (2010-09-22) [stable]
   Released by Eric Blake, based on git versions 2.67.*.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 730b590..d553f4a 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -8262,6 +8262,25 @@ results in @address@hidden and
 @address@hidden variables, respectively.
 @end defmac
 
address@hidden AC_FC_PP_DEFINE (@ovar{action-if-success}, 
@dvar{action-if-failure, @
+  AC_MSG_FAILURE})
address@hidden
address@hidden fc_pp_define
+
+Find a flag to specify defines for preprocessed Fortran.  Not all
+Fortran compilers use @option{-D}.  Substitute @code{FC_DEFINE} with
+the result and call @var{action-if-success} (defaults to nothing) if
+successful, and @var{action-if-failure} (defaults to failing with an
+error message) if not.
+
+This macro calls @code{AC_FC_PP_SRCEXT([F])} in order to learn how to
+to preprocess a @file{conftest.F} file, but restores a previously used
+Fortran source file extension afterwards again.
+
+The result of this test is cached in the @code{ac_cv_fc_pp_define}
+variable.
address@hidden defmac
+
 @defmac AC_FC_FREEFORM (@ovar{action-if-success}, @dvar{action-if-failure, @
   AC_MSG_FAILURE})
 @acindex{FC_FREEFORM}
diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4
index 1c31392..56488a9 100644
--- a/lib/autoconf/fortran.m4
+++ b/lib/autoconf/fortran.m4
@@ -1275,6 +1275,56 @@ AC_LANG_POP(Fortran)dnl
 ])# AC_FC_PP_SRCEXT
 
 
+# AC_FC_PP_DEFINE([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE = FAILURE])
+# -------------------------------------------------------------------
+# Find a flag to specify defines for preprocessed Fortran.  Not all
+# Fortran compilers use -D.  Substitute FC_DEFINE with the result and
+# call ACTION-IF-SUCCESS (defaults to nothing) if successful, and
+# ACTION-IF-FAILURE (defaults to failing with an error message) if not.
+#
+# Known flags:
+# IBM: -WF,-D
+# Lahey/Fujitsu: -Wp,-D     older versions???
+# f2c: -D or -Wc,-D
+# others: -D
+AC_DEFUN([AC_FC_PP_DEFINE],
+[AC_LANG_PUSH([Fortran])dnl
+ac_fc_pp_define_srcext_save=$ac_fc_srcext
+AC_FC_PP_SRCEXT([F])
+AC_CACHE_CHECK([how to define symbols for preprocessed Fortran],
+  [ac_cv_fc_pp_define],
+[ac_fc_pp_define_srcext_save=$ac_fc_srcext
+ac_cv_fc_pp_define=unknown
+ac_fc_pp_define_FCFLAGS_save=$FCFLAGS
+for ac_flag in -D -WF,-D -Wp,-D -Wc,-D
+do
+  FCFLAGS="$ac_fc_pp_define_FCFLAGS_save ${ac_flag}FOOBAR ${ac_flag}ZORK=42"
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
+#ifndef FOOBAR
+      choke me
+#endif
+#if ZORK != 42
+      choke me
+#endif]])],
+    [ac_cv_fc_pp_define=$ac_flag])
+  test x"$ac_cv_fc_pp_define" != xunknown && break
+done
+FCFLAGS=$ac_fc_pp_define_FCFLAGS_save
+])
+ac_fc_srcext=$ac_fc_pp_define_srcext_save
+if test "x$ac_cv_fc_pp_define" = xunknown; then
+  FC_DEFINE=
+  m4_default([$2],
+            [AC_MSG_ERROR([Fortran does not allow to define preprocessor 
symbols], 77)])
+else
+  FC_DEFINE=$ac_cv_fc_pp_define
+  $1
+fi
+AC_SUBST([FC_DEFINE])dnl
+AC_LANG_POP([Fortran])dnl
+])
+
+
 # AC_FC_FREEFORM([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE = FAILURE])
 # ------------------------------------------------------------------
 # Look for a compiler flag to make the Fortran (FC) compiler accept
diff --git a/lib/autom4te.in b/lib/autom4te.in
index 0f86842..f38c4ad 100644
--- a/lib/autom4te.in
+++ b/lib/autom4te.in
@@ -44,6 +44,7 @@ args: --preselect AC_CONFIG_LIBOBJ_DIR
 args: --preselect AC_CONFIG_LINKS
 args: --preselect AC_FC_FREEFORM
 args: --preselect AC_FC_SRCEXT
+args: --preselect AC_FC_PP_DEFINE
 args: --preselect AC_FC_PP_SRCEXT
 args: --preselect AC_INIT
 args: --preselect AC_LIBSOURCE
diff --git a/tests/local.at b/tests/local.at
index a2efce3..1678c33 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -317,7 +317,7 @@ if test -f state-env.before && test -f state-env.after; then
       [cross_compiling|U],
       [interpval|PATH_SEPARATOR],
       [F77_DUMMY_MAIN|f77_(case|underscore)],
-      [FC(_DUMMY_MAIN|FLAGS|LIBS|FLAGS_f|_MODEXT|_MODINC|_MODOUT)?],
+      [FC(_DUMMY_MAIN|FLAGS|LIBS|FLAGS_[fF]|_MODEXT|_MODINC|_MODOUT|_DEFINE)?],
       [ALLOCA|GETLOADAVG_LIBS|KMEM_GROUP|NEED_SETGID|POW_LIB],
       [AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|MKDIR_P|RANLIB|SET_MAKE|YACC],
       [GREP|[EF]GREP|SED],


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

[Prev in Thread] Current Thread [Next in Thread]