diff options
Diffstat (limited to 'unix/configure')
-rwxr-xr-x | unix/configure | 250 |
1 files changed, 240 insertions, 10 deletions
diff --git a/unix/configure b/unix/configure index 63f35d3..dfd7cc2 100755 --- a/unix/configure +++ b/unix/configure @@ -3139,6 +3139,13 @@ cat >>confdefs.h <<\_ACEOF #define _REENTRANT 1 _ACEOF + if test "`uname -s`" = "SunOS" ; then + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + fi cat >>confdefs.h <<\_ACEOF #define _THREAD_SAFE 1 @@ -3886,6 +3893,129 @@ _ACEOF fi done + if test "x$ac_cv_func_readdir_r" = "xyes"; then + echo "$as_me:$LINENO: checking how many args readdir_r takes" >&5 +echo $ECHO_N "checking how many args readdir_r takes... $ECHO_C" >&6 + # IRIX 5.3 has a 2 arg version of readdir_r + # while other systems have a 3 arg version. + if test "${tcl_cv_two_arg_readdir_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <sys/types.h> +#ifdef NO_DIRENT_H +# include <sys/dir.h> /* logic from tcl/compat/dirent.h * +# define dirent direct * */ +#else +# include <dirent.h> +#endif + +int +main () +{ +readdir_r(NULL, NULL); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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_two_arg_readdir_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_two_arg_readdir_r=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi + + if test "${tcl_cv_three_arg_readdir_r+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <sys/types.h> +#ifdef NO_DIRENT_H +# include <sys/dir.h> /* logic from tcl/compat/dirent.h * +# define dirent direct * */ +#else +# include <dirent.h> +#endif + +int +main () +{ +readdir_r(NULL, NULL, NULL); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (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_three_arg_readdir_r=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +tcl_cv_three_arg_readdir_r=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi + + if test "x$tcl_cv_two_arg_readdir_r" = "xyes" ; then + echo "$as_me:$LINENO: result: 2" >&5 +echo "${ECHO_T}2" >&6 + cat >>confdefs.h <<\_ACEOF +#define HAVE_TWO_ARG_READDIR_R 1 +_ACEOF + + elif test "x$tcl_cv_three_arg_readdir_r" = "xyes" ; then + echo "$as_me:$LINENO: result: 3" >&5 +echo "${ECHO_T}3" >&6 + cat >>confdefs.h <<\_ACEOF +#define HAVE_THREE_ARG_READDIR_R 1 +_ACEOF + + else + { { echo "$as_me:$LINENO: error: unknown number of args for readdir_r" >&5 +echo "$as_me: error: unknown number of args for readdir_r" >&2;} + { (exit 1); exit 1; }; } + fi + fi else TCL_THREADS=0 echo "$as_me:$LINENO: result: no (default)" >&5 @@ -4160,6 +4290,10 @@ fi do64bit_ok=no 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] + # is disabled by the user. [Bug 1016796] + LDFLAGS_ARCH="" TCL_EXPORT_FILE_SUFFIX="" UNSHARED_LIB_SUFFIX="" TCL_TRIM_DOTS='`echo ${VERSION} | tr -d .`' @@ -4168,7 +4302,7 @@ fi CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE=-O if test "$GCC" = "yes" ; then - CFLAGS_WARNING="-Wall -Wno-implicit-int -fno-strict-aliasing" + CFLAGS_WARNING="-Wall -Wno-implicit-int" else CFLAGS_WARNING="" fi @@ -4248,7 +4382,7 @@ echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;} else do64bit_ok=yes CFLAGS="$CFLAGS -q64" - LDFLAGS="$LDFLAGS -q64" + LDFLAGS_ARCH="-q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" @@ -4310,7 +4444,7 @@ echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;} else do64bit_ok=yes CFLAGS="$CFLAGS -q64" - LDFLAGS="$LDFLAGS -q64" + LDFLAGS_ARCH="-q64" RANLIB="${RANLIB} -X64" AR="${AR} -X64" SHLIB_LD_FLAGS="-b64" @@ -4619,7 +4753,7 @@ echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;} else do64bit_ok=yes CFLAGS="$CFLAGS +DD64" - LDFLAGS="$LDFLAGS +DD64" + LDFLAGS_ARCH="+DD64" fi fi ;; @@ -4764,7 +4898,7 @@ echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;} do64bit_ok=yes SHLIB_LD="ld -64 -shared -rdata_shared" CFLAGS="$CFLAGS -64" - LDFLAGS="$LDFLAGS -64" + LDFLAGS_ARCH="-64" fi fi ;; @@ -5638,10 +5772,10 @@ echo "$as_me: WARNING: \"64bit mode not supported with GCC on $system\"" >&2;} do64bit_ok=yes if test "$do64bitVIS" = "yes" ; then CFLAGS="$CFLAGS -xarch=v9a" - LDFLAGS="$LDFLAGS -xarch=v9a" + LDFLAGS_ARCH="-xarch=v9a" else CFLAGS="$CFLAGS -xarch=v9" - LDFLAGS="$LDFLAGS -xarch=v9" + LDFLAGS_ARCH="-xarch=v9" fi fi else @@ -5978,6 +6112,7 @@ fi; LD_SEARCH_FLAGS="" BUILD_DLTEST="" fi + LDFLAGS="$LDFLAGS $LDFLAGS_ARCH" # If we're running gcc, then change the C flags for compiling shared # libraries to the right flags for gcc, instead of those for the @@ -6079,6 +6214,11 @@ fi; +cat >>confdefs.h <<_ACEOF +#define TCL_SHLIB_EXT "${SHLIB_SUFFIX}" +_ACEOF + + @@ -6562,6 +6702,91 @@ _ACEOF echo "$as_me:$LINENO: result: ${tcl_cv_struct_stat64}" >&5 echo "${ECHO_T}${tcl_cv_struct_stat64}" >&6 + + +for ac_func in open64 lseek64 +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + echo "$as_me:$LINENO: checking for off64_t" >&5 echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 if test "${tcl_cv_type_off64_t+set}" = set; then @@ -6607,15 +6832,20 @@ fi rm -f conftest.$ac_objext conftest.$ac_ext fi - if test "x${tcl_cv_type_off64_t}" = "xyes" ; then + if test "x${tcl_cv_type_off64_t}" = "xyes" && \ + test "x${ac_cv_func_lseek64}" = "xyes" && \ + test "x${ac_cv_func_open64}" = "xyes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_TYPE_OFF64_T 1 _ACEOF + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 fi - echo "$as_me:$LINENO: result: ${tcl_cv_type_off64_t}" >&5 -echo "${ECHO_T}${tcl_cv_type_off64_t}" >&6 fi #------------------------------------------------------------------------ |