[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: /lib/cpp again
From: |
Akim Demaille |
Subject: |
Re: /lib/cpp again |
Date: |
05 Jul 2001 14:42:04 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor) |
>>>>> "Lars" == Lars J Aas <address@hidden> writes:
Lars> What escapes me is why there is a fallback on /lib/cpp in the
Lars> first place. I can agree that /lib/cpp should be tested, but it
Lars> should not be the outcome if it fails some simple test.
It is not the case currently: it *is* tested.
|# AC_PROG_CPP
|# -----------
|# Find a working C preprocessor.
|# We shouldn't have to require AC_PROG_CC, but this is due to the concurrency
|# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CC.
|AC_DEFUN([AC_PROG_CPP],
|[AC_REQUIRE([AC_PROG_CC])dnl
|AC_ARG_VAR([CPP], [C preprocessor])dnl
|_AC_ARG_VAR_CPPFLAGS()dnl
|AC_LANG_PUSH(C)dnl
|AC_MSG_CHECKING([how to run the C preprocessor])
|# On Suns, sometimes $CPP names a directory.
|if test -n "$CPP" && test -d "$CPP"; then
| CPP=
|fi
|if test -z "$CPP"; then
| AC_CACHE_VAL([ac_cv_prog_CPP],
| [dnl
| # Double quotes because CPP needs to be expanded
| for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
| do
| _AC_PROG_PREPROC_WORKS_IFELSE([break])
| done
| ac_cv_prog_CPP=$CPP
| ])dnl
| CPP=$ac_cv_prog_CPP
|else
| ac_cv_prog_CPP=$CPP
|fi
|AC_MSG_RESULT([$CPP])
=>|_AC_PROG_PREPROC_WORKS_IFELSE([],
=>| [AC_MSG_ERROR([C preprocessor "$CPP" fails sanity
check])])
|AC_SUBST(CPP)dnl
|AC_LANG_POP(C)dnl
|])# AC_PROG_CPP
Lars> BTW, could missing be used for this? Make a hack cpp
Lars> implementation in awk for missing or something :)
This means moving missing into Autoconf which is not scheduled yet.