summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDmitry Goncharov <dgoncharov@users.sf.net>2021-04-17 17:50:07 -0400
committerPaul Smith <psmith@gnu.org>2021-05-30 15:11:30 -0400
commit5e829188d3595c8749f9e7bcbe4b515c085779a6 (patch)
treedbb3d92957c935e3044bacdab25327c96812bd7c /configure.ac
parent297cb5adb7bdde0cb04462f05deba1fba26ccce9 (diff)
downloadmake-git-5e829188d3595c8749f9e7bcbe4b515c085779a6.tar.gz
[SV 60378] Don't add duplicate default search directories
Depending on how make was configured it may add duplicate directories in the default include search path: avoid this. (Tweaked by psmith@gnu.org) * configure.ac: Set AM variable KNOWN_PREFIX if --prefix is known * Makefile.am: Only set INCLUDEDIR if prefix is not known * read.c [default_include_directories]: Only add INCLUDEDIR if set
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7d8f9ef9..6ad20949 100644
--- a/configure.ac
+++ b/configure.ac
@@ -523,6 +523,11 @@ AS_IF([test "x$make_cv_posix_spawn" = xno && test "x$user_posix_spawn" = xyes],
echo
])
+# autoconf initializes $prefix to NONE.
+AM_CONDITIONAL([KNOWN_PREFIX],
+ [test "x$prefix" = xNONE -o "x$prefix" = x/usr/local \
+ -o "x$prefix" = x/usr/gnu -o "x$prefix" = x/usr])
+
# Specify what files are to be created.
AC_CONFIG_FILES([Makefile build.cfg lib/Makefile po/Makefile.in doc/Makefile \
tests/config-flags.pm])