This will fail at some point during the installation anyway,
so it's better to check early.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
AC_SUBST(versioninfo)
versioninfo=10:0:0
+if test "x$prefix" != "xNONE"; then
+ prefix_wd=`cd $prefix && pwd`
+ srcdir_wd=`cd $srcdir && pwd`
+ wd=`pwd`
+ if test "x$prefix_wd" = "x$srcdir_wd"; then
+ AC_MSG_ERROR(Installation in source directory not supported)
+ fi
+ if test "x$prefix_wd" = "x$wd"; then
+ AC_MSG_ERROR(Installation in build directory not supported)
+ fi
+fi
+
AC_PROG_CC
AC_PROG_CXX