@evindex CPP
@ovindex CPP
Set output variable @code{CPP} to a command that runs the
-C preprocessor. If @samp{$CC -E} doesn't work, @file{/lib/cpp} is used.
+C preprocessor. If @samp{$CC -E} doesn't work, tries @code{cpp} and
+@file{/lib/cpp}, in that order.
+
It is only portable to run @code{CPP} on files with a @file{.c}
extension.
@evindex CXXCPP
@ovindex CXXCPP
Set output variable @code{CXXCPP} to a command that runs the C++
-preprocessor. If @samp{$CXX -E} doesn't work, @file{/lib/cpp} is used.
+preprocessor. If @samp{$CXX -E} doesn't work, tries @code{cpp} and
+@file{/lib/cpp}, in that order. Because of this fallback, @code{CXXCPP}
+may or may not set C++-specific predefined macros (such as @code{__cplusplus}).
+
It is portable to run @code{CXXCPP} only on files with a @file{.c},
@file{.C}, @file{.cc}, or @file{.cpp} extension.
@evindex OBJCPP
@ovindex OBJCPP
Set output variable @code{OBJCPP} to a command that runs the Objective C
-preprocessor. If @samp{$OBJC -E} doesn't work, @file{/lib/cpp} is used.
+preprocessor. If @samp{$OBJC -E} doesn't work, tries @code{cpp} and
+@file{/lib/cpp}, in that order. Because of this fallback, @code{CXXCPP}
+may or may not set Objective-C-specific predefined macros (such as
+@code{__OBJC__}).
@end defmac
@evindex OBJCXXCPP
@ovindex OBJCXXCPP
Set output variable @code{OBJCXXCPP} to a command that runs the Objective C++
-preprocessor. If @samp{$OBJCXX -E} doesn't work, @file{/lib/cpp} is used.
+preprocessor. If @samp{$OBJCXX -E} doesn't work, tries @code{cpp} and
+@file{/lib/cpp}, in that order. Because of this fallback, @code{CXXCPP}
+may or may not set Objective-C++-specific predefined macros (such as
+@code{__cplusplus} and @code{__OBJC__}).
@end defmac
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"
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
do
_AC_PROG_PREPROC_WORKS_IFELSE([break])
done
if test -z "$CXXCPP"; then
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
[dnl
- # Double quotes because CXXCPP needs to be expanded
- for CXXCPP in "$CXX -E" "/lib/cpp"
+ # Double quotes because $CXX needs to be expanded
+ for CXXCPP in "$CXX -E" cpp /lib/cpp
do
_AC_PROG_PREPROC_WORKS_IFELSE([break])
done
if test -z "$OBJCPP"; then
AC_CACHE_VAL(ac_cv_prog_OBJCPP,
[dnl
- # Double quotes because OBJCPP needs to be expanded
- for OBJCPP in "$OBJC -E" "/lib/cpp"
+ # Double quotes because $OBJC needs to be expanded
+ for OBJCPP in "$OBJC -E" cpp /lib/cpp
do
_AC_PROG_PREPROC_WORKS_IFELSE([break])
done
if test -z "$OBJCXXCPP"; then
AC_CACHE_VAL(ac_cv_prog_OBJCXXCPP,
[dnl
- # Double quotes because OBJCXXCPP needs to be expanded
- for OBJCXXCPP in "$OBJCXX -E" "/lib/cpp"
+ # Double quotes because $OBJCXX needs to be expanded
+ for OBJCXXCPP in "$OBJCXX -E" cpp /lib/cpp
do
_AC_PROG_PREPROC_WORKS_IFELSE([break])
done