summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/Makefile.in29
-rw-r--r--win/configure.in9
-rw-r--r--win/tcl.m443
3 files changed, 59 insertions, 22 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index d209d0d..0f68d1d 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.34 2000/05/02 22:02:37 kupries Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.35 2000/05/18 22:19:17 hobbs Exp $
VERSION = @TCL_VERSION@
@@ -156,8 +156,10 @@ DEPARG = "$(shell $(CYGPATH) $(PATHTYPE) $<)"
VPATH = $(GENERIC_DIR)@VPSEP@$(WIN_DIR)@VPSEP@$(COMPAT_DIR) # :
AR = @AR@
+RANLIB = @RANLIB@
CC = @CC@
RC = @RC@
+RES = @RES@
AC_FLAGS = @EXTRA_CFLAGS@ @DEFS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
@@ -313,19 +315,19 @@ winhelp: $(ROOT_DIR)/tools/man2help.tcl $(MAN2TCL)
$(MAN2TCL): $(ROOT_DIR)/tools/man2tcl.c
$(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(ROOT_DIR_NATIVE)"/tools/man2tcl.c
-$(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) tclsh.res
+$(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) tclsh.$(RES)
$(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) \
- tclsh.res $(CC_EXENAME)
+ tclsh.$(RES) $(CC_EXENAME)
$(TCLTEST): $(TCL_LIB_FILE) $(TCLTEST_OBJS) $(CAT32) tclsh.res
$(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(LIBS) \
- tclsh.res $(CC_EXENAME)
+ tclsh.$(RES) $(CC_EXENAME)
cat32.${OBJEXT}: cat.c
$(CC) -c $(CC_SWITCHES) $(DEPARG) $(CC_OBJNAME)
$(CAT32): cat32.${OBJEXT}
- $(CC) $(CFLAGS) cat32.obj $(CC_EXENAME) -link $(LDFLAGS_CONSOLE)
+ $(CC) $(CFLAGS) cat32.${OBJEXT} $(CC_EXENAME) $(LDFLAGS_CONSOLE)
# The following targets are configured by autoconf to generate either
# a shared library or static library
@@ -333,14 +335,16 @@ $(CAT32): cat32.${OBJEXT}
${TCL_STUB_LIB_FILE}: ${STUB_OBJS}
@$(RM) ${TCL_STUB_LIB_FILE}
@MAKE_LIB@ ${STUB_OBJS}
+ @POST_MAKE_LIB@
-${TCL_DLL_FILE}: ${TCL_OBJS} tcl.res
+${TCL_DLL_FILE}: ${TCL_OBJS} tcl.$(RES)
@$(RM) ${TCL_DLL_FILE}
- @MAKE_DLL@ ${TCL_OBJS} tcl.res
+ @MAKE_DLL@ ${TCL_OBJS} tcl.$(RES)
${TCL_LIB_FILE}: ${TCL_OBJS}
@$(RM) ${TCL_LIB_FILE}
@MAKE_LIB@ ${TCL_OBJS}
+ @POST_MAKE_LIB@
${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE}
@$(RM) ${DDE_DLL_FILE}
@@ -355,13 +359,13 @@ ${REG_DLL_FILE}: ${REG_OBJS} ${TCL_STUB_LIB_FILE}
${PIPE_DLL_FILE}: ${PIPE_OBJS}
@$(RM) ${PIPE_DLL_FILE}
- $(CC) $(CFLAGS) ${PIPE_OBJS} $(LIBS) -Fe$(PIPE_DLL_FILE)
+ @MAKE_EXE@ $(CFLAGS) ${PIPE_OBJS} $(LIBS)
# Add the object extension to the implicit rules. By default .obj is not
# automatically added.
.SUFFIXES: .${OBJEXT}
-.SUFFIXES: .res
+.SUFFIXES: .$(RES)
.SUFFIXES: .rc
# Special case object targets
@@ -404,9 +408,8 @@ tclStubLib.${OBJEXT}: tclStubLib.c
.c.${OBJEXT}:
$(CC) -c $(CC_SWITCHES) -DBUILD_tcl ${DEPARG} $(CC_OBJNAME)
-.rc.res:
- $(RC) -fo $@ -r -i "$(GENERIC_DIR_NATIVE)" $(DEPARG)
-
+.rc.$(RES):
+ $(RC) @RC_OUT@ $@ @RC_TYPE@ @RC_INCLUDE@ "$(GENERIC_DIR_NATIVE)" @RC_INCLUDE@ "$(WIN_DIR_NATIVE)" $(DEPARG)
install: all install-binaries install-libraries install-doc
@@ -517,7 +520,7 @@ cleanhelp:
$(RM) *.hlp *.cnt *.GID *.rtf man2tcl.exe
clean: cleanhelp
- $(RM) *.lib *.exp *.dll *.res *.${OBJEXT} *~ \#* TAGS a.out
+ $(RM) *.lib *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out
$(RM) $(TCLSH) $(TCLTEST) $(CAT32)
$(RM) *.pch *.ilk *.pdb
diff --git a/win/configure.in b/win/configure.in
index 9948676..2f35312 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.21 2000/05/03 00:15:10 hobbs Exp $
+# RCS: @(#) $Id: configure.in,v 1.22 2000/05/18 22:19:17 hobbs Exp $
AC_INIT(../generic/tcl.h)
@@ -134,13 +134,20 @@ AC_SUBST(LDFLAGS_OPTIMIZE)
AC_SUBST(LDFLAGS_CONSOLE)
AC_SUBST(LDFLAGS_WINDOW)
AC_SUBST(AR)
+AC_SUBST(RANLIB)
AC_SUBST(RC)
+AC_SUBST(RC_OUT)
+AC_SUBST(RC_TYPE)
+AC_SUBST(RC_INCLUDE)
+AC_SUBST(RES)
AC_SUBST(DLLSUFFIX)
AC_SUBST(LIBPREFIX)
AC_SUBST(LIBSUFFIX)
AC_SUBST(EXESUFFIX)
AC_SUBST(LIBRARIES)
AC_SUBST(MAKE_LIB)
+AC_SUBST(POST_MAKE_LIB)
AC_SUBST(MAKE_DLL)
+AC_SUBST(MAKE_EXE)
AC_OUTPUT(Makefile tclConfig.sh tcl.hpj)
diff --git a/win/tcl.m4 b/win/tcl.m4
index 3e9c238..b76f456 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -171,8 +171,27 @@ AC_DEFUN(SC_ENABLE_GCC, [
AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available [--disable-gcc]],
[ok=$enableval], [ok=no])
if test "$ok" = "yes"; then
- CC=gcc
- AC_PROG_CC
+ # Quick hack to simulate a real cross check
+ # The right way to do this is to use AC_CHECK_TOOL
+ # correctly, but this is the minimal change
+ # we need until the real fix is ready.
+ if test "$host" != "$build" ; then
+ if test -z "$CC"; then
+ CC=${host}-gcc
+ fi
+ AC_PROG_CC
+ AC_CHECK_PROG(AR, ${host}-ar, ${host}-ar)
+ AC_CHECK_PROG(RANLIB, ${host}-ranlib, ${host}-ranlib)
+ AC_CHECK_PROG(RC, ${host}-windres, ${host}-windres)
+ else
+ if test -z "$CC"; then
+ CC=gcc
+ fi
+ AC_PROG_CC
+ AC_CHECK_PROG(AR, ar, ar)
+ AC_CHECK_PROG(RANLIB, ranlib, ranlib)
+ AC_CHECK_PROG(RC, windres, windres)
+ fi
else
# Allow user to override
if test -z "$CC"; then
@@ -364,10 +383,13 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
SHLIB_LD_LIBS=""
LIBS=""
LIBS_GUI="-lgdi32 -lcomdlg32"
- AR="${AR-ar}"
- STLIB_LD="${AR-ar}"
- RC="${WINDRES-windres}"
- MAKE_LIB="\${AR} crv \[$]@"
+ STLIB_LD="${AR}"
+ RC_OUT=-o
+ RC_TYPE=
+ RC_INCLUDE=--include
+ RES=res.o
+ MAKE_LIB="\${AR} crv \[$]@"
+ POST_MAKE_LIB="\${RANLIB} \[$]@"
MAKE_EXE="\${CC} -o \[$]@"
LIBPREFIX="lib"
@@ -463,7 +485,12 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
AR="lib -nologo"
STLIB_LD="lib -nologo"
RC="rc"
+ RC_OUT=-fo
+ RC_TYPE=-r
+ RC_INCLUDE=-i
+ RES=res
MAKE_LIB="\${AR} -out:\[$]@"
+ POST_MAKE_LIB=
MAKE_EXE="\${CC} -Fe\[$]@"
LIBPREFIX=""
@@ -501,8 +528,8 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# Specify linker flags depending on the type of app being
# built -- Console vs. Window.
- LDFLAGS_CONSOLE="-subsystem:console"
- LDFLAGS_WINDOW="-subsystem:windows"
+ LDFLAGS_CONSOLE="-link -subsystem:console"
+ LDFLAGS_WINDOW="-link -subsystem:windows"
fi
])