diff configure.in @ 12787:5569b3a43323

(m68*-next-*): Use m68k.h and nextstep.h. (m68k-next-nextstep*): New alias for that. (i*86-*-nextstep*): Use nextstep.h. (sparc-*-nextstep*): New configuration. (CPP): Save original CFLAGS value in SPECIFIED_CFLAGS. And get CFLAGS from config.h if SPECIFIED_CFLAGS is null. Handle sunos4shr by sharing; not like sunos4*. Determine GETTIMEOFDAY_ONE_ARGUMENT by experiment.
author Richard M. Stallman <rms@gnu.org>
date Sat, 05 Aug 1995 23:01:11 +0000
parents 03d3249e5d24
children f5e4db7e8197
line wrap: on
line diff
--- a/configure.in	Sat Aug 05 22:58:11 1995 +0000
+++ b/configure.in	Sat Aug 05 23:01:11 1995 +0000
@@ -542,8 +542,8 @@
   ;;
 
   ## NeXT
-  m68*-next-* | i[345]86-next-* )
-    machine=next opsys=mach2
+  m68*-next-* | m68k-*-nextstep* )
+    machine=m68k opsys=nextstep
   ;;
 
   ## The complete machine from National Semiconductor
@@ -658,7 +658,7 @@
       ## The Sun386 didn't get past 4.0.
       i[345]86-*-sunos4	  ) opsys=sunos4-0 ;;
       *-sunos4.0*	  ) opsys=sunos4-0 ;;
-      *-sunos4.1.[3-9]* )
+      *-sunos4.1.[3-9]* | *-sunos4shr*)
 		opsys=sunos4shr
 		NON_GNU_CPP=/usr/lib/cpp
 		;;
@@ -685,6 +685,9 @@
       *			  ) opsys=bsd4-2   ;;
     esac
   ;;
+  sparc-*-nextstep* )
+    machine=sparc.h opsys=nextstep.h
+  ;;
 
   ## Tadpole 68k
   m68*-tadpole-sysv* )
@@ -774,7 +777,7 @@
       *-bsdi2* )		opsys=bsdos2 ;;
       *-386bsd* )	        opsys=386bsd ;;
       *-freebsd* )	        opsys=freebsd ;;
-      *-nextstep* )             opsys=mach2 ;;
+      *-nextstep* )             opsys=nextstep ;;
       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
     esac
   ;;
@@ -799,16 +802,16 @@
     *-sysv0 | *-sysvr0 )		opsys=usg5-0 ;;
     *-sysv2 | *-sysvr2 )		opsys=usg5-2 ;;
     *-sysv2.2 | *-sysvr2.2 )		opsys=usg5-2-2 ;;
-    *-sysv3 | *-sysvr3 )		opsys=usg5-3 ;;
-    *-sysv4 | *-sysvr4 )		opsys=usg5-4 ;;
-    *-sysv4.1 | *-sysvr4.1 )
+    *-sysv3* | *-sysvr3* )		opsys=usg5-3 ;;
+    *-sysv4.1* | *-sysvr4.1* )
 	NON_GNU_CPP=/usr/lib/cpp
 	opsys=usg5-4 ;;
-    *-sysv4.2 | *-sysvr4.2 )
+    *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
 	if [ x$NON_GNU_CPP = x ]; then
 	  NON_GNU_CPP=/usr/ccs/lib/cpp
 	fi
 	opsys=usg5-4-2 ;;
+    *-sysv4* | *-sysvr4* )		opsys=usg5-4 ;;
     * )
       unported=yes
     ;;
@@ -829,6 +832,9 @@
 #### Choose a compiler.
 test -n "$CC" && cc_specified=yes
 
+# Save the value of CFLAGS that the user specified.
+SPECIFIED_CFLAGS="$CFLAGS"
+
 case ${with_gcc} in
   "yes" ) CC="gcc" GCC=yes ;;
   "no"  ) : ${CC=cc} ;;
@@ -920,6 +926,7 @@
 #endif
 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;],
   [AC_MSG_RESULT(yes)
+   HAVE_TIMEVAL=yes
    AC_DEFINE(HAVE_TIMEVAL)],
   AC_MSG_RESULT(no))
 
@@ -1111,7 +1118,7 @@
 changequote(, )dnl
 eval `${CPP} -Isrc ${tempcname} \
        | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
-if test "x$CFLAGS" = x; then
+if test "x$SPECIFIED_CFLAGS" = x; then
   eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
 	 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
 else
@@ -1240,6 +1247,30 @@
 random lrand48 bcopy bcmp logb frexp fmod drem ftime res_init setsid \
 strerror fpathconf select mktime eaccess getpagesize)
 
+if test $HAVE_TIMEVAL = yes; then
+AC_MSG_CHECKING(whether gettimeofday can't accept two arguments)
+AC_TRY_LINK([
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+  ],
+  [
+  struct timeval time;
+  struct timezone dummy;
+  gettimeofday (&time, &dummy);
+],
+  [AC_MSG_RESULT(no)],
+  [AC_MSG_RESULT(yes)
+   AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)])
+fi
+
 ok_so_far=yes
 AC_CHECK_FUNC(socket, , ok_so_far=no)
 if test $ok_so_far = yes; then