[project @ 2004-12-16 10:36:57 by simonmar]
authorsimonmar <unknown>
Thu, 16 Dec 2004 10:36:59 +0000 (10:36 +0000)
committersimonmar <unknown>
Thu, 16 Dec 2004 10:36:59 +0000 (10:36 +0000)
Sanity check when configuring for mingw32: make sure that $CC is a
mingw gcc before proceeding.

aclocal.m4
configure.ac

index 16db6ce..a615c55 100644 (file)
@@ -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_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
 
 dnl Small feature test for perl version. Assumes PerlCmd
 dnl contains path to perl binary
index 388fa5c..e2d7536 100644 (file)
@@ -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
 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
 
 dnl ** figure out how to invoke cpp directly (gcc -E is no good)
 AC_PROG_CPP