configure.ac: Abort attempts to cross build in source
authorJohn Darrington <john@darrington.wattle.id.au>
Sun, 20 Dec 2020 21:49:20 +0000 (22:49 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Sun, 20 Dec 2020 21:55:40 +0000 (22:55 +0100)
configure.ac

index d98631fcfcd08b184d6c223db679684d90ef1936..d68d1bf5f8922e101aab62edd1a5b046448f5c8e 100644 (file)
@@ -28,6 +28,12 @@ dnl Checks for programs.
 AC_GNU_SOURCE
 AC_PROG_CC
 gl_EARLY
+if test x"$cross_compiling" = x"yes"; then
+   if test x"$srcdir" = x"."; then
+      AC_ERROR([Cross compiling must be done out of source.])
+   fi
+fi
+
 AM_PROG_CC_C_O
 AC_LIBTOOL_WIN32_DLL
 AC_LIBTOOL_DLOPEN