A couple of Makefile.ins I missed and fixed the broken check for HOSTCC unlabeled-1.1.2
authorcls%seawood.org
Mon, 05 Jul 1999 09:57:56 +0000
branchunlabeled-1.1.2
changeset 680 8d3c721ae3cf391eb1baac3ce0766149e34577ce
parent 671 3759696b5234d54b324bfea4fb1cb76370d5f380
child 682 48e88c557335744802d992c684a228acb04d6071
push idunknown
push userunknown
push dateunknown
A couple of Makefile.ins I missed and fixed the broken check for HOSTCC
configure.in
--- a/configure.in
+++ b/configure.in
@@ -26,34 +26,41 @@ dnl =
 dnl ========================================================
 CFLAGS="${CFLAGS=}"
 CXXFLAGS="${CXXFLAGS=}"
 HOSTCFLAGS="${HOSTCFLAGS=}"
 HOSTCXXFLAGS="${HOSTCXXFLAGS=}"
 
 AC_ARG_ENABLE(pthreads,
     [  --enable-pthreads           Use system pthreads library as thread subsystem],
-    USE_PTHREADS=1,
-    USE_PTHREADS=)
+    [ USE_PTHREADS=1 CLASSIC_NSPR=],
+    [ USE_PTHREADS= CLASSIC_NSPR=1])
 
 AC_ARG_ENABLE(bthreads,
     [  --enable-bthreads           Use system bthreads library as thread subsystem],
     USE_BTHREADS=1,
     USE_BTHREADS=)
 
 AC_ARG_ENABLE(cplus,
     [  --enable-cplus              Use cplus for whatever reason],
     USE_CPLUS=1,
     USE_CPLUS=)
 
 AC_ARG_ENABLE(ipv6,
     [  --enable-ipv6               Compile ipv6 support],
     USE_IPV6=1,
     USE_IPV6=)
 
+if test "$CLASSIC_NSPR" = 1 ; then
+AC_ARG_ENABLE(pthreads-user,
+    [  --enable-pthreads-user      Build pthreads-user version],
+    PTHREADS_USER=1,
+    PTHREADS_USER=)
+fi
+
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_CPP
 AC_PROG_CXXCPP
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_PROG_RANLIB
@@ -70,41 +77,61 @@ if test "$cross_compiling" = "no"; then
     if test "$HOSTCFLAGS" = ""; then
 	HOSTCFLAGS=$CFLAGS
     fi
     if test "$HOSTCXXFLAGS" = ""; then
 	HOSTCXXFLAGS=$CXXFLAGS
     fi
 else
 # do some stuff
+    dnl We were given the xcompilers, now we need to find the native
+    dnl compilers if they weren't given
     echo "Cross compiling"
+    if test -z "$HOSTCC" ; then
+	if test -z "$HOSTCFLAGS"; then
+	    HOSTCFLAGS=$CFLAGS
+	fi
+    fi
 fi
 
 echo "Using $host $build $target"
 case "$host" in
 *-linux*)
     HOSTCFLAGS="$HOSTCFLAGS -DXP_UNIX"
     HOSTCXXFLAGS="$HOSTCXXFLAGS -DXP_UNIX"
     ;;
 
 esac
 
 case "$target" in
-*-linux*)
+i?86-*-linux*)
     MDCPUCFG_H=_linux.cfg
     PR_MD_CSRCS=linux.c
     PR_MD_ASFILES=
     PR_MD_ARCH_DIR=unix
     if test "$USE_PTHREADS" = 1 ; then
 	CFLAGS="$CFLAGS -D_REENTRANT"
     else
 	CFLAGS="$CFLAGS -D_PR_LOCAL_THREADS_ONLY"
     fi
     ;;
 
+alpha-*-linux*)
+    MDCPUCFG_H=_linux.cfg
+    PR_MD_CSRCS=linux.c
+    PR_MD_ASFILES=
+    PR_MD_ARCH_DIR=unix
+    if test "$USE_PTHREADS" = 1 ; then
+	CFLAGS="$CFLAGS -D_REENTRANT"
+    else
+	CFLAGS="$CFLAGS -D_PR_LOCAL_THREADS_ONLY"
+    fi
+    CFLAGS="$CFLAGS -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR"
+    ;;
+
 *-mingw*)
     MDCPUCFG_H=_winnt.cfg
     ;;
 esac
 
 dnl Replace `main' with a function in -lC:
 AC_CHECK_LIB(C, main)
 dnl Replace `main' with a function in -lC_r: