From c69886a17db51737b2b81f778b64262e11083d0e Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 16 Dec 2004 10:36:59 +0000 Subject: [PATCH] [project @ 2004-12-16 10:36:57 by simonmar] Sanity check when configuring for mingw32: make sure that $CC is a mingw gcc before proceeding. --- aclocal.m4 | 13 +++++++++++++ configure.ac | 1 + 2 files changed, 14 insertions(+) diff --git a/aclocal.m4 b/aclocal.m4 index 16db6ce..a615c55 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -511,6 +511,19 @@ AC_SUBST([HaveGcc], [`echo $fp_cv_have_gcc | sed 'y/yesno/YESNO/'`]) AC_SUBST([GccVersion], [`gcc --version | grep mingw | cut -f 3 -d ' '`]) ])# FP_HAVE_GCC +AC_DEFUN([FP_MINGW_GCC], +[ + case $HostOS_CPP in + mingw*) AC_MSG_CHECKING([whether $CC is a mingw gcc]) + if $CC -v 2>&1 | grep mingw >/dev/null; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Please use --with-gcc to specify a mingw gcc]) + fi;; + *) ;; + esac +]) dnl Small feature test for perl version. Assumes PerlCmd dnl contains path to perl binary diff --git a/configure.ac b/configure.ac index 388fa5c..e2d7536 100644 --- a/configure.ac +++ b/configure.ac @@ -805,6 +805,7 @@ dnl Figure out which C compiler to use. Gcc is preferred. dnl If gcc, make sure it's at least 2.1 dnl FP_HAVE_GCC +FP_MINGW_GCC dnl ** figure out how to invoke cpp directly (gcc -E is no good) AC_PROG_CPP -- 1.7.10.4