diff options
-rw-r--r-- | ChangeLog | 34 | ||||
-rw-r--r-- | unix/Makefile.in | 57 | ||||
-rwxr-xr-x | unix/configure | 32 | ||||
-rw-r--r-- | unix/tcl.m4 | 97 |
4 files changed, 138 insertions, 82 deletions
@@ -1,3 +1,10 @@ +2009-12-22 Jan Nijtmans <nijtmans@users.sf.net> + + * unix/tcl.m4 Sync with current Tcl version + * unix/Makefile.in Use EXE_SUFFIX for Cygwin, and + install libtk8.6.dll in bin directory + * unix/configure (regenerated) + 2009-12-22 Joe English <jenglish@users.sourceforge.net> * library/ttk/sizegrip.tcl: Patch to avoid bizarro behavior @@ -10,19 +17,18 @@ 2009-12-16 Jan Nijtmans <nijtmans@users.sf.net> - * generic/tkListbox.c: Fix gcc warning: ignoring return value of - strtol, declared with attribute - warn_unused_result. - * unix/tkUnixEvent.c: Fix gcc warning: dereferencing pointer xgePtr - does break strict-aliasing rules. - * generic/tkInt.decls: CONSTify return values of TkKeysymToString, - * generic/tkBind.c: TkFindStateString, TkpGetString, TkpGetChar, - * generic/tkIntDecls.h: which are all not supposed to be modified by - * generic/tkUtil.c: the caller. In tkUtil.c this gets rid of a - * carbon/tkMacOSXKeyboard.c: dangerous type cast. - * macosx/tkMacOSXKeyboard.c: - * unix/tkUnixKey.c: - * win/tkWinKey.c: + * generic/tkListbox.c: Fix gcc warning: ignoring return value of "strtol", + declared with attribute warn_unused_result. + * unix/tkUnixEvent.c: Fix gcc warning: dereferencing pointer "xgePtr" does + break strict-aliasing rules. + * generic/tkInt.decls: CONSTify return values of TkKeysymToString, + * generic/tkBind.c TkFindStateString, TkpGetString, TkpGetChar, + * generic/tkIntDecls.h which are all not supposed to be modified by + * generic/tkUtil.c the caller. In tkUtil.c this gets rid of a + * carbon/tkMacOSXKeyboard.c dangerous type cast. + * macosx/tkMacOSXKeyboard.c + * unix/tkUnixKey.c + * win/tkWinKey.c 2009-12-15 Don Porter <dgp@users.sourceforge.net> @@ -186,7 +192,7 @@ 2009-11-12 Joe English <jenglish@users.sourceforge.net> * library/ttk/button.tcl, library/ttk/combobox.tcl, - * library/ttk/notebook.tcl, library/ttk/treeview.tcl: + * library/ttk/notebook.tcl, library/ttk/treeview.tcl: [update] hygiene. + Where possible, replace [a; update; b] with [a ; after 0 b]. diff --git a/unix/Makefile.in b/unix/Makefile.in index 317081a..bc9fbf0 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -5,7 +5,7 @@ # "autoconf" program (constructs like "@foo@" will get replaced in the # actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.164 2009/11/23 16:09:33 dkf Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.165 2009/12/23 07:16:52 nijtmans Exp $ # Current Tk version; used in various names. @@ -208,7 +208,9 @@ BUILD_TCLSH = @BUILD_TCLSH@ # need it to be available on the PATH. This executable should *NOT* be # required just to do a normal build although it can be required to run # make dist. This variable is set to "" if no tclsh is available. +EXE_SUFFIX = @EXE_SUFFIX@ TCL_EXE = @TCLSH_PROG@ +WISH_EXE = wish${EXE_SUFFIX} # Tk used to let the configure script choose which program to use # for installing, but there are just too many different versions of @@ -570,7 +572,7 @@ SHELL_ENV = \ all: binaries libraries doc -binaries: ${LIB_FILE} ${STUB_LIB_FILE} ${TK_BUILD_EXP_FILE} wish +binaries: ${LIB_FILE} ${STUB_LIB_FILE} ${TK_BUILD_EXP_FILE} ${WISH_EXE} libraries: @@ -611,9 +613,9 @@ tkLibObjs: objs: ${OBJS} -wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@ +${WISH_EXE}: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@ ${CC} ${CFLAGS} ${LDFLAGS} $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ \ - $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o wish + $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o ${WISH_EXE} # Resetting the LIB_RUNTIME_DIR below is required so that # the generated tktest executable gets the build directory @@ -621,12 +623,12 @@ wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) @APP_RSRC_FILE@ # picking up an already installed version of the Tcl or # Tk shared libraries. -tktest: $(TKTEST_OBJS) $(TK_LIB_FILE) +tktest${EXE_SUFFIX}: $(TKTEST_OBJS) $(TK_LIB_FILE) $(MAKE) tktest-real LIB_RUNTIME_DIR="`pwd`:$(TCL_BIN_DIR)" tktest-real: ${TK_STUB_LIB_FILE} ${CC} ${CFLAGS} ${LDFLAGS} $(TKTEST_OBJS) ${TK_STUB_LIB_FILE} ${TCL_STUB_LIB_SPEC} @TK_BUILD_LIB_SPEC@ \ - $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o tktest + $(WISH_LIBS) $(CC_SEARCH_FLAGS) -o tktest${EXE_SUFFIX} # # FIXME: This xttest rule seems to be broken in a number of ways. It should # # use CC_SEARCH_FLAGS, it does not include the shared lib location logic from @@ -646,41 +648,41 @@ tktest-real: ${TK_STUB_LIB_FILE} test: test-classic test-ttk -test-classic: tktest - $(SHELL_ENV) ./tktest $(TEST_DIR)/all.tcl -geometry +0+0 $(TESTFLAGS) +test-classic: tktest${EXE_SUFFIX} + $(SHELL_ENV) ./tktest${EXE_SUFFIX} $(TEST_DIR)/all.tcl -geometry +0+0 $(TESTFLAGS) -test-ttk: tktest - $(SHELL_ENV) ./tktest $(TEST_DIR)/ttk/all.tcl -geometry +0+0 \ +test-ttk: tktest${EXE_SUFFIX} + $(SHELL_ENV) ./tktest${EXE_SUFFIX} $(TEST_DIR)/ttk/all.tcl -geometry +0+0 \ $(TESTFLAGS) # Tests with different languages -testlang: tktest +testlang: tktest${EXE_SUFFIX} $(SHELL_ENV) \ for lang in $(LOCALES) ; \ do \ LANG=$(lang); export LANG; \ - ./tktest $(TEST_DIR)/all.tcl -geometry +0+0 \ + ./tktest${EXE_SUFFIX} $(TEST_DIR)/all.tcl -geometry +0+0 \ $(TESTFLAGS); \ done # Useful target to launch a built tktest with the proper path,... -runtest: tktest - $(SHELL_ENV) ./tktest +runtest: tktest${EXE_SUFFIX} + $(SHELL_ENV) ./tktest${EXE_SUFFIX} # This target can be used to run wish from the build directory # via `make shell` or `make shell SCRIPT=/tmp/foo.tcl` -shell: wish - $(SHELL_ENV) ./wish $(SCRIPT) +shell: ${WISH_EXE} + $(SHELL_ENV) ./${WISH_EXE} $(SCRIPT) demo: - $(SHELL_ENV) ./wish $(TOP_DIR)/library/demos/widget + $(SHELL_ENV) ./${WISH_EXE} $(TOP_DIR)/library/demos/widget # This target can be used to run wish inside either gdb or insight -gdb: wish +gdb: ${WISH_EXE} @echo "set env @LD_LIBRARY_PATH_VAR@=\"`pwd`:${TCL_BIN_DIR}:$${@LD_LIBRARY_PATH_VAR@}\"" > gdb.run @echo "set env TCL_LIBRARY=@TCL_SRC_DIR@/library" >> gdb.run @echo "set env TK_LIBRARY=@TK_SRC_DIR@/library" >> gdb.run - gdb ./wish --command=gdb.run + gdb ./${WISH_EXE} --command=gdb.run rm gdb.run INSTALL_TARGETS = install-binaries install-libraries install-demos install-doc @EXTRA_INSTALL@ @@ -696,7 +698,7 @@ install-strip: # some ranlibs write to current directory, and this might not always be # possible (e.g. if installing as root). -install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish +install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) ${WISH_EXE} @for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)" \ "$(PKG_INSTALL_DIR)" "$(CONFIG_INSTALL_DIR)" ; \ do \ @@ -714,23 +716,22 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish echo "Creating package index $(PKG_INDEX)"; \ rm -f "$(PKG_INDEX)"; \ (\ - echo "if {[catch {package present Tcl\ - $(TCLVERSION)$(TCLPATCHL)}]} { return }";\ + echo "if {[catch {package present Tcl $(TCLVERSION)$(TCLPATCHL)}]} return";\ relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\ echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL)\ [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\ ) > "$(PKG_INDEX)"; \ fi - @echo "Installing $(LIB_FILE) to $(LIB_INSTALL_DIR)/" + @echo "Installing $(LIB_FILE) to @DLL_INSTALL_DIR@/" @@INSTALL_LIB@ - @chmod 555 "$(LIB_INSTALL_DIR)"/$(LIB_FILE) + @chmod 555 "@DLL_INSTALL_DIR@"/$(LIB_FILE) @if test "$(TK_BUILD_EXP_FILE)" != ""; then \ echo "Installing $(TK_EXP_FILE) to $(LIB_INSTALL_DIR)/"; \ $(INSTALL_DATA) $(TK_BUILD_EXP_FILE) \ "$(LIB_INSTALL_DIR)"/$(TK_EXP_FILE); \ fi - @echo "Installing wish as $(BIN_INSTALL_DIR)/wish$(VERSION)" - @$(INSTALL_PROGRAM) wish "$(BIN_INSTALL_DIR)"/wish$(VERSION) + @echo "Installing ${WISH_EXE} as $(BIN_INSTALL_DIR)/wish$(VERSION)${EXE_SUFFIX}" + @$(INSTALL_PROGRAM) ${WISH_EXE} "$(BIN_INSTALL_DIR)"/wish$(VERSION)${EXE_SUFFIX} @echo "Installing tkConfig.sh to $(CONFIG_INSTALL_DIR)/" @$(INSTALL_DATA) tkConfig.sh "$(CONFIG_INSTALL_DIR)"/tkConfig.sh @if test "$(STUB_LIB_FILE)" != "" ; then \ @@ -881,7 +882,7 @@ Makefile: $(UNIX_DIR)/Makefile.in clean: rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out \ - errors wish tktest lib.exp Tk *.rsrc + errors ${WISH_EXE} tktest${EXE_SUFFIX} lib.exp Tk *.rsrc distclean: clean rm -rf Makefile config.status config.cache config.log tkConfig.sh \ @@ -898,7 +899,7 @@ depend: # execute concurrently with the renaming and recompiling of that same object # file in the target below. -tkTestInit.o: $(UNIX_DIR)/tkAppInit.c wish +tkTestInit.o: $(UNIX_DIR)/tkAppInit.c ${WISH_EXE} @if test -f tkAppInit.o ; then \ rm -f tkAppInit.sav; \ mv tkAppInit.o tkAppInit.sav; \ diff --git a/unix/configure b/unix/configure index 52a26f1..de0ff4a 100755 --- a/unix/configure +++ b/unix/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCLSH_PROG BUILD_TCLSH MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT XFT_CFLAGS XFT_LIBS UNIX_FONT_OBJS TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_YEAR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_INCLUDE_SPEC TK_BUILD_STUB_LIB_SPEC TK_BUILD_STUB_LIB_PATH TK_SRC_DIR TK_SHARED_BUILD LD_LIBRARY_PATH_VAR TK_BUILD_LIB_SPEC TK_BUILD_EXP_FILE TK_EXP_FILE TCL_STUB_FLAGS XINCLUDES XLIBSW LOCALES TK_WINDOWINGSYSTEM TK_PKG_DIR TK_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_WISH_LIBS EXTRA_AQUA_OBJS EXTRA_AQUA_SRCS CFBUNDLELOCALIZATIONS MACOSX_SRC_DIR TK_RSRC_FILE WISH_RSRC_FILE LIB_RSRC_FILE APP_RSRC_FILE REZ REZ_FLAGS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCLSH_PROG BUILD_TCLSH MAN_FLAGS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP TCL_THREADS RANLIB ac_ct_RANLIB AR LIBOBJS TCL_LIBS DL_LIBS DL_OBJS PLAT_OBJS PLAT_SRCS LDAIX_SRC CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING LDFLAGS_DEBUG LDFLAGS_OPTIMIZE CC_SEARCH_FLAGS LD_SEARCH_FLAGS STLIB_LD SHLIB_LD TCL_SHLIB_LD_EXTRAS TK_SHLIB_LD_EXTRAS SHLIB_LD_LIBS SHLIB_CFLAGS SHLIB_SUFFIX EXE_SUFFIX MAKE_LIB MAKE_STUB_LIB INSTALL_LIB DLL_INSTALL_DIR INSTALL_STUB_LIB CFLAGS_DEFAULT LDFLAGS_DEFAULT XFT_CFLAGS XFT_LIBS UNIX_FONT_OBJS TK_VERSION TK_MAJOR_VERSION TK_MINOR_VERSION TK_PATCH_LEVEL TK_YEAR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_STUB_LIB_PATH TK_INCLUDE_SPEC TK_BUILD_STUB_LIB_SPEC TK_BUILD_STUB_LIB_PATH TK_SRC_DIR TK_SHARED_BUILD LD_LIBRARY_PATH_VAR TK_BUILD_LIB_SPEC TK_BUILD_EXP_FILE TK_EXP_FILE TCL_STUB_FLAGS XINCLUDES XLIBSW LOCALES TK_WINDOWINGSYSTEM TK_PKG_DIR TK_LIBRARY PRIVATE_INCLUDE_DIR HTML_DIR EXTRA_CC_SWITCHES EXTRA_APP_CC_SWITCHES EXTRA_INSTALL EXTRA_INSTALL_BINARIES EXTRA_BUILD_HTML EXTRA_WISH_LIBS EXTRA_AQUA_OBJS EXTRA_AQUA_SRCS CFBUNDLELOCALIZATIONS MACOSX_SRC_DIR TK_RSRC_FILE WISH_RSRC_FILE LIB_RSRC_FILE APP_RSRC_FILE REZ REZ_FLAGS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -4511,6 +4511,7 @@ fi # Step 3: set configuration options based on system name and version. do64bit_ok=no + EXE_SUFFIX="" LDFLAGS_ORIG="$LDFLAGS" # When ld needs options to work in 64-bit mode, put them in # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] @@ -4893,6 +4894,17 @@ fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; + CYGWIN_*) + SHLIB_CFLAGS="" + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dll" + EXE_SUFFIX=".exe" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' @@ -6826,6 +6838,7 @@ fi case $system in AIX-*) ;; BSD/OS*) ;; + CYGWIN_*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*) ;; Darwin-*) ;; @@ -6845,12 +6858,23 @@ fi UNSHARED_LIB_SUFFIX='${VERSION}.a' fi + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" if test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""; then LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + if test "${SHLIB_SUFFIX}" = ".dll"; then + + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)"/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + +else + + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + +fi + else @@ -6924,6 +6948,7 @@ fi + cat >>confdefs.h <<_ACEOF #define TCL_SHLIB_EXT "${SHLIB_SUFFIX}" _ACEOF @@ -6937,6 +6962,7 @@ _ACEOF + echo "$as_me:$LINENO: checking for build with symbols" >&5 echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6 # Check whether --enable-symbols or --disable-symbols was given. @@ -11834,9 +11860,11 @@ s,@TK_SHLIB_LD_EXTRAS@,$TK_SHLIB_LD_EXTRAS,;t t s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@EXE_SUFFIX@,$EXE_SUFFIX,;t t s,@MAKE_LIB@,$MAKE_LIB,;t t s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t s,@INSTALL_LIB@,$INSTALL_LIB,;t t +s,@DLL_INSTALL_DIR@,$DLL_INSTALL_DIR,;t t s,@INSTALL_STUB_LIB@,$INSTALL_STUB_LIB,;t t s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 6c23ace..8bb395e 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -265,7 +265,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ # Load the tclConfig.sh file # # Arguments: -# +# # Requires the following vars to be set: # TCL_BIN_DIR # @@ -351,7 +351,7 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ # Load the tkConfig.sh file # # Arguments: -# +# # Requires the following vars to be set: # TK_BIN_DIR # @@ -506,7 +506,7 @@ AC_DEFUN([SC_BUILD_TCLSH], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -551,7 +551,7 @@ AC_DEFUN([SC_ENABLE_SHARED], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -599,7 +599,7 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -705,13 +705,13 @@ AC_DEFUN([SC_ENABLE_THREADS], [ # # Arguments: # none -# +# # Requires the following vars to be set in the Makefile: # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE -# +# # Results: # # Adds the following arguments to configure: @@ -779,7 +779,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [ # # Arguments: # none -# +# # Results: # # Adds the following arguments to configure: @@ -809,14 +809,14 @@ AC_DEFUN([SC_ENABLE_LANGINFO], [ if test $tcl_cv_langinfo_h = yes; then AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) fi - else + else AC_MSG_RESULT([$langinfo_ok]) fi ]) #-------------------------------------------------------------------- # SC_CONFIG_MANPAGES -# +# # Decide whether to use symlinks for linking the manpages, # whether to compress the manpages after installation, and # whether to add a package name suffix to the installed @@ -990,7 +990,7 @@ AC_DEFUN([SC_CONFIG_SYSTEM], [ # TCL_SHLIB_LD_EXTRAS - Additional element which are added to SHLIB_LD_LIBS # TK_SHLIB_LD_EXTRAS for the build of Tcl and Tk, but not recorded in the # tclConfig.sh, since they are only used for the build -# of Tcl and Tk. +# of Tcl and Tk. # Examples: MacOS X records the library version and # compatibility version in the shared library. But # of course the Tcl version of this is only used for Tcl. @@ -1090,6 +1090,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # Step 3: set configuration options based on system name and version. do64bit_ok=no + EXE_SUFFIX="" LDFLAGS_ORIG="$LDFLAGS" # When ld needs options to work in 64-bit mode, put them in # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load] @@ -1246,6 +1247,17 @@ dnl AC_CHECK_TOOL(AR, ar) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; + CYGWIN_*) + SHLIB_CFLAGS="" + SHLIB_LD='${CC} -shared' + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".dll" + EXE_SUFFIX=".exe" + DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + CC_SEARCH_FLAGS="" + LD_SEARCH_FLAGS="" + ;; dgux*) SHLIB_CFLAGS="-K PIC" SHLIB_LD='${CC} -G' @@ -1407,7 +1419,7 @@ dnl AC_CHECK_TOOL(AR, ar) SHLIB_SUFFIX=".so" CFLAGS_OPTIMIZE="-O2" - # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings + # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings # when you inline the string and math operations. Turn this off to # get rid of the warnings. #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" @@ -1672,8 +1684,8 @@ dnl AC_CHECK_TOOL(AR, ar) eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"' done]) LIBS="$LIBS -framework CoreFoundation" - AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>], - [CFBundleRef b = CFBundleGetMainBundle();], + AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>], + [CFBundleRef b = CFBundleGetMainBundle();], tcl_cv_lib_corefoundation=yes, tcl_cv_lib_corefoundation=no) AS_IF([test "$fat_32_64" = yes], [ @@ -1683,7 +1695,7 @@ dnl AC_CHECK_TOOL(AR, ar) LIBS=$hold_libs]) AS_IF([test $tcl_cv_lib_corefoundation = yes], [ LIBS="$LIBS -framework CoreFoundation" - AC_DEFINE(HAVE_COREFOUNDATION, 1, + AC_DEFINE(HAVE_COREFOUNDATION, 1, [Do we have access to Darwin CoreFoundation.framework?]) ], [tcl_corefoundation=no]) AS_IF([test "$fat_32_64" = yes -a $tcl_corefoundation = yes],[ @@ -1692,8 +1704,8 @@ dnl AC_CHECK_TOOL(AR, ar) for v in CFLAGS CPPFLAGS LDFLAGS; do eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"' done - AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>], - [CFBundleRef b = CFBundleGetMainBundle();], + AC_TRY_LINK([#include <CoreFoundation/CoreFoundation.h>], + [CFBundleRef b = CFBundleGetMainBundle();], tcl_cv_lib_corefoundation_64=yes, tcl_cv_lib_corefoundation_64=no) for v in CFLAGS CPPFLAGS LDFLAGS; do @@ -1721,7 +1733,7 @@ dnl AC_CHECK_TOOL(AR, ar) CFLAGS_OPTIMIZE="" # Optimizer is buggy AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h [Should OS/390 do the right thing with sockets?]) - ;; + ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 SHLIB_CFLAGS="" @@ -2046,6 +2058,7 @@ dnl # preprocessing tests use only CPPFLAGS. case $system in AIX-*) ;; BSD/OS*) ;; + CYGWIN_*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*) ;; Darwin-*) ;; @@ -2057,11 +2070,17 @@ dnl # preprocessing tests use only CPPFLAGS. SHARED_LIB_SUFFIX='${VERSION}${SHLIB_SUFFIX}']) AS_IF([test "$UNSHARED_LIB_SUFFIX" = ""], [ UNSHARED_LIB_SUFFIX='${VERSION}.a']) + DLL_INSTALL_DIR="\$(LIB_INSTALL_DIR)" AS_IF([test "${SHARED_BUILD}" = 1 -a "${SHLIB_SUFFIX}" != ""], [ LIB_SUFFIX=${SHARED_LIB_SUFFIX} MAKE_LIB='${SHLIB_LD} -o [$]@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}' - INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + AS_IF([test "${SHLIB_SUFFIX}" = ".dll"], [ + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(BIN_INSTALL_DIR)"/$(LIB_FILE)' + DLL_INSTALL_DIR="\$(BIN_INSTALL_DIR)" + ], [ + INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)"/$(LIB_FILE)' + ]) ], [ LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} @@ -2117,12 +2136,14 @@ dnl # preprocessing tests use only CPPFLAGS. AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_SUFFIX) + AC_SUBST(EXE_SUFFIX) AC_DEFINE_UNQUOTED(TCL_SHLIB_EXT,"${SHLIB_SUFFIX}", [What is the default extension for shared libraries?]) AC_SUBST(MAKE_LIB) AC_SUBST(MAKE_STUB_LIB) AC_SUBST(INSTALL_LIB) + AC_SUBST(DLL_INSTALL_DIR) AC_SUBST(INSTALL_STUB_LIB) AC_SUBST(RANLIB) ]) @@ -2138,7 +2159,7 @@ dnl # preprocessing tests use only CPPFLAGS. # # Arguments: # none -# +# # Results: # # Defines only one of the following vars: @@ -2257,7 +2278,7 @@ int main() { # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2343,7 +2364,7 @@ closedir(d); # # Arguments: # none -# +# # Results: # # Sets the the following vars: @@ -2421,13 +2442,13 @@ AC_DEFUN([SC_PATH_X], [ # SC_BLOCKING_STYLE # # The statements below check for systems where POSIX-style -# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. +# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style # FIONBIO approach instead. # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2471,7 +2492,7 @@ AC_DEFUN([SC_BLOCKING_STYLE], [ # # Arguments: # none -# +# # Results: # # Defines some of the following vars: @@ -2542,7 +2563,7 @@ AC_DEFUN([SC_TIME_HANDLER], [ # # Arguments: # none -# +# # Results: # # Might defines some of the following vars: @@ -2592,7 +2613,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [ # # Arguments: # None. -# +# # Results: # # Might append to the following vars: @@ -2665,7 +2686,7 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2711,7 +2732,7 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2733,8 +2754,8 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ # See if we should use long anyway Note that we substitute in the # type that is our current guess for a 64-bit type inside this check # program, so it should be modified only carefully... - AC_TRY_COMPILE(,[switch (0) { - case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; + AC_TRY_COMPILE(,[switch (0) { + case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ; }],tcl_cv_type_64bit=${tcl_type_64bit})]) if test "${tcl_cv_type_64bit}" = none ; then AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) @@ -2853,7 +2874,7 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2920,7 +2941,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYADDR_R], [AC_CHECK_FUNC(gethostbyaddr_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -2996,7 +3017,7 @@ AC_DEFUN([SC_TCL_GETHOSTBYNAME_R], [AC_CHECK_FUNC(gethostbyname_r, [ # # Arguments: # None -# +# # Results: # Might define the following vars: # HAVE_GETADDRINFO @@ -3028,7 +3049,7 @@ AC_DEFUN([SC_TCL_GETADDRINFO], [AC_CHECK_FUNC(getaddrinfo, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3088,7 +3109,7 @@ AC_DEFUN([SC_TCL_GETPWUID_R], [AC_CHECK_FUNC(getpwuid_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3148,7 +3169,7 @@ AC_DEFUN([SC_TCL_GETPWNAM_R], [AC_CHECK_FUNC(getpwnam_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: @@ -3208,7 +3229,7 @@ AC_DEFUN([SC_TCL_GETGRGID_R], [AC_CHECK_FUNC(getgrgid_r, [ # # Arguments: # None -# +# # Results: # # Might define the following vars: |