mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-24 10:54:42 +08:00
Allow inspecting AC_PREPROC_IFELSE output in true branch.
* lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY): Redirect preprocessor output to conftest.i rather than /dev/null. (_AC_PREPROC_IFELSE): Remove conftest.i in the postprocessing. * tests/compile.at (Order of user actions and cleanup): Extend test in the ACTION-IF-TRUE branch. * doc/autoconf.texi (Running the Preprocessor): Document new feature. * NEWS: Update. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
parent
bccd0d35fb
commit
2fd37d5d0a
10
ChangeLog
10
ChangeLog
@ -1,5 +1,15 @@
|
||||
2010-07-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Allow inspecting AC_PREPROC_IFELSE output in true branch.
|
||||
* lib/autoconf/general.m4 (_AC_PREPROC_IFELSE_BODY): Redirect
|
||||
preprocessor output to conftest.i rather than /dev/null.
|
||||
(_AC_PREPROC_IFELSE): Remove conftest.i in the postprocessing.
|
||||
* tests/compile.at (Order of user actions and cleanup): Extend
|
||||
test in the ACTION-IF-TRUE branch.
|
||||
* doc/autoconf.texi (Running the Preprocessor): Document new
|
||||
feature.
|
||||
* NEWS: Update.
|
||||
|
||||
Fix AC_FC_LIBRARY_LDFLAGS detection for BlueGene xlf -qipa.
|
||||
* lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Ignore
|
||||
'-link', added spuriously when -qipa is used with the XL
|
||||
|
3
NEWS
3
NEWS
@ -10,6 +10,9 @@ GNU Autoconf NEWS - User visible changes.
|
||||
|
||||
** New macro AC_FC_LINE_LENGTH to accept long Fortran source code lines.
|
||||
|
||||
** AC_PREPROC_IFELSE now keeps the preprocessed output in the conftest.i
|
||||
file for inspection by the commands in the ACTION-IF-TRUE argument.
|
||||
|
||||
* Major changes in Autoconf 2.66 (2010-07-02) [stable]
|
||||
Released by Eric Blake, based on git versions 2.65.*.
|
||||
|
||||
|
@ -8900,7 +8900,8 @@ This macro uses @code{CPPFLAGS}, but not @code{CFLAGS}, because
|
||||
preprocessors.
|
||||
|
||||
It is customary to report unexpected failures with
|
||||
@code{AC_MSG_FAILURE}.
|
||||
@code{AC_MSG_FAILURE}. If needed, @var{action-if-true} can further access
|
||||
the preprocessed output in the file @file{conftest.i}.
|
||||
@end defmac
|
||||
|
||||
For instance:
|
||||
|
@ -2461,7 +2461,7 @@ AC_DEFUN([AC_RUN_LOG],
|
||||
# Shell function body for _AC_PREPROC_IFELSE.
|
||||
m4_define([_AC_PREPROC_IFELSE_BODY],
|
||||
[ AS_LINENO_PUSH([$[]1])
|
||||
AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && {
|
||||
AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) > conftest.i && {
|
||||
test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
|
||||
test ! -s conftest.err
|
||||
}],
|
||||
@ -2486,7 +2486,7 @@ AC_DEFUN([_AC_PREPROC_IFELSE],
|
||||
[$0_BODY])]dnl
|
||||
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl
|
||||
[AS_IF([ac_fn_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3])
|
||||
rm -f conftest.err[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
|
||||
rm -f conftest.err conftest.i[]m4_ifval([$1], [ conftest.$ac_ext])[]dnl
|
||||
])# _AC_PREPROC_IFELSE
|
||||
|
||||
# AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
|
@ -294,8 +294,8 @@ AT_DATA([configure.ac],
|
||||
[[AC_INIT
|
||||
AC_PROG_CC
|
||||
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([int ok;], [])],
|
||||
[test -f conftest.err || AS_EXIT([1])],
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([int grepme;], [])],
|
||||
[{ test -f conftest.err && grep grepme conftest.i; } || AS_EXIT([1])],
|
||||
[AS_EXIT([1])])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#define 12 34 /*], [])],
|
||||
[AS_EXIT([1])],
|
||||
|
Loading…
Reference in New Issue
Block a user