configure
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:187k
- ;;
- OSF1-1.0|OSF1-1.1|OSF1-1.2)
- # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
- SHLIB_CFLAGS=""
- # Hack: make package name same as library name
- SHLIB_LD='ld -R -export :'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadOSF.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- OSF1-1.*)
- # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
- SHLIB_CFLAGS="-fPIC"
- if test "$SHARED_BUILD" = "1" ; then
- SHLIB_LD="ld -shared"
- else
- SHLIB_LD="ld -non_shared"
- fi
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- OSF1-V*)
- # Digital OSF/1
- SHLIB_CFLAGS=""
- if test "$SHARED_BUILD" = "1" ; then
- SHLIB_LD='ld -shared -expect_unresolved "*"'
- else
- SHLIB_LD='ld -non_shared -expect_unresolved "*"'
- fi
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- if test "$GCC" = "yes" ; then
- CFLAGS="$CFLAGS -mieee"
- else
- CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
- fi
- # see pthread_intro(3) for pthread support on osf1, k.furukawa
- if test "${TCL_THREADS}" = "1" ; then
- CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
- CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
- LIBS=`echo $LIBS | sed s/-lpthreads//`
- if test "$GCC" = "yes" ; then
- LIBS="$LIBS -lpthread -lmach -lexc"
- else
- CFLAGS="$CFLAGS -pthread"
- LDFLAGS="$LDFLAGS -pthread"
- fi
- fi
- ;;
- QNX-6*)
- # QNX RTP
- # This may work for all QNX, but it was only reported for v6.
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- # dlopen is in -lc on QNX
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- RISCos-*)
- SHLIB_CFLAGS="-G 0"
- SHLIB_LD="echo tclLdAout $CC {$SHLIB_CFLAGS} | `pwd`/tclsh -r -G 0"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".a"
- DL_OBJS="tclLoadAout.o"
- DL_LIBS=""
- LDFLAGS="$LDFLAGS -Wl,-D,08000000"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- ;;
- SCO_SV-3.2*)
- # Note, dlopen is available only on SCO 3.2.5 and greater. However,
- # this test works, since "uname -s" was non-standard in 3.2.4 and
- # below.
- if test "$GCC" = "yes" ; then
- SHLIB_CFLAGS="-fPIC -melf"
- LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
- else
- SHLIB_CFLAGS="-Kpic -belf"
- LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
- fi
- SHLIB_LD="ld -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- SINIX*5.4*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD="cc -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- SunOS-4*)
- SHLIB_CFLAGS="-PIC"
- SHLIB_LD="ld"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- # SunOS can't handle version numbers with dots in them in library
- # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
- # requires an extra version number at the end of .so file names.
- # So, the library has to have a name like libtcl75.so.1.0
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so.1.0'
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
- SunOS-5.[0-6])
- # Careful to not let 5.10+ fall into this case
- # Note: If _REENTRANT isn't defined, then Solaris
- # won't define thread-safe library routines.
- cat >> confdefs.h <<EOF
- #define _REENTRANT 1
- EOF
- cat >> confdefs.h <<EOF
- #define _POSIX_PTHREAD_SEMANTICS 1
- EOF
- SHLIB_CFLAGS="-KPIC"
- # Note: need the LIBS below, otherwise Tk won't find Tcl's
- # symbols when dynamically loaded into tclsh.
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- if test "$GCC" = "yes" ; then
- SHLIB_LD="$CC -shared"
- CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- else
- SHLIB_LD="/usr/ccs/bin/ld -G -z text"
- CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- fi
- ;;
- SunOS-5*)
- # Note: If _REENTRANT isn't defined, then Solaris
- # won't define thread-safe library routines.
- cat >> confdefs.h <<EOF
- #define _REENTRANT 1
- EOF
- cat >> confdefs.h <<EOF
- #define _POSIX_PTHREAD_SEMANTICS 1
- EOF
- SHLIB_CFLAGS="-KPIC"
- # Check to enable 64-bit flags for compiler/linker
- if test "$do64bit" = "yes" ; then
- arch=`isainfo`
- if test "$arch" = "sparcv9 sparc" ; then
- if test "$GCC" = "yes" ; then
- if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
- echo "configure: warning: 64bit mode not supported with GCC < 3.2 on $system" 1>&2
- else
- do64bit_ok=yes
- CFLAGS="$CFLAGS -m64 -mcpu=v9"
- LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
- SHLIB_CFLAGS="-fPIC"
- fi
- else
- do64bit_ok=yes
- if test "$do64bitVIS" = "yes" ; then
- CFLAGS="$CFLAGS -xarch=v9a"
- LDFLAGS="$LDFLAGS -xarch=v9a"
- else
- CFLAGS="$CFLAGS -xarch=v9"
- LDFLAGS="$LDFLAGS -xarch=v9"
- fi
- # Solaris 64 uses this as well
- #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
- fi
- elif test "$arch" = "amd64 i386" ; then
- if test "$GCC" = "yes" ; then
- echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
- else
- do64bit_ok=yes
- CFLAGS="$CFLAGS -xarch=amd64"
- LDFLAGS="$LDFLAGS -xarch=amd64"
- fi
- else
- echo "configure: warning: 64bit mode not supported for $arch" 1>&2
- fi
- fi
-
- # Note: need the LIBS below, otherwise Tk won't find Tcl's
- # symbols when dynamically loaded into tclsh.
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- if test "$GCC" = "yes" ; then
- SHLIB_LD="$CC -shared"
- CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- if test "$do64bit_ok" = "yes" ; then
- # We need to specify -static-libgcc or we need to
- # add the path to the sparv9 libgcc.
- SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
- # for finding sparcv9 libgcc, get the regular libgcc
- # path, remove so name and append 'sparcv9'
- #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
- #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
- fi
- else
- case $system in
- SunOS-5.[1-9][0-9]*)
- SHLIB_LD='${CC} -G -z text';;
- *)
- SHLIB_LD="/usr/ccs/bin/ld -G -z text";;
- esac
- CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
- fi
- ;;
- ULTRIX-4.*)
- SHLIB_CFLAGS="-G 0"
- SHLIB_SUFFIX=".a"
- SHLIB_LD="echo tclLdAout $CC {$SHLIB_CFLAGS} | `pwd`/tclsh -r -G 0"
- SHLIB_LD_LIBS='${LIBS}'
- DL_OBJS="tclLoadAout.o"
- DL_LIBS=""
- LDFLAGS="$LDFLAGS -Wl,-D,08000000"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- if test "$GCC" != "yes" ; then
- CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
- fi
- ;;
- UNIX_SV* | UnixWare-5*)
- SHLIB_CFLAGS="-KPIC"
- SHLIB_LD="cc -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
- # that don't grok the -Bexport option. Test that it does.
- echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
- echo "configure:3527: checking for ld accepts -Bexport flag" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_Bexport'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_ldflags=$LDFLAGS
- LDFLAGS="$LDFLAGS -Wl,-Bexport"
- cat > conftest.$ac_ext <<EOF
- #line 3535 "configure"
- #include "confdefs.h"
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:3542: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_ld_Bexport=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_ld_Bexport=no
- fi
- rm -f conftest*
- LDFLAGS=$hold_ldflags
- fi
- echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6
- if test $tcl_cv_ld_Bexport = yes; then
- LDFLAGS="$LDFLAGS -Wl,-Bexport"
- fi
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- esac
- if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
- echo "configure: warning: 64bit support being disabled -- don't know magic for this platform" 1>&2
- fi
-
-
- # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
- # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop,
- # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
- # to determine which of several header files defines the a.out file
- # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we
- # support only a file format that is more or less version-7-compatible.
- # In particular,
- # - a.out files must begin with `struct exec'.
- # - the N_TXTOFF on the `struct exec' must compute the seek address
- # of the text segment
- # - The `struct exec' must contain a_magic, a_text, a_data, a_bss
- # and a_entry fields.
- # The following compilation should succeed if and only if either sys/exec.h
- # or a.out.h is usable for the purpose.
- #
- # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
- # `struct exec' includes a second header that contains information that
- # duplicates the v7 fields that are needed.
- if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
- echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
- echo "configure:3592: checking sys/exec.h" >&5
- if eval "test "`echo '$''{'tcl_cv_sysexec_h'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 3598 "configure"
- #include "confdefs.h"
- #include <sys/exec.h>
- int main() {
- struct exec foo;
- unsigned long seek;
- int flag;
- #if defined(__mips) || defined(mips)
- seek = N_TXTOFF (foo.ex_f, foo.ex_o);
- #else
- seek = N_TXTOFF (foo);
- #endif
- flag = (foo.a_magic == OMAGIC);
- return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-
- ; return 0; }
- EOF
- if { (eval echo configure:3616: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_sysexec_h=usable
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_sysexec_h=unusable
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_sysexec_h" 1>&6
- if test $tcl_cv_sysexec_h = usable; then
- cat >> confdefs.h <<EOF
- #define USE_SYS_EXEC_H 1
- EOF
- else
- echo $ac_n "checking a.out.h""... $ac_c" 1>&6
- echo "configure:3636: checking a.out.h" >&5
- if eval "test "`echo '$''{'tcl_cv_aout_h'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 3642 "configure"
- #include "confdefs.h"
- #include <a.out.h>
- int main() {
- struct exec foo;
- unsigned long seek;
- int flag;
- #if defined(__mips) || defined(mips)
- seek = N_TXTOFF (foo.ex_f, foo.ex_o);
- #else
- seek = N_TXTOFF (foo);
- #endif
- flag = (foo.a_magic == OMAGIC);
- return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-
- ; return 0; }
- EOF
- if { (eval echo configure:3660: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_aout_h=usable
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_aout_h=unusable
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_aout_h" 1>&6
- if test $tcl_cv_aout_h = usable; then
- cat >> confdefs.h <<EOF
- #define USE_A_OUT_H 1
- EOF
- else
- echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
- echo "configure:3680: checking sys/exec_aout.h" >&5
- if eval "test "`echo '$''{'tcl_cv_sysexecaout_h'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 3686 "configure"
- #include "confdefs.h"
- #include <sys/exec_aout.h>
- int main() {
- struct exec foo;
- unsigned long seek;
- int flag;
- #if defined(__mips) || defined(mips)
- seek = N_TXTOFF (foo.ex_f, foo.ex_o);
- #else
- seek = N_TXTOFF (foo);
- #endif
- flag = (foo.a_midmag == OMAGIC);
- return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-
- ; return 0; }
- EOF
- if { (eval echo configure:3704: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_sysexecaout_h=usable
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_sysexecaout_h=unusable
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_sysexecaout_h" 1>&6
- if test $tcl_cv_sysexecaout_h = usable; then
- cat >> confdefs.h <<EOF
- #define USE_SYS_EXEC_AOUT_H 1
- EOF
- else
- DL_OBJS=""
- fi
- fi
- fi
- fi
- # Step 5: disable dynamic loading if requested via a command-line switch.
- # Check whether --enable-load or --disable-load was given.
- if test "${enable_load+set}" = set; then
- enableval="$enable_load"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
- if test "$tcl_ok" = "no"; then
- DL_OBJS=""
- fi
- if test "x$DL_OBJS" != "x" ; then
- BUILD_DLTEST="$(DLTEST_TARGETS)"
- else
- echo "Can't figure out how to do dynamic loading or shared libraries"
- echo "on this system."
- SHLIB_CFLAGS=""
- SHLIB_LD=""
- SHLIB_SUFFIX=""
- DL_OBJS="tclLoadNone.o"
- DL_LIBS=""
- LDFLAGS="$LDFLAGS_ORIG"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- BUILD_DLTEST=""
- fi
- # 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
- # standard manufacturer compiler.
- if test "$DL_OBJS" != "tclLoadNone.o" ; then
- if test "$GCC" = "yes" ; then
- case $system in
- AIX-*)
- ;;
- BSD/OS*)
- ;;
- IRIX*)
- ;;
- NetBSD-*|FreeBSD-*|OpenBSD-*)
- ;;
- Darwin-*)
- ;;
- RISCos-*)
- ;;
- SCO_SV-3.2*)
- ;;
- ULTRIX-4.*)
- ;;
- *)
- SHLIB_CFLAGS="-fPIC"
- ;;
- esac
- fi
- fi
- if test "$SHARED_LIB_SUFFIX" = "" ; then
- SHARED_LIB_SUFFIX='${VERSION}${DBGX}${SHLIB_SUFFIX}'
- fi
- if test "$UNSHARED_LIB_SUFFIX" = "" ; then
- UNSHARED_LIB_SUFFIX='${VERSION}${DBGX}.a'
- fi
- if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
- LIB_SUFFIX=${SHARED_LIB_SUFFIX}
- MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
- else
- LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
- if test "$RANLIB" = "" ; then
- MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
- else
- MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
- fi
- fi
- # Stub lib does not depend on shared/static configuration
- if test "$RANLIB" = "" ; then
- MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
- else
- MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
- fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
- echo "configure:3857: checking for build with symbols" >&5
- # Check whether --enable-symbols or --disable-symbols was given.
- if test "${enable_symbols+set}" = set; then
- enableval="$enable_symbols"
- tcl_ok=$enableval
- else
- tcl_ok=no
- fi
- # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
- if test "$tcl_ok" = "no"; then
- CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
- LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
- DBGX=""
- echo "$ac_t""no" 1>&6
- else
- CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
- LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
- DBGX=g
- if test "$tcl_ok" = "yes"; then
- echo "$ac_t""yes (standard debugging)" 1>&6
- fi
- fi
-
-
- if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
- cat >> confdefs.h <<EOF
- #define TCL_MEM_DEBUG 1
- EOF
- fi
- if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
- cat >> confdefs.h <<EOF
- #define TCL_COMPILE_DEBUG 1
- EOF
- cat >> confdefs.h <<EOF
- #define TCL_COMPILE_STATS 1
- EOF
- fi
- if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
- if test "$tcl_ok" = "all"; then
- echo "$ac_t""enabled symbols mem compile debugging" 1>&6
- else
- echo "$ac_t""enabled $tcl_ok debugging" 1>&6
- fi
- fi
- TK_DBGX=${DBGX}
- #--------------------------------------------------------------------
- # Detect what compiler flags to set for 64-bit support.
- #--------------------------------------------------------------------
- echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
- echo "configure:3918: checking for required early compiler flags" >&5
- tcl_flags=""
-
- if eval "test "`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 3925 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- int main() {
- char *p = (char *)strtoll; char *q = (char *)strtoull;
- ; return 0; }
- EOF
- if { (eval echo configure:3932: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__isoc99_source=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
- #line 3940 "configure"
- #include "confdefs.h"
- #define _ISOC99_SOURCE 1
- #include <stdlib.h>
- int main() {
- char *p = (char *)strtoll; char *q = (char *)strtoull;
- ; return 0; }
- EOF
- if { (eval echo configure:3948: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__isoc99_source=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_flag__isoc99_source=no
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define _ISOC99_SOURCE 1
- EOF
- tcl_flags="$tcl_flags _ISOC99_SOURCE"
- fi
-
- if eval "test "`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 3975 "configure"
- #include "confdefs.h"
- #include <sys/stat.h>
- int main() {
- struct stat64 buf; int i = stat64("/", &buf);
- ; return 0; }
- EOF
- if { (eval echo configure:3982: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__largefile64_source=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
- #line 3990 "configure"
- #include "confdefs.h"
- #define _LARGEFILE64_SOURCE 1
- #include <sys/stat.h>
- int main() {
- struct stat64 buf; int i = stat64("/", &buf);
- ; return 0; }
- EOF
- if { (eval echo configure:3998: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__largefile64_source=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_flag__largefile64_source=no
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define _LARGEFILE64_SOURCE 1
- EOF
- tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
- fi
-
- if eval "test "`echo '$''{'tcl_cv_flag__largefile_source64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4025 "configure"
- #include "confdefs.h"
- #include <sys/stat.h>
- int main() {
- char *p = (char *)open64;
- ; return 0; }
- EOF
- if { (eval echo configure:4032: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__largefile_source64=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
- #line 4040 "configure"
- #include "confdefs.h"
- #define _LARGEFILE_SOURCE64 1
- #include <sys/stat.h>
- int main() {
- char *p = (char *)open64;
- ; return 0; }
- EOF
- if { (eval echo configure:4048: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__largefile_source64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_flag__largefile_source64=no
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define _LARGEFILE_SOURCE64 1
- EOF
- tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
- fi
- if test "x${tcl_flags}" = "x" ; then
- echo "$ac_t""none" 1>&6
- else
- echo "$ac_t""${tcl_flags}" 1>&6
- fi
- echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
- echo "configure:4079: checking for 64-bit integer type" >&5
- if eval "test "`echo '$''{'tcl_cv_type_64bit'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- tcl_cv_type_64bit=none
- # See if the compiler knows natively about __int64
- cat > conftest.$ac_ext <<EOF
- #line 4087 "configure"
- #include "confdefs.h"
- int main() {
- __int64 value = (__int64) 0;
- ; return 0; }
- EOF
- if { (eval echo configure:4094: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_type_64bit=__int64
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_type_64bit="long long"
- fi
- rm -f conftest*
- # See if we should use long anyway Note that we substitute in the
- # type that is our current guess for a 64-bit type inside this check
- # program, so it should be modified only carefully...
- cat > conftest.$ac_ext <<EOF
- #line 4108 "configure"
- #include "confdefs.h"
- int main() {
- switch (0) {
- case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
- }
- ; return 0; }
- EOF
- if { (eval echo configure:4117: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_type_64bit=${tcl_type_64bit}
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- fi
- if test "${tcl_cv_type_64bit}" = none ; then
- cat >> confdefs.h <<EOF
- #define TCL_WIDE_INT_IS_LONG 1
- EOF
- echo "$ac_t""using long" 1>&6
- else
- cat >> confdefs.h <<EOF
- #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
- EOF
- echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
- # Now check for auxiliary declarations
- echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
- echo "configure:4142: checking for struct dirent64" >&5
- if eval "test "`echo '$''{'tcl_cv_struct_dirent64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4148 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/dirent.h>
- int main() {
- struct dirent64 p;
- ; return 0; }
- EOF
- if { (eval echo configure:4156: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_struct_dirent64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_struct_dirent64=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_struct_dirent64" 1>&6
- if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define HAVE_STRUCT_DIRENT64 1
- EOF
- fi
- echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
- echo "configure:4177: checking for struct stat64" >&5
- if eval "test "`echo '$''{'tcl_cv_struct_stat64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4183 "configure"
- #include "confdefs.h"
- #include <sys/stat.h>
- int main() {
- struct stat64 p;
- ; return 0; }
- EOF
- if { (eval echo configure:4191: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_struct_stat64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_struct_stat64=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_struct_stat64" 1>&6
- if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define HAVE_STRUCT_STAT64 1
- EOF
- fi
- for ac_func in open64 lseek64
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:4214: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4219 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* 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();
- int main() {
- /* 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
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:4242: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- echo $ac_n "checking for off64_t""... $ac_c" 1>&6
- echo "configure:4267: checking for off64_t" >&5
- if eval "test "`echo '$''{'tcl_cv_type_off64_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4273 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- off64_t offset;
- ; return 0; }
- EOF
- if { (eval echo configure:4281: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_type_off64_t=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_type_off64_t=no
- fi
- rm -f conftest*
- fi
- 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 <<EOF
- #define HAVE_TYPE_OFF64_T 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- #--------------------------------------------------------------------
- # Check endianness because we can optimize some operations
- #--------------------------------------------------------------------
- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
- echo "configure:4312: checking whether byte ordering is bigendian" >&5
- if eval "test "`echo '$''{'ac_cv_c_bigendian'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_cv_c_bigendian=unknown
- # See if sys/param.h defines the BYTE_ORDER macro.
- cat > conftest.$ac_ext <<EOF
- #line 4319 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/param.h>
- int main() {
- #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:4330: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- # It does; now see whether it defined to BIG_ENDIAN or not.
- cat > conftest.$ac_ext <<EOF
- #line 4334 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/param.h>
- int main() {
- #if BYTE_ORDER != BIG_ENDIAN
- not big endian
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:4345: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_bigendian=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_bigendian=no
- fi
- rm -f conftest*
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- if test $ac_cv_c_bigendian = unknown; then
- if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
- else
- cat > conftest.$ac_ext <<EOF
- #line 4365 "configure"
- #include "confdefs.h"
- main () {
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
- }
- EOF
- if { (eval echo configure:4378: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_c_bigendian=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_bigendian=yes
- fi
- rm -fr conftest*
- fi
- fi
- fi
- echo "$ac_t""$ac_cv_c_bigendian" 1>&6
- if test $ac_cv_c_bigendian = yes; then
- cat >> confdefs.h <<EOF
- #define WORDS_BIGENDIAN 1
- EOF
- fi
- #------------------------------------------------------------------------
- # 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
- if test "$TCL_PREFIX" != "$prefix"; then
- echo "configure: warning:
- Different --prefix selected for Tk and Tcl!
- [package require Tk] may not work correctly in tclsh." 1>&2
- fi
- #--------------------------------------------------------------------
- # Include sys/select.h if it exists and if it supplies things
- # that appear to be useful and aren't already in sys/types.h.
- # This appears to be true only on the RS/6000 under AIX. Some
- # systems like OSF/1 have a sys/select.h that's of no use, and
- # other systems like SCO UNIX have a sys/select.h that's
- # pernicious. If "fd_set" isn't defined anywhere then set a
- # special flag.
- #--------------------------------------------------------------------
- echo $ac_n "checking for fd_set in sys/types""... $ac_c" 1>&6
- echo "configure:4430: checking for fd_set in sys/types" >&5
- if eval "test "`echo '$''{'tcl_cv_type_fd_set'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4436 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- fd_set readMask, writeMask;
- ; return 0; }
- EOF
- if { (eval echo configure:4443: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_type_fd_set=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_type_fd_set=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_type_fd_set" 1>&6
- tk_ok=$tcl_cv_type_fd_set
- if test $tk_ok = no; then
- echo $ac_n "checking for fd_mask in sys/select""... $ac_c" 1>&6
- echo "configure:4459: checking for fd_mask in sys/select" >&5
- if eval "test "`echo '$''{'tcl_cv_grep_fd_mask'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4465 "configure"
- #include "confdefs.h"
- #include <sys/select.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "fd_mask" >/dev/null 2>&1; then
- rm -rf conftest*
- tcl_cv_grep_fd_mask=present
- else
- rm -rf conftest*
- tcl_cv_grep_fd_mask=missing
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_grep_fd_mask" 1>&6
- if test $tcl_cv_grep_fd_mask = present; then
- cat >> confdefs.h <<EOF
- #define HAVE_SYS_SELECT_H 1
- EOF
- tk_ok=yes
- fi
- fi
- if test $tk_ok = no; then
- cat >> confdefs.h <<EOF
- #define NO_FD_SET 1
- EOF
- fi
- #------------------------------------------------------------------------------
- # Find out all about time handling differences.
- #------------------------------------------------------------------------------
- for ac_hdr in sys/time.h
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- echo "configure:4505: checking for $ac_hdr" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4510 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:4515: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_hdr 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
- echo "configure:4542: checking whether time.h and sys/time.h may both be included" >&5
- if eval "test "`echo '$''{'ac_cv_header_time'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4547 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/time.h>
- #include <time.h>
- int main() {
- struct tm *tp;
- ; return 0; }
- EOF
- if { (eval echo configure:4556: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_header_time=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_time=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_header_time" 1>&6
- if test $ac_cv_header_time = yes; then
- cat >> confdefs.h <<EOF
- #define TIME_WITH_SYS_TIME 1
- EOF
- fi
- #--------------------------------------------------------------------
- # Under Solaris 2.4, strtod returns the wrong value for the
- # terminating character under some conditions. Check for this
- # and if the problem exists use a substitute procedure
- # "fixstrtod" (provided by Tcl) that corrects the error.
- #--------------------------------------------------------------------
- echo $ac_n "checking for strtod""... $ac_c" 1>&6
- echo "configure:4586: checking for strtod" >&5
- if eval "test "`echo '$''{'ac_cv_func_strtod'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4591 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char strtod(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char strtod();
- int main() {
- /* 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_strtod) || defined (__stub___strtod)
- choke me
- #else
- strtod();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:4614: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_strtod=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_strtod=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'strtod`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tcl_strtod=1
- else
- echo "$ac_t""no" 1>&6
- tcl_strtod=0
- fi
- if test "$tcl_strtod" = 1; then
- echo $ac_n "checking for Solaris2.4/Tru64 strtod bugs""... $ac_c" 1>&6
- echo "configure:4636: checking for Solaris2.4/Tru64 strtod bugs" >&5
- if eval "test "`echo '$''{'tcl_cv_strtod_buggy'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- if test "$cross_compiling" = yes; then
- tcl_cv_strtod_buggy=buggy
- else
- cat > conftest.$ac_ext <<EOF
- #line 4645 "configure"
- #include "confdefs.h"
- extern double strtod();
- int main() {
- char *infString="Inf", *nanString="NaN", *spaceString=" ";
- char *term;
- double value;
- value = strtod(infString, &term);
- if ((term != infString) && (term[-1] == 0)) {
- exit(1);
- }
- value = strtod(nanString, &term);
- if ((term != nanString) && (term[-1] == 0)) {
- exit(1);
- }
- value = strtod(spaceString, &term);
- if (term == (spaceString+1)) {
- exit(1);
- }
- exit(0);
- }
- EOF
- if { (eval echo configure:4668: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- tcl_cv_strtod_buggy=ok
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- tcl_cv_strtod_buggy=buggy
- fi
- rm -fr conftest*
- fi
- fi
- echo "$ac_t""$tcl_cv_strtod_buggy" 1>&6
- if test "$tcl_cv_strtod_buggy" = buggy; then
- LIBOBJS="$LIBOBJS fixstrtod.o"
- cat >> confdefs.h <<EOF
- #define strtod fixstrtod
- EOF
- fi
- fi
- #--------------------------------------------------------------------
- # Check for various typedefs and provide substitutes if
- # they don't exist.
- #--------------------------------------------------------------------
- echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
- echo "configure:4699: checking for ANSI C header files" >&5
- if eval "test "`echo '$''{'ac_cv_header_stdc'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4704 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- #include <stdarg.h>
- #include <string.h>
- #include <float.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:4712: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- ac_cv_header_stdc=yes
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat > conftest.$ac_ext <<EOF
- #line 4729 "configure"
- #include "confdefs.h"
- #include <string.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "memchr" >/dev/null 2>&1; then
- :
- else
- rm -rf conftest*
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- fi
- if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat > conftest.$ac_ext <<EOF
- #line 4747 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "free" >/dev/null 2>&1; then
- :
- else
- rm -rf conftest*
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- fi
- if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
- else
- cat > conftest.$ac_ext <<EOF
- #line 4768 "configure"
- #include "confdefs.h"
- #include <ctype.h>
- #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
- int main () { int i; for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
- exit (0); }
- EOF
- if { (eval echo configure:4779: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- :
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_header_stdc=no
- fi
- rm -fr conftest*
- fi
- fi
- fi
- echo "$ac_t""$ac_cv_header_stdc" 1>&6
- if test $ac_cv_header_stdc = yes; then
- cat >> confdefs.h <<EOF
- #define STDC_HEADERS 1
- EOF
- fi
- echo $ac_n "checking for mode_t""... $ac_c" 1>&6
- echo "configure:4803: checking for mode_t" >&5
- if eval "test "`echo '$''{'ac_cv_type_mode_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4808 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- #include <stdlib.h>
- #include <stddef.h>
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_mode_t=yes
- else
- rm -rf conftest*
- ac_cv_type_mode_t=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_mode_t" 1>&6
- if test $ac_cv_type_mode_t = no; then
- cat >> confdefs.h <<EOF
- #define mode_t int
- EOF
- fi
- echo $ac_n "checking for pid_t""... $ac_c" 1>&6
- echo "configure:4836: checking for pid_t" >&5
- if eval "test "`echo '$''{'ac_cv_type_pid_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4841 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- #include <stdlib.h>
- #include <stddef.h>
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_pid_t=yes
- else
- rm -rf conftest*
- ac_cv_type_pid_t=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_pid_t" 1>&6
- if test $ac_cv_type_pid_t = no; then
- cat >> confdefs.h <<EOF
- #define pid_t int
- EOF
- fi
- echo $ac_n "checking for size_t""... $ac_c" 1>&6
- echo "configure:4869: checking for size_t" >&5
- if eval "test "`echo '$''{'ac_cv_type_size_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4874 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- #include <stdlib.h>
- #include <stddef.h>
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_size_t=yes
- else
- rm -rf conftest*
- ac_cv_type_size_t=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_size_t" 1>&6
- if test $ac_cv_type_size_t = no; then
- cat >> confdefs.h <<EOF
- #define size_t unsigned
- EOF
- fi
- echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
- echo "configure:4902: checking for uid_t in sys/types.h" >&5
- if eval "test "`echo '$''{'ac_cv_type_uid_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4907 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "uid_t" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_uid_t=yes
- else
- rm -rf conftest*
- ac_cv_type_uid_t=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_uid_t" 1>&6
- if test $ac_cv_type_uid_t = no; then
- cat >> confdefs.h <<EOF
- #define uid_t int
- EOF
- cat >> confdefs.h <<EOF
- #define gid_t int
- EOF
- fi
- #-------------------------------------------
- # In OS/390 struct pwd has no pw_gecos field
- #-------------------------------------------
- echo $ac_n "checking pw_gecos in struct pwd""... $ac_c" 1>&6
- echo "configure:4941: checking pw_gecos in struct pwd" >&5
- if eval "test "`echo '$''{'tcl_cv_pwd_pw_gecos'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4947 "configure"
- #include "confdefs.h"
- #include <pwd.h>
- int main() {
- struct passwd pwd; pwd.pw_gecos;
- ; return 0; }
- EOF
- if { (eval echo configure:4954: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_pwd_pw_gecos=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_pwd_pw_gecos=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_pwd_pw_gecos" 1>&6
- if test $tcl_cv_pwd_pw_gecos = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_PW_GECOS 1
- EOF
- fi
- #--------------------------------------------------------------------
- # On Mac OS X, we can build either with X11 or with Aqua
- #--------------------------------------------------------------------
- if test "`uname -s`" = "Darwin" ; then
- echo $ac_n "checking whether to use Aqua""... $ac_c" 1>&6
- echo "configure:4980: checking whether to use Aqua" >&5
- # Check whether --enable-aqua or --disable-aqua was given.
- if test "${enable_aqua+set}" = set; then
- enableval="$enable_aqua"
- tk_aqua=$enableval
- else
- tk_aqua=no
- fi
- if test $tk_aqua = yes; then
- if test $tcl_corefoundation = no; then
- echo "configure: warning: Aqua can only be used when CoreFoundation is available" 1>&2
- tk_aqua=no
- fi
- if test ! -d /System/Library/Frameworks/Carbon.framework; then
- echo "configure: warning: Aqua can only be used when Carbon is available" 1>&2
- tk_aqua=no
- fi
- if test "`uname -r | awk -F. '{print $1}'`" -lt 6; then
- echo "configure: warning: Aqua requires Mac OS X 10.2 or later" 1>&2
- tk_aqua=no
- fi
- fi
- echo "$ac_t""$tk_aqua" 1>&6
- if test "$fat_32_64" = yes; then
- if test $tk_aqua = no; then
- echo $ac_n "checking for 64-bit X11""... $ac_c" 1>&6
- echo "configure:5007: checking for 64-bit X11" >&5
- if eval "test "`echo '$''{'tcl_cv_lib_x11_64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
- done
- CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
- LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
- cat > conftest.$ac_ext <<EOF
- #line 5018 "configure"
- #include "confdefs.h"
- #include <X11/Xlib.h>
- int main() {
- XrmInitialize();
- ; return 0; }
- EOF
- if { (eval echo configure:5025: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_lib_x11_64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_lib_x11_64=no
- fi
- rm -f conftest*
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="$hold_'$v'"'
- done
- fi
- echo "$ac_t""$tcl_cv_lib_x11_64" 1>&6
- fi
- # remove 64-bit arch flags from CFLAGS et al. for combined 32 & 64 bit
- # fat builds if configuration does not support 64-bit.
- if test $tk_aqua = yes -o "$tcl_cv_lib_x11_64" = no; then
- echo "configure: warning: Removing 64-bit architectures from compiler & linker flags" 1>&2
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
- done
- fi
- fi
- else
- tk_aqua=no
- fi
- if test $tk_aqua = yes; then
- cat >> confdefs.h <<EOF
- #define MAC_OSX_TK 1
- EOF
- LIBS="$LIBS -framework Carbon"
- CFLAGS="$CFLAGS -fpascal-strings"
- TK_WINDOWINGSYSTEM=AQUA
- if test -n "${enable_symbols}" -a "${enable_symbols}" != no; then
- cat >> confdefs.h <<EOF
- #define TK_MAC_DEBUG 1
- EOF
- fi
- else
- #--------------------------------------------------------------------
- # Locate the X11 header files and the X11 library archive. Try
- # the ac_path_x macro first, but if it doesn't find the X stuff
- # (e.g. because there's no xmkmf program) then check through
- # a list of possible directories. Under some conditions the
- # autoconf macro will return an include directory that contains
- # no include files, so double-check its result just to be safe.
- #--------------------------------------------------------------------
-
-
- # If we find X, set shell vars x_includes and x_libraries to the
- # paths, otherwise set no_x=yes.
- # Uses ac_ vars as temps to allow command line to override cache and checks.
- # --without-x overrides everything else, but does not touch the cache.
- echo $ac_n "checking for X""... $ac_c" 1>&6
- echo "configure:5085: checking for X" >&5
- # Check whether --with-x or --without-x was given.
- if test "${with_x+set}" = set; then
- withval="$with_x"
- :
- fi
- # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
- if test "x$with_x" = xno; then
- # The user explicitly disabled X.
- have_x=disabled
- else
- if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
- # Both variables are already set.
- have_x=yes
- else
- if eval "test "`echo '$''{'ac_cv_have_x'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- # One or both of the vars are not set, and there is no cached value.
- ac_x_includes=NO ac_x_libraries=NO
- rm -fr conftestdir
- if mkdir conftestdir; then
- cd conftestdir
- # Make sure to not put "make" in the Imakefile rules, since we grep it out.
- cat > Imakefile <<'EOF'
- acfindx:
- @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
- EOF
- if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
- eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- for ac_extension in a so sl; do
- if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
- test -f $ac_im_libdir/libX11.$ac_extension; then
- ac_im_usrlibdir=$ac_im_libdir; break
- fi
- done
- # Screen out bogus values from the imake configuration. They are
- # bogus both because they are the default anyway, and because
- # using them would break gcc on systems where it needs fixed includes.
- case "$ac_im_incroot" in
- /usr/include) ;;
- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
- esac
- case "$ac_im_usrlibdir" in
- /usr/lib | /lib) ;;
- *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
- esac
- fi
- cd ..
- rm -fr conftestdir
- fi
- if test "$ac_x_includes" = NO; then
- # Guess where to find include files, by looking for this one X11 .h file.
- test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
- # First, try using that file with no special directory specified.
- cat > conftest.$ac_ext <<EOF
- #line 5147 "configure"
- #include "confdefs.h"
- #include <$x_direct_test_include>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:5152: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- # We can compile using X headers with no special include directory.
- ac_x_includes=
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- # Look for the header file in a standard set of common directories.
- # Check X11 before X11Rn because it is often a symlink to the current release.
- for ac_dir in
- /usr/X11/include
- /usr/X11R6/include
- /usr/X11R5/include
- /usr/X11R4/include
-
- /usr/include/X11
- /usr/include/X11R6
- /usr/include/X11R5
- /usr/include/X11R4
-
- /usr/local/X11/include
- /usr/local/X11R6/include
- /usr/local/X11R5/include
- /usr/local/X11R4/include
-
- /usr/local/include/X11
- /usr/local/include/X11R6
- /usr/local/include/X11R5
- /usr/local/include/X11R4
-
- /usr/X386/include
- /usr/x386/include
- /usr/XFree86/include/X11
-
- /usr/include
- /usr/local/include
- /usr/unsupported/include
- /usr/athena/include
- /usr/local/x11r5/include
- /usr/lpp/Xamples/include
-
- /usr/openwin/include
- /usr/openwin/share/include
- ;
- do
- if test -r "$ac_dir/$x_direct_test_include"; then
- ac_x_includes=$ac_dir
- break
- fi
- done
- fi
- rm -f conftest*
- fi # $ac_x_includes = NO
- if test "$ac_x_libraries" = NO; then
- # Check for the libraries.
- test -z "$x_direct_test_library" && x_direct_test_library=Xt
- test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
- # See if we find them without any special options.
- # Don't add to $LIBS permanently.
- ac_save_LIBS="$LIBS"
- LIBS="-l$x_direct_test_library $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5221 "configure"
- #include "confdefs.h"
- int main() {
- ${x_direct_test_function}()
- ; return 0; }
- EOF
- if { (eval echo configure:5228: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- LIBS="$ac_save_LIBS"
- # We can link X programs with no special library path.
- ac_x_libraries=
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$ac_save_LIBS"
- # First see if replacing the include by lib works.
- # Check X11 before X11Rn because it is often a symlink to the current release.
- for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/`
- /usr/X11/lib
- /usr/X11R6/lib
- /usr/X11R5/lib
- /usr/X11R4/lib
-
- /usr/lib/X11
- /usr/lib/X11R6
- /usr/lib/X11R5
- /usr/lib/X11R4
-
- /usr/local/X11/lib
- /usr/local/X11R6/lib
- /usr/local/X11R5/lib
- /usr/local/X11R4/lib
-
- /usr/local/lib/X11
- /usr/local/lib/X11R6
- /usr/local/lib/X11R5
- /usr/local/lib/X11R4
-
- /usr/X386/lib
- /usr/x386/lib
- /usr/XFree86/lib/X11
-
- /usr/lib
- /usr/local/lib
- /usr/unsupported/lib
- /usr/athena/lib
- /usr/local/x11r5/lib
- /usr/lpp/Xamples/lib
- /lib/usr/lib/X11
-
- /usr/openwin/lib
- /usr/openwin/share/lib
- ;
- do
- for ac_extension in a so sl; do
- if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
- ac_x_libraries=$ac_dir
- break 2
- fi
- done
- done
- fi
- rm -f conftest*
- fi # $ac_x_libraries = NO
- if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
- # Didn't find X anywhere. Cache the known absence of X.
- ac_cv_have_x="have_x=no"
- else
- # Record where we found X for the cache.
- ac_cv_have_x="have_x=yes
- ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
- fi
- fi
- fi
- eval "$ac_cv_have_x"
- fi # $with_x != no
- if test "$have_x" != yes; then
- echo "$ac_t""$have_x" 1>&6
- no_x=yes
- else
- # If each of the values was on the command line, it overrides each guess.
- test "x$x_includes" = xNONE && x_includes=$ac_x_includes
- test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
- # Update the cache value to reflect the command line values.
- ac_cv_have_x="have_x=yes
- ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
- echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
- fi
- not_really_there=""
- if test "$no_x" = ""; then
- if test "$x_includes" = ""; then
- cat > conftest.$ac_ext <<EOF
- #line 5318 "configure"
- #include "confdefs.h"
- #include <X11/XIntrinsic.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:5323: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- :
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- not_really_there="yes"
- fi
- rm -f conftest*
- else
- if test ! -r $x_includes/X11/Intrinsic.h; then
- not_really_there="yes"
- fi
- fi
- fi
- if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
- echo $ac_n "checking for X11 header files""... $ac_c" 1>&6
- echo "configure:5343: checking for X11 header files" >&5
- found_xincludes="no"
- cat > conftest.$ac_ext <<EOF
- #line 5346 "configure"
- #include "confdefs.h"
- #include <X11/Intrinsic.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:5351: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- found_xincludes="yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- found_xincludes="no"
- fi
- rm -f conftest*
- if test "$found_xincludes" = "no"; then
- dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
- for i in $dirs ; do
- if test -r $i/X11/Intrinsic.h; then
- echo "$ac_t""$i" 1>&6
- XINCLUDES=" -I$i"
- found_xincludes="yes"
- break
- fi
- done
- fi
- else
- if test "$x_includes" != ""; then
- XINCLUDES="-I$x_includes"
- found_xincludes="yes"
- fi
- fi
- if test found_xincludes = "no"; then
- echo "$ac_t""couldn't find any!" 1>&6
- fi
- if test "$no_x" = yes; then
- echo $ac_n "checking for X11 libraries""... $ac_c" 1>&6
- echo "configure:5387: checking for X11 libraries" >&5
- XLIBSW=nope
- dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
- for i in $dirs ; do
- if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
- echo "$ac_t""$i" 1>&6
- XLIBSW="-L$i -lX11"
- x_libraries="$i"
- break
- fi
- done
- else
- if test "$x_libraries" = ""; then
- XLIBSW=-lX11
- else
- XLIBSW="-L$x_libraries -lX11"
- fi
- fi
- if test "$XLIBSW" = nope ; then
- echo $ac_n "checking for XCreateWindow in -lXwindow""... $ac_c" 1>&6
- echo "configure:5407: checking for XCreateWindow in -lXwindow" >&5
- ac_lib_var=`echo Xwindow'_'XCreateWindow | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lXwindow $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5415 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char XCreateWindow();
- int main() {
- XCreateWindow()
- ; return 0; }
- EOF
- if { (eval echo configure:5426: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- XLIBSW=-lXwindow
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- if test "$XLIBSW" = nope ; then
- echo "$ac_t""could not find any! Using -lX11." 1>&6
- XLIBSW=-lX11
- fi
- TK_WINDOWINGSYSTEM=X11
- fi
- #--------------------------------------------------------------------
- # Various manipulations on the search path used at runtime to
- # find shared libraries:
- # 1. If the X library binaries are in a non-standard directory,
- # add the X library location into that search path.
- # 2. On systems such as AIX and Ultrix that use "-L" as the
- # search path option, colons cannot be used to separate
- # directories from each other. Change colons to " -L".
- # 3. Create two sets of search flags, one for use in cc lines
- # and the other for when the linker is invoked directly. In
- # the second case, '-Wl,' must be stripped off and commas must
- # be replaced by spaces.
- #--------------------------------------------------------------------
- if test "x${x_libraries}" != "x"; then
- LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${x_libraries}"
- fi
- if test "${TCL_LD_SEARCH_FLAGS}" = '-L${LIB_RUNTIME_DIR}'; then
- LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -L/g'`
- fi
- # The statement below is very tricky! It actually *evaluates* the
- # string in TCL_CC_SEARCH_FLAGS and TCL_LD_SEARCH_FLAGS which
- # causes a substitution of the variable LIB_RUNTIME_DIR.
- eval "CC_SEARCH_FLAGS="$TCL_CC_SEARCH_FLAGS""
- eval "LD_SEARCH_FLAGS="$TCL_LD_SEARCH_FLAGS""
- #--------------------------------------------------------------------
- # Check for the existence of various libraries. The order here
- # is important, so that then end up in the right order in the
- # command line generated by make. The -lsocket and -lnsl libraries
- # require a couple of special tricks:
- # 1. Use "connect" and "accept" to check for -lsocket, and
- # "gethostbyname" to check for -lnsl.
- # 2. Use each function name only once: can't redo a check because
- # autoconf caches the results of the last check and won't redo it.
- # 3. Use -lnsl and -lsocket only if they supply procedures that
- # aren't already present in the normal libraries. This is because
- # IRIX 5.2 has libraries, but they aren't needed and they're
- # bogus: they goof up name resolution if used.
- # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
- # To get around this problem, check for both libraries together
- # if -lsocket doesn't work by itself.
- #--------------------------------------------------------------------
- if test $tk_aqua = no; then
- echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
- echo "configure:5503: checking for main in -lXbsd" >&5
- ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lXbsd $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5511 "configure"
- #include "confdefs.h"
- int main() {
- main()
- ; return 0; }
- EOF
- if { (eval echo configure:5518: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lXbsd"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- tk_checkBoth=0
- echo $ac_n "checking for connect""... $ac_c" 1>&6
- echo "configure:5542: checking for connect" >&5
- if eval "test "`echo '$''{'ac_cv_func_connect'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5547 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char connect(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char connect();
- int main() {
- /* 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_connect) || defined (__stub___connect)
- choke me
- #else
- connect();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5570: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_connect=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_connect=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'connect`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tk_checkSocket=0
- else
- echo "$ac_t""no" 1>&6
- tk_checkSocket=1
- fi
- if test "$tk_checkSocket" = 1; then
- echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
- echo "configure:5592: checking for main in -lsocket" >&5
- ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5600 "configure"
- #include "confdefs.h"
- int main() {
- main()
- ; return 0; }
- EOF
- if { (eval echo configure:5607: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lsocket"
- else
- echo "$ac_t""no" 1>&6
- tk_checkBoth=1
- fi
- fi
- if test "$tk_checkBoth" = 1; then
- tk_oldLibs=$LIBS
- LIBS="$LIBS -lsocket -lnsl"
- echo $ac_n "checking for accept""... $ac_c" 1>&6
- echo "configure:5633: checking for accept" >&5
- if eval "test "`echo '$''{'ac_cv_func_accept'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5638 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char accept(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char accept();
- int main() {
- /* 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_accept) || defined (__stub___accept)
- choke me
- #else
- accept();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5661: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_accept=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_accept=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'accept`" = yes"; then
- echo "$ac_t""yes" 1>&6
- tk_checkNsl=0
- else
- echo "$ac_t""no" 1>&6
- LIBS=$tk_oldLibs
- fi
- fi
- echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
- echo "configure:5683: checking for gethostbyname" >&5
- if eval "test "`echo '$''{'ac_cv_func_gethostbyname'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5688 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char gethostbyname();
- int main() {
- /* 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_gethostbyname) || defined (__stub___gethostbyname)
- choke me
- #else
- gethostbyname();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5711: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'gethostbyname`" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
- echo "configure:5729: checking for main in -lnsl" >&5
- ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lnsl $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 5737 "configure"
- #include "confdefs.h"
- int main() {
- main()
- ; return 0; }
- EOF
- if { (eval echo configure:5744: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- LIBS="$LIBS -lnsl"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- #--------------------------------------------------------------------
- # One more check related to the X libraries. The standard releases
- # of Ultrix don't support the "xauth" mechanism, so send won't work
- # unless TK_NO_SECURITY is defined. However, there are usually copies
- # of the MIT X server available as well, which do support xauth.
- # Check for the MIT stuff and use it if it exists.
- #
- # Note: can't use ac_check_lib macro (at least, not in Autoconf 2.1)
- # because it can't deal with the "-" in the library name.
- #--------------------------------------------------------------------
- if test -d /usr/include/mit -a $tk_aqua = no; then
- echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6
- echo "configure:5780: checking MIT X libraries" >&5
- tk_oldCFlags=$CFLAGS
- CFLAGS="$CFLAGS -I/usr/include/mit"
- tk_oldLibs=$LIBS
- LIBS="$LIBS -lX11-mit"
- cat > conftest.$ac_ext <<EOF
- #line 5786 "configure"
- #include "confdefs.h"
- #include <X11/Xlib.h>
-
- int main() {
- XOpenDisplay(0);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5797: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
-
- echo "$ac_t""yes" 1>&6
- XLIBSW="-lX11-mit"
- XINCLUDES="-I/usr/include/mit"
-
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- CFLAGS=$tk_oldCFlags
- LIBS=$tk_oldLibs
- fi
- #--------------------------------------------------------------------
- # Figure out whether "char" is unsigned. If so, set a
- # #define for __CHAR_UNSIGNED__.
- #--------------------------------------------------------------------
- echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
- echo "configure:5821: checking whether char is unsigned" >&5
- if eval "test "`echo '$''{'ac_cv_c_char_unsigned'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test "$GCC" = yes; then
- # GCC predefines this symbol on systems where it applies.
- cat > conftest.$ac_ext <<EOF
- #line 5828 "configure"
- #include "confdefs.h"
- #ifdef __CHAR_UNSIGNED__
- yes
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_c_char_unsigned=yes
- else
- rm -rf conftest*
- ac_cv_c_char_unsigned=no
- fi
- rm -f conftest*
- else
- if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
- else
- cat > conftest.$ac_ext <<EOF
- #line 5850 "configure"
- #include "confdefs.h"
- /* volatile prevents gcc2 from optimizing the test away on sparcs. */
- #if !defined(__STDC__) || __STDC__ != 1
- #define volatile
- #endif
- main() {
- volatile char c = 255; exit(c < 0);
- }
- EOF
- if { (eval echo configure:5860: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_c_char_unsigned=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_char_unsigned=no
- fi
- rm -fr conftest*
- fi
- fi
- fi
- echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
- if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
- cat >> confdefs.h <<EOF
- #define __CHAR_UNSIGNED__ 1
- EOF
- fi
- #--------------------------------------------------------------------
- # The statements below define a collection of symbols related to
- # building libtk as a shared library instead of a static library.
- #--------------------------------------------------------------------
- eval eval "TK_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}"
- eval eval "TK_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}"
- eval "TK_LIB_FILE=libtk${LIB_SUFFIX}"
- # tkConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed
- # so that the backslashes quoting the DBX braces are dropped.
- # Trick to replace DBGX with TK_DBGX
- DBGX='${TK_DBGX}'
- eval "TK_LIB_FILE=${TK_LIB_FILE}"
- if test "${SHARED_BUILD}" = "1" -a "${SHLIB_SUFFIX}" != ""; then
- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
- TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
- fi
- TK_LIBRARY='$(prefix)/lib/tk$(VERSION)'
- PRIVATE_INCLUDE_DIR='$(includedir)'
- HTML_DIR='$(DISTDIR)/html'
- TK_PKG_DIR='tk$(VERSION)$(TK_DBGX)'
- TK_RSRC_FILE='tk$(VERSION).rsrc'
- WISH_RSRC_FILE='wish$(VERSION).rsrc'
- # Note: in the following variable, it's important to use the absolute
- # path name of the Tcl directory rather than "..": this is because
- # AIX remembers this path and will attempt to use it at run-time to look
- # up the Tcl library.
- if test "`uname -s`" = "Darwin" ; then
-
- if test "`uname -s`" = "Darwin" ; then
- echo $ac_n "checking how to package libraries""... $ac_c" 1>&6
- echo "configure:5921: checking how to package libraries" >&5
- # Check whether --enable-framework or --disable-framework was given.
- if test "${enable_framework+set}" = set; then
- enableval="$enable_framework"
- enable_framework=$enableval
- else
- enable_framework=no
- fi
- if test $enable_framework = yes; then
- if test $SHARED_BUILD = 0; then
- echo "configure: warning: Frameworks can only be built if --enable-shared is yes" 1>&2
- enable_framework=no
- fi
- if test $tcl_corefoundation = no; then
- echo "configure: warning: Frameworks can only be used when CoreFoundation is available" 1>&2
- enable_framework=no
- fi
- fi
- if test $enable_framework = yes; then
- echo "$ac_t""framework" 1>&6
- FRAMEWORK_BUILD=1
- else
- if test $SHARED_BUILD = 1; then
- echo "$ac_t""shared library" 1>&6
- else
- echo "$ac_t""static library" 1>&6
- fi
- FRAMEWORK_BUILD=0
- fi
- fi
- TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk '{match($0, "\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`"
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[^_] > $$f && echo $$f)'
- echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000'
- TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist'
- EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist'
- EXTRA_APP_CC_SWITCHES='-mdynamic-no-pic'
- tk_config_files="${tk_config_files} Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in"
- for l in ${LOCALES}; do CFBUNDLELOCALIZATIONS="${CFBUNDLELOCALIZATIONS}<string>$l</string>"; done
- TK_YEAR="`date +%Y`"
- fi
- if test "$FRAMEWORK_BUILD" = "1" ; then
- cat >> confdefs.h <<EOF
- #define TK_FRAMEWORK 1
- EOF
- # Construct a fake local framework structure to make linking with
- # '-framework Tk' and running of tktest work
-
- LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH"
- if test "${libdir}" = '${exec_prefix}/lib'; then
- # override libdir default
- libdir="/Library/Frameworks"
- fi
- TK_LIB_FILE="Tk"
- TK_LIB_FLAG="-framework Tk"
- TK_BUILD_LIB_SPEC="-F`pwd` -framework Tk"
- TK_LIB_SPEC="-F${libdir} -framework Tk"
- libdir="${libdir}/Tk.framework/Versions/${VERSION}"
- TK_LIBRARY="${libdir}/Resources/Scripts"
- TK_PKG_DIR="Resources/Scripts"
- TK_RSRC_FILE="Tk.rsrc"
- WISH_RSRC_FILE="Wish.rsrc"
- includedir="${libdir}/Headers"
- PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders"
- HTML_DIR="${libdir}/Resources/Documentation/Reference/Tk"
- EXTRA_INSTALL="install-private-headers html-tk"
- EXTRA_BUILD_HTML='@ln -fs contents.htm $(HTML_INSTALL_DIR)/TkTOC.html'
- EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tk-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"'
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"'
- if test $tk_aqua = yes; then
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${TK_RSRC_FILE} to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "${TK_RSRC_FILE}" "$(LIB_INSTALL_DIR)/Resources"'
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing wish$(VERSION) script to $(INSTALL_ROOT)/'"${bindir}"'" && mkdir -p "$(INSTALL_ROOT)/'"${bindir}"'" && printf > "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)" "#!/bin/shn"$$(dirname $$0)'"`eval d="${bindir}"; echo "$d" | sed -e 's#/[^/][^/]*#/..#g'`"'$(bindir)/Wish" "$$@"" && chmod +x "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)"'
- bindir="${libdir}/Resources/Wish.app/Contents/MacOS"
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Info.plist to $(BIN_INSTALL_DIR)/.." && $(INSTALL_DATA) Wish-Info.plist "$(BIN_INSTALL_DIR)/../Info.plist" && mv -f "$(BIN_INSTALL_DIR)/wish$(VERSION)" "$(BIN_INSTALL_DIR)/Wish"'
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.icns to $(BIN_INSTALL_DIR)/../Resources" && mkdir -p "$(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "'$(MAC_OSX_DIR)'/Wish.icns" "$(BIN_INSTALL_DIR)/../Resources"'
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${WISH_RSRC_FILE} to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "${WISH_RSRC_FILE}" "$(BIN_INSTALL_DIR)/../Resources"'
- fi
- EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tk.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tkConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."'
- # Don't use AC_DEFINE for the following as the framework version define
- # needs to go into the Makefile even when using autoheader, so that we
- # can pick up a potential make override of VERSION. Also, don't put this
- # into CFLAGS as it should not go into tkConfig.sh
- EXTRA_CC_SWITCHES='-DTK_FRAMEWORK_VERSION="$(VERSION)"'
- else
- # libdir must be a fully qualified path and not ${exec_prefix}/lib
- eval libdir="$libdir"
- if test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then
- if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- eval TK_LIB_FLAG="-ltk${VERSION}${TK_DBGX}"
- else
- eval TK_LIB_FLAG="-ltk`echo ${VERSION} | tr -d .`${TK_DBGX}"
- fi
- TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}"
- TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
- else
- TK_BUILD_EXP_FILE="lib.exp"
- eval "TK_EXP_FILE=libtk${TCL_EXPORT_FILE_SUFFIX}"
-
- if test "$GCC" = "yes" ; then
- TK_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TK_BUILD_EXP_FILE} -L`pwd`"
- TK_LIB_SPEC="-Wl,-bI:${libdir}/${TK_EXP_FILE} -L`pwd`"
- else
- TK_BUILD_LIB_SPEC="-bI:`pwd`/${TK_BUILD_EXP_FILE}"
- TK_LIB_SPEC="-bI:${libdir}/${TK_EXP_FILE}"
- fi
- fi
- fi
- # Support for building the Aqua resource files
- if test $tk_aqua = yes; then
- LIB_RSRC_FILE='${TK_RSRC_FILE}'
- APP_RSRC_FILE='${WISH_RSRC_FILE}'
- REZ=/Developer/Tools/Rez
- REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro'
- if test "$SHARED_BUILD" = 0; then
- EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) $(LIB_INSTALL_DIR)'
- TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd`/${TK_RSRC_FILE}"
- TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc ${libdir}/${TK_RSRC_FILE}"
- else
- TK_SHLIB_LD_EXTRAS="$TK_SHLIB_LD_EXTRAS -sectcreate __TEXT __tk_rsrc ${TK_RSRC_FILE}"
- fi
- fi
- #--------------------------------------------------------------------
- # The statements below define various symbols relating to Tk
- # stub support.
- #--------------------------------------------------------------------
- # Replace ${VERSION} with contents of ${TK_VERSION}
- eval "TK_STUB_LIB_FILE=libtkstub${TK_UNSHARED_LIB_SUFFIX}"
- eval "TK_STUB_LIB_DIR=${libdir}"
- if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- eval TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}${TK_DBGX}"
- else
- eval TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`${TK_DBGX}"
- fi
- TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}"
- TK_STUB_LIB_SPEC="-L${TK_STUB_LIB_DIR} ${TK_STUB_LIB_FLAG}"
- TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}"
- TK_STUB_LIB_PATH="${TK_STUB_LIB_DIR}/${TK_STUB_LIB_FILE}"
- # Install time header dir can be set via --includedir
- eval "TK_INCLUDE_SPEC="-I${includedir}""
- #------------------------------------------------------------------------
- # tkConfig.sh refers to this by a different name
- #------------------------------------------------------------------------
- TK_SHARED_BUILD=${SHARED_BUILD}
- CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
- tk_config_files="${tk_config_files} Makefile tkConfig.sh"
- trap '' 1 2 15
- cat > confcache <<EOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
- # scripts and configure runs. It is not useful on other systems.
- # If it contains results you don't want to keep, you may remove or edit it.
- #
- # By default, configure uses ./config.cache as the cache file,
- # creating it if it does not exist already. You can give configure
- # the --cache-file=FILE option to use a different cache file; that is
- # what configure does when it calls configure scripts in
- # subdirectories, so they share the cache.
- # Giving --cache-file=/dev/null disables caching, for debugging configure.
- # config.status only pays attention to the cache file if you give it the
- # --recheck option to rerun configure.
- #
- EOF
- # The following way of writing the cache mishandles newlines in values,
- # but we know of no workaround that is simple, portable, and efficient.
- # So, don't put newlines in cache variables' values.
- # Ultrix sh set writes to stderr and can't be redirected directly,
- # and sets the high bit in the cache file unless we assign to the vars.
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space= *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\ into \, and sed turns \ into ).
- sed -n
- -e "s/'/'\\''/g"
- -e "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1='\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*)=(.*)/1=${1=2}/p'
- ;;
- esac >> confcache
- if cmp -s $cache_file confcache; then
- :
- else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
- fi
- rm -f confcache
- trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- # Let make expand exec_prefix.
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- # Any assignment to VPATH causes Sun make to only execute
- # the first set of double-colon rules, so remove it if not needed.
- # If there is a colon in the path, we need to keep it.
- if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
- fi
- trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
- # Transform confdefs.h into DEFS.
- # Protect against shell expansion while executing Makefile rules.
- # Protect against Makefile macro expansion.
- #
- # If the first sed substitution is executed (which looks for macros that
- # take arguments), then we branch to the quote section. Otherwise,
- # look for a macro that doesn't take arguments.
- cat >confdef2opt.sed <<_ACEOF
- t clear
- : clear
- s,^[ ]*#[ ]*define[ ][ ]*([^ (][^ (]*([^)]*))[ ]*(.*),-D1=2,g
- t quote
- s,^[ ]*#[ ]*define[ ][ ]*([^ ][^ ]*)[ ]*(.*),-D1=2,g
- t quote
- d
- : quote
- s,[ `~#$^&*(){}\|;'"<>?],\&,g
- s,[,\&,g
- s,],\&,g
- s,$,$$,g
- p
- _ACEOF
- # We use echo to avoid assuming a particular line-breaking character.
- # The extra dot is to prevent the shell from consuming trailing
- # line-breaks from the sub-command output. A line-break within
- # single-quotes doesn't work because, if this script is created in a
- # platform that uses two characters for line-breaks (e.g., DOS), tr
- # would break.
- ac_LF_and_DOT=`echo; echo .`
- DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
- rm -f confdef2opt.sed
- # Without the "./", some shells look in PATH for config.status.
- : ${CONFIG_STATUS=./config.status}
- echo creating $CONFIG_STATUS
- rm -f $CONFIG_STATUS
- cat > $CONFIG_STATUS <<EOF
- #! /bin/sh
- # Generated automatically by configure.
- # Run this file to recreate the current configuration.
- # This directory was configured as follows,
- # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
- #
- # $0 $ac_configure_args
- #
- # Compiler output produced by configure, useful for debugging
- # configure, is in ./config.log if it exists.
- ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- for ac_option
- do
- case "$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running ${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec ${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "$ac_cs_usage"; exit 0 ;;
- *) echo "$ac_cs_usage"; exit 1 ;;
- esac
- done
- ac_given_srcdir=$srcdir
- trap 'rm -fr `echo "${tk_config_files}" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
- EOF
- cat >> $CONFIG_STATUS <<EOF
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
- $ac_vpsub
- $extrasub
- s%@SHELL@%$SHELL%g
- s%@CFLAGS@%$CFLAGS%g
- s%@CPPFLAGS@%$CPPFLAGS%g
- s%@CXXFLAGS@%$CXXFLAGS%g
- s%@FFLAGS@%$FFLAGS%g
- s%@DEFS@%$DEFS%g
- s%@LDFLAGS@%$LDFLAGS%g
- s%@LIBS@%$LIBS%g
- s%@exec_prefix@%$exec_prefix%g
- s%@prefix@%$prefix%g
- s%@program_transform_name@%$program_transform_name%g
- s%@bindir@%$bindir%g
- s%@sbindir@%$sbindir%g
- s%@libexecdir@%$libexecdir%g
- s%@datadir@%$datadir%g
- s%@sysconfdir@%$sysconfdir%g
- s%@sharedstatedir@%$sharedstatedir%g
- s%@localstatedir@%$localstatedir%g
- s%@libdir@%$libdir%g
- s%@includedir@%$includedir%g
- s%@oldincludedir@%$oldincludedir%g
- s%@infodir@%$infodir%g
- s%@mandir@%$mandir%g
- s%@TCL_VERSION@%$TCL_VERSION%g
- s%@TCL_PATCH_LEVEL@%$TCL_PATCH_LEVEL%g
- s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
- s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
- s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
- s%@TCL_LIB_FLAG@%$TCL_LIB_FLAG%g
- s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
- s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
- s%@TCL_STUB_LIB_FLAG@%$TCL_STUB_LIB_FLAG%g
- s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
- s%@TCLSH_PROG@%$TCLSH_PROG%g
- s%@BUILD_TCLSH@%$BUILD_TCLSH%g
- s%@MAN_FLAGS@%$MAN_FLAGS%g
- s%@CC@%$CC%g
- s%@CPP@%$CPP%g
- s%@TCL_THREADS@%$TCL_THREADS%g
- s%@RANLIB@%$RANLIB%g
- s%@AR@%$AR%g
- s%@DL_LIBS@%$DL_LIBS%g
- s%@DL_OBJS@%$DL_OBJS%g
- s%@PLAT_OBJS@%$PLAT_OBJS%g
- s%@PLAT_SRCS@%$PLAT_SRCS%g
- s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
- s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
- s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
- s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
- s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
- s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
- s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
- s%@STLIB_LD@%$STLIB_LD%g
- s%@SHLIB_LD@%$SHLIB_LD%g
- s%@TCL_SHLIB_LD_EXTRAS@%$TCL_SHLIB_LD_EXTRAS%g
- s%@TK_SHLIB_LD_EXTRAS@%$TK_SHLIB_LD_EXTRAS%g
- s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
- s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
- s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
- s%@MAKE_LIB@%$MAKE_LIB%g
- s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
- s%@INSTALL_LIB@%$INSTALL_LIB%g
- s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g
- s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
- s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
- s%@TK_VERSION@%$TK_VERSION%g
- s%@TK_MAJOR_VERSION@%$TK_MAJOR_VERSION%g
- s%@TK_MINOR_VERSION@%$TK_MINOR_VERSION%g
- s%@TK_PATCH_LEVEL@%$TK_PATCH_LEVEL%g
- s%@TK_YEAR@%$TK_YEAR%g
- s%@TK_LIB_FILE@%$TK_LIB_FILE%g
- s%@TK_LIB_FLAG@%$TK_LIB_FLAG%g
- s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
- s%@TK_STUB_LIB_FILE@%$TK_STUB_LIB_FILE%g
- s%@TK_STUB_LIB_FLAG@%$TK_STUB_LIB_FLAG%g
- s%@TK_STUB_LIB_SPEC@%$TK_STUB_LIB_SPEC%g
- s%@TK_STUB_LIB_PATH@%$TK_STUB_LIB_PATH%g
- s%@TK_INCLUDE_SPEC@%$TK_INCLUDE_SPEC%g
- s%@TK_BUILD_STUB_LIB_SPEC@%$TK_BUILD_STUB_LIB_SPEC%g
- s%@TK_BUILD_STUB_LIB_PATH@%$TK_BUILD_STUB_LIB_PATH%g
- s%@TK_SRC_DIR@%$TK_SRC_DIR%g
- s%@TK_DBGX@%$TK_DBGX%g
- s%@TK_SHARED_BUILD@%$TK_SHARED_BUILD%g
- s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
- s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
- s%@TK_BUILD_EXP_FILE@%$TK_BUILD_EXP_FILE%g
- s%@TK_EXP_FILE@%$TK_EXP_FILE%g
- s%@TCL_STUB_FLAGS@%$TCL_STUB_FLAGS%g
- s%@MATH_LIBS@%$MATH_LIBS%g
- s%@XINCLUDES@%$XINCLUDES%g
- s%@XLIBSW@%$XLIBSW%g
- s%@LOCALES@%$LOCALES%g
- s%@TK_WINDOWINGSYSTEM@%$TK_WINDOWINGSYSTEM%g
- s%@TK_PKG_DIR@%$TK_PKG_DIR%g
- s%@TK_LIBRARY@%$TK_LIBRARY%g
- s%@PRIVATE_INCLUDE_DIR@%$PRIVATE_INCLUDE_DIR%g
- s%@HTML_DIR@%$HTML_DIR%g
- s%@EXTRA_CC_SWITCHES@%$EXTRA_CC_SWITCHES%g
- s%@EXTRA_APP_CC_SWITCHES@%$EXTRA_APP_CC_SWITCHES%g
- s%@EXTRA_INSTALL@%$EXTRA_INSTALL%g
- s%@EXTRA_INSTALL_BINARIES@%$EXTRA_INSTALL_BINARIES%g
- s%@EXTRA_BUILD_HTML@%$EXTRA_BUILD_HTML%g
- s%@EXTRA_WISH_LIBS@%$EXTRA_WISH_LIBS%g
- s%@CFBUNDLELOCALIZATIONS@%$CFBUNDLELOCALIZATIONS%g
- s%@TK_RSRC_FILE@%$TK_RSRC_FILE%g
- s%@WISH_RSRC_FILE@%$WISH_RSRC_FILE%g
- s%@LIB_RSRC_FILE@%$LIB_RSRC_FILE%g
- s%@APP_RSRC_FILE@%$APP_RSRC_FILE%g
- s%@REZ@%$REZ%g
- s%@REZ_FLAGS@%$REZ_FLAGS%g
- CEOF
- EOF
- cat >> $CONFIG_STATUS <<EOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
- ac_file=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_cmds # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=""
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
- EOF
- cat >> $CONFIG_STATUS <<EOF
- CONFIG_FILES=${CONFIG_FILES-"${tk_config_files}"}
- EOF
- cat >> $CONFIG_STATUS <<EOF
- for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\
- # $configure_input" ;;
- *) ac_comsub= ;;
- esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
- s%@configure_input@%$configure_input%g
- s%@srcdir@%$srcdir%g
- s%@top_srcdir@%$top_srcdir%g
- " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
- fi; done
- rm -f conftest.s*
- EOF
- cat >> $CONFIG_STATUS <<EOF
- VERSION=${TK_VERSION} FRAMEWORK_BUILD=${FRAMEWORK_BUILD}
- tk_aqua=${tk_aqua}
- EOF
- cat >> $CONFIG_STATUS <<EOF
- test "$FRAMEWORK_BUILD" = "1" && n=Tk &&
- f=$n.framework && v=Versions/$VERSION &&
- echo "creating $f" && rm -rf $f && mkdir -p $f/$v/Resources &&
- ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
- ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
- if test $tk_aqua = yes; then ln -s ../../../../$n.rsrc $f/$v/Resources; fi &&
- unset n f v
-
- exit 0
- EOF
- chmod +x $CONFIG_STATUS
- rm -fr confdefs* $ac_clean_files
- test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1