From bc3775389acb53c519aaab707e8c99efe8e64bb2 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 (cherry picked from commit ae037670b83557d8591c633896186a3634de30cc) --- dynconfig/config.m4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dynconfig/config.m4 b/dynconfig/config.m4 index 842a960..6b5dfdb 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" -- 1.7.9.5