[kaffe] CVS kaffe (jim): Don't automatically default to --enable-pure-java-math if gmp is not found.

Kaffe CVS cvs-commits at kaffe.org
Wed Aug 27 20:00:03 PDT 2003


PatchSet 3992 
Date: 2003/08/28 02:53:35
Author: jim
Branch: HEAD
Tag: (none) 
Log:
Don't automatically default to --enable-pure-java-math if gmp is not found.

I keep stumbling into this one - it's a bit of a pet peeve.  I want the
build to fail, instead of finding out later when I run the built Kaffe that
I didn't have the gmp devel packages installed.

Members: 
	ChangeLog:1.1588->1.1589 
	configure:1.252->1.253 
	configure.in:1.219->1.220 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1588 kaffe/ChangeLog:1.1589
--- kaffe/ChangeLog:1.1588	Thu Aug 28 00:47:59 2003
+++ kaffe/ChangeLog	Thu Aug 28 02:53:35 2003
@@ -1,5 +1,14 @@
 2003-08-27  Jim Pick  <jim at kaffe.org>
 
+	* configure.in:
+	Don't automatically default to --enable-pure-java-math if gmp
+	is not found.
+
+	* configure:
+	Regenerated.
+
+2003-08-27  Jim Pick  <jim at kaffe.org>
+
 	* README, RELEASE-NOTES, configure.in:
 	Oops, it looks like I bumped the version number on the
 	HEAD branch instead of the Release_1_1_1_Branch.  Revert.
Index: kaffe/configure
diff -u kaffe/configure:1.252 kaffe/configure:1.253
--- kaffe/configure:1.252	Thu Aug 28 00:48:00 2003
+++ kaffe/configure	Thu Aug 28 02:53:35 2003
@@ -41431,149 +41431,12 @@
 
 	if test $ac_cv_lib_gmp_mpz_get_d = no; then
 		if test $ac_cv_lib_gmp___gmpz_get_d = no; then
-		   pure_java_math=true
-		else
-			if test "${ac_cv_header_gmp_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for gmp.h" >&5
-echo $ECHO_N "checking for gmp.h... $ECHO_C" >&6
-if test "${ac_cv_header_gmp_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_gmp_h" >&5
-echo "${ECHO_T}$ac_cv_header_gmp_h" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking gmp.h usability" >&5
-echo $ECHO_N "checking gmp.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <gmp.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking gmp.h presence" >&5
-echo $ECHO_N "checking gmp.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <gmp.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc in
-  yes:no )
-    { echo "$as_me:$LINENO: WARNING: gmp.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: gmp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gmp.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: gmp.h: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-  no:yes )
-    { echo "$as_me:$LINENO: WARNING: gmp.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: gmp.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gmp.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: gmp.h: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: gmp.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: gmp.h: proceeding with the preprocessor's result" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf at gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for gmp.h" >&5
-echo $ECHO_N "checking for gmp.h... $ECHO_C" >&6
-if test "${ac_cv_header_gmp_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_gmp_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_gmp_h" >&5
-echo "${ECHO_T}$ac_cv_header_gmp_h" >&6
-
-fi
-if test $ac_cv_header_gmp_h = yes; then
-  pure_java_math=false
-else
-  { echo "$as_me:$LINENO: WARNING: Found GNU MP library, but can't find gmp.h. Using pure java implementation." >&5
-echo "$as_me: WARNING: Found GNU MP library, but can't find gmp.h. Using pure java implementation." >&2;}
-					pure_java_math=true
-fi
-
-
+			{ { echo "$as_me:$LINENO: error: Could not find GNU MP library.  Install the gmp development package, or pass --enable-pure-java-math to configure." >&5
+echo "$as_me: error: Could not find GNU MP library.  Install the gmp development package, or pass --enable-pure-java-math to configure." >&2;}
+   { (exit 1); exit 1; }; }
 		fi
-	else
-		if test "${ac_cv_header_gmp_h+set}" = set; then
+	fi
+	if test "${ac_cv_header_gmp_h+set}" = set; then
   echo "$as_me:$LINENO: checking for gmp.h" >&5
 echo $ECHO_N "checking for gmp.h... $ECHO_C" >&6
 if test "${ac_cv_header_gmp_h+set}" = set; then
@@ -41705,13 +41568,12 @@
 if test $ac_cv_header_gmp_h = yes; then
   pure_java_math=false
 else
-  { echo "$as_me:$LINENO: WARNING: Found GNU MP library, but can't find gmp.h. Using pure java implementation." >&5
-echo "$as_me: WARNING: Found GNU MP library, but can't find gmp.h. Using pure java implementation." >&2;}
-				pure_java_math=true
+  { { echo "$as_me:$LINENO: error: Found GNU MP library, but can't find gmp.h.  Install the gmp development package, or pass --enable-pure-java-math to configure." >&5
+echo "$as_me: error: Found GNU MP library, but can't find gmp.h.  Install the gmp development package, or pass --enable-pure-java-math to configure." >&2;}
+   { (exit 1); exit 1; }; }
 fi
 
 
-	fi
 
 
 fi;
@@ -41728,8 +41590,12 @@
 
 
 if test x"$pure_java_math" = x"true" ; then
+	echo "$as_me:$LINENO: result: Information: Using pure Java math library" >&5
+echo "${ECHO_T}Information: Using pure Java math library" >&6
 	MATH_LIB=""
 else
+	echo "$as_me:$LINENO: result: Information: Using native math library" >&5
+echo "${ECHO_T}Information: Using native math library" >&6
 	MATH_LIB="\$(top_builddir)/libraries/clib/math/libmath.la"
 fi
 
Index: kaffe/configure.in
diff -u kaffe/configure.in:1.219 kaffe/configure.in:1.220
--- kaffe/configure.in:1.219	Thu Aug 28 00:48:03 2003
+++ kaffe/configure.in	Thu Aug 28 02:53:37 2003
@@ -1279,30 +1279,24 @@
 esac],
 [
 dnl  If nothing is set, use native implementation if GNU MP can be found.
-dnl  Otherwise use pure java implementation.
 	if test $ac_cv_lib_gmp_mpz_get_d = no; then
 		if test $ac_cv_lib_gmp___gmpz_get_d = no; then
-		   pure_java_math=true
-		else
-			AC_CHECK_HEADER([gmp.h],
-					[pure_java_math=false],
-					[AC_MSG_WARN([Found GNU MP library, but can't find gmp.h. Using pure java implementation.])
-					pure_java_math=true])
+			AC_MSG_ERROR([Could not find GNU MP library.  Install the gmp development package, or pass --enable-pure-java-math to configure.])
 		fi
-	else
-		AC_CHECK_HEADER([gmp.h],
-				[pure_java_math=false],
-				[AC_MSG_WARN([Found GNU MP library, but can't find gmp.h. Using pure java implementation.])
-				pure_java_math=true])
 	fi
+	AC_CHECK_HEADER([gmp.h],
+			[pure_java_math=false],
+			[AC_MSG_ERROR([Found GNU MP library, but can't find gmp.h.  Install the gmp development package, or pass --enable-pure-java-math to configure.])])
 ]
 )
 
 AM_CONDITIONAL([COND_PURE_JAVA_MATH], [test "$enable_pure_java_math" = yes])
 
 if test x"$pure_java_math" = x"true" ; then
+	AC_MSG_RESULT(Information: Using pure Java math library)
 	MATH_LIB=""
 else
+	AC_MSG_RESULT(Information: Using native math library)
 	MATH_LIB="\$(top_builddir)/libraries/clib/math/libmath.la"
 fi
 




More information about the kaffe mailing list