From 034bd13a3cd5781c916ced37c764a6634e458499 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 24 Jun 2020 13:05:47 +0000 Subject: Fix [9080d6a871]: Build fix for tcl on macOS on Apple Silicon --- .fossil-settings/ignore-glob | 10 ++++++++++ .gitignore | 2 ++ unix/configure | 3 +++ unix/configure.in | 2 ++ unix/tcl.m4 | 6 +++++- unix/tclConfig.h.in | 40 +++++++++------------------------------- 6 files changed, 31 insertions(+), 32 deletions(-) diff --git a/.fossil-settings/ignore-glob b/.fossil-settings/ignore-glob index 62a7a5a..eca9bcd 100644 --- a/.fossil-settings/ignore-glob +++ b/.fossil-settings/ignore-glob @@ -11,6 +11,7 @@ *.sl *.so */Makefile +*/autom4te.cache */config.cache */config.log */config.status @@ -40,10 +41,19 @@ libtommath/etc/* libtommath/demo/* libtommath/*.out libtommath/*.tex +macosx/configure unix/autoMkindex.tcl unix/dltest.marker +unix/dltest/*.bundle +unix/dltest/*.dll +unix/dltest/*.dylib +unix/dltest/*.o +unix/dltest/*.sl +unix/dltest/*.so unix/tcl.pc unix/tclIndex +unix/Tcl-Info.plist +unix/Tclsh-Info.plist unix/pkgs/* win/Debug* win/Release* diff --git a/.gitignore b/.gitignore index 3f6ce0c..701419b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ .fslckout Makefile Tcl-Info.plist +autom4te.cache config.cache config.log config.status @@ -46,6 +47,7 @@ libtommath/etc/* libtommath/demo/* libtommath/*.out libtommath/*.tex +macosx/configure unix/autoMkindex.tcl unix/dltest.marker unix/tcl.pc diff --git a/unix/configure b/unix/configure index b02525b..a900a70 100755 --- a/unix/configure +++ b/unix/configure @@ -15050,6 +15050,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main() { + #include extern double strtod(); char *term, *string = " +69"; exit(strtod(string,&term) != 69 || term != string+4); @@ -15220,6 +15221,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include extern double strtod(); int main() { char *infString="Inf", *nanString="NaN", *spaceString=" "; @@ -16607,6 +16609,7 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include + #include #define OURVAR "havecopy=yes" int main (int argc, char *argv[]) { diff --git a/unix/configure.in b/unix/configure.in index c110c21..a4ec925 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -298,6 +298,7 @@ SC_TCL_CHECK_BROKEN_FUNC(strtoul, [ #-------------------------------------------------------------------- SC_TCL_CHECK_BROKEN_FUNC(strtod, [ + #include extern double strtod(); char *term, *string = " +69"; exit(strtod(string,&term) != 69 || term != string+4); @@ -453,6 +454,7 @@ fi AC_CACHE_CHECK([for a putenv() that copies the buffer], tcl_cv_putenv_copy, [ AC_TRY_RUN([ #include + #include #define OURVAR "havecopy=yes" int main (int argc, char *argv[]) { diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 0dd4d77..4c96316 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -2596,6 +2596,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [ if test "$tcl_strtod" = 1; then AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[ AC_TRY_RUN([ + #include extern double strtod(); int main() { char *infString="Inf", *nanString="NaN", *spaceString=" "; @@ -2882,7 +2883,10 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ AC_CHECK_FUNC($1, tcl_ok=1, tcl_ok=0) if test ["$tcl_ok"] = 1; then AC_CACHE_CHECK([proper ]$1[ implementation], [tcl_cv_]$1[_unbroken], - AC_TRY_RUN([[int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok, + AC_TRY_RUN([[ +#include +#include +int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok, [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=unknown)) if test ["$tcl_cv_]$1[_unbroken"] = "ok"; then tcl_ok=1 diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index c02adc5..0879c7a 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -4,9 +4,6 @@ #ifndef _TCLCONFIG #define _TCLCONFIG -/* Define if building universal (internal helper macro) */ -#undef AC_APPLE_UNIVERSAL_BUILD - /* Is pthread_attr_get_np() declared in ? */ #undef ATTRGETNP_NOT_DECLARED @@ -40,17 +37,6 @@ /* Is the cpuid instruction usable? */ #undef HAVE_CPUID -/* Define to 1 if you have the declaration of `gethostbyaddr_r', and to 0 if - you don't. */ -#undef HAVE_DECL_GETHOSTBYADDR_R - -/* Define to 1 if you have the declaration of `gethostbyname_r', and to 0 if - you don't. */ -#undef HAVE_DECL_GETHOSTBYNAME_R - -/* Is 'DIR64' in ? */ -#undef HAVE_DIR64 - /* Do we have fts functions? */ #undef HAVE_FTS @@ -207,13 +193,16 @@ /* Is 'struct dirent64' in ? */ #undef HAVE_STRUCT_DIRENT64 +/* Is 'DIR64' in ? */ +#undef HAVE_DIR64 + /* Is 'struct stat64' in ? */ #undef HAVE_STRUCT_STAT64 -/* Define to 1 if `st_blksize' is a member of `struct stat'. */ +/* Define to 1 if `st_blksize' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `st_blocks' is a member of `struct stat'. */ +/* Define to 1 if `st_blocks' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLOCKS /* Define to 1 if you have the header file. */ @@ -348,9 +337,6 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME -/* Define to the home page for this package. */ -#undef PACKAGE_URL - /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -444,17 +430,9 @@ /* Should we use vfork() instead of fork()? */ #undef USE_VFORK -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -# undef WORDS_BIGENDIAN -# endif -#endif +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN /* Are Darwin SUSv3 extensions available? */ #undef _DARWIN_C_SOURCE @@ -509,7 +487,7 @@ /* Define to `int' if does not define. */ #undef pid_t -/* Define to `unsigned int' if does not define. */ +/* Define to `unsigned' if does not define. */ #undef size_t /* Define as int if socklen_t is not available */ -- cgit v0.12