dynconfig/config.m4: disallow --prefix=/usr and --prefix=/usr/local without --enable-fhs
authorStefan Metzmacher <metze@samba.org>
Wed, 18 Jan 2012 07:33:37 +0000 (08:33 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Sep 2012 14:04:52 +0000 (16:04 +0200)
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

index 842a960cd6a77bf0fe919dcdcb5d13796a791250..6b5dfdbaddef4a05fde3901e04b4b93e2be91637 100644 (file)
@@ -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"