diff options
author | hobbs <hobbs> | 2004-07-19 20:30:01 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-07-19 20:30:01 (GMT) |
commit | 23b110750cfc4d080d64119fc3b48df02527a094 (patch) | |
tree | 1d645438131cebe453323b4abe6fcaec7fbcf266 /unix/configure.in | |
parent | e588dc1eeed689236f0c555b83ceeb0ae136dc13 (diff) | |
download | tk-23b110750cfc4d080d64119fc3b48df02527a094.zip tk-23b110750cfc4d080d64119fc3b48df02527a094.tar.gz tk-23b110750cfc4d080d64119fc3b48df02527a094.tar.bz2 |
* unix/Makefile.in, unix/tcl.m4: move (C|LD)FLAGS after their
* unix/configure.in, unix/configure: _DEFAULT to allow for env
setting to override m4 switches.
Consolidate header checks to limit redundancy in configure.
(CFLAGS_WARNING): Remove -Wconversion, add -fno-strict-aliasing
for gcc builds (need to suppress 3.x type puning warnings).
(SC_ENABLE_THREADS): Set m4 to force threaded build when built
against a threaded Tcl core.
Reorder configure.in for better 64-bit build configuration,
replacing EXTRA_CFLAGS with CFLAGS. [Bug #874058]
Diffstat (limited to 'unix/configure.in')
-rw-r--r-- | unix/configure.in | 55 |
1 files changed, 20 insertions, 35 deletions
diff --git a/unix/configure.in b/unix/configure.in index 92fe669..654822c 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -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 Tk installation dnl to configure the system for the local environment. # -# RCS: @(#) $Id: configure.in,v 1.83.2.9 2004/07/13 19:32:05 hobbs Exp $ +# RCS: @(#) $Id: configure.in,v 1.83.2.10 2004/07/19 20:30:02 hobbs Exp $ AC_INIT(../generic/tk.h) AC_PREREQ(2.13) @@ -61,17 +61,7 @@ fi AC_PROG_CC -#------------------------------------------------------------------------ -# I'm not sure why these need to come before all of the other tests -#------------------------------------------------------------------------ - -AC_HAVE_HEADERS(unistd.h limits.h) - -#------------------------------------------------------------------------ -# Threads support -#------------------------------------------------------------------------ - -SC_ENABLE_THREADS +AC_HAVE_HEADERS([unistd.h limits.h]) #------------------------------------------------------------------------------ # If we're using GCC, see if the compiler understands -pipe. If so, use it. @@ -90,13 +80,14 @@ if test -n "$GCC"; then fi fi -#-------------------------------------------------------------------- -# Detect what compiler flags to set for 64-bit support. -#-------------------------------------------------------------------- +#------------------------------------------------------------------------ +# Threads support - this auto-enables if Tcl was compiled threaded +#------------------------------------------------------------------------ -SC_TCL_EARLY_FLAGS +SC_ENABLE_THREADS -SC_TCL_64BIT_FLAGS +# Add the threads support libraries +LIBS="$LIBS$THREADS_LIBS" #-------------------------------------------------------------------- # Recompute the necessary flags to run the compiler @@ -108,15 +99,23 @@ SC_CONFIG_CFLAGS SC_ENABLE_SYMBOLS -LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}' - TK_DBGX=${DBGX} +#-------------------------------------------------------------------- +# Detect what compiler flags to set for 64-bit support. +#-------------------------------------------------------------------- + +SC_TCL_EARLY_FLAGS + +SC_TCL_64BIT_FLAGS + #------------------------------------------------------------------------ # If Tcl and Tk are installed in different places, adjust the library # search path to reflect this. #------------------------------------------------------------------------ +LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}' + if test "$TCL_EXEC_PREFIX" != "$exec_prefix"; then LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${TCL_EXEC_PREFIX}/lib" fi @@ -134,7 +133,8 @@ fi # right (and it must appear before "-lm"). #-------------------------------------------------------------------- -AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") +MATH_LIBS="" +AC_CHECK_FUNC(sin, , MATH_LIBS="-lm") AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) #-------------------------------------------------------------------- @@ -290,10 +290,6 @@ if test "$tk_checkBoth" = 1; then fi AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])]) -# Add the threads support libraries - -LIBS="$LIBS$THREADS_LIBS" - #-------------------------------------------------------------------- # One more check related to the X libraries. The standard releases # of Ultrix don't support the "xauth" mechanism, so send won't work @@ -325,17 +321,6 @@ if test -d /usr/include/mit ; then fi #-------------------------------------------------------------------- -# On a few very rare systems, all of the libm.a stuff is -# already in libc.a. Set compiler flags accordingly. -# Also, Linux requires the "ieee" library for math to -# work right (and it must appear before "-lm"). -#-------------------------------------------------------------------- - -MATH_LIBS="" -AC_CHECK_FUNC(sin, , MATH_LIBS="-lm") -AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) - -#-------------------------------------------------------------------- # Figure out whether "char" is unsigned. If so, set a # #define for __CHAR_UNSIGNED__. #-------------------------------------------------------------------- |