Vanilla Development Maling List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS update: Vanilla
Date: Friday March 12, 1999 @ 11:40
Author: siegl
Update of /home/netrek/cvsroot/Vanilla
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv8265
Modified Files:
config.h.in configure configure.in system.mk.in
Log Message:
COW autoconfig code with GMP 2 support
****************************************
Index: Vanilla/config.h.in
diff -u Vanilla/config.h.in:1.5 Vanilla/config.h.in:1.6
--- Vanilla/config.h.in:1.5 Wed Feb 10 18:37:35 1999
+++ Vanilla/config.h.in Fri Mar 12 11:40:24 1999
@@ -1,6 +1,15 @@
-/*
- Netrek Configuration file - by Kurt Siegl
-*/
+/* Netrek Configuration file - by Kurt Siegl
+ *
+ * $Log: config.h.in,v $
+ * Revision 1.6 1999/03/12 17:40:24 siegl
+ * COW autoconfig code with GMP 2 support
+ *
+ * Revision 1.2 1999/02/17 19:37:48 siegl
+ * merging autoconf files with Vanilla Server
+ *
+ * Revision 1.1.1.1 1998/11/01 17:24:13 siegl
+ * COW 3.0 initial revision
+ * */
#ifndef __CONFIG_H
#define __CONFIG_H
@@ -14,6 +23,8 @@
#undef COW
#undef SERVER
+#undef STABLE
+
/*
################################################################################
All The fun defines
@@ -73,7 +84,9 @@
#define CORRUPTED_PACKETS
/* EXPIRE=# - number of days this version will work for */
+#ifndef STABLE
#define EXPIRE 365
+#endif
/* ARMY_SLIDER - some sort of funky status window thing */
#define ARMY_SLIDER
@@ -125,6 +138,8 @@
/* RACE_COLORS - additional bitplane for race colors */
#define RACE_COLORS
+/* XTRA_MESSAGE_UI - Show message being typed on the local display */
+#define XTRA_MESSAGE_UI
#define PLIST1
#define PLIST
@@ -133,6 +148,7 @@
#define DOC_WIN
#define RABBIT_EARS
#define ROTATERACE
+#define FUNCTION_KEYS
/* client options */
#define IGNORE_SIGNALS_SEGV_BUS
@@ -142,6 +158,8 @@
#define TNG_FED_BITMAPS
#define MOTION_MOUSE
#define DIST_KEY_NAME
+#define PHASER_STATS
+#define RECORDGAME
#endif /* COW */
@@ -418,13 +436,16 @@
#undef HAVE_SYS_RESOURCE_H
#undef HAVE_SYS_WAIT_H
#undef HAVE_NETINET_IN_H
+#undef HAVE_GMP2_H
#undef NO_U_INT
#undef SIZEOF_LONG
#undef HAVE_USLEEP
#undef HAVE_SETSTATE
#undef HAVE_RANDOM
+#undef HAVE_STRFTIME
#undef HAVE_FTIME
-#undef STRFTIME
+#undef HAVE_STRCMPI
+#undef HAVE_STRNCMPI
#undef HAVE_NINT
#undef NEED_RINT_DEC
#undef RETSIGTYPE
@@ -439,6 +460,20 @@
#undef NO_PATH_MAX
#undef inline
+#ifdef COW
+#undef HAVE_X11
+#undef HAVE_WIN32
+#undef HAVE_XPM
+#undef HAVE_X11_XPM_H
+
+/* Autodetection error with GNU win32 */
+#ifdef HAVE_WIN32
+#define HAVE_STRCMPI
+#define HAVE_STRNCMPI
+#endif
+
+#endif
+
#ifdef SERVER
#define LIBDIR "/usr/local/games/netrek"
@@ -635,6 +670,7 @@
#else
#define INC_SYS_SELECT NULLFILE
#endif
+#define SELECT select
#ifdef HAVE_UNISTD_H
#define INC_UNISTD <unistd.h>
@@ -696,7 +732,7 @@
#define INC_SYS_WAIT NULLFILE
#endif
-#if HAVE_NETINET_IN_H
+#ifdef HAVE_NETINET_IN_H
#define INC_NETINET_IN <netinet/in.h>
#else
#define INC_NETINET_IN NULLFILE
@@ -710,6 +746,31 @@
#define INC_SYS_TIMEB <sys/time.h>
#endif
+#ifdef HAVE_GMP2_H
+#define INC_MP <gmp.h>
+#define MPTYPEDEF typedef mpz_t MPTYPE;
+
+#define assignItom(x,i) {mpz_init(x); mpz_set_ui(x,i);}
+#define madd(x, y, z) mpz_add(z, x, y)
+#define msub(x, y, z) mpz_sub(z, x, y)
+#define mult(x, y, z) mpz_mul(z, x, y)
+#define mdiv(n, d, q, r) mpz_fdiv_qr(q, r, n, d)
+#define sdiv(n, d, q, r) *r = mpz_fdiv_q_ui(q, n, d)
+#define msqrt(x, y, z) mpz_sqrt(z, x, y)
+#define mp_pow(x, y, z, a) mpz_powm(a, x, y, z)
+#define gcd(x, y, z) mpz_gcd(z, x, y)
+#define mcmp(x, y) mpz_cmp(x, y)
+#define min(x) mpz_min(x)
+#define mout(x) mpz_mout(x)
+#define mfree(x) mpz_clear(x)
+
+#else
+#define MPTYPEDEF typedef MINT *MPTYPE;
+#define assignItom(x,i) x= itom(i)
+#define mp_pow(x, y, z, a) pow(x, y, z, a)
+#define INC_MP <mp.h>
+#endif
+
#ifdef NO_PATH_MAX
#define PATH_MAX 255
#define INC_LIMITS NULLFILE
@@ -717,6 +778,16 @@
#define INC_LIMITS <limits.h>
#endif
+#ifdef HAVE_XPM
+#ifdef HAVE_X11_XPM_H
+#define INC_XPM <X11/xpm.h>
+#else
+#define INC_XPM <xpm.h>
+#endif
+#else
+#define INC_XPM NULLFILE
+#endif
+
/* Unchecked machine dependencies */
#ifdef linux
@@ -786,4 +857,27 @@
#endif /* defined sun4 */
+#ifdef WIN32
+typedef unsigned short int ushort;
+#define strncasecmp strncmp
+#ifdef THREADED
+#define THREAD(fn) { DWORD junk; CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)f
+#define ENDTHREAD ExitThread(0);
+typedef unsigned long int SEMAPHORE;
+#define CREATE_SEMAPHORE(initstate) CreateEvent(NULL, 1, initstate, NULL)
+#define SET_SEMAPHORE(sem) SetEvent((HANDLE)sem)
+#define RESET_SEMAPHORE(sem) ResetEvent((HANDLE)sem)
+#endif
+#endif
+
+#ifdef _MSC_VER
+#define INC_STRINGS <ntstring.h>
+#define INC_IO <ntio.h>
+#else
+#define INC_IO NULLFILE
+#endif
+
#endif /* __CONFIG_H */
+
+
+
Index: Vanilla/configure
diff -u Vanilla/configure:1.7 Vanilla/configure:1.8
--- Vanilla/configure:1.7 Fri Feb 19 21:01:10 1999
+++ Vanilla/configure Fri Mar 12 11:40:25 1999
@@ -12,11 +12,11 @@
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
+ --with-x use the X Window System"
+ac_help="$ac_help
--with-gmp-incdir GMP Include Dir"
ac_help="$ac_help
--with-gmp-libdir GMP Library Dir"
-ac_help="$ac_help
- --with-x use the X Window System"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -564,6 +564,22 @@
fi
+if test "$code" = cow; then
+echo "Produce a stable release (y/n)?"
+read stable
+
+
+ if test "$stable" = "y"; then
+ echo "Producing stable release"
+ cat >> confdefs.h <<\EOF
+#define STABLE 1
+EOF
+
+ else
+ stable=nope
+ fi
+fi
+
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -594,7 +610,7 @@
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:598: checking for a BSD compatible install" >&5
+echo "configure:614: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -660,7 +676,7 @@
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:664: checking for $ac_word" >&5
+echo "configure:680: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -689,7 +705,7 @@
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:693: checking for $ac_word" >&5
+echo "configure:709: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -737,7 +753,7 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:741: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -747,11 +763,11 @@
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 751 "configure"
+#line 767 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -771,12 +787,12 @@
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:775: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:791: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:780: checking whether we are using GNU C" >&5
+echo "configure:796: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -785,7 +801,7 @@
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -800,7 +816,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:804: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:820: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -828,7 +844,7 @@
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:832: checking how to run the C preprocessor" >&5
+echo "configure:848: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -843,13 +859,13 @@
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 847 "configure"
+#line 863 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -860,13 +876,13 @@
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 864 "configure"
+#line 880 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -889,7 +905,7 @@
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:893: checking whether ln -s works" >&5
+echo "configure:909: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -911,9 +927,9 @@
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:915: checking for AIX" >&5
+echo "configure:931: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 917 "configure"
+#line 933 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -936,21 +952,21 @@
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:940: checking for inline" >&5
+echo "configure:956: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 947 "configure"
+#line 963 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -977,459 +993,220 @@
#--------------------------------------------------------------------
-# Check for gmp and mp
+# Include sys/select.h if it exists and if it supplies things
+# that appear to be useful. This appears to be true only on
+# the RS/6000 under AIX. Some systems like OSF/1 have a
+# sys/select.h that's of no use, and other systems like SCO
+# UNIX have a sys/select.h that's pernicious. If there isn't
+# a sys/select.h, then make sure that "fd_set" is defined in
+# sys/types.h.
#--------------------------------------------------------------------
-
-echo $ac_n "checking for mp.h or gmp.h""... $ac_c" 1>&6
-echo "configure:985: checking for mp.h or gmp.h" >&5
-# Check whether --with-gmp-incdir or --without-gmp-incdir was given.
-if test "${with_gmp_incdir+set}" = set; then
- withval="$with_gmp_incdir"
- MPINC="-I$withval" search=false
-else
- MPINC=nope
-fi
-if test "$MPINC" = nope; then
+echo $ac_n "checking if fd_set requires sys/select.h""... $ac_c" 1>&6
+echo "configure:1007: checking if fd_set requires sys/select.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 996 "configure"
+#line 1009 "configure"
#include "confdefs.h"
-
-#include <mp.h>
-__GNU_MP__
-
+#include <sys/types.h>
+int main() {
+fd_set readMask, writeMask;
+; return 0; }
+EOF
+if { (eval echo configure:1016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 1024 "configure"
+#include "confdefs.h"
+#include <sys/select.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "GNU_MP" >/dev/null 2>&1; then
+ egrep "fd_set" >/dev/null 2>&1; then
rm -rf conftest*
- MPINC=nope search=true
+ cat >> confdefs.h <<\EOF
+#define NEED_SYS_SELECT_H 1
+EOF
+ echo "$ac_t""yes" 1>&6
else
rm -rf conftest*
- MPINC="" search=false
+ cat >> confdefs.h <<\EOF
+#define NO_FD_SET 1
+EOF
+ echo "$ac_t""fd_set missing" 1>&6
fi
rm -f conftest*
-fi
-if test "$MPINC" = nope; then
- dirs="$srcdir/gmp-1.3.2 /usr/unsupported/include /usr/local/include \
- /usr/gnu/include /usr/gnu/include/mp /usr/local/gnu/include \
- /usr/local/gnu/include/mp /usr/include/gnu /usr/local/lib/gmp-1.3.2"
- for i in $dirs; do
- if test -r $i/gmp.h; then
- MPINC="-I$i"
- echo "$ac_t""yes" 1>&6
- fi
- done
fi
-if test "$MPINC" = nope; then
- if test "$code" = cow; then
-# mp not supported with new mkkey.
- cat > conftest.$ac_ext <<EOF
-#line 1029 "configure"
+rm -f conftest*
+
+#--------------------------------------------------------------------
+# Check for various typedefs and provide substitutes if
+# they don't exist.
+#--------------------------------------------------------------------
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1053: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1058 "configure"
#include "confdefs.h"
-#include <mp.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
- MPINC=nope
+ ac_cv_header_stdc=yes
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- MPINC=nope
+ ac_cv_header_stdc=no
fi
rm -f conftest*
- else
- cat > conftest.$ac_ext <<EOF
-#line 1049 "configure"
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1083 "configure"
#include "confdefs.h"
-#include <mp.h>
+#include <string.h>
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- MPINC=""
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "memchr" >/dev/null 2>&1; then
+ :
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
rm -rf conftest*
- MPINC=nope
+ ac_cv_header_stdc=no
fi
rm -f conftest*
- fi
- if test "$MPINC" = nope; then
- MPINC="# -I."
- NORSA="#"
- fi
fi
-
-echo $ac_n "checking for libgmp.a""... $ac_c" 1>&6
-echo "configure:1077: checking for libgmp.a" >&5
-# Check whether --with-gmp-libdir or --without-gmp-libdir was given.
-if test "${with_gmp_libdir+set}" = set; then
- withval="$with_gmp_libdir"
- MPLIB="-L$withval -lmp -lgmp" search=false
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1101 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "free" >/dev/null 2>&1; then
+ :
else
- MPLIB=nope
+ rm -rf conftest*
+ ac_cv_header_stdc=no
fi
+rm -f conftest*
-if test "$MPLIB" = nope; then
- if test "$search" = true; then
- MPLIB=nope
- else
- echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
-echo "configure:1091: 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
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+ :
else
- ac_save_LIBS="$LIBS"
-LIBS="-lgmp $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1099 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 1122 "configure"
#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
-int main() {
-main()
-; return 0; }
EOF
-if { (eval echo configure:1106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+then
+ :
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ rm -fr conftest*
+ ac_cv_header_stdc=no
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
+rm -fr conftest*
+fi
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- MPLIB="-lmp -lgmp"
-else
- echo "$ac_t""no" 1>&6
-MPLIB=nope
fi
- fi
- if test "$MPLIB" = nope; then
- dirs="$srcdir/gmp-1.3.2 /usr/unsupported/lib /usr/local/lib /usr/gnu/lib \
- /usr/local/gnu/lib /usr/lib/gnu /usr/local/lib/gmp-1.3.2 /usr/lib"
- for i in $dirs; do
- if test -r $i/libgmp.a; then
- MPLIB="-L$i -lmp -lgmp"
- echo "$ac_t""yes" 1>&6
- fi
- done
- fi
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+ cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
fi
-if test "$MPLIB" = nope; then
- if test "$code" = cow; then
- echo $ac_n "checking for main in -lmp""... $ac_c" 1>&6
-echo "configure:1142: checking for main in -lmp" >&5
-ac_lib_var=`echo mp'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+
+for ac_hdr in unistd.h memory.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1160: 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
- ac_save_LIBS="$LIBS"
-LIBS="-lmp $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1150 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 1165 "configure"
#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
+#include <$ac_hdr>
EOF
-if { (eval echo configure:1157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+ 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_lib_$ac_lib_var=no"
+ eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
-LIBS="$ac_save_LIBS"
-
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
- MPLIB=bsdmp
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
else
echo "$ac_t""no" 1>&6
-MPLIB=nope
fi
+done
- else
- echo $ac_n "checking for main in -lmp""... $ac_c" 1>&6
-echo "configure:1180: checking for main in -lmp" >&5
-ac_lib_var=`echo mp'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+for ac_hdr in sys/timeb.h sys/ptyio.h sys/fcntl.h fcntl.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1200: 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
- ac_save_LIBS="$LIBS"
-LIBS="-lmp $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1188 "configure"
+ cat > conftest.$ac_ext <<EOF
+#line 1205 "configure"
#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:1195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
- MPLIB="-lmp"
-else
- echo "$ac_t""no" 1>&6
-MPLIB=nope
-fi
-
- fi
- if test "$MPLIB" = bsdmp; then
- echo "Sorry COW requires gmp not mp for RSA."
- MPLIB="# -L. -lmp -lgmp"
- NORSA="#"
- fi
- if test "$MPLIB" = nope; then
- echo Warning mp or gmp library not found, turning RSA off.
- MPLIB="# -L. -lmp -lgmp"
- NORSA="#"
- fi
-fi
-
-
-if test "$code" = cow; then
- if test -r "$srcdir/mkkey.c"; then
- echo " RSA utilities for cow build found."
- else
- echo
- echo Warning RSA utilities for cow build not found, turning RSA off.
- NORSA="#"
- echo Check your favorite ftp site for a blessed client.
- echo In case you can not find one contact brmbugs.
- echo
- fi
-fi
-if test "$code" = server; then
-echo $ac_n "checking res-rsa/rsa_util.c""... $ac_c" 1>&6
-echo "configure:1244: checking res-rsa/rsa_util.c" >&5
- if test -r "$srcdir/res-rsa/rsa_util.c"; then
- echo "$ac_t""RSA utilities found" 1>&6
- RSAINC="-I`pwd`/res-rsa"
- else
- echo "$ac_t""Warning RSA utilities for server build not found" 1>&6
- NORSA="#"
- echo
- fi
-fi
-
-
-
-
-
-#--------------------------------------------------------------------
-# Include sys/select.h if it exists and if it supplies things
-# that appear to be useful. This appears to be true only on
-# the RS/6000 under AIX. Some systems like OSF/1 have a
-# sys/select.h that's of no use, and other systems like SCO
-# UNIX have a sys/select.h that's pernicious. If there isn't
-# a sys/select.h, then make sure that "fd_set" is defined in
-# sys/types.h.
-#--------------------------------------------------------------------
-
-echo $ac_n "checking if fd_set requires sys/select.h""... $ac_c" 1>&6
-echo "configure:1270: checking if fd_set requires sys/select.h" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1272 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-fd_set readMask, writeMask;
-; return 0; }
-EOF
-if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
-#line 1287 "configure"
-#include "confdefs.h"
-#include <sys/select.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "fd_set" >/dev/null 2>&1; then
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
-#define NEED_SYS_SELECT_H 1
-EOF
- echo "$ac_t""yes" 1>&6
-else
- rm -rf conftest*
- cat >> confdefs.h <<\EOF
-#define NO_FD_SET 1
-EOF
- echo "$ac_t""fd_set missing" 1>&6
-fi
-rm -f conftest*
-
-fi
-rm -f conftest*
-
-#--------------------------------------------------------------------
-# Check for various typedefs and provide substitutes if
-# they don't exist.
-#--------------------------------------------------------------------
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1316: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1321 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- rm -rf conftest*
- ac_cv_header_stdc=yes
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1346 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1364 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
-else
- rm -rf conftest*
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
- :
-else
- cat > conftest.$ac_ext <<EOF
-#line 1385 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:1396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
- :
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-for ac_hdr in unistd.h memory.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1423: 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 1428 "configure"
-#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1455,21 +1232,21 @@
fi
done
-for ac_hdr in sys/timeb.h sys/ptyio.h sys/fcntl.h fcntl.h
+for ac_hdr in ctype.h machine/endian.h sys/resource.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1463: checking for $ac_hdr" >&5
+echo "configure:1240: 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 1468 "configure"
+#line 1245 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1495,21 +1272,21 @@
fi
done
-for ac_hdr in ctype.h machine/endian.h sys/resource.h
+for ac_hdr in sys/wait.h netinet/in.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1503: checking for $ac_hdr" >&5
+echo "configure:1280: 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 1508 "configure"
+#line 1285 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1535,58 +1312,18 @@
fi
done
-for ac_hdr in sys/wait.h netinet/in.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1543: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+
+echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
+echo "configure:1318: checking for wait3 that fills in rusage" >&5
+if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_wait3_rusage=no
+else
cat > conftest.$ac_ext <<EOF
-#line 1548 "configure"
+#line 1326 "configure"
#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-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
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
-echo "configure:1581: checking for wait3 that fills in rusage" >&5
-if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_wait3_rusage=no
-else
- cat > conftest.$ac_ext <<EOF
-#line 1589 "configure"
-#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -1616,7 +1353,7 @@
}
}
EOF
-if { (eval echo configure:1620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_wait3_rusage=yes
else
@@ -1639,12 +1376,12 @@
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1643: checking for pid_t" >&5
+echo "configure:1380: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1648 "configure"
+#line 1385 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1672,12 +1409,12 @@
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1676: checking for uid_t in sys/types.h" >&5
+echo "configure:1413: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1681 "configure"
+#line 1418 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -1706,12 +1443,12 @@
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1710: checking for size_t" >&5
+echo "configure:1447: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1715 "configure"
+#line 1452 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1740,17 +1477,17 @@
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:1744: checking for vfork.h" >&5
+echo "configure:1481: checking for vfork.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 1749 "configure"
+#line 1486 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1775,18 +1512,18 @@
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:1779: checking for working vfork" >&5
+echo "configure:1516: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:1785: checking for vfork" >&5
+echo "configure:1522: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1790 "configure"
+#line 1527 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -1809,7 +1546,7 @@
; return 0; }
EOF
-if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -1830,7 +1567,7 @@
else
cat > conftest.$ac_ext <<EOF
-#line 1834 "configure"
+#line 1571 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -1925,7 +1662,7 @@
}
}
EOF
-if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -1948,12 +1685,12 @@
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:1952: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:1689: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1957 "configure"
+#line 1694 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -1961,7 +1698,7 @@
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:1965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -1983,9 +1720,9 @@
echo $ac_n "checking for itimer in time.h""... $ac_c" 1>&6
-echo "configure:1987: checking for itimer in time.h" >&5
+echo "configure:1724: checking for itimer in time.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 1989 "configure"
+#line 1726 "configure"
#include "confdefs.h"
#include <time.h>
EOF
@@ -2004,7 +1741,7 @@
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2008: checking size of long" >&5
+echo "configure:1745: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2012,7 +1749,7 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 2016 "configure"
+#line 1753 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2023,7 +1760,7 @@
exit(0);
}
EOF
-if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -2044,9 +1781,9 @@
echo $ac_n "checking for u_int in sys/types.h""... $ac_c" 1>&6
-echo "configure:2048: checking for u_int in sys/types.h" >&5
+echo "configure:1785: checking for u_int in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2050 "configure"
+#line 1787 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -2065,9 +1802,9 @@
echo $ac_n "checking for PATH_MAX in limits.h""... $ac_c" 1>&6
-echo "configure:2069: checking for PATH_MAX in limits.h" >&5
+echo "configure:1806: checking for PATH_MAX in limits.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 2071 "configure"
+#line 1808 "configure"
#include "confdefs.h"
#include <limits.h>
@@ -2090,17 +1827,63 @@
+# Checking for gnu-win32 Windows libraries
+echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
+echo "configure:1833: checking for main in -lgdi32" >&5
+ac_lib_var=`echo gdi32'_'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="-lgdi32 $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1841 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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_WIN32 1
+EOF
+ XLIBSWDIR="-Lwin32"; XLIBSWLIB="-lgdi32 -luser32"; XINCLUDES="-Iwin32"; NOX11="#"; CPPFLAGS="$CPPFLAGS -Iwin32"
+else
+ echo "$ac_t""no" 1>&6
+cat >> confdefs.h <<\EOF
+#define HAVE_X11 1
+EOF
+ NOWIN32="#"
+fi
+
#--------------------------------------------------------------------
# Locate the X11 header files and the X11 library archive.
#--------------------------------------------------------------------
+if test -z "$NOX11" ; then
+
# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:2104: checking for X" >&5
+echo "configure:1887: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -2162,12 +1945,12 @@
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 2166 "configure"
+#line 1949 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2236,14 +2019,14 @@
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2240 "configure"
+#line 2023 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -2300,93 +2083,501 @@
done
done
fi
+rm -f conftest*
+fi # $ac_x_libraries = NO
+
+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
+ # Didn't find X anywhere. Cache the known absence of X.
+ ac_cv_have_x="have_x=no"
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+ fi
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ echo "$ac_t""$have_x" 1>&6
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+ echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
+fi
+
+
+if test -z "$x_libraries" ; then
+echo checking for X11 header files
+XINCLUDES=""
+cat > conftest.$ac_ext <<EOF
+#line 2121 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ XINCLUDES="nope"
+fi
+rm -f conftest*
+if test "$XINCLUDES" = nope; then
+ dirs="/usr/unsupported/include /usr/local/include /usr/X386/include \
+ /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 \
+ /usr/openwin/include /usr/X11/include /pub/X11R5/include \
+ /usr/local/X11R5/include /usr/X11R6/include /usr/include/X11R6 \
+ /pub/X11R6/include /usr/local/X11R6/include"
+
+ for i in $dirs ; do
+ if test -r $i/X11/Intrinsic.h; then
+ XINCLUDES=" -I$i"
+ fi
+ done
+fi
+if test "$XINCLUDES" = nope; then
+ echo "Warning: couldn't find any X11 include files."
+ XINCLUDES=""
+fi
+
+echo "checking for X11 library archive"
+echo $ac_n "checking for main in -lX11""... $ac_c" 1>&6
+echo "configure:2158: checking for main in -lX11" >&5
+ac_lib_var=`echo X11'_'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="-lX11 $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2166 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
+ XLIBSWLIB="-lX11"
+else
+ echo "$ac_t""no" 1>&6
+XLIBSWLIB=nope
+fi
+
+if test "$XLIBSWLIB" = nope; then
+ dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib \
+ /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/openwin/lib \
+ /usr/X11/lib /pub/X11R5/lib /usr/local/X11R5/lib \
+ /usr/X11R6/lib /usr/lib/X11R6 /pub/X11R6/lib /usr/local/X11R6/lib"
+
+ for i in $dirs ; do
+ if test -r $i/libX11.a; then
+ XLIBSWDIR="-L$i"
+ XLIBSWLIB="-lX11"
+ fi
+ done
+fi
+if test "$XLIBSWLIB" = nope ; then
+ echo $ac_n "checking for main in -lXwindow""... $ac_c" 1>&6
+echo "configure:2209: checking for main in -lXwindow" >&5
+ac_lib_var=`echo Xwindow'_'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="-lXwindow $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2217 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
+ XLIBSWLIB=-lXwindow
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test "$XLIBSWLIB" = nope ; then
+ echo "Warning: couldn't find the X11 library archive. Using -lX11."
+ XLIBSWLIB=-lX11
+fi
+else
+XINCLUDES="-I$x_includes"
+XLIBSWDIR="-L$x_libraries"
+XLIBSWLIB="-lX11"
+fi
+
+fi
+
+
+
+
+if test "$code" = cow; then
+ if test "$stable" = nope; then
+ SAVELIBS="$LIBS"
+ LIBS="$LIBS $XLIBSWDIR $XLIBSWLIB"
+ SAVEINCS="$INCS"
+ INCS="$INCS $XINCLUDES"
+ echo $ac_n "checking for main in -lXpm""... $ac_c" 1>&6
+echo "configure:2267: checking for main in -lXpm" >&5
+ac_lib_var=`echo Xpm'_'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="-lXpm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2275 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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_XPM 1
+EOF
+ XPMLIBS="-lXpm"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ for ac_hdr in X11/xpm.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2309: 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 2314 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+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
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ LIBS="$SAVELIBS"
+ INCS="$SAVEINCS"
+ fi
+fi
+
+# Fix link order for Xpm
+XLIBSW="$XLIBSWDIR $XPMLIBS $XLIBSWLIB"
+
+if test "$code" = server; then
+
+
+ true # dummy line
+else
+ INCS="$INCS $XINCLUDES"
+
+ LIBS="$LIBS $XLIBSW"
+fi
+
+
+#--------------------------------------------------------------------
+# Check for gmp and mp
+#--------------------------------------------------------------------
+
+echo $ac_n "checking for mp.h or gmp.h""... $ac_c" 1>&6
+echo "configure:2369: checking for mp.h or gmp.h" >&5
+# Check whether --with-gmp-incdir or --without-gmp-incdir was given.
+if test "${with_gmp_incdir+set}" = set; then
+ withval="$with_gmp_incdir"
+ MPINC="-I$withval" search=false
+else
+ MPINC=nope
+fi
+
+if test "$MPINC" = nope; then
+cat > conftest.$ac_ext <<EOF
+#line 2380 "configure"
+#include "confdefs.h"
+
+#include <mp.h>
+__GNU_MP__
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "GNU_MP" >/dev/null 2>&1; then
+ rm -rf conftest*
+ MPINC=nope search=true
+else
+ rm -rf conftest*
+ MPINC="" search=false
+fi
+rm -f conftest*
+
+fi
+
+# Checking for GMP
+ if test "$MPINC" = nope; then
+ cat > conftest.$ac_ext <<EOF
+#line 2402 "configure"
+#include "confdefs.h"
+#include <gmp.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ MPINC="" search=false
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ MPINC=nope
+fi
+rm -f conftest*
+ fi
+
+if test "$MPINC" = nope; then
+ dirs="$srcdir/gmp-2.0.2 /usr/unsupported/include /usr/local/include \
+ /usr/gnu/include /usr/gnu/include/mp /usr/local/gnu/include \
+ /usr/local/gnu/include/mp /usr/include/gnu /usr/local/lib/gmp-2.0.2"
+ for i in $dirs; do
+ if test -r $i/gmp.h; then
+ MPINC="-I$i"
+ fi
+ done
+fi
+
+if test "$MPINC" = nope; then
+
+ if test "$code" = cow; then
+# mp not supported with new mkkey.
+ cat > conftest.$ac_ext <<EOF
+#line 2438 "configure"
+#include "confdefs.h"
+#include <mp.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ MPINC=nope
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ MPINC=nope
+fi
+rm -f conftest*
+ else
+ cat > conftest.$ac_ext <<EOF
+#line 2458 "configure"
+#include "confdefs.h"
+#include <mp.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ MPINC=""
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ MPINC=nope
+fi
+rm -f conftest*
+ fi
+
+ if test "$MPINC" = nope; then
+ MPINC="# -I."
+ NORSA="#"
+ echo "$ac_t""no" 1>&6
+ else
+ echo "$ac_t""yes" 1>&6
+ fi
+else
+ echo "$ac_t""yes" 1>&6
+fi
+
+
+
+# Checking for GMP 2
+SAVEINCS="$INCS"
+INCS="$INCS $XINCLUDES"
+cat > conftest.$ac_ext <<EOF
+#line 2495 "configure"
+#include "confdefs.h"
+
+ #include <gmp.h>
+ gmp=__GNU_MP__
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep ""gmp=.*2"" >/dev/null 2>&1; then
+ rm -rf conftest*
+ cat >> confdefs.h <<\EOF
+#define HAVE_GMP2_H 1
+EOF
+
+fi
rm -f conftest*
-fi # $ac_x_libraries = NO
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
- # Didn't find X anywhere. Cache the known absence of X.
- ac_cv_have_x="have_x=no"
-else
- # Record where we found X for the cache.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
- fi
- eval "$ac_cv_have_x"
-fi # $with_x != no
+INCS="$SAVEINCS"
-if test "$have_x" != yes; then
- echo "$ac_t""$have_x" 1>&6
- no_x=yes
+
+# AC_MSG_CHECKING(for libgmp.a)
+# Check whether --with-gmp-libdir or --without-gmp-libdir was given.
+if test "${with_gmp_libdir+set}" = set; then
+ withval="$with_gmp_libdir"
+ MPLIB="-L$withval -lgmp" search=false
else
- # If each of the values was on the command line, it overrides each guess.
- test "x$x_includes" = xNONE && x_includes=$ac_x_includes
- test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
- # Update the cache value to reflect the command line values.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
- echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
+ MPLIB=nope
fi
-
-if test -z "$x_libraries" ; then
-echo checking for X11 header files
-XINCLUDES=""
+if test "$MPLIB" = nope; then
+ if test "$search" = true; then
+ MPLIB=nope
+ else
+ echo $ac_n "checking for main in -lmp""... $ac_c" 1>&6
+echo "configure:2529: checking for main in -lmp" >&5
+ac_lib_var=`echo mp'_'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="-lmp $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2338 "configure"
+#line 2537 "configure"
#include "confdefs.h"
-#include <X11/Intrinsic.h>
+
+int main() {
+main()
+; return 0; }
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
- :
+if { (eval echo configure:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
else
- echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- XINCLUDES="nope"
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
-if test "$XINCLUDES" = nope; then
- dirs="/usr/unsupported/include /usr/local/include /usr/X386/include \
- /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 \
- /usr/openwin/include /usr/X11/include /pub/X11R5/include \
- /usr/local/X11R5/include /usr/X11R6/include /usr/include/X11R6 \
- /pub/X11R6/include /usr/local/X11R6/include"
+LIBS="$ac_save_LIBS"
- for i in $dirs ; do
- if test -r $i/X11/Intrinsic.h; then
- XINCLUDES=" -I$i"
- fi
- done
fi
-if test "$XINCLUDES" = nope; then
- echo "Warning: couldn't find any X11 include files."
- XINCLUDES=""
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ MPLIB="-lmp"
+else
+ echo "$ac_t""no" 1>&6
+MPLIB=" "
fi
-echo "checking for X11 library archive"
-echo $ac_n "checking for main in -lX11""... $ac_c" 1>&6
-echo "configure:2375: checking for main in -lX11" >&5
-ac_lib_var=`echo X11'_'main | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for main in -lgmp""... $ac_c" 1>&6
+echo "configure:2566: 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
else
ac_save_LIBS="$LIBS"
-LIBS="-lX11 $LIBS"
+LIBS="-lgmp $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2383 "configure"
+#line 2574 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2401,42 +2592,46 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- XLIBSW="-lX11"
+ MPLIB="$MPLIB -lgmp"
else
echo "$ac_t""no" 1>&6
-XLIBSW=nope
+MPLIB=nope
fi
-
-if test "$XLIBSW" = nope; then
- dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib \
- /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/openwin/lib \
- /usr/X11/lib /pub/X11R5/lib /usr/local/X11R5/lib \
- /usr/X11R6/lib /usr/lib/X11R6 /pub/X11R6/lib /usr/local/X11R6/lib"
- for i in $dirs ; do
- if test -r $i/libX11.a; then
- XLIBSW="-L$i -lX11"
- fi
+ fi
+ if test "$MPLIB" = nope; then
+ dirs="$srcdir/gmp-2.0.2 /usr/unsupported/lib /usr/local/lib /usr/gnu/lib \
+ /usr/local/gnu/lib /usr/lib/gnu /usr/local/lib/gmp-2.0.2"
+ for i in $dirs; do
+ if test -r $i/libmp.a; then
+ MPLIB="-L$i -lmp"
+ fi
+ if test -r $i/libgmp.a; then
+ MPLIB="-L$i -lgmp"
+ echo "$ac_t""yes" 1>&6
+ fi
done
+ fi
fi
-if test "$XLIBSW" = nope ; then
- echo $ac_n "checking for main in -lXwindow""... $ac_c" 1>&6
-echo "configure:2425: checking for main in -lXwindow" >&5
-ac_lib_var=`echo Xwindow'_'main | sed 'y%./+-%__p_%'`
+if test "$MPLIB" = nope; then
+ if test "$code" = cow; then
+ echo $ac_n "checking for main in -lmp""... $ac_c" 1>&6
+echo "configure:2620: checking for main in -lmp" >&5
+ac_lib_var=`echo mp'_'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="-lXwindow $LIBS"
+LIBS="-lmp $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2433 "configure"
+#line 2628 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2451,31 +2646,93 @@
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- XLIBSW=-lXwindow
+ MPLIB=bsdmp
else
echo "$ac_t""no" 1>&6
+MPLIB=nope
fi
+ else
+ echo $ac_n "checking for main in -lmp""... $ac_c" 1>&6
+echo "configure:2658: checking for main in -lmp" >&5
+ac_lib_var=`echo mp'_'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="-lmp $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2666 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:2673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
-if test "$XLIBSW" = nope ; then
- echo "Warning: couldn't find the X11 library archive. Using -lX11."
- XLIBSW=-lX11
+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
+ MPLIB="-lmp"
else
-XINCLUDES="-I$x_includes"
-XLIBSW="-L$x_libraries -lX11"
+ echo "$ac_t""no" 1>&6
+MPLIB=nope
+fi
+
+ fi
+ if test "$MPLIB" = bsdmp; then
+ echo "Sorry COW requires gmp not mp for RSA."
+ MPLIB="# -L. -lmp -lgmp"
+ NORSA="#"
+ fi
+ if test "$MPLIB" = nope; then
+ echo Warning mp or gmp library not found, turning RSA off.
+ MPLIB="# -L. -lmp -lgmp"
+ NORSA="#"
+ fi
fi
+
+if test "$code" = cow; then
+ if test -r "$srcdir/mkkey.c"; then
+ echo " RSA utilities for cow build found."
+ else
+ echo
+ echo Warning RSA utilities for cow build not found, turning RSA off.
+ NORSA="#"
+ echo Check your favorite ftp site for a blessed client.
+ echo In case you can not find one contact brmbugs.
+ echo
+ fi
+fi
if test "$code" = server; then
-
-
- true # dummy line
-else
- INCS="$INCS $XINCLUDES"
-
- LIBS="$LIBS $XLIBSW"
+echo $ac_n "checking res-rsa/rsa_util.c""... $ac_c" 1>&6
+echo "configure:2722: checking res-rsa/rsa_util.c" >&5
+ if test -r "$srcdir/res-rsa/rsa_util.c"; then
+ echo "$ac_t""RSA utilities found" 1>&6
+ RSAINC="-I`pwd`/res-rsa"
+ else
+ echo "$ac_t""Warning RSA utilities for server build not found" 1>&6
+ NORSA="#"
+ echo
+ fi
fi
-
+
+
+
+
+
#--------------------------------------------------------------------
# Check for the existence of various libraries. The order here
# is important, so that then end up in the right order in the
@@ -2483,7 +2740,7 @@
#--------------------------------------------------------------------
echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:2487: checking for main in -lXbsd" >&5
+echo "configure:2744: checking for main in -lXbsd" >&5
ac_lib_var=`echo Xbsd'_'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
@@ -2491,14 +2748,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lXbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2495 "configure"
+#line 2752 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2521,7 +2778,7 @@
# AC _CHECK_LIB(V3, main, [LIBS="$LIBS -lV3"])
# AC _CHECK_LIB(PW, main, [LIBS="$LIBS -lPW"])
echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:2525: checking for main in -lsocket" >&5
+echo "configure:2782: checking for main in -lsocket" >&5
ac_lib_var=`echo socket'_'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
@@ -2529,14 +2786,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2533 "configure"
+#line 2790 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2557,7 +2814,7 @@
fi
echo $ac_n "checking for main in -linet""... $ac_c" 1>&6
-echo "configure:2561: checking for main in -linet" >&5
+echo "configure:2818: checking for main in -linet" >&5
ac_lib_var=`echo inet'_'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
@@ -2565,14 +2822,14 @@
ac_save_LIBS="$LIBS"
LIBS="-linet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2569 "configure"
+#line 2826 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2593,7 +2850,7 @@
fi
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:2597: checking for main in -lnsl" >&5
+echo "configure:2854: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'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
@@ -2601,14 +2858,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2605 "configure"
+#line 2862 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2629,7 +2886,7 @@
fi
echo $ac_n "checking for main in -lseq""... $ac_c" 1>&6
-echo "configure:2633: checking for main in -lseq" >&5
+echo "configure:2890: checking for main in -lseq" >&5
ac_lib_var=`echo seq'_'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
@@ -2637,14 +2894,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lseq $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2641 "configure"
+#line 2898 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2665,7 +2922,7 @@
fi
echo $ac_n "checking for main in -lsun""... $ac_c" 1>&6
-echo "configure:2669: checking for main in -lsun" >&5
+echo "configure:2926: checking for main in -lsun" >&5
ac_lib_var=`echo sun'_'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
@@ -2673,14 +2930,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lsun $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2677 "configure"
+#line 2934 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2703,7 +2960,7 @@
if test "$code" = server; then
echo $ac_n "checking for main in -lipc""... $ac_c" 1>&6
-echo "configure:2707: checking for main in -lipc" >&5
+echo "configure:2964: checking for main in -lipc" >&5
ac_lib_var=`echo ipc'_'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
@@ -2711,14 +2968,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2715 "configure"
+#line 2972 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2739,7 +2996,7 @@
fi
echo $ac_n "checking for main in -lshm""... $ac_c" 1>&6
-echo "configure:2743: checking for main in -lshm" >&5
+echo "configure:3000: checking for main in -lshm" >&5
ac_lib_var=`echo shm'_'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
@@ -2747,14 +3004,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lshm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2751 "configure"
+#line 3008 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2775,7 +3032,7 @@
fi
echo $ac_n "checking for main in -lstuff""... $ac_c" 1>&6
-echo "configure:2779: checking for main in -lstuff" >&5
+echo "configure:3036: checking for main in -lstuff" >&5
ac_lib_var=`echo stuff'_'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
@@ -2783,14 +3040,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lstuff $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2787 "configure"
+#line 3044 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2812,7 +3069,7 @@
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:2816: checking for crypt in -lcrypt" >&5
+echo "configure:3073: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2820,7 +3077,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2824 "configure"
+#line 3081 "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
@@ -2831,7 +3088,7 @@
crypt()
; return 0; }
EOF
-if { (eval echo configure:2835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2854,7 +3111,7 @@
echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6
-echo "configure:2858: checking for main in -ltermcap" >&5
+echo "configure:3115: checking for main in -ltermcap" >&5
ac_lib_var=`echo termcap'_'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
@@ -2862,14 +3119,14 @@
ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2866 "configure"
+#line 3123 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2892,7 +3149,7 @@
echo $ac_n "checking for newwin in -lcurses""... $ac_c" 1>&6
-echo "configure:2896: checking for newwin in -lcurses" >&5
+echo "configure:3153: checking for newwin in -lcurses" >&5
ac_lib_var=`echo curses'_'newwin | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2900,7 +3157,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2904 "configure"
+#line 3161 "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
@@ -2911,7 +3168,7 @@
newwin()
; return 0; }
EOF
-if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2940,12 +3197,12 @@
#--------------------------------------------------------------------
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2944: checking return type of signal handlers" >&5
+echo "configure:3201: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2949 "configure"
+#line 3206 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2962,7 +3219,7 @@
int i;
; return 0; }
EOF
-if { (eval echo configure:2966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -2981,7 +3238,7 @@
echo $ac_n "checking for restartable system calls""... $ac_c" 1>&6
-echo "configure:2985: checking for restartable system calls" >&5
+echo "configure:3242: checking for restartable system calls" >&5
if eval "test \"`echo '$''{'ac_cv_sys_restartable_syscalls'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2989,7 +3246,7 @@
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 2993 "configure"
+#line 3250 "configure"
#include "confdefs.h"
/* Exit 0 (true) if wait returns something other than -1,
i.e. the pid of the child, which means that wait was restarted
@@ -3007,7 +3264,7 @@
}
EOF
-if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_sys_restartable_syscalls=yes
else
@@ -3038,7 +3295,7 @@
else
cat > conftest.$ac_ext <<EOF
-#line 3042 "configure"
+#line 3299 "configure"
#include "confdefs.h"
#include <signal.h>
@@ -3048,17 +3305,17 @@
int c;
static struct itimerval udt;
signal(SIGALRM,test);
-udt.it_interval.tv_sec = 0;
+udt.it_interval.tv_sec = 1;
udt.it_interval.tv_usec = 10;
-udt.it_value.tv_sec = 0;
+udt.it_value.tv_sec = 1;
udt.it_value.tv_usec = 10;
(void) setitimer(ITIMER_REAL, &udt, (struct itimerval *) 0);
-for (c=0; c<10; c++)
+for (c=0; c<5; c++)
pause();
exit(0);}
EOF
-if { (eval echo configure:3062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
#define BSD_SIGNALS 1
@@ -3069,12 +3326,12 @@
cat conftest.$ac_ext >&5
rm -fr conftest*
echo $ac_n "checking for sigset""... $ac_c" 1>&6
-echo "configure:3073: checking for sigset" >&5
+echo "configure:3330: checking for sigset" >&5
if eval "test \"`echo '$''{'ac_cv_func_sigset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3078 "configure"
+#line 3335 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sigset(); below. */
@@ -3097,7 +3354,7 @@
; return 0; }
EOF
-if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_sigset=yes"
else
@@ -3127,89 +3384,19 @@
rm -fr conftest*
fi
-
-echo $ac_n "checking for main in -lBSD""... $ac_c" 1>&6
-echo "configure:3133: checking for main in -lBSD" >&5
-ac_lib_var=`echo BSD'_'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="-lBSD $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3141 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
- LIBS="$LIBS -lBSD"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
-echo "configure:3169: checking for main in -lbsd" >&5
-ac_lib_var=`echo bsd'_'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="-lbsd $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3177 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
- LIBS="$LIBS -lbsd"
-else
- echo "$ac_t""no" 1>&6
-fi
+# AC_CHECK_LIB(BSD, main, [LIBS="$LIBS -lBSD"])
+# AC_CHECK_LIB(bsd, main, [LIBS="$LIBS -lbsd"])
-for ac_func in usleep random setstate strftime ftime
+for ac_func in usleep random setstate strftime ftime strcmpi strncmpi
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3208: checking for $ac_func" >&5
+echo "configure:3395: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3213 "configure"
+#line 3400 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3232,7 +3419,7 @@
; return 0; }
EOF
-if { (eval echo configure:3236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3258,7 +3445,7 @@
echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:3262: checking for main in -lm" >&5
+echo "configure:3449: 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
@@ -3266,14 +3453,14 @@
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3270 "configure"
+#line 3457 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3296,12 +3483,12 @@
for ac_func in nint
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3300: checking for $ac_func" >&5
+echo "configure:3487: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3305 "configure"
+#line 3492 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3324,7 +3511,7 @@
; return 0; }
EOF
-if { (eval echo configure:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3349,7 +3536,7 @@
done
cat > conftest.$ac_ext <<EOF
-#line 3353 "configure"
+#line 3540 "configure"
#include "confdefs.h"
#include <math.h>
EOF
@@ -3370,12 +3557,12 @@
for ac_func in setstate strdup rint
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3374: checking for $ac_func" >&5
+echo "configure:3561: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3379 "configure"
+#line 3566 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3398,7 +3585,7 @@
; return 0; }
EOF
-if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3429,12 +3616,12 @@
for ac_func in random strdup rint
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3433: checking for $ac_func" >&5
+echo "configure:3620: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3438 "configure"
+#line 3625 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3457,7 +3644,7 @@
; return 0; }
EOF
-if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3492,7 +3679,7 @@
if test "$code" = server; then
echo $ac_n "checking for netstat""... $ac_c" 1>&6
-echo "configure:3496: checking for netstat" >&5
+echo "configure:3683: checking for netstat" >&5
dirs="/bsd /usr/bsd /etc /bin /usr/bin /usr/etc"
NETSTAT="nice -20 /usr/ucb/netstat -f inet"
for i in $dirs; do
@@ -3508,7 +3695,7 @@
done
echo $ac_n "checking for uptime""... $ac_c" 1>&6
-echo "configure:3512: checking for uptime" >&5
+echo "configure:3699: checking for uptime" >&5
dirs="/bsd /usr/bsd /etc /bin /usr/bin /usr/etc"
for i in $dirs; do
if test -x $i/uptime; then
@@ -3521,7 +3708,6 @@
fi
done
-
fi
trap '' 1 2 15
@@ -3656,18 +3842,21 @@
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@LOGNAME@%$LOGNAME%g
+s%@stable@%$stable%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@LN_S@%$LN_S%g
+s%@NOX11@%$NOX11%g
+s%@NOWIN32@%$NOWIN32%g
+s%@XINCLUDES@%$XINCLUDES%g
+s%@XLIBSW@%$XLIBSW%g
+s%@INCS@%$INCS%g
s%@MPINC@%$MPINC%g
s%@MPLIB@%$MPLIB%g
s%@RSAINC@%$RSAINC%g
s%@NORSA@%$NORSA%g
-s%@XINCLUDES@%$XINCLUDES%g
-s%@XLIBSW@%$XLIBSW%g
-s%@INCS@%$INCS%g
s%@LIBCRYPT@%$LIBCRYPT%g
s%@LIBTERMCAP@%$LIBTERMCAP%g
s%@LIBCURSES@%$LIBCURSES%g
Index: Vanilla/configure.in
diff -u Vanilla/configure.in:1.7 Vanilla/configure.in:1.8
--- Vanilla/configure.in:1.7 Fri Feb 19 21:01:10 1999
+++ Vanilla/configure.in Fri Mar 12 11:40:26 1999
@@ -32,6 +32,19 @@
AC_SUBST(LOGNAME)
fi
+if test "$code" = cow; then
+echo "Produce a stable release (y/n)?"
+read stable
+
+AC_SUBST(stable)
+ if test "$stable" = "y"; then
+ echo "Producing stable release"
+ AC_DEFINE(STABLE)
+ else
+ stable=nope
+ fi
+fi
+
AC_PROG_INSTALL
#
# autoconf assumes that we never cd to a subdirectory and then use the
@@ -56,110 +69,6 @@
AC_C_INLINE
#--------------------------------------------------------------------
-# Check for gmp and mp
-#--------------------------------------------------------------------
-
-AC_MSG_CHECKING(for mp.h or gmp.h)
-AC_ARG_WITH(gmp-incdir,[ --with-gmp-incdir GMP Include Dir], MPINC="-I$withval" search=false, MPINC=nope)
-if test "$MPINC" = nope; then
-AC_EGREP_CPP( GNU_MP,[
-#include <mp.h>
-__GNU_MP__
-], MPINC=nope search=true, MPINC="" search=false )
-fi
-if test "$MPINC" = nope; then
- dirs="$srcdir/gmp-1.3.2 /usr/unsupported/include /usr/local/include \
- /usr/gnu/include /usr/gnu/include/mp /usr/local/gnu/include \
- /usr/local/gnu/include/mp /usr/include/gnu /usr/local/lib/gmp-1.3.2"
- for i in $dirs; do
- if test -r $i/gmp.h; then
- MPINC="-I$i"
- AC_MSG_RESULT(yes)
- fi
- done
-fi
-if test "$MPINC" = nope; then
- if test "$code" = cow; then
-# mp not supported with new mkkey.
- AC_TRY_CPP([#include <mp.h>], MPINC=nope , MPINC=nope)
- else
- AC_TRY_CPP([#include <mp.h>], MPINC="" , MPINC=nope)
- fi
-
- if test "$MPINC" = nope; then
- MPINC="# -I."
- NORSA="#"
- fi
-fi
-AC_SUBST(MPINC)
-
-AC_MSG_CHECKING(for libgmp.a)
-AC_ARG_WITH(gmp-libdir,[ --with-gmp-libdir GMP Library Dir], MPLIB="-L$withval -lmp -lgmp" search=false, MPLIB=nope)
-if test "$MPLIB" = nope; then
- if test "$search" = true; then
- MPLIB=nope
- else
- AC_CHECK_LIB(gmp, main, MPLIB="-lmp -lgmp", MPLIB=nope)
- fi
- if test "$MPLIB" = nope; then
- dirs="$srcdir/gmp-1.3.2 /usr/unsupported/lib /usr/local/lib /usr/gnu/lib \
- /usr/local/gnu/lib /usr/lib/gnu /usr/local/lib/gmp-1.3.2 /usr/lib"
- for i in $dirs; do
- if test -r $i/libgmp.a; then
- MPLIB="-L$i -lmp -lgmp"
- AC_MSG_RESULT(yes)
- fi
- done
- fi
-fi
-if test "$MPLIB" = nope; then
- if test "$code" = cow; then
- AC_CHECK_LIB(mp, main, MPLIB=bsdmp, MPLIB=nope)
- else
- AC_CHECK_LIB(mp, main, MPLIB="-lmp", MPLIB=nope)
- fi
- if test "$MPLIB" = bsdmp; then
- echo "Sorry COW requires gmp not mp for RSA."
- MPLIB="# -L. -lmp -lgmp"
- NORSA="#"
- fi
- if test "$MPLIB" = nope; then
- echo Warning mp or gmp library not found, turning RSA off.
- MPLIB="# -L. -lmp -lgmp"
- NORSA="#"
- fi
-fi
-AC_SUBST(MPLIB)
-
-if test "$code" = cow; then
- if test -r "$srcdir/mkkey.c"; then
- echo " RSA utilities for cow build found."
- else
- echo
- echo Warning RSA utilities for cow build not found, turning RSA off.
- NORSA="#"
- echo Check your favorite ftp site for a blessed client.
- echo In case you can not find one contact brmbugs.
- echo
- fi
-fi
-if test "$code" = server; then
-AC_MSG_CHECKING(res-rsa/rsa_util.c)
- if test -r "$srcdir/res-rsa/rsa_util.c"; then
- AC_MSG_RESULT(RSA utilities found)
- RSAINC="-I`pwd`/res-rsa"
- else
- AC_MSG_RESULT(Warning RSA utilities for server build not found, turning RSA off)
- NORSA="#"
- echo
- fi
-fi
-
-AC_SUBST(RSAINC)
-
-AC_SUBST(NORSA)
-
-#--------------------------------------------------------------------
# Include sys/select.h if it exists and if it supplies things
# that appear to be useful. This appears to be true only on
# the RS/6000 under AIX. Some systems like OSF/1 have a
@@ -210,11 +119,15 @@
+# Checking for gnu-win32 Windows libraries
+AC_CHECK_LIB(gdi32, main, [AC_DEFINE(HAVE_WIN32) XLIBSWDIR="-Lwin32"; XLIBSWLIB="-lgdi32 -luser32"; XINCLUDES="-Iwin32"; NOX11="#"; CPPFLAGS="$CPPFLAGS -Iwin32" ], [AC_DEFINE(HAVE_X11) NOWIN32="#" ])
#--------------------------------------------------------------------
# Locate the X11 header files and the X11 library archive.
#--------------------------------------------------------------------
+if test -z "$NOX11" ; then
+
AC_PATH_X
if test -z "$x_libraries" ; then
@@ -240,8 +153,8 @@
fi
echo "checking for X11 library archive"
-AC_CHECK_LIB(X11, main, XLIBSW="-lX11", XLIBSW=nope)
-if test "$XLIBSW" = nope; then
+AC_CHECK_LIB(X11, main, XLIBSWLIB="-lX11", XLIBSWLIB=nope)
+if test "$XLIBSWLIB" = nope; then
dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib \
/usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/openwin/lib \
/usr/X11/lib /pub/X11R5/lib /usr/local/X11R5/lib \
@@ -249,22 +162,45 @@
for i in $dirs ; do
if test -r $i/libX11.a; then
- XLIBSW="-L$i -lX11"
+ XLIBSWDIR="-L$i"
+ XLIBSWLIB="-lX11"
fi
done
fi
-if test "$XLIBSW" = nope ; then
- AC_CHECK_LIB(Xwindow, main, XLIBSW=-lXwindow)
+if test "$XLIBSWLIB" = nope ; then
+ AC_CHECK_LIB(Xwindow, main, XLIBSWLIB=-lXwindow)
fi
-if test "$XLIBSW" = nope ; then
+if test "$XLIBSWLIB" = nope ; then
echo "Warning: couldn't find the X11 library archive. Using -lX11."
- XLIBSW=-lX11
+ XLIBSWLIB=-lX11
fi
else
XINCLUDES="-I$x_includes"
-XLIBSW="-L$x_libraries -lX11"
+XLIBSWDIR="-L$x_libraries"
+XLIBSWLIB="-lX11"
+fi
+
+fi
+
+AC_SUBST(NOX11)
+AC_SUBST(NOWIN32)
+
+if test "$code" = cow; then
+ if test "$stable" = nope; then
+ SAVELIBS="$LIBS"
+ LIBS="$LIBS $XLIBSWDIR $XLIBSWLIB"
+ SAVEINCS="$INCS"
+ INCS="$INCS $XINCLUDES"
+ AC_CHECK_LIB(Xpm, main, [AC_DEFINE(HAVE_XPM) XPMLIBS="-lXpm"])
+ AC_CHECK_HEADERS(X11/xpm.h)
+ LIBS="$SAVELIBS"
+ INCS="$SAVEINCS"
+ fi
fi
+# Fix link order for Xpm
+XLIBSW="$XLIBSWDIR $XPMLIBS $XLIBSWLIB"
+
if test "$code" = server; then
AC_SUBST(XINCLUDES)
AC_SUBST(XLIBSW)
@@ -274,8 +210,140 @@
AC_SUBST(INCS)
LIBS="$LIBS $XLIBSW"
fi
-
+
+
#--------------------------------------------------------------------
+# Check for gmp and mp
+#--------------------------------------------------------------------
+
+AC_MSG_CHECKING(for mp.h or gmp.h)
+AC_ARG_WITH(gmp-incdir,[ --with-gmp-incdir GMP Include Dir], MPINC="-I$withval" search=false, MPINC=nope)
+if test "$MPINC" = nope; then
+AC_EGREP_CPP( GNU_MP,[
+#include <mp.h>
+__GNU_MP__
+], MPINC=nope search=true, MPINC="" search=false )
+fi
+
+# Checking for GMP
+ if test "$MPINC" = nope; then
+ AC_TRY_CPP([#include <gmp.h>], [MPINC="" search=false], MPINC=nope)
+ fi
+
+if test "$MPINC" = nope; then
+ dirs="$srcdir/gmp-2.0.2 /usr/unsupported/include /usr/local/include \
+ /usr/gnu/include /usr/gnu/include/mp /usr/local/gnu/include \
+ /usr/local/gnu/include/mp /usr/include/gnu /usr/local/lib/gmp-2.0.2"
+ for i in $dirs; do
+ if test -r $i/gmp.h; then
+ MPINC="-I$i"
+ fi
+ done
+fi
+
+if test "$MPINC" = nope; then
+
+ if test "$code" = cow; then
+# mp not supported with new mkkey.
+ AC_TRY_CPP([#include <mp.h>], MPINC=nope , MPINC=nope)
+ else
+ AC_TRY_CPP([#include <mp.h>], MPINC="" , MPINC=nope)
+ fi
+
+ if test "$MPINC" = nope; then
+ MPINC="# -I."
+ NORSA="#"
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ fi
+else
+ AC_MSG_RESULT(yes)
+fi
+
+AC_SUBST(MPINC)
+
+# Checking for GMP 2
+SAVEINCS="$INCS"
+INCS="$INCS $XINCLUDES"
+AC_EGREP_CPP("gmp=.*2", [
+ #include <gmp.h>
+ gmp=__GNU_MP__
+ ],AC_DEFINE(HAVE_GMP2_H))
+INCS="$SAVEINCS"
+
+
+# AC_MSG_CHECKING(for libgmp.a)
+AC_ARG_WITH(gmp-libdir,[ --with-gmp-libdir GMP Library Dir], MPLIB="-L$withval -lgmp" search=false, MPLIB=nope)
+if test "$MPLIB" = nope; then
+ if test "$search" = true; then
+ MPLIB=nope
+ else
+ AC_CHECK_LIB(mp, main, MPLIB="-lmp", MPLIB=" ")
+ AC_CHECK_LIB(gmp, main, MPLIB="$MPLIB -lgmp", MPLIB=nope)
+ fi
+ if test "$MPLIB" = nope; then
+ dirs="$srcdir/gmp-2.0.2 /usr/unsupported/lib /usr/local/lib /usr/gnu/lib \
+ /usr/local/gnu/lib /usr/lib/gnu /usr/local/lib/gmp-2.0.2"
+ for i in $dirs; do
+ if test -r $i/libmp.a; then
+ MPLIB="-L$i -lmp"
+ fi
+ if test -r $i/libgmp.a; then
+ MPLIB="-L$i -lgmp"
+ AC_MSG_RESULT(yes)
+ fi
+ done
+ fi
+fi
+if test "$MPLIB" = nope; then
+ if test "$code" = cow; then
+ AC_CHECK_LIB(mp, main, MPLIB=bsdmp, MPLIB=nope)
+ else
+ AC_CHECK_LIB(mp, main, MPLIB="-lmp", MPLIB=nope)
+ fi
+ if test "$MPLIB" = bsdmp; then
+ echo "Sorry COW requires gmp not mp for RSA."
+ MPLIB="# -L. -lmp -lgmp"
+ NORSA="#"
+ fi
+ if test "$MPLIB" = nope; then
+ echo Warning mp or gmp library not found, turning RSA off.
+ MPLIB="# -L. -lmp -lgmp"
+ NORSA="#"
+ fi
+fi
+AC_SUBST(MPLIB)
+
+if test "$code" = cow; then
+ if test -r "$srcdir/mkkey.c"; then
+ echo " RSA utilities for cow build found."
+ else
+ echo
+ echo Warning RSA utilities for cow build not found, turning RSA off.
+ NORSA="#"
+ echo Check your favorite ftp site for a blessed client.
+ echo In case you can not find one contact brmbugs.
+ echo
+ fi
+fi
+if test "$code" = server; then
+AC_MSG_CHECKING(res-rsa/rsa_util.c)
+ if test -r "$srcdir/res-rsa/rsa_util.c"; then
+ AC_MSG_RESULT(RSA utilities found)
+ RSAINC="-I`pwd`/res-rsa"
+ else
+ AC_MSG_RESULT(Warning RSA utilities for server build not found, turning RSA off)
+ NORSA="#"
+ echo
+ fi
+fi
+
+AC_SUBST(RSAINC)
+
+AC_SUBST(NORSA)
+
+#--------------------------------------------------------------------
# Check for the existence of various libraries. The order here
# is important, so that then end up in the right order in the
# command line generated by Make.
@@ -321,12 +389,12 @@
int c;
static struct itimerval udt;
signal(SIGALRM,test);
-udt.it_interval.tv_sec = 0;
+udt.it_interval.tv_sec = 1;
udt.it_interval.tv_usec = 10;
-udt.it_value.tv_sec = 0;
+udt.it_value.tv_sec = 1;
udt.it_value.tv_usec = 10;
(void) setitimer(ITIMER_REAL, &udt, (struct itimerval *) 0);
-for (c=0; c<10; c++)
+for (c=0; c<5; c++)
pause();
exit(0);}
], AC_DEFINE(BSD_SIGNALS),
@@ -334,10 +402,10 @@
AC_DEFINE(POSIX_SIGNALS)
)
-AC_CHECK_LIB(BSD, main, [LIBS="$LIBS -lBSD"])
-AC_CHECK_LIB(bsd, main, [LIBS="$LIBS -lbsd"])
+# AC_CHECK_LIB(BSD, main, [LIBS="$LIBS -lBSD"])
+# AC_CHECK_LIB(bsd, main, [LIBS="$LIBS -lbsd"])
-AC_CHECK_FUNCS(usleep random setstate strftime ftime)
+AC_CHECK_FUNCS(usleep random setstate strftime ftime strcmpi strncmpi)
AC_CHECK_LIB(m, main, [LIBS="$LIBS -lm"])
AC_CHECK_FUNCS(nint)
@@ -377,7 +445,6 @@
break
fi
done
-
fi
Index: Vanilla/system.mk.in
diff -u Vanilla/system.mk.in:1.4 Vanilla/system.mk.in:1.5
--- Vanilla/system.mk.in:1.4 Fri Jan 29 19:36:48 1999
+++ Vanilla/system.mk.in Fri Mar 12 11:40:26 1999
@@ -1,6 +1,6 @@
# This is a generic system.mk file for
#
-# Autoconfig done by: Kurt Siegl <siegl@risc.uni-linz.ac.at>
+# Autoconfig done by: Kurt Siegl <007@netrek.org>
#
# Directories:
# LIBDIR - where the lib files will go (.sysdef, .motd, etc)
@@ -84,8 +84,8 @@
# RSA stuff
RSA_FLAGS = @NORSA@ -DRSA
-RSA_OBJS = @NORSA@ rsa_key.o rsa_util.o
-RSA_SRC = @NORSA@ rsa_key.c rsa_util.c
+RSA_OBJS = @NORSA@ rsa_key.o ../res-rsa/rsa_util.o
+RSA_SRC = @NORSA@ rsa_key.c ../res-rsa/rsa_util.c
RSA_INCS = @MPINC@ # @RSAINC@
RSA_LIBS = @MPLIB@