summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdejong <mdejong>2001-07-06 02:20:31 (GMT)
committermdejong <mdejong>2001-07-06 02:20:31 (GMT)
commitb238f5b91918301d19821b57eb83c3bf077f2be6 (patch)
tree0122d42607fc6421223f5d87207495faef102bcf
parent6f3350d72668fbc24956091ab9fc547da83d5e03 (diff)
downloadtcl-b238f5b91918301d19821b57eb83c3bf077f2be6.zip
tcl-b238f5b91918301d19821b57eb83c3bf077f2be6.tar.gz
tcl-b238f5b91918301d19821b57eb83c3bf077f2be6.tar.bz2
* win/Makefile.in: Subst DEPARG directly instead
of relying on a variable. This will make Cygwin build faster since an extra exec will be avoided. * win/configure: Regen. * win/configure.in: Subst DEPARG. * win/tcl.m4 (SC_CONFIG_CFLAGS): Move AC_MSG_CHECKING after the AC_CHECK_PROG so that status messages do not get mixed together. Set DEPARG based on the results of the cygpath check so that we avoid using an extra exec when it is not needed. Use ac_cv_cygwin status flag instead of looking at the output of gcc -v, which works in the case where -mno-cygwin is set in the CFLAGS.
-rw-r--r--ChangeLog16
-rw-r--r--win/Makefile.in33
-rwxr-xr-xwin/configure40
-rw-r--r--win/configure.in3
-rw-r--r--win/tcl.m412
5 files changed, 65 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index f1538fb..438325c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2001-07-05 Mo DeJong <mdejong@redhat.com>
+
+ * win/Makefile.in: Subst DEPARG directly instead
+ of relying on a variable. This will make Cygwin
+ build faster since an extra exec will be avoided.
+ * win/configure: Regen.
+ * win/configure.in: Subst DEPARG.
+ * win/tcl.m4 (SC_CONFIG_CFLAGS): Move AC_MSG_CHECKING
+ after the AC_CHECK_PROG so that status messages do
+ not get mixed together. Set DEPARG based on the
+ results of the cygpath check so that we avoid using
+ an extra exec when it is not needed. Use ac_cv_cygwin
+ status flag instead of looking at the output of
+ gcc -v, which works in the case where -mno-cygwin is
+ set in the CFLAGS.
+
2001-07-04 Jeff Hobbs <jeffh@ActiveState.com>
* README:
diff --git a/win/Makefile.in b/win/Makefile.in
index 563d194..9efe90e 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.48 2001/07/04 00:07:46 mdejong Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.49 2001/07/06 02:20:31 mdejong Exp $
VERSION = @TCL_VERSION@
@@ -102,7 +102,7 @@ GENERIC_DIR = @srcdir@/../generic
WIN_DIR = @srcdir@
COMPAT_DIR = @srcdir@/../compat
-# This program converts between Windows native and Cygwin POSIX pathnames.
+# Converts a POSIX path to a Windows native path.
CYGPATH = @CYGPATH@
GENERIC_DIR_NATIVE = $(shell $(CYGPATH) '$(GENERIC_DIR)')
@@ -135,11 +135,6 @@ MAN2TCL = man2tcl$(EXEEXT)
@SET_MAKE@
-# Macro that expands to the first dependency argument with the appropriate
-# path type already resolved.
-
-DEPARG = "$(shell $(CYGPATH) $<)"
-
# Setting the VPATH variable to a list of paths will cause the
# makefile to look into these paths when resolving .c to .obj
# dependencies.
@@ -319,7 +314,7 @@ $(TCLTEST): $(TCL_LIB_FILE) $(TCLTEST_OBJS) $(CAT32) tclsh.$(RES)
tclsh.$(RES) $(CC_EXENAME)
cat32.$(OBJEXT): cat.c
- $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
$(CAT32): cat32.$(OBJEXT)
$(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
@@ -374,45 +369,45 @@ ${PIPE_DLL_FILE}: ${PIPE_OBJS}
# Special case object targets
tclWinInit.${OBJEXT}: tclWinInit.c
- $(CC) -c $(CC_SWITCHES) -DBUILD_tcl $(EXTFLAGS) $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DBUILD_tcl $(EXTFLAGS) @DEPARG@ $(CC_OBJNAME)
testMain.${OBJEXT}: tclAppInit.c
- $(CC) -c $(CC_SWITCHES) -DTCL_TEST $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DTCL_TEST @DEPARG@ $(CC_OBJNAME)
tclTest.${OBJEXT}: tclTest.c
- $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
tclTestObj.${OBJEXT}: tclTestObj.c
- $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
tclWinTest.${OBJEXT}: tclWinTest.c
- $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
tclAppInit.${OBJEXT} : tclAppInit.c
- $(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
# The following objects should be built using the stub interfaces
tclWinReg.${OBJEXT} : tclWinReg.c
- $(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS @DEPARG@ $(CC_OBJNAME)
tclWinDde.${OBJEXT} : tclWinDde.c
- $(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DUSE_TCL_STUBS @DEPARG@ $(CC_OBJNAME)
# The following objects are part of the stub library and should not
# be built as DLL objects but none of the symbols should be exported
tclStubLib.${OBJEXT}: tclStubLib.c
- $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD $(DEPARG) $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @DEPARG@ $(CC_OBJNAME)
# Implicit rule for all object files that will end up in the Tcl library
.c.${OBJEXT}:
- $(CC) -c $(CC_SWITCHES) -DBUILD_tcl ${DEPARG} $(CC_OBJNAME)
+ $(CC) -c $(CC_SWITCHES) -DBUILD_tcl @DEPARG@ $(CC_OBJNAME)
.rc.$(RES):
- $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_DEFINES@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(WIN_DIR_NATIVE)" $(DEPARG)
+ $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_DEFINES@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(WIN_DIR_NATIVE)" @DEPARG@
install: all install-binaries install-libraries install-doc
diff --git a/win/configure b/win/configure
index 07efcb6..9c97ccc 100755
--- a/win/configure
+++ b/win/configure
@@ -1123,8 +1123,6 @@ fi
echo "$ac_t""$do64bit" 1>&6
- echo $ac_n "checking compiler flags""... $ac_c" 1>&6
-echo "configure:1128: checking compiler flags" >&5
# Set some defaults (may get changed below)
EXTRA_CFLAGS=""
@@ -1132,7 +1130,7 @@ echo "configure:1128: checking compiler flags" >&5
# Extract the first word of "cygpath", so it can be a program name with args.
set dummy cygpath; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1136: checking for $ac_word" >&5
+echo "configure:1134: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1160,8 +1158,16 @@ else
fi
+ if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
+ DEPARG='"$<"'
+ else
+ DEPARG='"$(shell $(CYGPATH) $<)"'
+ fi
+
# set various compiler flags depending on whether we are using gcc or cl
-
+
+ echo $ac_n "checking compiler flags""... $ac_c" 1>&6
+echo "configure:1171: checking compiler flags" >&5
if test "${GCC}" = "yes" ; then
if test "$do64bit" = "yes" ; then
echo "configure: warning: "64bit mode not supported with GCC on Windows"" 1>&2
@@ -1181,7 +1187,7 @@ fi
MAKE_EXE="\${CC} -o \$@"
LIBPREFIX="lib"
- if "$CC" -v 2>&1 | egrep '\/gcc-lib\/i[3-6]86[^\/]*-cygwin' >/dev/null; then
+ if test "$ac_cv_cygwin" = "yes"; then
extra_cflags="-mno-cygwin"
extra_ldflags="-mno-cygwin"
else
@@ -1309,7 +1315,7 @@ fi
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:1313: checking for build with symbols" >&5
+echo "configure:1319: checking for build with symbols" >&5
# Check whether --enable-symbols or --disable-symbols was given.
if test "${enable_symbols+set}" = set; then
enableval="$enable_symbols"
@@ -1339,7 +1345,7 @@ TCL_DBGX=${DBGX}
#--------------------------------------------------------------------
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1343: checking how to run the C preprocessor" >&5
+echo "configure:1349: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1354,13 +1360,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1358 "configure"
+#line 1364 "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:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1371,13 +1377,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1375 "configure"
+#line 1381 "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:1381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1388,13 +1394,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1392 "configure"
+#line 1398 "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:1398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1420,17 +1426,17 @@ echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:1424: checking for errno.h" >&5
+echo "configure:1430: checking for errno.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 1429 "configure"
+#line 1435 "configure"
#include "confdefs.h"
#include <errno.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1575,6 +1581,7 @@ fi
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -1750,6 +1757,7 @@ s%@CFG_TCL_SHARED_LIB_SUFFIX@%$CFG_TCL_SHARED_LIB_SUFFIX%g
s%@CFG_TCL_UNSHARED_LIB_SUFFIX@%$CFG_TCL_UNSHARED_LIB_SUFFIX%g
s%@CFG_TCL_EXPORT_FILE_SUFFIX@%$CFG_TCL_EXPORT_FILE_SUFFIX%g
s%@TCL_SHARED_BUILD@%$TCL_SHARED_BUILD%g
+s%@DEPARG@%$DEPARG%g
s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
diff --git a/win/configure.in b/win/configure.in
index f593136..833317a 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -2,7 +2,7 @@
# generate the file "configure", which is run during Tcl installation
# to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.38 2001/07/04 00:07:47 mdejong Exp $
+# RCS: @(#) $Id: configure.in,v 1.39 2001/07/06 02:20:31 mdejong Exp $
AC_INIT(../generic/tcl.h)
@@ -187,6 +187,7 @@ AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)
AC_SUBST(TCL_SHARED_BUILD)
AC_SUBST(CYGPATH)
+AC_SUBST(DEPARG)
AC_SUBST(CFLAGS_DEFAULT)
AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_OPTIMIZE)
diff --git a/win/tcl.m4 b/win/tcl.m4
index 5e6e36f..40ba286 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -325,15 +325,21 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
AC_MSG_RESULT($do64bit)
- AC_MSG_CHECKING([compiler flags])
# Set some defaults (may get changed below)
EXTRA_CFLAGS=""
AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+ if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
+ DEPARG='"$<"'
+ else
+ DEPARG='"$(shell $(CYGPATH) $<)"'
+ fi
+
# set various compiler flags depending on whether we are using gcc or cl
-
+
+ AC_MSG_CHECKING([compiler flags])
if test "${GCC}" = "yes" ; then
if test "$do64bit" = "yes" ; then
AC_MSG_WARN("64bit mode not supported with GCC on Windows")
@@ -353,7 +359,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
MAKE_EXE="\${CC} -o \[$]@"
LIBPREFIX="lib"
- if "$CC" -v 2>&1 | egrep '\/gcc-lib\/i[[3-6]]86[[^\/]]*-cygwin' >/dev/null; then
+ if test "$ac_cv_cygwin" = "yes"; then
extra_cflags="-mno-cygwin"
extra_ldflags="-mno-cygwin"
else