summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-10-17 05:50:16 (GMT)
committerhobbs <hobbs>2002-10-17 05:50:16 (GMT)
commitba12cc6cacdbb495db4699484d66e686d4d3c847 (patch)
tree6e36956509df9bf42ea07a4c5ad2caf212e90897
parentaecd57d51da09893f48a47d1fa895f3bdbc125ff (diff)
downloadtcl-ba12cc6cacdbb495db4699484d66e686d4d3c847.zip
tcl-ba12cc6cacdbb495db4699484d66e686d4d3c847.tar.gz
tcl-ba12cc6cacdbb495db4699484d66e686d4d3c847.tar.bz2
* win/configure: add workaround for cygwin windres
* win/tcl.m4 (SC_CONFIG_CFLAGS): problem. [Patch #624010] (howell)
-rw-r--r--ChangeLog5
-rwxr-xr-xwin/configure52
-rw-r--r--win/tcl.m425
3 files changed, 69 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f61c18..5a19012 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-16 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * win/configure: add workaround for cygwin windres
+ * win/tcl.m4 (SC_CONFIG_CFLAGS): problem. [Patch #624010] (howell)
+
2002-10-15 Jeff Hobbs <jeffh@ActiveState.com>
* README: updated to 8.3.5 patchlevel
diff --git a/win/configure b/win/configure
index 23ca022..ab5670c 100755
--- a/win/configure
+++ b/win/configure
@@ -1685,6 +1685,32 @@ else
fi
+ # Check for a bug in gcc's windres that causes the
+ # compile to fail when a Windows native path is
+ # passed into windres. The mingw toolchain requires
+ # Windows native paths while Cygwin should work
+ # with both. Avoid the bug by passing a POSIX
+ # path when using the Cygwin toolchain.
+
+ if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then
+ conftest=/tmp/conftest.rc
+ echo "STRINGTABLE BEGIN" > $conftest
+ echo "101 \"name\"" >> $conftest
+ echo "END" >> $conftest
+
+ echo $ac_n "checking for Windows native path bug in windres""... $ac_c" 1>&6
+echo "configure:1703: checking for Windows native path bug in windres" >&5
+ cyg_conftest=`$CYGPATH $conftest`
+ if { ac_try='$RC -o conftest.res.o $cyg_conftest'; { (eval echo configure:1705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then
+ echo "$ac_t""no" 1>&6
+ else
+ echo "$ac_t""yes" 1>&6
+ CYGPATH=echo
+ fi
+ conftest=
+ cyg_conftest=
+ fi
+
if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
DEPARG='"$<"'
else
@@ -1694,7 +1720,7 @@ 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:1698: checking compiler flags" >&5
+echo "configure:1724: 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
@@ -1907,7 +1933,7 @@ echo "configure:1698: checking compiler flags" >&5
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:1911: checking for build with symbols" >&5
+echo "configure:1937: 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"
@@ -1931,7 +1957,7 @@ fi
echo $ac_n "checking for build with memory debugging""... $ac_c" 1>&6
-echo "configure:1935: checking for build with memory debugging" >&5
+echo "configure:1961: checking for build with memory debugging" >&5
# Check whether --enable-memdebug or --disable-memdebug was given.
if test "${enable_memdebug+set}" = set; then
enableval="$enable_memdebug"
@@ -1957,7 +1983,7 @@ TCL_DBGX=${DBGX}
#--------------------------------------------------------------------
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1961: checking how to run the C preprocessor" >&5
+echo "configure:1987: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1972,13 +1998,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 1976 "configure"
+#line 2002 "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:1982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2008: \"$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
:
@@ -1989,13 +2015,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1993 "configure"
+#line 2019 "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:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2025: \"$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
:
@@ -2006,13 +2032,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2010 "configure"
+#line 2036 "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:2016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2042: \"$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
:
@@ -2038,17 +2064,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:2042: checking for errno.h" >&5
+echo "configure:2068: 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 2047 "configure"
+#line 2073 "configure"
#include "confdefs.h"
#include <errno.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2078: \"$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*
diff --git a/win/tcl.m4 b/win/tcl.m4
index 449ac70..e3a0266 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -425,6 +425,31 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+ # Check for a bug in gcc's windres that causes the
+ # compile to fail when a Windows native path is
+ # passed into windres. The mingw toolchain requires
+ # Windows native paths while Cygwin should work
+ # with both. Avoid the bug by passing a POSIX
+ # path when using the Cygwin toolchain.
+
+ if test "$GCC" = "yes" && test "$CYGPATH" != "echo" ; then
+ conftest=/tmp/conftest.rc
+ echo "STRINGTABLE BEGIN" > $conftest
+ echo "101 \"name\"" >> $conftest
+ echo "END" >> $conftest
+
+ AC_MSG_CHECKING([for Windows native path bug in windres])
+ cyg_conftest=`$CYGPATH $conftest`
+ if AC_TRY_COMMAND($RC -o conftest.res.o $cyg_conftest) ; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([yes])
+ CYGPATH=echo
+ fi
+ conftest=
+ cyg_conftest=
+ fi
+
if test "$CYGPATH" = "echo" || test "$ac_cv_cygwin" = "yes"; then
DEPARG='"$<"'
else