summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/Makefile.in24
-rw-r--r--win/aclocal.m444
-rw-r--r--win/configure.in13
3 files changed, 77 insertions, 4 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 96a17d5..24208c6 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -4,7 +4,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.14 1999/11/23 22:22:34 wart Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.15 1999/12/07 01:03:19 wart Exp $
TCLVERSION = @TCL_VERSION@
VERSION = @TK_VERSION@
@@ -121,6 +121,7 @@ STATIC_LIBRARIES = $(TK_LIB_FILE)
WISH = wish$(VER)${EXESUFFIX}
TKTEST = tktest${EXEEXT}
CAT32 = cat32
+MAN2TCL = man2tcl$(EXEEXT)
@SET_MAKE@
@@ -153,6 +154,9 @@ LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
CFLAGS = @CFLAGS@
+# Special compiler flags to use when building man2tcl on Windows.
+MAN2TCLFLAGS = @MAN2TCLFLAGS@
+
AR = @AR@
CC = @CC@
RC = @RC@
@@ -178,6 +182,8 @@ COPY = cp
CC_OBJNAME = @CC_OBJNAME@
CC_EXENAME = @CC_EXENAME@
+TCLSH_PROG = @TCLSH_PROG@
+
CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
-I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \
-I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \
@@ -327,6 +333,10 @@ TK_OBJS = \
STUB_OBJS = \
tkStubLib.$(OBJEXT)
+TCL_DOCS = "$(TCL_SRC_DIR_NATIVE)"/../doc/*.[13n]
+TK_DOCS = "$(ROOT_DIR_NATIVE)"/doc/*.[13n]
+CORE_DOCS = $(TCL_DOCS) $(TK_DOCS)
+
DEMOPROGS = browse hello ixset rmt rolodex square tcolor timer widget
# Main targets. The default target -- all -- builds the binaries,
@@ -341,7 +351,17 @@ libraries:
$(ROOT_DIR)/doc/man.macros:
$(INSTALL_DATA) @TCL_SRC_DIR@/../doc/man.macros $(ROOT_DIR)/doc/man.macros
-doc: $(ROOT_DIR)/doc/man.macros
+doc:
+
+winhelp: $(ROOT_DIR)/doc/man.macros $(TCL_SRC_DIR_NATIVE)/../tools/man2help.tcl $(MAN2TCL)
+ TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/../library"; export TCL_LIBRARY; \
+ TK_LIBRARY="$(ROOT_DIR_NATIVE)/library"; export TK_LIBRARY; \
+ PATH="$(PATH):$(TCL_BIN_DIR)"; export PATH; \
+ $(TCLSH_PROG) "$(TCL_SRC_DIR_NATIVE)"/../tools/man2help.tcl tcl "$(VER)" $(CORE_DOCS)
+ hcw /c /e tcl.hpj
+
+$(MAN2TCL): $(TCL_SRC_DIR_NATIVE)/../tools/man2tcl.c
+ $(CC) $(CFLAGS_OPTIMIZE) $(MAN2TCLFLAGS) -o $(MAN2TCL) "$(TCL_SRC_DIR_NATIVE)"/../tools/man2tcl.c
test: binaries $(TKTEST)
@TCL_LIBRARY="$(TCL_SRC_DIR_NATIVE)/../library"; export TCL_LIBRARY; \
diff --git a/win/aclocal.m4 b/win/aclocal.m4
index 9fad38c..012107a 100644
--- a/win/aclocal.m4
+++ b/win/aclocal.m4
@@ -442,3 +442,47 @@ AC_DEFUN(SC_WITH_TCL, [
AC_SUBST(TCL_BIN_DIR)
])
+#------------------------------------------------------------------------
+# SC_PROG_TCLSH
+# Locate a tclsh shell in the following directories:
+# ${exec_prefix}/bin
+# ${prefix}/bin
+# ${TCL_BIN_DIR}
+# ${TCL_BIN_DIR}/../bin
+# ${PATH}
+#
+# Arguments
+# none
+#
+# Results
+# Subst's the following values:
+# TCLSH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN(SC_PROG_TCLSH, [
+ AC_MSG_CHECKING([for tclsh])
+
+ AC_CACHE_VAL(ac_cv_path_tclsh, [
+ search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/tclsh[[8-9]]* 2> /dev/null` \
+ `ls -r $dir/tclsh* 2> /dev/null` ; do
+ if test x"$ac_cv_path_tclsh" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_tclsh=$j
+ break
+ fi
+ fi
+ done
+ done
+ ])
+
+ if test -f "$ac_cv_path_tclsh" ; then
+ TCLSH_PROG=$ac_cv_path_tclsh
+ AC_MSG_RESULT($TCLSH_PROG)
+ else
+ AC_MSG_ERROR(No tclsh found in PATH: $search_path)
+ fi
+ AC_SUBST(TCLSH_PROG)
+])
+
diff --git a/win/configure.in b/win/configure.in
index af06ec9..dd841a6 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -2,7 +2,7 @@
# generate the file "configure", which is run during Tk installation
# to configure the system for the local environment.
#
-# RCS: @(#) $Id: configure.in,v 1.10 1999/10/01 22:45:31 hobbs Exp $
+# RCS: @(#) $Id: configure.in,v 1.11 1999/12/07 01:03:19 wart Exp $
AC_INIT(../generic/tk.h)
@@ -61,6 +61,13 @@ SC_ENABLE_SHARED
SC_CONFIG_CFLAGS
#--------------------------------------------------------------------
+# man2tcl needs this so that it can use errno.h
+#--------------------------------------------------------------------
+
+AC_CHECK_HEADER(errno.h, , MAN2TCLFLAGS="-DNO_ERRNO_H")
+AC_SUBST(MAN2TCLFLAGS)
+
+#--------------------------------------------------------------------
# Set the default compiler switches based on the --enable-symbols
# option. This macro depends on C flags, and should be called
# after SC_CONFIG_CFLAGS macro is called.
@@ -79,6 +86,8 @@ LDFLAGS=${LDFLAGS_DEFAULT}
SC_PATH_TCLCONFIG($TK_PATCH_LEVEL)
SC_LOAD_TCLCONFIG
+SC_PROG_TCLSH
+
#--------------------------------------------------------------------
# Perform final evaluations of variables with possible substitutions.
#--------------------------------------------------------------------
@@ -142,4 +151,4 @@ AC_SUBST(MAKE_DLL)
AC_SUBST(TK_XINCLUDES)
AC_SUBST(XINCLUDES)
-AC_OUTPUT(Makefile tkConfig.sh)
+AC_OUTPUT(Makefile tkConfig.sh tcl.hpj)