Attachment "mingw.patch" to
ticket [538772ffff]
added by
fandom
2002-04-03 22:26:43.
Also attachment "mingw.patch" to
ticket [538775ffff]
added by
nobody
2002-04-03 22:17:20.
Common subdirectories: sampleextension/CVS and sampleextension.mingw/CVS
diff -u sampleextension/Makefile.in sampleextension.mingw/Makefile.in
--- sampleextension/Makefile.in Mon Apr 1 21:28:48 2002
+++ sampleextension.mingw/Makefile.in Tue Apr 2 11:30:06 2002
@@ -51,7 +51,7 @@
# This is a list of header files to be installed
#========================================================================
-GENERIC_HDRS = $(srcdir)/sample.h
+GENERIC_HDRS = $(srcdir)/generic/sample.h
#========================================================================
# Add additional lines to handle any additional AC_SUBST cases that
@@ -181,7 +181,7 @@
@echo " xml2nroff sample.xml > sample.n"
@echo " xml2html sample.xml > sample.html"
-install: all install-binaries install-libraries install-doc
+install: all installdirs install-binaries install-libraries install-doc
install-binaries: binaries install-lib-binaries install-bin-binaries
if test "x$(SHARED_BUILD)" = "x1"; then \
@@ -208,7 +208,7 @@
install-doc: doc
mkdir -p $(mandir)/mann
@echo "Installing documentation in $(mandir)"
- @for i in $(srcdir)/*.n; \
+ @for i in $(srcdir)/doc/*.n; \
do \
echo "Installing $$i"; \
rm -f $(mandir)/mann/$$i; \
diff -u sampleextension/README.cygwin sampleextension.mingw/README.cygwin
--- sampleextension/README.cygwin Tue Mar 19 23:35:56 2002
+++ sampleextension.mingw/README.cygwin Wed Apr 3 08:34:18 2002
@@ -1,30 +1,48 @@
-To use cygwin for building TEA extensions on Windows, there are a couple of
-things you will need to do.
+To use cygwin for building TEA extensions, there are a couple of things
+you will need to do.
+
+If you want to use a Microsoft compiler
1. Make sure you have a working Visual C++ (version 5.0 or later) compiler.
2. Download and install the free Cygnus Cywgin full tools package from
http://sources.redhat.com/cygwin/
-3. Create a directory called "C:\bin". Copy the sh.exe
- program from the cygnus bin directory
- (C:\cygnus\cygwin-b20\H-i586-cygwin32\bin\sh.exe) to "C:\bin".
- This will allow you to run shell scripts that use the
- "#!/bin/sh" invocation.
-
- Create another directory called "C:\tmp". The bash.exe program
- requires this directory for storing temporary files.
-
-4. Ensure your environment variable "MAKE_MODE" has the value "unix"
+3. Ensure your environment variable "MAKE_MODE" has the value "unix"
This will set up the "make" program to operate in a more sane manner.
-5. Run vcvars32.bat. You must do this every time you wish to
+4. Run vcvars32.bat. You must do this every time you wish to
perform a build of an extension. It is strongly recommended
that you modify your sytem environment so that you don't have to
run vcvars32.bat all the time. If you look in the vcvars32.bat
file you will see what system environment variables need to be
set in order to make this work.
-6. If you are authoring a TEA extension, you will also want the GNU
- autoconf package. This can be obtained from http://www.gnu.org
- Autoconf version 2.13 or later is required.
+
+If you would rather use Mingw32
+
+1. Download and install the free Cygnus Cywgin full tools package from
+ http://sources.redhat.com/cygwin/
+
+2. Download and install the mingw compiler:
+
+ The 1.1 version you can find at mingw's site will NOT work with Tcl,
+ you'd better use:
+
+ ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-1/mingw-msvcrt-20000203.zip
+ ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-1/binutils-19990818-1-msvcrt.zip
+ ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-1/gcc-2.95.2-1-msvcrt.zip
+
+ Extract the contents of these zip files into /usr/local/mingw and
+ place /usr/local/mingw/bin at the front of your PATH env var.
+
+3. Download and install Tcl
+
+4. To compile the sample extension:
+
+ ./configure
+ make
+ make install
+
+
+
diff -u sampleextension/configure sampleextension.mingw/configure
--- sampleextension/configure Fri Mar 29 22:26:38 2002
+++ sampleextension.mingw/configure Wed Apr 3 12:49:14 2002
@@ -1149,7 +1149,7 @@
echo "$ac_t""ok" 1>&6
TEA_INIT=ok
case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*)
+ *win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95* | *CYGWIN_ME*)
# 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
@@ -1485,7 +1485,7 @@
TCL_THREADS=1
case "`uname -s`" in
- *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*)
+ *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95* | *CYGWIN_ME*)
echo "$ac_t""yes" 1>&6
;;
*)
@@ -2089,7 +2089,7 @@
STLIB_LD='${AR} cr'
case $system in
- *win32*|*WIN32*|CYGWIN_NT*|cygwin_nt*|*CYGWIN_98*|*CYGWIN_95*)
+ *win32*|*WIN32*|CYGWIN_NT*|cygwin_nt*|*CYGWIN_98*|*CYGWIN_95* | *CYGWIN_ME*)
# This is a 2-stage check to make sure we have the 64-bit SDK
# We have to know where the SDK is installed.
if test "$do64bit" = "yes" ; then
@@ -2127,26 +2127,38 @@
export STLIB_LD="${MSSDK}/bin/win64/lib.exe -nologo ${lflags}"
export LINKBIN="${MSSDK}/bin/win64/link.exe ${lflags}"
else
- export RC="rc"
- export CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
- export CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
- export STLIB_LD="lib -nologo"
- export LINKBIN="link -link50compat"
+ if test "$MINGW32" != "yes"; then
+ export RC="rc"
+ export CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
+ export CFLAGS_OPTIMIZE="-nologo -O2 -Gs -GD -W2 ${runtime}"
+ export STLIB_LD="lib -nologo"
+ export LINKBIN="link -link50compat"
+ else
+ export LINKBIN="gcc"
+ export CFLAGS_DEBUG="-g"
+ export CFLAGS_OPTIMIZE="-O2"
+ fi
fi
+ if test "$MINGW32" != "yes"; then
+ SHLIB_LD="${LINKBIN} -dll -nologo -warn:2"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
+ EXTRA_CFLAGS="-YX"
+ LDFLAGS_DEBUG="-debug:full -debugtype:cv"
+ LDFLAGS_OPTIMIZE="-release"
+ LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
+ LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
+ PATHTYPE=-w
+ else
+ SHLIB_LD="${LINKBIN} -shared"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
+ LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
- SHLIB_LD="${LINKBIN} -dll -nologo -warn:2"
+ fi
SHLIB_LD_LIBS='${LIBS}'
-
SHLIB_SUFFIX=".dll"
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.dll'
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.lib'
- EXTRA_CFLAGS="-YX"
- LDFLAGS_DEBUG="-debug:full -debugtype:cv"
- LDFLAGS_OPTIMIZE="-release"
- LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
- LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
- PATHTYPE=-w
# Bogus to avoid getting this turned off
DL_OBJS="tclLoadNone.obj"
TCL_LIB_VERSIONS_OK=nodots
@@ -2229,7 +2241,7 @@
# known GMT value.
echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:2233: checking for gettimeofday in -lbsd" >&5
+echo "configure:2245: checking for gettimeofday in -lbsd" >&5
ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2237,7 +2249,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2241 "configure"
+#line 2253 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2248,7 +2260,7 @@
gettimeofday()
; return 0; }
EOF
-if { (eval echo configure:2252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2316,7 +2328,7 @@
SHLIB_SUFFIX=".sl"
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:2320: checking for shl_load in -ldld" >&5
+echo "configure:2332: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2324,7 +2336,7 @@
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2328 "configure"
+#line 2340 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2335,7 +2347,7 @@
shl_load()
; return 0; }
EOF
-if { (eval echo configure:2339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2380,7 +2392,7 @@
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
SHLIB_SUFFIX=".sl"
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:2384: checking for shl_load in -ldld" >&5
+echo "configure:2396: checking for shl_load in -ldld" >&5
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2388,7 +2400,7 @@
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2392 "configure"
+#line 2404 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2399,7 +2411,7 @@
shl_load()
; return 0; }
EOF
-if { (eval echo configure:2403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2506,17 +2518,17 @@
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2510: checking for dld.h" >&5
+echo "configure:2522: checking for dld.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 2515 "configure"
+#line 2527 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2532: \"$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*
@@ -2573,17 +2585,17 @@
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2577: checking for dld.h" >&5
+echo "configure:2589: checking for dld.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 2582 "configure"
+#line 2594 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2599: \"$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*
@@ -2638,17 +2650,17 @@
# Not available on all versions: check for include file.
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:2642: checking for dlfcn.h" >&5
+echo "configure:2654: checking for dlfcn.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 2647 "configure"
+#line 2659 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2664: \"$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*
@@ -2675,9 +2687,9 @@
LDFLAGS=""
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
echo $ac_n "checking for ELF""... $ac_c" 1>&6
-echo "configure:2679: checking for ELF" >&5
+echo "configure:2691: checking for ELF" >&5
cat > conftest.$ac_ext <<EOF
-#line 2681 "configure"
+#line 2693 "configure"
#include "confdefs.h"
#ifdef __ELF__
@@ -3000,17 +3012,17 @@
# that don't grok the -Bexport option. Test that it does.
hold_ldflags=$LDFLAGS
echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
-echo "configure:3004: checking for ld accepts -Bexport flag" >&5
+echo "configure:3016: checking for ld accepts -Bexport flag" >&5
LDFLAGS="${LDFLAGS} -Wl,-Bexport"
cat > conftest.$ac_ext <<EOF
-#line 3007 "configure"
+#line 3019 "configure"
#include "confdefs.h"
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
found=yes
else
@@ -3056,9 +3068,9 @@
if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
-echo "configure:3060: checking sys/exec.h" >&5
+echo "configure:3072: checking sys/exec.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3062 "configure"
+#line 3074 "configure"
#include "confdefs.h"
#include <sys/exec.h>
int main() {
@@ -3076,7 +3088,7 @@
; return 0; }
EOF
-if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -3094,9 +3106,9 @@
else
echo $ac_n "checking a.out.h""... $ac_c" 1>&6
-echo "configure:3098: checking a.out.h" >&5
+echo "configure:3110: checking a.out.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3100 "configure"
+#line 3112 "configure"
#include "confdefs.h"
#include <a.out.h>
int main() {
@@ -3114,7 +3126,7 @@
; return 0; }
EOF
-if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -3132,9 +3144,9 @@
else
echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
-echo "configure:3136: checking sys/exec_aout.h" >&5
+echo "configure:3148: checking sys/exec_aout.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 3138 "configure"
+#line 3150 "configure"
#include "confdefs.h"
#include <sys/exec_aout.h>
int main() {
@@ -3152,7 +3164,7 @@
; return 0; }
EOF
-if { (eval echo configure:3156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
tcl_ok=usable
else
@@ -3215,6 +3227,11 @@
;;
BSD/OS*)
;;
+ CYGWIN*)
+ if test "$MINGW32" != "yes"; then
+ SHLIB_CFLAGS="-fPIC"
+ fi
+ ;;
IRIX*)
;;
NetBSD-*|FreeBSD-*|OpenBSD-*)
@@ -3274,7 +3291,7 @@
fi
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:3278: checking for build with symbols" >&5
+echo "configure:3295: 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"
@@ -3405,7 +3422,7 @@
echo $ac_n "checking for tclsh""... $ac_c" 1>&6
-echo "configure:3409: checking for tclsh" >&5
+echo "configure:3426: checking for tclsh" >&5
if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
Common subdirectories: sampleextension/doc and sampleextension.mingw/doc
Common subdirectories: sampleextension/generic and sampleextension.mingw/generic
Common subdirectories: sampleextension/tclconfig and sampleextension.mingw/tclconfig
Common subdirectories: sampleextension/tests and sampleextension.mingw/tests