new tests
authorBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Tue, 6 Mar 2001 13:48:32 +0000 (13:48 +0000)
committerBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Tue, 6 Mar 2001 13:48:32 +0000 (13:48 +0000)
[r117]

MakeRules.in
configure
configure.in

index 972403a..9508541 100644 (file)
@@ -7,6 +7,8 @@
 
 VPATH = $(srcdir)
 
+SHELL = @CONFIG_SHELL@
+
 CC = @CC@
 CFLAGS := @CFLAGS@
 CPPFLAGS := -I. -I$(topdir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
index 1c57e22..17fe563 100755 (executable)
--- a/configure
+++ b/configure
@@ -1334,7 +1334,7 @@ fi
 
 
 
-for ac_hdr in gmp.h
+for ac_hdr in math.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -1367,6 +1367,53 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
   cat >> confdefs.h <<EOF
 #define $ac_tr_hdr 1
+EOF
+ ac_math_headers="yes"
+else
+  echo "$ac_t""no" 1>&6
+ac_math_headers="no"
+fi
+done
+
+if test "$ac_math_headers" != yes; then
+    { echo "configure: error: "math header file not found"" 1>&2; exit 1; }
+fi
+
+
+
+for ac_hdr in gmp.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1389: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1394 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
 EOF
  ac_gmp_headers="yes"
 else
@@ -1381,9 +1428,56 @@ fi
 
 
 
+for ac_hdr in obstack.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1436: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1441 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ ac_obstack_headers="yes"
+else
+  echo "$ac_t""no" 1>&6
+ac_obstack_headers="no"
+fi
+done
+
+if test "$ac_obstack_headers" != yes; then
+    { echo "configure: error: "obstack header file not found"" 1>&2; exit 1; }
+fi
+
+
+
 
 echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
-echo "configure:1387: checking for main in -lgmp" >&5
+echo "configure:1481: checking for main in -lgmp" >&5
 ac_lib_var=`echo gmp'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1391,14 +1485,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1395 "configure"
+#line 1489 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1420,12 +1514,105 @@ ac_gmp_library="no"
 fi
 
 if test "$ac_gmp_library" != yes; then
-    echo $ac_gmp_library
-  { echo "configure: error: "GNU multiprecission gmp library not found"" 1>&2; exit 1; }
+    { echo "configure: error: "GNU multiprecission gmp library not found"" 1>&2; exit 1; }
 fi
 
 
+echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:1523: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1531 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
 
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_m_library="yes"
+else
+  echo "$ac_t""no" 1>&6
+ac_m_library="no"
+fi
+
+if test "$ac_m_library" != yes; then
+    { echo "configure: error: "standard math library not found"" 1>&2; exit 1; }
+fi
+
+
+
+
+
+
+echo $ac_n "checking for strerror""... $ac_c" 1>&6
+echo "configure:1569: checking for strerror" >&5
+if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1574 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char strerror(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char strerror();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_strerror) || defined (__stub___strerror)
+choke me
+#else
+strerror();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_strerror=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_strerror=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'strerror`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: "need strerror function"" 1>&2; exit 1; }
+
+fi
 
 
 
index 3378d20..c0ec1b2 100644 (file)
@@ -82,6 +82,15 @@ dnl ========================
 
 AC_HEADER_STDC
 
+dnl check for the math header file
+
+AC_CHECK_HEADERS(math.h, ac_math_headers="yes", ac_math_headers="no")
+if test "$ac_math_headers" != yes; then
+  dnl math header not found.
+  AC_MSG_ERROR("math header file not found")
+fi
+
+
 dnl check for the gnu multiprecission (gmp) header file
 
 AC_CHECK_HEADERS(gmp.h, ac_gmp_headers="yes", ac_gmp_headers="no")
@@ -91,6 +100,15 @@ if test "$ac_gmp_headers" != yes; then
 fi
 
 
+dnl check for the obstack header file
+
+AC_CHECK_HEADERS(obstack.h, ac_obstack_headers="yes", ac_obstack_headers="no")
+if test "$ac_obstack_headers" != yes; then
+  dnl obstack header not found.
+  AC_MSG_ERROR("obstack header file not found")
+fi
+
+
 dnl Checks for libraries.
 dnl =====================
 
@@ -99,11 +117,17 @@ dnl check for the gnu multiprecission (gmp) library
 AC_CHECK_LIB(gmp, main, ac_gmp_library="yes", ac_gmp_library="no")
 if test "$ac_gmp_library" != yes; then
   dnl gmp library not found.
-  echo $ac_gmp_library
   AC_MSG_ERROR("GNU multiprecission gmp library not found")
 fi
 
 
+AC_CHECK_LIB(m, main, ac_m_library="yes", ac_m_library="no")
+if test "$ac_m_library" != yes; then
+  dnl std math library not found.
+  AC_MSG_ERROR("standard math library not found")
+fi
+
+
 dnl Checks for typedefs, structures, and compiler characteristics.
 dnl ==============================================================
 
@@ -111,6 +135,12 @@ dnl ==============================================================
 dnl Checks for library functions.
 dnl =============================
 
+dnl check for strerror
+
+AC_CHECK_FUNC(strerror,,
+  AC_MSG_ERROR("need strerror function")
+)
+
 
 dnl Error messaging
 dnl ===============