Update of /cvsroot/netrek/server/Vanilla/res-rsa
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28256/res-rsa

Modified Files:
	configure configure.in 
Log Message:
merge 2.11.1 from darcs

Index: configure
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/res-rsa/configure,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- configure	21 Mar 2005 05:23:44 -0000	1.1
+++ configure	1 Jun 2006 03:17:25 -0000	1.2
@@ -944,64 +944,64 @@
 
   # If GMP directory was specified, do some smart checking
   if test "$GMP_DIR" != ""; then
-
     # prefix the search path with the provided path
     GMP_PATH="$GMP_DIR $GMP_PATH"
+  fi
 
-    # search for the header file
-    echo $ac_n "checking for local gmp.h""... $ac_c" 1>&6
+  # search for the header file
+  echo $ac_n "checking for local gmp.h""... $ac_c" 1>&6
 echo "configure:954: checking for local gmp.h" >&5
 
+  for path in $GMP_PATH; do
+    if test -r $path/gmp.h; then
+      GMP_VER=1
+      GMP_INC="-I$path"
+      break
+    fi
+    if test -r $path/include/gmp.h; then
+      GMP_VER=1
+      GMP_INC="-I$path/include"
+      break
+    fi
+  done
+
+  if test $GMP_VER = 1; then
+    echo "$ac_t""found in $GMP_INC" 1>&6
+  else
+    echo "$ac_t""not found" 1>&6
+  fi
+
+  # search for the library file only if header was found
+  if test $GMP_VER = 1; then
+
+    GMP_VER=0
+
+    echo $ac_n "checking for local libgmp.a""... $ac_c" 1>&6
+echo "configure:981: checking for local libgmp.a" >&5
+
     for path in $GMP_PATH; do
-      if test -r $path/gmp.h; then
+      if test -r $path/libgmp.a; then
         GMP_VER=1
-        GMP_INC="-I$path"
+        GMP_LIB="-L$path"
         break
       fi
-      if test -r $path/include/gmp.h; then
+      if test -r $path/lib/libgmp.a; then
         GMP_VER=1
-        GMP_INC="-I$path/include"
+        GMP_LIB="-L$path/lib"
         break
       fi
     done
-
     if test $GMP_VER = 1; then
-      echo "$ac_t""found in $GMP_INC" 1>&6
+      echo "$ac_t""found in $GMP_LIB" 1>&6
     else
       echo "$ac_t""not found" 1>&6
     fi
 
-    # search for the library file only if header was found
+    # Check for GMP2
     if test $GMP_VER = 1; then
-
-      GMP_VER=0
-
-      echo $ac_n "checking for local libgmp.a""... $ac_c" 1>&6
-echo "configure:981: checking for local libgmp.a" >&5
-
-      for path in $GMP_PATH; do
-        if test -r $path/libgmp.a; then
-          GMP_VER=1
-          GMP_LIB="-L$path"
-          break
-        fi
-        if test -r $path/lib/libgmp.a; then
-          GMP_VER=1
-          GMP_LIB="-L$path/lib"
-          break
-        fi
-      done
-      if test $GMP_VER = 1; then
-        echo "$ac_t""found in $GMP_LIB" 1>&6
-      else
-        echo "$ac_t""not found" 1>&6
-      fi
-
-      # Check for GMP2
-      if test $GMP_VER = 1; then
-        LDOLD="$LDFLAGS"
-        LDFLAGS="$GMP_LIB -lgmp"
-        echo $ac_n "checking for mpz_fdiv_q_ui in -lgmp""... $ac_c" 1>&6
+      LDOLD="$LDFLAGS"
+      LDFLAGS="$GMP_LIB -lgmp"
+      echo $ac_n "checking for mpz_fdiv_q_ui in -lgmp""... $ac_c" 1>&6
 echo "configure:1006: checking for mpz_fdiv_q_ui in -lgmp" >&5
 ac_lib_var=`echo gmp'_'mpz_fdiv_q_ui | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1044,9 +1044,52 @@
   echo "$ac_t""no" 1>&6
 fi
 
-        LDFLAGS="$LDOLD"
-      fi
+      if test $ac_cv_lib_gmp_mpz_fdiv_q_ui = no; then
+                echo $ac_n "checking for __gmpz_fdiv_q_ui in -lgmp""... $ac_c" 1>&6
+echo "configure:1050: checking for __gmpz_fdiv_q_ui in -lgmp" >&5
+ac_lib_var=`echo gmp'_'__gmpz_fdiv_q_ui | 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="-lgmp  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1058 "configure"
+#include "confdefs.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 __gmpz_fdiv_q_ui();
 
