summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--win/Makefile.in14
-rwxr-xr-xwin/configure68
-rw-r--r--win/configure.in3
-rw-r--r--win/tcl.m414
5 files changed, 64 insertions, 46 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c9f2d7..a526096 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-07-03 Mo DeJong <mdejong@redhat.com>
+
+ * win/Makefile.in: Remove PATHTYPE variable.
+ * win/configure: Regen.
+ * win/configure.in: Don't subst PATHTYPE.
+ * win/tcl.m4 (SC_CONFIG_CFLAGS): Remove PATHTYPE
+ variable. Set CYGPATH to "cygpath -w" if the
+ cygpath executable is found on the path. This
+ approach works for native Cygwin builds and
+ cross compiles.
+
2001-07-03 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tclVar.c (Tcl_GetVar2Ex): added ability to recognize
diff --git a/win/Makefile.in b/win/Makefile.in
index 1f9ee81..563d194 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.47 2001/06/27 01:53:18 mdejong Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.48 2001/07/04 00:07:46 mdejong Exp $
VERSION = @TCL_VERSION@
@@ -102,16 +102,12 @@ GENERIC_DIR = @srcdir@/../generic
WIN_DIR = @srcdir@
COMPAT_DIR = @srcdir@/../compat
-# This is a switch passed to a Cygwin script that generates file
-# names based on the platform.
-PATHTYPE = @PATHTYPE@
-
# This program converts between Windows native and Cygwin POSIX pathnames.
CYGPATH = @CYGPATH@
-GENERIC_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(GENERIC_DIR)')
-WIN_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(WIN_DIR)')
-ROOT_DIR_NATIVE = $(shell $(CYGPATH) $(PATHTYPE) '$(ROOT_DIR)')
+GENERIC_DIR_NATIVE = $(shell $(CYGPATH) '$(GENERIC_DIR)')
+WIN_DIR_NATIVE = $(shell $(CYGPATH) '$(WIN_DIR)')
+ROOT_DIR_NATIVE = $(shell $(CYGPATH) '$(ROOT_DIR)')
LIBRARY_DIR = $(shell echo '$(ROOT_DIR_NATIVE)/library' | sed 's/\\/\//g' )
@@ -142,7 +138,7 @@ MAN2TCL = man2tcl$(EXEEXT)
# Macro that expands to the first dependency argument with the appropriate
# path type already resolved.
-DEPARG = "$(shell $(CYGPATH) $(PATHTYPE) $<)"
+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
diff --git a/win/configure b/win/configure
index 25b81e6..07efcb6 100755
--- a/win/configure
+++ b/win/configure
@@ -1128,8 +1128,37 @@ echo "configure:1128: checking compiler flags" >&5
# Set some defaults (may get changed below)
EXTRA_CFLAGS=""
- PATHTYPE='-w'
- CYGPATH='cygpath'
+
+ # 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
+if eval "test \"`echo '$''{'ac_cv_prog_CYGPATH'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$CYGPATH"; then
+ ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CYGPATH="cygpath -w"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
+fi
+fi
+CYGPATH="$ac_cv_prog_CYGPATH"
+if test -n "$CYGPATH"; then
+ echo "$ac_t""$CYGPATH" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
# set various compiler flags depending on whether we are using gcc or cl
@@ -1153,20 +1182,13 @@ echo "configure:1128: checking compiler flags" >&5
LIBPREFIX="lib"
if "$CC" -v 2>&1 | egrep '\/gcc-lib\/i[3-6]86[^\/]*-cygwin' >/dev/null; then
- mno_cygwin="yes"
extra_cflags="-mno-cygwin"
extra_ldflags="-mno-cygwin"
else
- mno_cygwin="no"
extra_cflags=""
extra_ldflags=""
fi
- if test "$cross_compiling" = "yes" -o "$mno_cygwin" = "yes"; then
- PATHTYPE=''
- CYGPATH='echo '
- fi
-
if test "${SHARED_BUILD}" = "0" ; then
# static
echo "$ac_t""using static flags" 1>&6
@@ -1266,7 +1288,7 @@ echo "configure:1128: checking compiler flags" >&5
# Specify the CC output file names based on the target name
CC_OBJNAME="-Fo\$@"
- CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) \$(PATHTYPE) '\$@')\""
+ CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\$@')\""
# Specify linker flags depending on the type of app being
# built -- Console vs. Window.
@@ -1287,7 +1309,7 @@ echo "configure:1128: checking compiler flags" >&5
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:1291: checking for build with symbols" >&5
+echo "configure:1313: 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"
@@ -1317,7 +1339,7 @@ TCL_DBGX=${DBGX}
#--------------------------------------------------------------------
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1321: checking how to run the C preprocessor" >&5
+echo "configure:1343: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1332,13 +1354,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 1336 "configure"
+#line 1358 "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:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1364: \"$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
:
@@ -1349,13 +1371,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1353 "configure"
+#line 1375 "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:1359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1381: \"$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
:
@@ -1366,13 +1388,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1370 "configure"
+#line 1392 "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:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1398: \"$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
:
@@ -1398,17 +1420,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:1402: checking for errno.h" >&5
+echo "configure:1424: 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 1407 "configure"
+#line 1429 "configure"
#include "confdefs.h"
#include <errno.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1434: \"$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*
@@ -1553,7 +1575,6 @@ fi
-
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -1706,6 +1727,7 @@ s%@SET_MAKE@%$SET_MAKE%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
s%@TCL_THREADS@%$TCL_THREADS%g
+s%@CYGPATH@%$CYGPATH%g
s%@CPP@%$CPP%g
s%@MAN2TCLFLAGS@%$MAN2TCLFLAGS%g
s%@TCL_VERSION@%$TCL_VERSION%g
@@ -1728,8 +1750,6 @@ 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%@PATHTYPE@%$PATHTYPE%g
-s%@CYGPATH@%$CYGPATH%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 793969d..f593136 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.37 2001/06/27 01:06:12 mdejong Exp $
+# RCS: @(#) $Id: configure.in,v 1.38 2001/07/04 00:07:47 mdejong Exp $
AC_INIT(../generic/tcl.h)
@@ -186,7 +186,6 @@ AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)
AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)
AC_SUBST(TCL_SHARED_BUILD)
-AC_SUBST(PATHTYPE)
AC_SUBST(CYGPATH)
AC_SUBST(CFLAGS_DEFAULT)
AC_SUBST(CFLAGS_DEBUG)
diff --git a/win/tcl.m4 b/win/tcl.m4
index f5fdf8c..5e6e36f 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -297,7 +297,6 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
# LDFLAGS_WINDOW
# CC_OBJNAME
# CC_EXENAME
-# PATHTYPE
# CYGPATH
# SHLIB_LD
# SHLIB_LD_LIBS
@@ -330,8 +329,8 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# Set some defaults (may get changed below)
EXTRA_CFLAGS=""
- PATHTYPE='-w'
- CYGPATH='cygpath'
+
+ AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
# set various compiler flags depending on whether we are using gcc or cl
@@ -355,20 +354,13 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
LIBPREFIX="lib"
if "$CC" -v 2>&1 | egrep '\/gcc-lib\/i[[3-6]]86[[^\/]]*-cygwin' >/dev/null; then
- mno_cygwin="yes"
extra_cflags="-mno-cygwin"
extra_ldflags="-mno-cygwin"
else
- mno_cygwin="no"
extra_cflags=""
extra_ldflags=""
fi
- if test "$cross_compiling" = "yes" -o "$mno_cygwin" = "yes"; then
- PATHTYPE=''
- CYGPATH='echo '
- fi
-
if test "${SHARED_BUILD}" = "0" ; then
# static
AC_MSG_RESULT([using static flags])
@@ -468,7 +460,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# Specify the CC output file names based on the target name
CC_OBJNAME="-Fo\[$]@"
- CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) \$(PATHTYPE) '\[$]@')\""
+ CC_EXENAME="-Fe\"\$(shell \$(CYGPATH) '\[$]@')\""
# Specify linker flags depending on the type of app being
# built -- Console vs. Window.