From ae037670b83557d8591c633896186a3634de30cc Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Jan 2012 08:33:37 +0100 Subject: [PATCH] dynconfig/config.m4: disallow --prefix=/usr and --prefix=/usr/local without --enable-fhs This matches the waf configure behavior and catches the case where old build scripts try '--with-fhs' instead of '--enable-fhs'. metze --- dynconfig/config.m4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dynconfig/config.m4 b/dynconfig/config.m4 index 842a960cd6a..6b5dfdbadde 100644 --- a/dynconfig/config.m4 +++ b/dynconfig/config.m4 @@ -19,6 +19,10 @@ AC_ARG_ENABLE(fhs, [AS_HELP_STRING([--enable-fhs], [Turn on FHS support (default=no)])]) if test x$enable_fhs != xyes; then + if test x"$prefix" = x"/usr" -o x"$prefix" = x"/usr/local"; then + AC_MSG_WARN([Don't install directly under /usr or /usr/local without using the FHS option (--enable-fhs)]) + AC_MSG_ERROR([invalid --prefix=$prefix]) + fi MODULESDIR="${libdir}" INCLUDEDIR="${includedir}" SETUPDIR="${datadir}/setup" -- 2.11.4.GIT