From b12831c4b0f30de8e424ed68bd0d292c03e39630 Mon Sep 17 00:00:00 2001 From: hobbs2 Date: Mon, 22 Aug 2005 21:24:08 +0000 Subject: * Makefile.in: install man pages with html docs * configure, configure.ac, tclconfig/tcl.m4: updated to newer TEA system --- ChangeLog | 6 + Makefile.in | 9 +- configure | 370 ++++++++++++++++++++++++++++++++++++++----------------- configure.ac | 3 +- tclconfig/tcl.m4 | 232 ++++++++++++++++++---------------- 5 files changed, 396 insertions(+), 224 deletions(-) diff --git a/ChangeLog b/ChangeLog index f0af276..0cea192 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-22 Jeff Hobbs + + * Makefile.in: install man pages with html docs + * configure, configure.ac, tclconfig/tcl.m4: updated to newer TEA + system + 2005-08-09 Jeff Hobbs * generic/tkTreeStyle.c (Style_DoLayout): use if instead of diff --git a/Makefile.in b/Makefile.in index 0b8065d..3f98902 100644 --- a/Makefile.in +++ b/Makefile.in @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: Makefile.in,v 1.8 2005/07/16 17:59:52 treectrl Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.9 2005/08/22 21:24:08 hobbs2 Exp $ #======================================================================== # Edit the following few lines when writing a new extension @@ -114,9 +114,6 @@ TCL_SRC_DIR = @TCL_SRC_DIR@ TCL_BIN_DIR = @TCL_BIN_DIR@ TK_SRC_DIR = @TK_SRC_DIR@ TK_BIN_DIR = @TK_BIN_DIR@ -# This is necessary for packages that use private Tcl headers -TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@ -TK_TOP_DIR_NATIVE = @TK_TOP_DIR_NATIVE@ # Not used, but retained for reference of what libs Tcl required TCL_LIBS = @TCL_LIBS@ TK_LIBS = @TK_LIBS@ @@ -215,7 +212,7 @@ install-libraries: libraries # directory. #======================================================================== -install-doc-x: doc +install-doc-x: @mkdir -p $(DESTDIR)$(mandir)/mann @echo "Installing documentation in $(DESTDIR)$(mandir)" @for i in $(srcdir)/doc/*.n; do \ @@ -224,7 +221,7 @@ install-doc-x: doc $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ done -install-doc: +install-doc: install-doc-x mkdir -p $(DESTDIR)$(pkglibdir)/htmldoc cp $(srcdir)/doc/*.html $(DESTDIR)$(pkglibdir)/htmldoc diff --git a/configure b/configure index 3415fa8..7a10b2a 100644 --- a/configure +++ b/configure @@ -1768,6 +1768,25 @@ echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} fi + # Ensure windowingsystem is defined + if test "${TEA_PLATFORM}" = "unix" ; then + case ${TK_DEFS} in + *MAC_OSX_TK*) + +cat >>confdefs.h <<\_ACEOF +#define MAC_OSX_TK 1 +_ACEOF + + TEA_WINDOWINGSYSTEM="aqua" + ;; + *) + TEA_WINDOWINGSYSTEM="x11" + ;; + esac + elif test "${TEA_PLATFORM}" = "windows" ; then + TEA_WINDOWINGSYSTEM="windows" + fi + # # eval is required to do the TK_DBGX substitution # @@ -4142,7 +4161,9 @@ echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6 fi if test $ac_cv_header_net_errno_h = yes; then - cat >>confdefs.h <<\_ACEOF + + +cat >>confdefs.h <<\_ACEOF #define HAVE_NET_ERRNO_H 1 _ACEOF @@ -4706,7 +4727,10 @@ fi echo "$as_me:$LINENO: checking dirent.h" >&5 echo $ECHO_N "checking dirent.h... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + if test "${tcl_cv_dirent_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4762,18 +4786,21 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - tcl_ok=yes + tcl_cv_dirent_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -tcl_ok=no +tcl_cv_dirent_h=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +fi + + + if test $tcl_cv_dirent_h = no; then - if test $tcl_ok = no; then - cat >>confdefs.h <<\_ACEOF +cat >>confdefs.h <<\_ACEOF #define NO_DIRENT_H 1 _ACEOF @@ -4921,7 +4948,8 @@ fi if test $ac_cv_header_errno_h = yes; then : else - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define NO_ERRNO_H 1 _ACEOF @@ -5068,7 +5096,8 @@ fi if test $ac_cv_header_float_h = yes; then : else - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define NO_FLOAT_H 1 _ACEOF @@ -5215,7 +5244,8 @@ fi if test $ac_cv_header_values_h = yes; then : else - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define NO_VALUES_H 1 _ACEOF @@ -5360,12 +5390,14 @@ echo "${ECHO_T}$ac_cv_header_limits_h" >&6 fi if test $ac_cv_header_limits_h = yes; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_LIMITS_H 1 _ACEOF else - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define NO_LIMITS_H 1 _ACEOF @@ -5568,7 +5600,8 @@ fi rm -f conftest* if test $tcl_ok = 0; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define NO_STDLIB_H 1 _ACEOF @@ -5756,7 +5789,8 @@ rm -f conftest* # set and why. if test $tcl_ok = 0; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define NO_STRING_H 1 _ACEOF @@ -5902,7 +5936,8 @@ fi if test $ac_cv_header_sys_wait_h = yes; then : else - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define NO_SYS_WAIT_H 1 _ACEOF @@ -6049,7 +6084,8 @@ fi if test $ac_cv_header_dlfcn_h = yes; then : else - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define NO_DLFCN_H 1 _ACEOF @@ -6334,31 +6370,23 @@ echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;} echo "$as_me:$LINENO: checking for Tcl private include files" >&5 echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6 + TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` + TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" + TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" + TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" + TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" + TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\" + TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\" + TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\" + if test "${TEA_PLATFORM}" = "windows"; then - TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\" - TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\" - TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\" - TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\" - TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\" - TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\" - TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\" TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} - - TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" else - TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)' - TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic' - TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix' - TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win' - TCL_BMAP_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/bitmaps' - TCL_TOOL_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/tools' - TCL_COMPAT_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/compat' TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} - - # substitute these in "relaxed" so that TCL_INCLUDES still works - # without requiring the other vars to be defined in the Makefile - eval "TCL_INCLUDES=\"-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}\"" fi + # We want to ensure these are substitured so as not to require + # any *_NATIVE vars be defined in the Makefile + TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" @@ -6378,25 +6406,26 @@ echo "${ECHO_T}Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" >&6 echo "$as_me:$LINENO: checking for Tk private include files" >&5 echo $ECHO_N "checking for Tk private include files... $ECHO_C" >&6 + TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` + TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" + TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" + TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" + TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" + TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" if test "${TEA_PLATFORM}" = "windows"; then - TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\" - TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\" - TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\" - TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\" - TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\" TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE} - - TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}" else - TK_TOP_DIR_NATIVE='${TK_SRC_DIR}' - TK_GENERIC_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/generic' - TK_UNIX_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/unix' - TK_WIN_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/win' TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE} - - # substitute these in "relaxed" so that TK_INCLUDES still works - # without requiring the other vars to be defined in the Makefile - eval "TK_INCLUDES=\"-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}\"" + fi + # We want to ensure these are substitured so as not to require + # any *_NATIVE vars be defined in the Makefile + TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" + if test "${TEA_WINDOWINGSYSTEM}" = "windows" \ + -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then + TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}" + fi + if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then + TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx" fi @@ -6417,15 +6446,6 @@ echo "${ECHO_T}Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" >&6 if test "${TEA_PLATFORM}" = "unix" ; then - case ${TK_DEFS} in - *MAC_OSX_TK*) - cat >>confdefs.h <<\_ACEOF -#define MAC_OSX_TK 1 -_ACEOF - - TEA_WINDOWINGSYSTEM="aqua" - ;; - *) echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 @@ -6866,11 +6886,6 @@ echo "${ECHO_T}could not find any! Using -lX11." >&6 PKG_LIBS="${PKG_LIBS} ${XLIBSW}" fi - TEA_WINDOWINGSYSTEM="x11" - ;; - esac - elif test "${TEA_PLATFORM}" = "windows" ; then - TEA_WINDOWINGSYSTEM="windows" fi @@ -6912,7 +6927,6 @@ else CLEANFILES="pkgIndex.tcl" fi if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then - TK_INCLUDES="${TK_INCLUDES} -I${TK_TOP_DIR_NATIVE}/macosx" vars="-framework Carbon" for i in $vars; do @@ -6945,15 +6959,18 @@ fi; if test "${TEA_PLATFORM}" != "windows" ; then # We are always OK on Windows, so check what this platform wants. - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define USE_THREAD_ALLOC 1 _ACEOF - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 _ACEOF @@ -7555,7 +7572,8 @@ done echo "$as_me:$LINENO: checking for building with threads" >&5 echo $ECHO_N "checking for building with threads... $ECHO_C" >&6 if test "${TCL_THREADS}" = "1"; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define TCL_THREADS 1 _ACEOF @@ -7624,7 +7642,8 @@ echo "${ECHO_T}shared" >&6 echo "$as_me:$LINENO: result: static" >&5 echo "${ECHO_T}static" >&6 SHARED_BUILD=0 - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define STATIC_BUILD 1 _ACEOF @@ -8179,16 +8198,19 @@ echo "$as_me: error: could not find PocketPC SDK or target compiler to enable Wi defs="${defs} _DLL" fi for i in $defs ; do - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<_ACEOF #define $i 1 _ACEOF done - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<_ACEOF #define _WIN32_WCE $CEVERSION _ACEOF - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<_ACEOF #define UNDER_CE $CEVERSION _ACEOF @@ -8397,7 +8419,8 @@ fi if test $libbsd = yes; then MATH_LIBS="$MATH_LIBS -lbsd" - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define USE_DELTA_FOR_TZ 1 _ACEOF @@ -8441,7 +8464,8 @@ _ACEOF ;; HP-UX-*.11.*) # Use updated header definitions where possible - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _XOPEN_SOURCE_EXTENDED 1 _ACEOF @@ -8709,22 +8733,6 @@ echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} fi fi ;; - CYGWIN*) - DL_LIBS="" - SHLIB_CFLAGS="" - SHLIB_LD_LIBS='${LIBS}' - SHLIB_SUFFIX=".dll" - - SHLIB_LD="${CC} -shared" - DL_OBJS="tclLoadDl.o" - LDFLAGS="" - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - cat >>confdefs.h <<\_ACEOF -#define HAVE_TM_ZONE 1 -_ACEOF - - ;; Linux*) SHLIB_CFLAGS="-fPIC" SHLIB_LD_LIBS='${LIBS}' @@ -9351,16 +9359,138 @@ rm -f conftest* esac ;; Darwin-*) + CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" SHLIB_LD="cc -dynamiclib \${LDFLAGS}" + echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5 +echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6 +if test "${tcl_cv_ld_single_module+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_ld_single_module=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_ld_single_module=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$hold_ldflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5 +echo "${ECHO_T}$tcl_cv_ld_single_module" >&6 + if test $tcl_cv_ld_single_module = yes; then + SHLIB_LD="${SHLIB_LD} -Wl,-single_module" + fi SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" - LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first" + LDFLAGS="$LDFLAGS -prebind" + echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5 +echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6 +if test "${tcl_cv_ld_search_paths_first+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_ld_search_paths_first=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_ld_search_paths_first=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$hold_ldflags +fi +echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5 +echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6 + if test $tcl_cv_ld_search_paths_first = yes; then + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + fi LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" - CFLAGS_OPTIMIZE="-Os" ;; NEXTSTEP-*) SHLIB_CFLAGS="" @@ -9372,11 +9502,12 @@ rm -f conftest* LD_SEARCH_FLAGS="" ;; OS/390-*) - CFLAGS_OPTIMIZE="" # Optimizer is buggy - cat >>confdefs.h <<\_ACEOF + CFLAGS_OPTIMIZE="" # Optimizer is buggy + +cat >>confdefs.h <<\_ACEOF #define _OE_SOCKETS 1 _ACEOF - # needed in sys/socket.h + ;; OSF1-1.0|OSF1-1.1|OSF1-1.2) # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 @@ -9507,11 +9638,13 @@ _ACEOF # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF @@ -9538,11 +9671,13 @@ _ACEOF # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF @@ -9769,7 +9904,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $tcl_ok" >&5 echo "${ECHO_T}$tcl_ok" >&6 if test $tcl_ok = usable; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define USE_SYS_EXEC_H 1 _ACEOF @@ -9835,7 +9971,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $tcl_ok" >&5 echo "${ECHO_T}$tcl_ok" >&6 if test $tcl_ok = usable; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define USE_A_OUT_H 1 _ACEOF @@ -9901,7 +10038,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $tcl_ok" >&5 echo "${ECHO_T}$tcl_ok" >&6 if test $tcl_ok = usable; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define USE_SYS_EXEC_AOUT_H 1 _ACEOF @@ -9963,8 +10101,6 @@ fi; ;; ULTRIX-4.*) ;; - CYGWIN*) - ;; windows) ;; *) @@ -10097,7 +10233,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _ISOC99_SOURCE 1 _ACEOF @@ -10201,7 +10338,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define _LARGEFILE64_SOURCE 1 _ACEOF @@ -10322,7 +10460,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "${tcl_cv_type_64bit}" = none ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define TCL_WIDE_INT_IS_LONG 1 _ACEOF @@ -10335,7 +10474,8 @@ echo "${ECHO_T}using long" >&6 echo "$as_me:$LINENO: result: using Tcl header defaults" >&5 echo "${ECHO_T}using Tcl header defaults" >&6 else - cat >>confdefs.h <<_ACEOF + +cat >>confdefs.h <<_ACEOF #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit} _ACEOF @@ -10398,7 +10538,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_DIRENT64 1 _ACEOF @@ -10461,7 +10602,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_struct_stat64}" = "xyes" ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_STRUCT_STAT64 1 _ACEOF @@ -10524,7 +10666,8 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "x${tcl_cv_type_off64_t}" = "xyes" ; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF @@ -10575,7 +10718,8 @@ echo "${ECHO_T}yes (standard debugging)" >&6 if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then - cat >>confdefs.h <<\_ACEOF + +cat >>confdefs.h <<\_ACEOF #define TCL_MEM_DEBUG 1 _ACEOF diff --git a/configure.ac b/configure.ac index 383f9a0..59de4e7 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.ac,v 1.11 2005/07/23 00:31:28 treectrl Exp $ +# RCS: @(#) $Id: configure.ac,v 1.12 2005/08/22 21:24:08 hobbs2 Exp $ #----------------------------------------------------------------------- # Sample configure.in for Tcl Extensions. @@ -122,7 +122,6 @@ else CLEANFILES="pkgIndex.tcl" fi if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then - TK_INCLUDES="${TK_INCLUDES} -I${TK_TOP_DIR_NATIVE}/macosx" TEA_ADD_LIBS([-framework Carbon]) fi AC_SUBST(CLEANFILES) diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4 index ad35d33..66198f3 100644 --- a/tclconfig/tcl.m4 +++ b/tclconfig/tcl.m4 @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.m4,v 1.4 2005/03/25 20:22:20 hobbs2 Exp $ +# RCS: @(#) $Id: tcl.m4,v 1.5 2005/08/22 21:24:08 hobbs2 Exp $ AC_PREREQ(2.50) @@ -356,6 +356,21 @@ AC_DEFUN(TEA_LOAD_TKCONFIG, [ TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} fi + # Ensure windowingsystem is defined + if test "${TEA_PLATFORM}" = "unix" ; then + case ${TK_DEFS} in + *MAC_OSX_TK*) + AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?]) + TEA_WINDOWINGSYSTEM="aqua" + ;; + *) + TEA_WINDOWINGSYSTEM="x11" + ;; + esac + elif test "${TEA_PLATFORM}" = "windows" ; then + TEA_WINDOWINGSYSTEM="windows" + fi + # # eval is required to do the TK_DBGX substitution # @@ -424,7 +439,7 @@ AC_DEFUN(TEA_ENABLE_SHARED, [ else AC_MSG_RESULT([static]) SHARED_BUILD=0 - AC_DEFINE(STATIC_BUILD) + AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?]) fi AC_SUBST(SHARED_BUILD) ]) @@ -464,9 +479,10 @@ AC_DEFUN(TEA_ENABLE_THREADS, [ if test "${TEA_PLATFORM}" != "windows" ; then # We are always OK on Windows, so check what this platform wants. - AC_DEFINE(USE_THREAD_ALLOC) - AC_DEFINE(_REENTRANT) - AC_DEFINE(_THREAD_SAFE) + AC_DEFINE(USE_THREAD_ALLOC, 1, + [Do we want to use the threaded memory allocator?]) + AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) + AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?]) AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no) if test "$tcl_ok" = "no"; then # Check a little harder for __pthread_mutex_init in the @@ -520,7 +536,7 @@ AC_DEFUN(TEA_ENABLE_THREADS, [ # Do checking message here to not mess up interleaved configure output AC_MSG_CHECKING([for building with threads]) if test "${TCL_THREADS}" = "1"; then - AC_DEFINE(TCL_THREADS) + AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?]) #LIBS="$LIBS $THREADS_LIBS" AC_MSG_RESULT([yes]) else @@ -605,7 +621,7 @@ AC_DEFUN(TEA_ENABLE_SYMBOLS, [ AC_SUBST(LDFLAGS_DEFAULT) if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then - AC_DEFINE(TCL_MEM_DEBUG) + AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?]) fi if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then @@ -656,7 +672,7 @@ AC_DEFUN(TEA_ENABLE_LANGINFO, [ langinfo_ok="no (could not compile with nl_langinfo)"; fi if test "$langinfo_ok" = "yes"; then - AC_DEFINE(HAVE_LANGINFO) + AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?]) fi fi AC_MSG_RESULT([$langinfo_ok]) @@ -952,10 +968,10 @@ dnl AC_CHECK_TOOL(AR, ar, :) defs="${defs} _DLL" fi for i in $defs ; do - AC_DEFINE_UNQUOTED($i) + AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i) done - AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION) - AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION) + AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version]) + AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version]) CFLAGS_DEBUG="-nologo -Zi -Od" CFLAGS_OPTIMIZE="-nologo -Ox" lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'` @@ -1083,7 +1099,7 @@ dnl AC_CHECK_TOOL(AR, ar, :) AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no) if test $libbsd = yes; then MATH_LIBS="$MATH_LIBS -lbsd" - AC_DEFINE(USE_DELTA_FOR_TZ) + AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?]) fi ;; BeOS*) @@ -1124,7 +1140,7 @@ dnl AC_CHECK_TOOL(AR, ar, :) ;; HP-UX-*.11.*) # Use updated header definitions where possible - AC_DEFINE(_XOPEN_SOURCE_EXTENDED) + AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?]) SHLIB_SUFFIX=".sl" AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no) @@ -1418,16 +1434,32 @@ dnl AC_CHECK_TOOL(AR, ar, :) esac ;; Darwin-*) + CFLAGS_OPTIMIZE="-Os" SHLIB_CFLAGS="-fno-common" SHLIB_LD="cc -dynamiclib \${LDFLAGS}" + AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [ + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module" + AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no) + LDFLAGS=$hold_ldflags]) + if test $tcl_cv_ld_single_module = yes; then + SHLIB_LD="${SHLIB_LD} -Wl,-single_module" + fi SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".dylib" DL_OBJS="tclLoadDyld.o" DL_LIBS="" - LDFLAGS="$LDFLAGS -prebind -Wl,-search_paths_first" + LDFLAGS="$LDFLAGS -prebind" + AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [ + hold_ldflags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no) + LDFLAGS=$hold_ldflags]) + if test $tcl_cv_ld_search_paths_first = yes; then + LDFLAGS="$LDFLAGS -Wl,-search_paths_first" + fi LD_SEARCH_FLAGS="" LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" - CFLAGS_OPTIMIZE="-Os" ;; NEXTSTEP-*) SHLIB_CFLAGS="" @@ -1439,8 +1471,9 @@ dnl AC_CHECK_TOOL(AR, ar, :) LD_SEARCH_FLAGS="" ;; OS/390-*) - CFLAGS_OPTIMIZE="" # Optimizer is buggy - AC_DEFINE(_OE_SOCKETS) # needed in sys/socket.h + 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 @@ -1571,8 +1604,9 @@ dnl AC_CHECK_TOOL(AR, ar, :) # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. - AC_DEFINE(_REENTRANT) - AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) + AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) + AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, + [Do we really want to follow the standard? Yes we do!]) SHLIB_CFLAGS="-KPIC" @@ -1596,8 +1630,9 @@ dnl AC_CHECK_TOOL(AR, ar, :) # Note: If _REENTRANT isn't defined, then Solaris # won't define thread-safe library routines. - AC_DEFINE(_REENTRANT) - AC_DEFINE(_POSIX_PTHREAD_SEMANTICS) + AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?]) + AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, + [Do we really want to follow the standard? Yes we do!]) SHLIB_CFLAGS="-KPIC" @@ -1726,7 +1761,8 @@ dnl AC_CHECK_TOOL(AR, ar, :) ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT([$tcl_ok]) if test $tcl_ok = usable; then - AC_DEFINE(USE_SYS_EXEC_H) + AC_DEFINE(USE_SYS_EXEC_H, 1, + [Should we use when doing dynamic loading?]) else AC_MSG_CHECKING([a.out.h]) AC_TRY_COMPILE([#include ],[ @@ -1743,7 +1779,8 @@ dnl AC_CHECK_TOOL(AR, ar, :) ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT([$tcl_ok]) if test $tcl_ok = usable; then - AC_DEFINE(USE_A_OUT_H) + AC_DEFINE(USE_A_OUT_H, 1, + [Should we use when doing dynamic loading?]) else AC_MSG_CHECKING([sys/exec_aout.h]) AC_TRY_COMPILE([#include ],[ @@ -1760,7 +1797,8 @@ dnl AC_CHECK_TOOL(AR, ar, :) ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT([$tcl_ok]) if test $tcl_ok = usable; then - AC_DEFINE(USE_SYS_EXEC_AOUT_H) + AC_DEFINE(USE_SYS_EXEC_AOUT_H, 1, + [Should we use when doing dynamic loading?]) else DL_OBJS="" fi @@ -1962,9 +2000,9 @@ int main() { }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none) fi]) case $tcl_cv_api_serial in - termios) AC_DEFINE(USE_TERMIOS);; - termio) AC_DEFINE(USE_TERMIO);; - sgtty) AC_DEFINE(USE_SGTTY);; + termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);; + termio) AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);; + sgtty) AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);; esac AC_MSG_RESULT([$tcl_cv_api_serial]) ]) @@ -2003,6 +2041,7 @@ int main() { AC_DEFUN(TEA_MISSING_POSIX_HEADERS, [ AC_MSG_CHECKING([dirent.h]) + AC_CACHE_VAL(tcl_cv_dirent_h, AC_TRY_LINK([#include #include ], [ #ifndef _POSIX_SOURCE @@ -2022,24 +2061,25 @@ d = opendir("foobar"); entryPtr = readdir(d); p = entryPtr->d_name; closedir(d); -], tcl_ok=yes, tcl_ok=no) +], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)) - if test $tcl_ok = no; then - AC_DEFINE(NO_DIRENT_H) + if test $tcl_cv_dirent_h = no; then + AC_DEFINE(NO_DIRENT_H, 1, [Do we have ?]) fi AC_MSG_RESULT([$tcl_ok]) - AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)]) - AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)]) - AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)]) + AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have ?])]) + AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have ?])]) + AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have ?])]) AC_CHECK_HEADER(limits.h, - [AC_DEFINE(HAVE_LIMITS_H)], [AC_DEFINE(NO_LIMITS_H)]) + [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have ?])], + [AC_DEFINE(NO_LIMITS_H, 1, [Do we have ?])]) AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0) AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0) if test $tcl_ok = 0; then - AC_DEFINE(NO_STDLIB_H) + AC_DEFINE(NO_STDLIB_H, 1, [Do we have ?]) fi AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0) AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0) @@ -2049,11 +2089,11 @@ closedir(d); # set and why. if test $tcl_ok = 0; then - AC_DEFINE(NO_STRING_H) + AC_DEFINE(NO_STRING_H, 1, [Do we have ?]) fi - AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)]) - AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)]) + AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have ?])]) + AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have ?])]) # OS/390 lacks sys/param.h (and doesn't need it, by chance). AC_HAVE_HEADERS(sys/param.h) @@ -2088,18 +2128,7 @@ closedir(d); AC_DEFUN(TEA_PATH_X, [ if test "${TEA_PLATFORM}" = "unix" ; then - case ${TK_DEFS} in - *MAC_OSX_TK*) - AC_DEFINE(MAC_OSX_TK) - TEA_WINDOWINGSYSTEM="aqua" - ;; - *) - TEA_PATH_UNIX_X - TEA_WINDOWINGSYSTEM="x11" - ;; - esac - elif test "${TEA_PLATFORM}" = "windows" ; then - TEA_WINDOWINGSYSTEM="windows" + TEA_PATH_UNIX_X fi ]) @@ -2222,15 +2251,15 @@ AC_DEFUN(TEA_BLOCKING_STYLE, [ # code (JO, 5/31/97). OSF*) - AC_DEFINE(USE_FIONBIO) + AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) AC_MSG_RESULT([FIONBIO]) ;; SunOS-4*) - AC_DEFINE(USE_FIONBIO) + AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) AC_MSG_RESULT([FIONBIO]) ;; ULTRIX-4.*) - AC_DEFINE(USE_FIONBIO) + AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?]) AC_MSG_RESULT([FIONBIO]) ;; *) @@ -2271,7 +2300,7 @@ AC_DEFUN(TEA_TIME_HANDLER, [ tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)) AC_MSG_RESULT([$tcl_cv_member_tm_tzadj]) if test $tcl_cv_member_tm_tzadj = yes ; then - AC_DEFINE(HAVE_TM_TZADJ) + AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?]) fi AC_MSG_CHECKING([tm_gmtoff in struct tm]) @@ -2280,7 +2309,7 @@ AC_DEFUN(TEA_TIME_HANDLER, [ tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)) AC_MSG_RESULT([$tcl_cv_member_tm_gmtoff]) if test $tcl_cv_member_tm_gmtoff = yes ; then - AC_DEFINE(HAVE_TM_GMTOFF) + AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?]) fi # @@ -2296,7 +2325,7 @@ AC_DEFUN(TEA_TIME_HANDLER, [ tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)) AC_MSG_RESULT([$tcl_cv_timezone_long]) if test $tcl_cv_timezone_long = yes ; then - AC_DEFINE(HAVE_TIMEZONE_VAR) + AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) else # # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. @@ -2310,7 +2339,7 @@ AC_DEFUN(TEA_TIME_HANDLER, [ tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)) AC_MSG_RESULT([$tcl_cv_timezone_time]) if test $tcl_cv_timezone_time = yes ; then - AC_DEFINE(HAVE_TIMEZONE_VAR) + AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?]) fi fi ]) @@ -2339,6 +2368,7 @@ AC_DEFUN(TEA_BUGGY_STRTOD, [ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0) if test "$tcl_strtod" = 1; then AC_MSG_CHECKING([for Solaris2.4/Tru64 strtod bugs]) + AC_CACHE_VAL(tcl_cv_strtod_buggy,[ AC_TRY_RUN([ extern double strtod(); int main() @@ -2355,15 +2385,15 @@ AC_DEFUN(TEA_BUGGY_STRTOD, [ exit(1); } exit(0); - }], tcl_ok=1, tcl_ok=0, tcl_ok=0) - if test "$tcl_ok" = 1; then + }], tcl_cv_strtod_buggy=1, tcl_cv_strtod_buggy=0, tcl_cv_strtod_buggy=0)]) + if test "$tcl_cv_strtod_buggy" = 1; then AC_MSG_RESULT([ok]) else AC_MSG_RESULT([buggy]) #LIBOBJS="$LIBOBJS fixstrtod.o" AC_LIBOBJ([fixstrtod]) USE_COMPAT=1 - AC_DEFINE(strtod, fixstrtod) + AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?]) fi fi ]) @@ -2412,7 +2442,8 @@ AC_DEFUN(TEA_TCL_LINK_LIBS, [ #-------------------------------------------------------------------- AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"]) - AC_CHECK_HEADER(net/errno.h, AC_DEFINE(HAVE_NET_ERRNO_H)) + AC_CHECK_HEADER(net/errno.h, [ + AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have ?])]) #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. @@ -2479,7 +2510,7 @@ AC_DEFUN(TEA_TCL_EARLY_FLAG,[ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no))) if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then - AC_DEFINE($1) + AC_DEFINE($1, 1, [Add the ]$1[ flag when building]) tcl_flags="$tcl_flags $1" fi ]) @@ -2531,7 +2562,7 @@ AC_DEFUN(TEA_TCL_64BIT_FLAGS, [ 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) + AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?]) AC_MSG_RESULT([using long]) elif test "${tcl_cv_type_64bit}" = "__int64" \ -a "${TEA_PLATFORM}" = "windows" ; then @@ -2539,7 +2570,8 @@ AC_DEFUN(TEA_TCL_64BIT_FLAGS, [ # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER* AC_MSG_RESULT([using Tcl header defaults]) else - AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}) + AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit}, + [What type should be used to define wide integers?]) AC_MSG_RESULT([${tcl_cv_type_64bit}]) # Now check for auxiliary declarations @@ -2549,7 +2581,7 @@ AC_DEFUN(TEA_TCL_64BIT_FLAGS, [ #include ],[struct dirent64 p;], tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)]) if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then - AC_DEFINE(HAVE_STRUCT_DIRENT64) + AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in ?]) fi AC_MSG_RESULT([${tcl_cv_struct_dirent64}]) @@ -2559,7 +2591,7 @@ AC_DEFUN(TEA_TCL_64BIT_FLAGS, [ ], tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)]) if test "x${tcl_cv_struct_stat64}" = "xyes" ; then - AC_DEFINE(HAVE_STRUCT_STAT64) + AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in ?]) fi AC_MSG_RESULT([${tcl_cv_struct_stat64}]) @@ -2569,7 +2601,7 @@ AC_DEFUN(TEA_TCL_64BIT_FLAGS, [ ], tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)]) if test "x${tcl_cv_type_off64_t}" = "xyes" ; then - AC_DEFINE(HAVE_TYPE_OFF64_T) + AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in ?]) fi AC_MSG_RESULT([${tcl_cv_type_off64_t}]) fi @@ -3201,31 +3233,23 @@ AC_DEFUN(TEA_LIB_SPEC, [ AC_DEFUN(TEA_PRIVATE_TCL_HEADERS, [ AC_MSG_CHECKING([for Tcl private include files]) + TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}` + TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\" + TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\" + TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\" + TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\" + TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\" + TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\" + TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\" + if test "${TEA_PLATFORM}" = "windows"; then - TCL_TOP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}`\" - TCL_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/generic`\" - TCL_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/unix`\" - TCL_WIN_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/win`\" - TCL_BMAP_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/bitmaps`\" - TCL_TOOL_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/tools`\" - TCL_COMPAT_DIR_NATIVE=\"`${CYGPATH} ${TCL_SRC_DIR}/compat`\" TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE} - - TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" else - TCL_TOP_DIR_NATIVE='$(TCL_SRC_DIR)' - TCL_GENERIC_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/generic' - TCL_UNIX_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/unix' - TCL_WIN_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/win' - TCL_BMAP_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/bitmaps' - TCL_TOOL_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/tools' - TCL_COMPAT_DIR_NATIVE='${TCL_TOP_DIR_NATIVE}/compat' TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE} - - # substitute these in "relaxed" so that TCL_INCLUDES still works - # without requiring the other vars to be defined in the Makefile - eval "TCL_INCLUDES=\"-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}\"" fi + # We want to ensure these are substitured so as not to require + # any *_NATIVE vars be defined in the Makefile + TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}" AC_SUBST(TCL_TOP_DIR_NATIVE) AC_SUBST(TCL_GENERIC_DIR_NATIVE) @@ -3332,25 +3356,26 @@ AC_DEFUN(TEA_PUBLIC_TCL_HEADERS, [ AC_DEFUN(TEA_PRIVATE_TK_HEADERS, [ AC_MSG_CHECKING([for Tk private include files]) + TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}` + TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\" + TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\" + TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\" + TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\" + TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\" if test "${TEA_PLATFORM}" = "windows"; then - TK_TOP_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}`\" - TK_UNIX_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/unix`\" - TK_WIN_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/win`\" - TK_GENERIC_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/generic`\" - TK_XLIB_DIR_NATIVE=\"`${CYGPATH} ${TK_SRC_DIR}/xlib`\" TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE} - - TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE} -I${TK_XLIB_DIR_NATIVE}" else - TK_TOP_DIR_NATIVE='${TK_SRC_DIR}' - TK_GENERIC_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/generic' - TK_UNIX_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/unix' - TK_WIN_DIR_NATIVE='${TK_TOP_DIR_NATIVE}/win' TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE} - - # substitute these in "relaxed" so that TK_INCLUDES still works - # without requiring the other vars to be defined in the Makefile - eval "TK_INCLUDES=\"-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}\"" + fi + # We want to ensure these are substitured so as not to require + # any *_NATIVE vars be defined in the Makefile + TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}" + if test "${TEA_WINDOWINGSYSTEM}" = "windows" \ + -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then + TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}" + fi + if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then + TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx" fi AC_SUBST(TK_TOP_DIR_NATIVE) @@ -3437,7 +3462,8 @@ AC_DEFUN(TEA_PUBLIC_TK_HEADERS, [ AC_SUBST(TK_INCLUDES) - if test "${TEA_PLATFORM}" = "windows" ; then + if test "${TEA_WINDOWINGSYSTEM}" = "windows" \ + -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then # On Windows, we need the X compat headers AC_MSG_CHECKING([for X11 header files]) if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then -- cgit v0.12