+int main() {
+__gmpz_fdiv_q_ui()
+; return 0; }
+EOF
+if { (eval echo configure:1069: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIB_GMP2 1
+EOF
+ GMP_VER=2
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+      fi
+      LDFLAGS="$LDOLD"
     fi
 
   fi
@@ -1058,17 +1101,17 @@
 
     ac_safe=`echo "gmp.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for gmp.h""... $ac_c" 1>&6
-echo "configure:1062: checking for gmp.h" >&5
+echo "configure:1105: checking for gmp.h" >&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 1067 "configure"
+#line 1110 "configure"
 #include "confdefs.h"
 #include <gmp.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1115: \"$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*
@@ -1095,7 +1138,7 @@
 
     if test $GMP_VER = 1; then
       echo $ac_n "checking for mpz_init in -lgmp""... $ac_c" 1>&6
-echo "configure:1099: checking for mpz_init in -lgmp" >&5
+echo "configure:1142: checking for mpz_init in -lgmp" >&5
 ac_lib_var=`echo gmp'_'mpz_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1103,7 +1146,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1107 "configure"
+#line 1150 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1114,7 +1157,7 @@
 mpz_init()
 ; return 0; }
 EOF
-if { (eval echo configure:1118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1161: \"$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
@@ -1138,12 +1181,57 @@
 GMP_VER=0
 fi
 
+      if test $ac_cv_lib_gmp_mpz_init = no; then
+                echo $ac_n "checking for __gmpz_init in -lgmp""... $ac_c" 1>&6
+echo "configure:1187: checking for __gmpz_init in -lgmp" >&5
+ac_lib_var=`echo gmp'_'__gmpz_init | 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="-lgmp  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1195 "configure"
+#include "confdefs.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 __gmpz_init();
+
+int main() {
+__gmpz_init()
+; return 0; }
+EOF
+if { (eval echo configure:1206: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIB_GMP2 1
+EOF
+ GMP_VER=2
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+      fi
     fi
 
     # Check for GMP2
     if test $GMP_VER = 1; then
       echo $ac_n "checking for mpz_fdiv_q_ui in -lgmp""... $ac_c" 1>&6
-echo "configure:1147: checking for mpz_fdiv_q_ui in -lgmp" >&5
+echo "configure:1235: checking for mpz_fdiv_q_ui in -lgmp" >&5
 ac_lib_var=`echo gmp'_'mpz_fdiv_q_ui | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1151,7 +1239,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lgmp  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1155 "configure"
+#line 1243 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1162,7 +1250,51 @@
 mpz_fdiv_q_ui()
 ; return 0; }
 EOF
-if { (eval echo configure:1166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1254: \"$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
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIB_GMP2 1
+EOF
+ GMP_VER=2
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+      if test $ac_cv_lib_gmp_mpz_fdiv_q_ui = no; then
+                echo $ac_n "checking for __gmpz_fdiv_q_ui in -lgmp""... $ac_c" 1>&6
+echo "configure:1279: checking for __gmpz_fdiv_q_ui in -lgmp" >&5
+ac_lib_var=`echo gmp'_'__gmpz_fdiv_q_ui | 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="-lgmp  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1287 "configure"
+#include "confdefs.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 __gmpz_fdiv_q_ui();
+
+int main() {
+__gmpz_fdiv_q_ui()
+; return 0; }
+EOF
+if { (eval echo configure:1298: \"$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
@@ -1185,6 +1317,7 @@
   echo "$ac_t""no" 1>&6
 fi
 
+      fi
     fi
 
   fi

Index: configure.in
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/res-rsa/configure.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- configure.in	12 May 2006 03:44:48 -0000	1.2
+++ configure.in	1 Jun 2006 03:17:25 -0000	1.3
@@ -109,6 +109,10 @@
       LDOLD="$LDFLAGS"
       LDFLAGS="$GMP_LIB -lgmp"
       AC_CHECK_LIB(gmp, mpz_fdiv_q_ui, AC_DEFINE(HAVE_LIB_GMP2) GMP_VER=2)
+      if test $ac_cv_lib_gmp_mpz_fdiv_q_ui = no; then
+        dnl with gmp3 it's a #define, use real function name
+        AC_CHECK_LIB(gmp, __gmpz_fdiv_q_ui, AC_DEFINE(HAVE_LIB_GMP2) GMP_VER=2)
+      fi
       LDFLAGS="$LDOLD"
     fi
 
@@ -123,11 +127,19 @@
 
     if test $GMP_VER = 1; then
       AC_CHECK_LIB(gmp, mpz_init, AC_DEFINE(HAVE_LIB_GMP), GMP_VER=0)
+      if test $ac_cv_lib_gmp_mpz_init = no; then
+        dnl with gmp3 it's a #define, use real function name
+        AC_CHECK_LIB(gmp, __gmpz_init, AC_DEFINE(HAVE_LIB_GMP2) GMP_VER=2)
+      fi
     fi
 
     # Check for GMP2
     if test $GMP_VER = 1; then
       AC_CHECK_LIB(gmp, mpz_fdiv_q_ui, AC_DEFINE(HAVE_LIB_GMP2) GMP_VER=2)
+      if test $ac_cv_lib_gmp_mpz_fdiv_q_ui = no; then
+        dnl with gmp3 it's a #define, use real function name
+        AC_CHECK_LIB(gmp, __gmpz_fdiv_q_ui, AC_DEFINE(HAVE_LIB_GMP2) GMP_VER=2)
+      fi
     fi
 
   fi