📄 configure.in
字号:
SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_FLAGS="" LD_SEARCH_FLAGS="" ;; OSF1-V*) # Digital OSF/1 SHLIB_CFLAGS="" SHLIB_LD='ld -shared -expect_unresolved "*"' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_FLAGS="" LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' ;; 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="" LD_FLAGS="-Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' ;; 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. SHLIB_CFLAGS="-Kpic -belf" SHLIB_LD="ld -G" SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LD_FLAGS="-belf -Wl,-Bexport" 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" LD_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" LD_FLAGS="" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' # 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 TCL_SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0' TCL_UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a' TCL_LIB_VERSIONS_OK=nodots ;; SunOS-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD="/usr/ccs/bin/ld -G -z text" # 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" LD_FLAGS="" LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}' ;; 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="" LD_FLAGS="-Wl,-D,08000000" LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}' ;; 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. hold_ldflags=$LDFLAGS AC_MSG_CHECKING(for ld accepts -Bexport flag) LDFLAGS="${LDFLAGS} -Wl,-Bexport" AC_TRY_LINK(, [int i;], found=yes, found=no) LDFLAGS=$hold_ldflags AC_MSG_RESULT($found) if test $found = yes; then LD_FLAGS="-Wl,-Bexport" else LD_FLAGS="" fi LD_SEARCH_FLAGS="" ;;esac# 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 AC_MSG_CHECKING(sys/exec.h) AC_TRY_COMPILE([#include <sys/exec.h>],[ 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;], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT($tcl_ok) if test $tcl_ok = usable; then AC_DEFINE(USE_SYS_EXEC_H) else AC_MSG_CHECKING(a.out.h) AC_TRY_COMPILE([#include <a.out.h>],[ 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; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT($tcl_ok) if test $tcl_ok = usable; then AC_DEFINE(USE_A_OUT_H) else AC_MSG_CHECKING(sys/exec_aout.h) AC_TRY_COMPILE([#include <sys/exec_aout.h>],[ 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; ], tcl_ok=usable, tcl_ok=unusable) AC_MSG_RESULT($tcl_ok) if test $tcl_ok = usable; then AC_DEFINE(USE_SYS_EXEC_AOUT_H) else DL_OBJS="" fi fi fifi# Step 5: disable dynamic loading if requested via a command-line switch.#AC_ARG_ENABLE(load, [ --disable-load disallow dynamic loading and "load" command],# [tcl_ok=$enableval], [tcl_ok=yes])#if test "$tcl_ok" = "no"; then# DL_OBJS=""#fi##if test "x$DL_OBJS" != "x" ; then# BUILD_DLTEST="\$(DLTEST_TARGETS)"#else echo "Dynamic loading and shared libraries are disabled." SHLIB_CFLAGS="" SHLIB_LD="" SHLIB_SUFFIX="" DL_OBJS="tclLoadNone.o" DL_LIBS="" LD_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 "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then case $system in AIX-*) ;; BSD/OS*) ;; IRIX*) ;; NetBSD-*|FreeBSD-*|OpenBSD-*) ;; RISCos-*) ;; ULTRIX-4.*) ;; *) SHLIB_CFLAGS="-fPIC" ;; esac fifi# Set the default compiler switches based on the --enable-symbols optionAC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols], [tcl_ok=$enableval], [tcl_ok=no])if test "$tcl_ok" = "yes"; then CFLAGS_DEFAULT=CFLAGS_DEBUG TCL_DBGX=gelse CFLAGS_DEFAULT=CFLAGS_OPTIMIZE TCL_DBGX=""fi#--------------------------------------------------------------------# The statements below check for systems where POSIX-style# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. # On these systems (mostly older ones), use the old BSD-style# FIONBIO approach instead.#--------------------------------------------------------------------AC_CHECK_HEADERS(sys/ioctl.h)AC_CHECK_HEADERS(sys/filio.h)AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])if test -f /usr/lib/NextStep/software_version; then system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`else system=`uname -s`-`uname -r` if test "$?" -ne 0 ; then system=unknown else # Special check for weird MP-RAS system (uname returns weird # results, and the version is kept in special file). if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then system=MP-RAS-`awk '{print $3}' /etc/.relid'` fi if test "`uname -s`" = "AIX" ; then system=AIX-`uname -v`.`uname -r` fi fificase $system in # There used to be code here to use FIONBIO under AIX. However, it # was reported that FIONBIO doesn't work under AIX 3.2.5. Since # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO # code (JO, 5/31/97). OSF*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT(FIONBIO) ;; SunOS-4*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT(FIONBIO) ;; ULTRIX-4.*) AC_DEFINE(USE_FIONBIO) AC_MSG_RESULT(FIONBIO) ;; *) AC_MSG_RESULT(O_NONBLOCK) ;;esac#--------------------------------------------------------------------# The statements below define a collection of symbols related to# building libtcl as a shared library instead of a static library.#--------------------------------------------------------------------realRanlib=$RANLIBif test "$TCL_SHARED_LIB_SUFFIX" = "" ; then TCL_SHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}${SHLIB_SUFFIX}'fiif test "$TCL_UNSHARED_LIB_SUFFIX" = "" ; then TCL_UNSHARED_LIB_SUFFIX='${VERSION}\$\{DBGX\}.a'fi#AC_ARG_ENABLE(shared,# [ --enable-shared build libtcl as a shared library],# [tcl_ok=$enableval], [tcl_ok=no])#if test "$tcl_ok" = "yes" -a "${SHLIB_SUFFIX}" != "" ; then# TCL_SHARED_BUILD=1# TCL_SHLIB_CFLAGS="${SHLIB_CFLAGS}"# TCL_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"# eval "TCL_LIB_FILE=libtcl${TCL_SHARED_LIB_SUFFIX}"# if test "x$DL_OBJS" = "xtclLoadAout.o"; then# MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"# else# MAKE_LIB="\${SHLIB_LD} -o \${TCL_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}"# RANLIB=":"# fi#else TCL_SHARED_BUILD=0 case $system in BSD/OS*) ;; AIX-*) ;; *) SHLIB_LD_LIBS="" ;; esac TCL_SHLIB_CFLAGS="" TCL_LD_SEARCH_FLAGS="" eval "TCL_LIB_FILE=libtcl${TCL_UNSHARED_LIB_SUFFIX}" MAKE_LIB="ar cr \${TCL_LIB_FILE} \${OBJS}"#fi# 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 "${TCL_LIB_VERSIONS_OK}" = "ok"; then TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}"else TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"fi#TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}"TCL_BUILD_LIB_SPEC="`pwd`/libtcl8.0.a"TCL_LIB_SPEC="-L${exec_prefix}/lib ${TCL_LIB_FLAG}"# tclConfig.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 TCL_DBGXDBGX='${TCL_DBGX}'eval "TCL_LIB_FILE=${TCL_LIB_FILE}"VERSION='${VERSION}'eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"#--------------------------------------------------------------------# The statements below define the symbol TCL_PACKAGE_PATH, which# gives a list of directories that may contain packages. The list# consists of one directory for machine-dependent binaries and# another for platform-independent scripts.#--------------------------------------------------------------------if test "$prefix" != "$exec_prefix"; then TCL_PACKAGE_PATH="${exec_prefix}/lib ${prefix}/lib"else TCL_PACKAGE_PATH="${prefix}/lib"fiAC_SUBST(BUILD_DLTEST)AC_SUBST(CFLAGS_DEBUG)AC_SUBST(CFLAGS_DEFAULT)AC_SUBST(CFLAGS_OPTIMIZE)AC_SUBST(CFLAGS_WARNING)AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)AC_SUBST(TCL_DBGX)AC_SUBST(DL_LIBS)AC_SUBST(DL_OBJS)AC_SUBST(LD_FLAGS)AC_SUBST(MAKE_LIB)AC_SUBST(MATH_LIBS)AC_SUBST(SHLIB_CFLAGS)AC_SUBST(SHLIB_LD)AC_SUBST(SHLIB_LD_LIBS)AC_SUBST(SHLIB_SUFFIX)AC_SUBST(TCL_BUILD_LIB_SPEC)AC_SUBST(TCL_LD_SEARCH_FLAGS)AC_SUBST(TCL_LIB_FILE)AC_SUBST(TCL_LIB_FLAG)AC_SUBST(TCL_LIB_SPEC)AC_SUBST(TCL_LIB_VERSIONS_OK)AC_SUBST(TCL_MAJOR_VERSION)AC_SUBST(TCL_MINOR_VERSION)AC_SUBST(TCL_PACKAGE_PATH)AC_SUBST(TCL_PATCH_LEVEL)AC_SUBST(TCL_SHARED_LIB_SUFFIX)AC_SUBST(TCL_SHARED_BUILD)AC_SUBST(TCL_SHLIB_CFLAGS)AC_SUBST(TCL_SRC_DIR)AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)AC_SUBST(TCL_VERSION)AC_OUTPUT(Makefile tclConfig.sh)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -