aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExplorer09 <explorer09@gmail.com>2024-05-09 03:25:29 +0800
committerWill Estes <westes@users.noreply.github.com>2024-05-10 12:52:44 -0400
commitbbe2a15e2d37a6cc6d9b1ea1caae02415228e35e (patch)
treeee0e79249782a78953696b357157ff99fa23f397
parent787edd41833e14e986ff093f7216e7005aca5fe2 (diff)
downloadflex-bbe2a15e2d37a6cc6d9b1ea1caae02415228e35e.tar.gz
build: Add BUILD_OBJEXT sanity check
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a729eda..dfb2988 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,15 @@ AC_PROG_LN_S
AC_PROG_AWK
AC_PROG_INSTALL
+AS_IF([test "x${BUILD_OBJEXT-}" = x],
+ [AS_IF([test "$cross_compiling" = no],
+ [BUILD_EXEEXT="$EXEEXT"
+ BUILD_OBJEXT="$OBJEXT"],
+ [BUILD_EXEEXT="${ac_cv_build_exeext-}"
+ BUILD_OBJEXT="${ac_cv_build_objext-}"])])
+AS_IF([test "x${BUILD_OBJEXT-}" = x && test "x${enable_bootstrap-yes}" = xyes],
+ [AC_MSG_ERROR([BUILD_OBJEXT is invalid; please regenerate 'configure' with a newer ax_prog_cc_for_build.m4 (serial 22 or later) or configure with '--disable-bootstrap'])])
+
pkgconfigdir=${libdir}/pkgconfig
AC_SUBST(pkgconfigdir)