]> git.ipfire.org Git - thirdparty/autoconf.git/commit
AC_PROG_*CPP: Try ‘cpp’ before ‘/lib/cpp’
authorZack Weinberg <zackw@panix.com>
Thu, 10 Sep 2020 16:10:41 +0000 (12:10 -0400)
committerZack Weinberg <zackw@panix.com>
Thu, 10 Sep 2020 16:10:41 +0000 (12:10 -0400)
commitb560f0a657be0ba69417d26589ffd93a26f62573
treebccac8c77a244b43e9f165fe7d746ddc6ee925b0
parent14265094af1614d9e359550ca4a4939e590a5dba
AC_PROG_*CPP: Try ‘cpp’ before ‘/lib/cpp’

All of the AC_PROG_*CPP macros fall back to ‘/lib/cpp’ if invoking the
relevant compiler with ‘-E’ doesn’t work.  This is an obsolete
location to find the C preprocessor.  Linux distributions tend to ship
a compatibility symlink, as do Solaris and AIX (as of the versions in the
GCC compile farm, anyway), but the BSDs no longer do.

The tests for this fallback are already expecting ‘cpp’ to be a
command findable via $PATH, so make the probe macros do the same
thing.  (We still try ‘/lib/cpp’ if ‘cpp’ _isn’t_ in $PATH.)

* lib/autoconf/c.m4
  (AC_PROG_CPP, AC_PROG_CXXCPP, AC_PROG_OBJCPP, AC_PROG_OBJCXXCPP):
  If $CC / $CXX / $OBJC / $OBJCXX -E (respectively) does not run the
  preprocessor, look for ‘cpp’ in $PATH before falling back to ‘/lib/cpp’.

* doc/autoconf.texi
  (AC_PROG_CPP, AC_PROG_CXXCPP, AC_PROG_OBJCPP, AC_PROG_OBJCXXCPP):
  Update to match.
doc/autoconf.texi
lib/autoconf/c.m4