From 2fc35bb9ba41c64cd39412f33a06ce3f97ae52bf Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 18 Dec 2020 11:35:15 +0000 Subject: More update necessary for autoconf 2.70. This fixes the determination of intptr_t/uintptr_t --- unix/configure | 96 ++++--------------------------------------------------- unix/configure.ac | 92 ++++++++++++++++++++-------------------------------- unix/tcl.m4 | 44 ++++++++++++------------- win/configure | 83 +++++++++++++++++++++++++++++++++++++++++++++++ win/configure.ac | 17 ++++++---- win/tcl.m4 | 10 +++--- 6 files changed, 162 insertions(+), 180 deletions(-) diff --git a/unix/configure b/unix/configure index 7343380..ce6b6de 100755 --- a/unix/configure +++ b/unix/configure @@ -7363,108 +7363,26 @@ printf "%s\n" "#define gid_t int" >>confdefs.h fi -ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" +ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" " +#include + +" if test "x$ac_cv_type_intptr_t" = xyes then : - printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pointer-size signed integer type" >&5 -printf %s "checking for pointer-size signed integer type... " >&6; } -if test ${tcl_cv_intptr_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - for tcl_cv_intptr_t in "int" "long" "long long" none; do - if test "$tcl_cv_intptr_t" != none; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main (void) -{ -static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_intptr_t))]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - tcl_ok=yes -else $as_nop - tcl_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - test "$tcl_ok" = yes && break; fi - done -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_intptr_t" >&5 -printf "%s\n" "$tcl_cv_intptr_t" >&6; } - if test "$tcl_cv_intptr_t" != none; then - -printf "%s\n" "#define intptr_t $tcl_cv_intptr_t" >>confdefs.h - - fi fi +ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" " +#include -ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" +" if test "x$ac_cv_type_uintptr_t" = xyes then : - printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h -else $as_nop - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pointer-size unsigned integer type" >&5 -printf %s "checking for pointer-size unsigned integer type... " >&6; } -if test ${tcl_cv_uintptr_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \ - none; do - if test "$tcl_cv_uintptr_t" != none; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main (void) -{ -static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($tcl_cv_uintptr_t))]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - tcl_ok=yes -else $as_nop - tcl_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - test "$tcl_ok" = yes && break; fi - done -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_uintptr_t" >&5 -printf "%s\n" "$tcl_cv_uintptr_t" >&6; } - if test "$tcl_cv_uintptr_t" != none; then - -printf "%s\n" "#define uintptr_t $tcl_cv_uintptr_t" >>confdefs.h - - fi fi diff --git a/unix/configure.ac b/unix/configure.ac index d861aa1..aa30233 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -4,7 +4,7 @@ dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. AC_INIT([tk],[8.7]) -AC_PREREQ(2.69) +AC_PREREQ([2.70]) dnl This is only used when included from macosx/configure.ac m4_ifdef([SC_USE_CONFIG_HEADERS], [ @@ -92,7 +92,7 @@ if test -z "$no_pipe" && test -n "$GCC"; then AC_CACHE_CHECK([if the compiler understands -pipe], tcl_cv_cc_pipe, [ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe" - AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_cc_pipe=yes],[tcl_cv_cc_pipe=no]) CFLAGS=$hold_cflags]) if test $tcl_cv_cc_pipe = yes; then CFLAGS="$CFLAGS -pipe" @@ -159,8 +159,7 @@ fi #-------------------------------------------------------------------- AC_CACHE_CHECK([for fd_set in sys/types], tcl_cv_type_fd_set, [ - AC_TRY_COMPILE([#include ],[fd_set readMask, writeMask;], - tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no)]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[fd_set readMask, writeMask;]])],[tcl_cv_type_fd_set=yes],[tcl_cv_type_fd_set=no])]) tk_ok=$tcl_cv_type_fd_set if test $tk_ok = no; then AC_CACHE_CHECK([for fd_mask in sys/select], tcl_cv_grep_fd_mask, [ @@ -180,7 +179,20 @@ fi #------------------------------------------------------------------------------ AC_CHECK_HEADERS(sys/time.h) -AC_HEADER_TIME +m4_warn([obsolete], +[Update your code to rely only on HAVE_SYS_TIME_H, +then remove this warning and the obsolete code below it. +All current systems provide time.h; it need not be checked for. +Not all systems provide sys/time.h, but those that do, all allow +you to include it and time.h simultaneously.])dnl +AC_CHECK_HEADERS_ONCE([sys/time.h]) +# Obsolete code to be removed. +if test $ac_cv_header_sys_time_h = yes; then + AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both + and . This macro is obsolete.]) +fi +# End of obsolete code. + #-------------------------------------------------------------------- # Check for various typedefs and provide substitutes if @@ -192,46 +204,16 @@ AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T -AC_CHECK_TYPE([intptr_t], [ - AC_DEFINE([HAVE_INTPTR_T], 1, [Do we have the intptr_t type?])], [ - AC_CACHE_CHECK([for pointer-size signed integer type], tcl_cv_intptr_t, [ - for tcl_cv_intptr_t in "int" "long" "long long" none; do - if test "$tcl_cv_intptr_t" != none; then - AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT], - [[sizeof (void *) <= sizeof ($tcl_cv_intptr_t)]])], - [tcl_ok=yes], [tcl_ok=no]) - test "$tcl_ok" = yes && break; fi - done]) - if test "$tcl_cv_intptr_t" != none; then - AC_DEFINE_UNQUOTED([intptr_t], [$tcl_cv_intptr_t], [Signed integer - type wide enough to hold a pointer.]) - fi -]) -AC_CHECK_TYPE([uintptr_t], [ - AC_DEFINE([HAVE_UINTPTR_T], 1, [Do we have the uintptr_t type?])], [ - AC_CACHE_CHECK([for pointer-size unsigned integer type], tcl_cv_uintptr_t, [ - for tcl_cv_uintptr_t in "unsigned int" "unsigned long" "unsigned long long" \ - none; do - if test "$tcl_cv_uintptr_t" != none; then - AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT], - [[sizeof (void *) <= sizeof ($tcl_cv_uintptr_t)]])], - [tcl_ok=yes], [tcl_ok=no]) - test "$tcl_ok" = yes && break; fi - done]) - if test "$tcl_cv_uintptr_t" != none; then - AC_DEFINE_UNQUOTED([uintptr_t], [$tcl_cv_uintptr_t], [Unsigned integer - type wide enough to hold a pointer.]) - fi -]) +AC_CHECK_TYPES([intptr_t, uintptr_t],,,[[ +#include +]]) #------------------------------------------- # In OS/390 struct pwd has no pw_gecos field #------------------------------------------- AC_CACHE_CHECK([pw_gecos in struct pwd], tcl_cv_pwd_pw_gecos, [ - AC_TRY_COMPILE([#include ], - [struct passwd pwd; (void)pwd.pw_gecos;], - tcl_cv_pwd_pw_gecos=yes, tcl_cv_pwd_pw_gecos=no)]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[struct passwd pwd; (void)pwd.pw_gecos;]])],[tcl_cv_pwd_pw_gecos=yes],[tcl_cv_pwd_pw_gecos=no])]) if test $tcl_cv_pwd_pw_gecos = yes; then AC_DEFINE(HAVE_PW_GECOS, 1, [Does struct password have a pw_gecos field?]) fi @@ -243,8 +225,7 @@ fi if test "`uname -s`" = "Darwin" ; then AC_MSG_CHECKING([whether to use Aqua]) AC_ARG_ENABLE(aqua, - AC_HELP_STRING([--enable-aqua=yes|no], - [use Aqua windowingsystem on Mac OS X (default: no)]), + AS_HELP_STRING([--enable-aqua=yes|no],[use Aqua windowingsystem on Mac OS X (default: no)]), [tk_aqua=$enableval], [tk_aqua=no]) if test $tk_aqua = yes -o $tk_aqua = cocoa; then tk_aqua=yes @@ -270,8 +251,7 @@ if test "`uname -s`" = "Darwin" ; then done CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include" LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11" - AC_TRY_LINK([#include ], [XrmInitialize();], - tcl_cv_lib_x11_64=yes, tcl_cv_lib_x11_64=no) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[XrmInitialize();]])],[tcl_cv_lib_x11_64=yes],[tcl_cv_lib_x11_64=no]) for v in CFLAGS CPPFLAGS LDFLAGS; do eval $v'="$hold_'$v'"' done]) @@ -290,15 +270,14 @@ if test "`uname -s`" = "Darwin" ; then AC_CACHE_CHECK([if ld accepts -weak-l flag], tcl_cv_ld_weak_l, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-weak-lm" - AC_TRY_LINK([#include ], [double f = sin(1.0);], - tcl_cv_ld_weak_l=yes, tcl_cv_ld_weak_l=no) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[double f = sin(1.0);]])],[tcl_cv_ld_weak_l=yes],[tcl_cv_ld_weak_l=no]) LDFLAGS=$hold_ldflags]) fi AC_CHECK_HEADERS(AvailabilityMacros.h) if test "$ac_cv_header_AvailabilityMacros_h" = yes; then AC_CACHE_CHECK([if weak import is available], tcl_cv_cc_weak_import, [ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1020 @@ -307,8 +286,7 @@ if test "`uname -s`" = "Darwin" ; then #error MAC_OS_X_VERSION_MIN_REQUIRED < 1020 #endif int rand(void) __attribute__((weak_import)); - ], [rand();], - tcl_cv_cc_weak_import=yes, tcl_cv_cc_weak_import=no) + ]], [[rand();]])],[tcl_cv_cc_weak_import=yes],[tcl_cv_cc_weak_import=no]) CFLAGS=$hold_cflags]) if test $tcl_cv_cc_weak_import = yes; then AC_DEFINE(HAVE_WEAK_IMPORT, 1, [Is weak import available?]) @@ -316,7 +294,7 @@ if test "`uname -s`" = "Darwin" ; then AC_CACHE_CHECK([if Darwin SUSv3 extensions are available], tcl_cv_cc_darwin_c_source, [ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror" - AC_TRY_COMPILE([ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 #error __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1050 @@ -326,7 +304,7 @@ if test "`uname -s`" = "Darwin" ; then #endif #define _DARWIN_C_SOURCE 1 #include - ],,tcl_cv_cc_darwin_c_source=yes, tcl_cv_cc_darwin_c_source=no) + ]], [[]])],[tcl_cv_cc_darwin_c_source=yes],[tcl_cv_cc_darwin_c_source=no]) CFLAGS=$hold_cflags]) if test $tcl_cv_cc_darwin_c_source = yes; then AC_DEFINE(_DARWIN_C_SOURCE, 1, @@ -424,15 +402,15 @@ if test -d /usr/include/mit -a $tk_aqua = no; then CFLAGS="$CFLAGS -I/usr/include/mit" tk_oldLibs=$LIBS LIBS="$LIBS -lX11-mit" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include - ], [ + ]], [[ XOpenDisplay(0); - ], [ + ]])],[ AC_MSG_RESULT([yes]) XLIBSW="-lX11-mit" XINCLUDES="-I/usr/include/mit" - ], AC_MSG_RESULT([no])) + ],[AC_MSG_RESULT(no)]) CFLAGS=$tk_oldCFlags LIBS=$tk_oldLibs fi @@ -444,8 +422,7 @@ fi if test $tk_aqua = no; then AC_MSG_CHECKING([whether to use xft]) AC_ARG_ENABLE(xft, - AC_HELP_STRING([--enable-xft], - [use freetype/fontconfig/xft (default: on)]), + AS_HELP_STRING([--enable-xft],[use freetype/fontconfig/xft (default: on)]), [enable_xft=$enableval], [enable_xft="default"]) XFT_CFLAGS="" XFT_LIBS="" @@ -540,8 +517,7 @@ if test $tk_aqua = no; then xss_lib_found=no AC_MSG_CHECKING([whether to try to use XScreenSaver]) AC_ARG_ENABLE(xss, - AC_HELP_STRING([--enable-xss], - [use XScreenSaver for activity timer (default: on)]), + AS_HELP_STRING([--enable-xss],[use XScreenSaver for activity timer (default: on)]), [enable_xss=$enableval], [enable_xss=yes]) if test "$enable_xss" = "no" ; then AC_MSG_RESULT([$enable_xss]) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 01ccead..75cdb85 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -28,9 +28,9 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tcl, - AC_HELP_STRING([--with-tcl], + AS_HELP_STRING([--with-tcl], [directory containing tcl configuration (tclConfig.sh)]), - with_tclconfig="${withval}") + [with_tclconfig="${withval}"]) AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ @@ -161,9 +161,9 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ # we reset no_tk in case something fails here no_tk=true AC_ARG_WITH(tk, - AC_HELP_STRING([--with-tk], + AS_HELP_STRING([--with-tk], [directory containing tk configuration (tkConfig.sh)]), - with_tkconfig="${withval}") + [with_tkconfig="${withval}"]) AC_MSG_CHECKING([for Tk configuration]) AC_CACHE_VAL(ac_cv_c_tkconfig,[ @@ -508,7 +508,7 @@ AC_DEFUN([SC_BUILD_TCLSH], [ AC_DEFUN([SC_ENABLE_SHARED], [ AC_MSG_CHECKING([how to build libraries]) AC_ARG_ENABLE(shared, - AC_HELP_STRING([--enable-shared], + AS_HELP_STRING([--enable-shared], [build and link with shared libraries (default: on)]), [tcl_ok=$enableval], [tcl_ok=yes]) if test "$tcl_ok" = "yes" ; then @@ -543,7 +543,7 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [ if test "`uname -s`" = "Darwin" ; then AC_MSG_CHECKING([how to package libraries]) AC_ARG_ENABLE(framework, - AC_HELP_STRING([--enable-framework], + AS_HELP_STRING([--enable-framework], [package shared libraries in MacOSX frameworks (default: off)]), [enable_framework=$enableval], [enable_framework=no]) if test $enable_framework = yes; then @@ -601,7 +601,7 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [ AC_DEFUN([SC_ENABLE_SYMBOLS], [ AC_MSG_CHECKING([for build with symbols]) AC_ARG_ENABLE(symbols, - AC_HELP_STRING([--enable-symbols], + AS_HELP_STRING([--enable-symbols], [build with debugging symbols (default: off)]), [tcl_ok=$enableval], [tcl_ok=no]) # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT. @@ -660,7 +660,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [ AC_DEFUN([SC_ENABLE_LANGINFO], [ AC_ARG_ENABLE(langinfo, - AC_HELP_STRING([--enable-langinfo], + AS_HELP_STRING([--enable-langinfo], [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]), [langinfo_ok=$enableval], [langinfo_ok=yes]) @@ -712,22 +712,22 @@ AC_DEFUN([SC_ENABLE_LANGINFO], [ AC_DEFUN([SC_CONFIG_MANPAGES], [ AC_MSG_CHECKING([whether to use symlinks for manpages]) AC_ARG_ENABLE(man-symlinks, - AC_HELP_STRING([--enable-man-symlinks], + AS_HELP_STRING([--enable-man-symlinks], [use symlinks for the manpages (default: off)]), - test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks", - enableval="no") + [test "$enableval" != "no" && MAN_FLAGS="$MAN_FLAGS --symlinks"], + [enableval="no"]) AC_MSG_RESULT([$enableval]) AC_MSG_CHECKING([whether to compress the manpages]) AC_ARG_ENABLE(man-compression, - AC_HELP_STRING([--enable-man-compression=PROG], + AS_HELP_STRING([--enable-man-compression=PROG], [compress the manpages with PROG (default: off)]), [case $enableval in yes) AC_MSG_ERROR([missing argument to --enable-man-compression]);; no) ;; *) MAN_FLAGS="$MAN_FLAGS --compress $enableval";; esac], - enableval="no") + [enableval="no"]) AC_MSG_RESULT([$enableval]) if test "$enableval" != "no"; then AC_MSG_CHECKING([for compressed file suffix]) @@ -741,14 +741,14 @@ AC_DEFUN([SC_CONFIG_MANPAGES], [ AC_MSG_CHECKING([whether to add a package name suffix for the manpages]) AC_ARG_ENABLE(man-suffix, - AC_HELP_STRING([--enable-man-suffix=STRING], + AS_HELP_STRING([--enable-man-suffix=STRING], [use STRING as a suffix to manpage file names (default: no, AC_PACKAGE_NAME if enabled without specifying STRING)]), [case $enableval in yes) enableval="AC_PACKAGE_NAME" MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; no) ;; *) MAN_FLAGS="$MAN_FLAGS --suffix $enableval";; esac], - enableval="no") + [enableval="no"]) AC_MSG_RESULT([$enableval]) AC_SUBST(MAN_FLAGS) @@ -884,7 +884,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_MSG_CHECKING([if 64bit support is requested]) AC_ARG_ENABLE(64bit, - AC_HELP_STRING([--enable-64bit], + AS_HELP_STRING([--enable-64bit], [enable 64bit support (default: off)]), [do64bit=$enableval], [do64bit=no]) AC_MSG_RESULT([$do64bit]) @@ -893,7 +893,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_MSG_CHECKING([if 64bit Sparc VIS support is requested]) AC_ARG_ENABLE(64bit-vis, - AC_HELP_STRING([--enable-64bit-vis], + AS_HELP_STRING([--enable-64bit-vis], [enable 64bit Sparc VIS support (default: off)]), [do64bitVIS=$enableval], [do64bitVIS=no]) AC_MSG_RESULT([$do64bitVIS]) @@ -922,7 +922,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_MSG_CHECKING([if rpath support is requested]) AC_ARG_ENABLE(rpath, - AC_HELP_STRING([--disable-rpath], + AS_HELP_STRING([--disable-rpath], [disable rpath support (default: on)]), [doRpath=$enableval], [doRpath=yes]) AC_MSG_RESULT([$doRpath]) @@ -1461,7 +1461,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ PLAT_SRCS='${MAC_OSX_SRCS}' AC_MSG_CHECKING([whether to use CoreFoundation]) AC_ARG_ENABLE(corefoundation, - AC_HELP_STRING([--enable-corefoundation], + AS_HELP_STRING([--enable-corefoundation], [use CoreFoundation API on MacOSX (default: on)]), [tcl_corefoundation=$enableval], [tcl_corefoundation=yes]) AC_MSG_RESULT([$tcl_corefoundation]) @@ -1748,7 +1748,7 @@ dnl # preprocessing tests use only CPPFLAGS. # Step 4: disable dynamic loading if requested via a command-line switch. AC_ARG_ENABLE(load, - AC_HELP_STRING([--enable-load], + AS_HELP_STRING([--enable-load], [allow dynamic loading and "load" command (default: on)]), [tcl_ok=$enableval], [tcl_ok=yes]) AS_IF([test "$tcl_ok" = no], [DL_OBJS=""]) @@ -2436,9 +2436,9 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ AC_DEFUN([SC_TCL_CFG_ENCODING], [ AC_ARG_WITH(encoding, - AC_HELP_STRING([--with-encoding], + AS_HELP_STRING([--with-encoding], [encoding for configuration values (default: utf-8)]), - with_tcencoding=${withval}) + [with_tcencoding=${withval}]) if test x"${with_tcencoding}" != x ; then AC_DEFINE_UNQUOTED(TCL_CFGVAL_ENCODING,"${with_tcencoding}", diff --git a/win/configure b/win/configure index 4f1e552..4332f79 100755 --- a/win/configure +++ b/win/configure @@ -1594,6 +1594,63 @@ printf "%s\n" "$ac_res" >&6; } } # ac_fn_c_check_header_compile +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -2314,6 +2371,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + # The following define is needed when building with Cygwin since newer # versions of autoconf incorrectly set SHELL to /bin/bash instead of # /bin/sh. The bash shell seems to suffer from some strange failures. @@ -3571,6 +3629,7 @@ printf "%s\n" "$ac_cv_path_EGREP" >&6; } + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -4975,6 +5034,30 @@ printf "%s\n" "#define HAVE_CAST_TO_UNION 1" >>confdefs.h +ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" " +#include + +" +if test "x$ac_cv_type_intptr_t" = xyes +then : + +printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h + + +fi +ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" " +#include + +" +if test "x$ac_cv_type_uintptr_t" = xyes +then : + +printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h + + +fi + + #-------------------------------------------------------------------- # man2tcl needs this so that it can use errno.h #-------------------------------------------------------------------- diff --git a/win/configure.ac b/win/configure.ac index 56b8813..72d5b9b 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -3,8 +3,9 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. -AC_INIT(../generic/tk.h) -AC_PREREQ(2.69) +AC_INIT +AC_CONFIG_SRCDIR([../generic/tk.h]) +AC_PREREQ([2.70]) # The following define is needed when building with Cygwin since newer # versions of autoconf incorrectly set SHELL to /bin/bash instead of @@ -43,6 +44,7 @@ fi AC_PROG_CC AC_C_INLINE AC_HEADER_STDC +AC_CHECK_INCLUDES_DEFAULT AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib) @@ -96,6 +98,10 @@ fi SC_CONFIG_CFLAGS +AC_CHECK_TYPES([intptr_t, uintptr_t],,,[[ +#include +]]) + #-------------------------------------------------------------------- # man2tcl needs this so that it can use errno.h #-------------------------------------------------------------------- @@ -108,9 +114,7 @@ AC_SUBST(MAN2TCLFLAGS) #------------------------------------------- AC_CACHE_CHECK([availability of _strtoi64], tcl_cv_strtoi64, [ - AC_TRY_LINK([#include ], - [_strtoi64(0,0,0)], - tcl_cv_strtoi64=yes, tcl_cv_strtoi64=no)]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[_strtoi64(0,0,0)]])],[tcl_cv_strtoi64=yes],[tcl_cv_strtoi64=no])]) if test $tcl_cv_strtoi64 = no; then AC_DEFINE(NO_STRTOI64, 1, [Is _strtoi64 function available?]) fi @@ -295,7 +299,8 @@ AC_SUBST(RC_DEFINE) AC_SUBST(RC_DEFINES) AC_SUBST(RES) -AC_OUTPUT(Makefile tkConfig.sh wish.exe.manifest) +AC_CONFIG_FILES([Makefile tkConfig.sh wish.exe.manifest]) +AC_OUTPUT dnl Local Variables: dnl mode: autoconf; diff --git a/win/tcl.m4 b/win/tcl.m4 index ec1442b..bd5d9fe 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -28,9 +28,9 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tcl, - AC_HELP_STRING([--with-tcl], + AS_HELP_STRING([--with-tcl], [directory containing tcl configuration (tclConfig.sh)]), - with_tclconfig="${withval}") + [with_tclconfig="${withval}"]) AC_MSG_CHECKING([for Tcl configuration]) AC_CACHE_VAL(ac_cv_c_tclconfig,[ @@ -146,9 +146,9 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ # we reset no_tk in case something fails here no_tk=true AC_ARG_WITH(tk, - AC_HELP_STRING([--with-tk], + AS_HELP_STRING([--with-tk], [directory containing tk configuration (tkConfig.sh)]), - with_tkconfig="${withval}") + [with_tkconfig="${withval}"]) AC_MSG_CHECKING([for Tk configuration]) AC_CACHE_VAL(ac_cv_c_tkconfig,[ @@ -1099,7 +1099,7 @@ AC_DEFUN([SC_TCL_CFG_ENCODING], [ AC_DEFUN([SC_EMBED_MANIFEST], [ AC_MSG_CHECKING(whether to embed manifest) AC_ARG_ENABLE(embedded-manifest, - AC_HELP_STRING([--enable-embedded-manifest], + AS_HELP_STRING([--enable-embedded-manifest], [embed manifest if possible (default: yes)]), [embed_ok=$enableval], [embed_ok=yes]) -- cgit v0.12