2002-04-08  Mo DeJong  <mdejong@users.sourceforge.net>

	* unix/configure: Regen.
	* unix/configure.in: Invoke SC_ENABLE_SHARED before
	calling SC_CONFIG_CFLAGS so that the SHARED_BUILD
	variable can be checked inside SC_CONFIG_CFLAGS.
	* unix/tcl.m4 (SC_CONFIG_CFLAGS): Pass -non_shared
	instead of -shared to ld when configured with
	--disable-shared under OSF.

Index: unix/configure.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure.in,v
retrieving revision 1.83
diff -u -r1.83 configure.in
--- unix/configure.in	6 Mar 2002 15:20:23 -0000	1.83
+++ unix/configure.in	8 Apr 2002 16:00:46 -0000
@@ -377,6 +377,8 @@
 
 LIBS="$LIBS$THREADS_LIBS"
 
+SC_ENABLE_SHARED
+
 #--------------------------------------------------------------------
 # The statements below define a collection of compile flags.  This
 # macro depends on the value of SHARED_BUILD, and should be called
@@ -405,8 +407,6 @@
 
 TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
 TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}
-
-SC_ENABLE_SHARED
 
 TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
 if test "${SHARED_BUILD}" = "1" -a "${SHLIB_SUFFIX}" != "" ; then
Index: unix/tcl.m4
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tcl.m4,v
retrieving revision 1.62
diff -u -r1.62 tcl.m4
--- unix/tcl.m4	26 Feb 2002 20:03:29 -0000	1.62
+++ unix/tcl.m4	8 Apr 2002 16:00:47 -0000
@@ -1075,7 +1075,11 @@
 	OSF1-1.*)
 	    # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
 	    SHLIB_CFLAGS="-fPIC"
-	    SHLIB_LD="ld -shared"
+	    if test "$SHARED_BUILD" = "1" ; then
+	        SHLIB_LD="ld -shared"
+	    else
+	        SHLIB_LD="ld -non_shared"
+	    fi
 	    SHLIB_LD_LIBS=""
 	    SHLIB_SUFFIX=".so"
 	    DL_OBJS="tclLoadDl.o"
@@ -1086,7 +1090,11 @@
 	OSF1-V*)
 	    # Digital OSF/1
 	    SHLIB_CFLAGS=""
-	    SHLIB_LD='ld -shared -expect_unresolved "*"'
+	    if test "$SHARED_BUILD" = "1" ; then
+	        SHLIB_LD='ld -shared -expect_unresolved "*"'
+	    else
+	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+	    fi
 	    SHLIB_LD_LIBS=""
 	    SHLIB_SUFFIX=".so"
 	    DL_OBJS="tclLoadDl.o"
