mirror of
git://git.sv.gnu.org/autoconf
synced 2024-11-27 01:49:56 +08:00
* aclang.m4 (_AC_PROG_PREPROC_WORKS): Use _AC_PREPROC_IFELSE.
* acgeneral.m4 (_AC_TRY_CPP): Its last use was that above, so inline it into... (_AC_PREPROC_IFELSE): here.
This commit is contained in:
parent
112b68ac15
commit
dfe7f821d1
@ -1,3 +1,10 @@
|
||||
2000-12-15 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* aclang.m4 (_AC_PROG_PREPROC_WORKS): Use _AC_PREPROC_IFELSE.
|
||||
* acgeneral.m4 (_AC_TRY_CPP): Its last use was that above, so
|
||||
inline it into...
|
||||
(_AC_PREPROC_IFELSE): here.
|
||||
|
||||
2000-12-15 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* tests/atgeneral.m4 (AT_INIT): Forget about `-n'.
|
||||
|
31
acgeneral.m4
31
acgeneral.m4
@ -2730,17 +2730,21 @@ m4_popdef([AC_Lib_Name])dnl
|
||||
## ------------------------ ##
|
||||
|
||||
|
||||
# _AC_TRY_CPP
|
||||
# -----------
|
||||
|
||||
# _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
# ----------------------------------------------------------------
|
||||
# Try to preprocess PROGRAM.
|
||||
#
|
||||
# Run cpp and set ac_cpp_err to "yes" for an error, to
|
||||
# "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
|
||||
# neither warnings nor errors have been detected. eval is necessary
|
||||
# to expand ac_cpp. It may put trace lines to conftest.err when run
|
||||
# under sh -x (e.g. when zsh is used), so we filter them out.
|
||||
#
|
||||
# Do not require AC_PROG_CPP since this macro is also used by AC_PROG_CPP.
|
||||
AC_DEFUN([_AC_TRY_CPP],
|
||||
[ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
|
||||
# This macro can be used during the selection of a preprocessor.
|
||||
AC_DEFUN([_AC_PREPROC_IFELSE],
|
||||
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
|
||||
if AC_TRY_EVAL(ac_try); then
|
||||
if egrep -v '^ *\+' conftest.err | grep . >/dev/null; then
|
||||
ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
|
||||
@ -2750,16 +2754,6 @@ if AC_TRY_EVAL(ac_try); then
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
])# _AC_TRY_CPP
|
||||
|
||||
|
||||
# _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
# ----------------------------------------------------------------
|
||||
# Try to preprocess PROGRAM.
|
||||
# This macro can be used during the selection of a preprocessor.
|
||||
AC_DEFUN([_AC_PREPROC_IFELSE],
|
||||
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
|
||||
_AC_TRY_CPP()
|
||||
if test -z "$ac_cpp_err"; then
|
||||
m4_default([$2], :)
|
||||
else
|
||||
@ -2772,8 +2766,8 @@ rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
|
||||
])# _AC_PREPROC_IFELSE
|
||||
|
||||
|
||||
# AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# --------------------------------------------------------------------
|
||||
# AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
# ---------------------------------------------------------------
|
||||
# Try to preprocess PROGRAM. Requires that the preprocessor for the
|
||||
# current language was checked for, hence do not use this macro in macros
|
||||
# looking for a preprocessor.
|
||||
@ -2785,8 +2779,7 @@ _AC_PREPROC_IFELSE($@)])
|
||||
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
# ---------------------------------------------------------
|
||||
# AC_TRY_CPP is used to check whether particular header files exist.
|
||||
# You can check for one at a time, or more than one if you need several
|
||||
# header files to all exist for some purpose.
|
||||
# (But it actually tests whether INCLUDES produces no CPP errors.)
|
||||
#
|
||||
# INCLUDES are not defaulted and are double quoted.
|
||||
AC_DEFUN([AC_TRY_CPP],
|
||||
|
25
aclang.m4
25
aclang.m4
@ -729,29 +729,22 @@ AC_DEFUN([_AC_PROG_PREPROC_WORKS],
|
||||
# with a fresh cross-compiler works.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <assert.h>
|
||||
Syntax error]])])
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe
|
||||
_AC_TRY_CPP()
|
||||
# Now check whether non-existent headers can be detected and how
|
||||
_AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <assert.h>
|
||||
Syntax error]])],
|
||||
[# Now check whether non-existent headers can be detected and how
|
||||
# Skip if ac_cpp_err is not empty - ac_cpp is broken
|
||||
if test -z "$ac_cpp_err"; then
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])])
|
||||
_AC_TRY_CPP()
|
||||
if test -z "$ac_cpp_err"; then
|
||||
# cannot detect missing includes at all
|
||||
ac_cpp_err=yes
|
||||
else
|
||||
if test "x$ac_cpp_err" = xmaybe; then
|
||||
_AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])],
|
||||
[# cannot detect missing includes at all
|
||||
ac_cpp_err=yes],
|
||||
[if test "x$ac_cpp_err" = xmaybe; then
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=yes
|
||||
else
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=
|
||||
fi
|
||||
ac_cpp_err=
|
||||
fi
|
||||
fi
|
||||
rm -f conftest*
|
||||
])# _AC_PROG_PREPROC_WORKS
|
||||
ac_cpp_err=])
|
||||
fi])])# _AC_PROG_PREPROC_WORKS
|
||||
|
||||
|
||||
# AC_PROG_CPP
|
||||
|
@ -729,29 +729,22 @@ AC_DEFUN([_AC_PROG_PREPROC_WORKS],
|
||||
# with a fresh cross-compiler works.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <assert.h>
|
||||
Syntax error]])])
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe
|
||||
_AC_TRY_CPP()
|
||||
# Now check whether non-existent headers can be detected and how
|
||||
_AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <assert.h>
|
||||
Syntax error]])],
|
||||
[# Now check whether non-existent headers can be detected and how
|
||||
# Skip if ac_cpp_err is not empty - ac_cpp is broken
|
||||
if test -z "$ac_cpp_err"; then
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])])
|
||||
_AC_TRY_CPP()
|
||||
if test -z "$ac_cpp_err"; then
|
||||
# cannot detect missing includes at all
|
||||
ac_cpp_err=yes
|
||||
else
|
||||
if test "x$ac_cpp_err" = xmaybe; then
|
||||
_AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])],
|
||||
[# cannot detect missing includes at all
|
||||
ac_cpp_err=yes],
|
||||
[if test "x$ac_cpp_err" = xmaybe; then
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=yes
|
||||
else
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=
|
||||
fi
|
||||
ac_cpp_err=
|
||||
fi
|
||||
fi
|
||||
rm -f conftest*
|
||||
])# _AC_PROG_PREPROC_WORKS
|
||||
ac_cpp_err=])
|
||||
fi])])# _AC_PROG_PREPROC_WORKS
|
||||
|
||||
|
||||
# AC_PROG_CPP
|
||||
|
@ -729,29 +729,22 @@ AC_DEFUN([_AC_PROG_PREPROC_WORKS],
|
||||
# with a fresh cross-compiler works.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <assert.h>
|
||||
Syntax error]])])
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe
|
||||
_AC_TRY_CPP()
|
||||
# Now check whether non-existent headers can be detected and how
|
||||
_AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <assert.h>
|
||||
Syntax error]])],
|
||||
[# Now check whether non-existent headers can be detected and how
|
||||
# Skip if ac_cpp_err is not empty - ac_cpp is broken
|
||||
if test -z "$ac_cpp_err"; then
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])])
|
||||
_AC_TRY_CPP()
|
||||
if test -z "$ac_cpp_err"; then
|
||||
# cannot detect missing includes at all
|
||||
ac_cpp_err=yes
|
||||
else
|
||||
if test "x$ac_cpp_err" = xmaybe; then
|
||||
_AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])],
|
||||
[# cannot detect missing includes at all
|
||||
ac_cpp_err=yes],
|
||||
[if test "x$ac_cpp_err" = xmaybe; then
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=yes
|
||||
else
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=
|
||||
fi
|
||||
ac_cpp_err=
|
||||
fi
|
||||
fi
|
||||
rm -f conftest*
|
||||
])# _AC_PROG_PREPROC_WORKS
|
||||
ac_cpp_err=])
|
||||
fi])])# _AC_PROG_PREPROC_WORKS
|
||||
|
||||
|
||||
# AC_PROG_CPP
|
||||
|
@ -2730,17 +2730,21 @@ m4_popdef([AC_Lib_Name])dnl
|
||||
## ------------------------ ##
|
||||
|
||||
|
||||
# _AC_TRY_CPP
|
||||
# -----------
|
||||
|
||||
# _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
# ----------------------------------------------------------------
|
||||
# Try to preprocess PROGRAM.
|
||||
#
|
||||
# Run cpp and set ac_cpp_err to "yes" for an error, to
|
||||
# "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
|
||||
# neither warnings nor errors have been detected. eval is necessary
|
||||
# to expand ac_cpp. It may put trace lines to conftest.err when run
|
||||
# under sh -x (e.g. when zsh is used), so we filter them out.
|
||||
#
|
||||
# Do not require AC_PROG_CPP since this macro is also used by AC_PROG_CPP.
|
||||
AC_DEFUN([_AC_TRY_CPP],
|
||||
[ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
|
||||
# This macro can be used during the selection of a preprocessor.
|
||||
AC_DEFUN([_AC_PREPROC_IFELSE],
|
||||
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.err"
|
||||
if AC_TRY_EVAL(ac_try); then
|
||||
if egrep -v '^ *\+' conftest.err | grep . >/dev/null; then
|
||||
ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
|
||||
@ -2750,16 +2754,6 @@ if AC_TRY_EVAL(ac_try); then
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
])# _AC_TRY_CPP
|
||||
|
||||
|
||||
# _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
# ----------------------------------------------------------------
|
||||
# Try to preprocess PROGRAM.
|
||||
# This macro can be used during the selection of a preprocessor.
|
||||
AC_DEFUN([_AC_PREPROC_IFELSE],
|
||||
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
|
||||
_AC_TRY_CPP()
|
||||
if test -z "$ac_cpp_err"; then
|
||||
m4_default([$2], :)
|
||||
else
|
||||
@ -2772,8 +2766,8 @@ rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
|
||||
])# _AC_PREPROC_IFELSE
|
||||
|
||||
|
||||
# AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||
# --------------------------------------------------------------------
|
||||
# AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
# ---------------------------------------------------------------
|
||||
# Try to preprocess PROGRAM. Requires that the preprocessor for the
|
||||
# current language was checked for, hence do not use this macro in macros
|
||||
# looking for a preprocessor.
|
||||
@ -2785,8 +2779,7 @@ _AC_PREPROC_IFELSE($@)])
|
||||
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
||||
# ---------------------------------------------------------
|
||||
# AC_TRY_CPP is used to check whether particular header files exist.
|
||||
# You can check for one at a time, or more than one if you need several
|
||||
# header files to all exist for some purpose.
|
||||
# (But it actually tests whether INCLUDES produces no CPP errors.)
|
||||
#
|
||||
# INCLUDES are not defaulted and are double quoted.
|
||||
AC_DEFUN([AC_TRY_CPP],
|
||||
|
@ -729,29 +729,22 @@ AC_DEFUN([_AC_PROG_PREPROC_WORKS],
|
||||
# with a fresh cross-compiler works.
|
||||
# On the NeXT, cc -E runs the code through the compiler's parser,
|
||||
# not just through cpp. "Syntax error" is here to catch this case.
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <assert.h>
|
||||
Syntax error]])])
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=maybe
|
||||
_AC_TRY_CPP()
|
||||
# Now check whether non-existent headers can be detected and how
|
||||
_AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <assert.h>
|
||||
Syntax error]])],
|
||||
[# Now check whether non-existent headers can be detected and how
|
||||
# Skip if ac_cpp_err is not empty - ac_cpp is broken
|
||||
if test -z "$ac_cpp_err"; then
|
||||
AC_LANG_CONFTEST([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])])
|
||||
_AC_TRY_CPP()
|
||||
if test -z "$ac_cpp_err"; then
|
||||
# cannot detect missing includes at all
|
||||
ac_cpp_err=yes
|
||||
else
|
||||
if test "x$ac_cpp_err" = xmaybe; then
|
||||
_AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include <ac_nonexistent.h>]])],
|
||||
[# cannot detect missing includes at all
|
||||
ac_cpp_err=yes],
|
||||
[if test "x$ac_cpp_err" = xmaybe; then
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=yes
|
||||
else
|
||||
ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag=
|
||||
fi
|
||||
ac_cpp_err=
|
||||
fi
|
||||
fi
|
||||
rm -f conftest*
|
||||
])# _AC_PROG_PREPROC_WORKS
|
||||
ac_cpp_err=])
|
||||
fi])])# _AC_PROG_PREPROC_WORKS
|
||||
|
||||
|
||||
# AC_PROG_CPP
|
||||
|
Loading…
Reference in New Issue
Block a user