📄 configure.in
字号:
# The check below checks whether <sys/wait.h> defines the type# "union wait" correctly. It's needed because of weirdness in# HP-UX where "union wait" is defined in both the BSD and SYS-V# environments. Checking the usability of WIFEXITED seems to do# the trick.#--------------------------------------------------------------------AC_MSG_CHECKING([union wait])AC_CACHE_VAL(tcl_cv_union_wait, AC_TRY_LINK([#include <sys/types.h> #include <sys/wait.h>], [union wait x;WIFEXITED(x); /* Generates compiler error if WIFEXITED * uses an int. */ ], tcl_cv_union_wait=yes, tcl_cv_union_wait=no))AC_MSG_RESULT($tcl_cv_union_wait)if test $tcl_cv_union_wait = no; then AC_DEFINE(NO_UNION_WAIT)fi#--------------------------------------------------------------------# Check whether there is an strncasecmp function on this system.# This is a bit tricky because under SCO it's in -lsocket and# under Sequent Dynix it's in -linet.#--------------------------------------------------------------------AC_CHECK_FUNC(strncasecmp, tcl_ok=1, tcl_ok=0)if test "$tcl_ok" = 0; then AC_CHECK_LIB(socket, strncasecmp, tcl_ok=1, tcl_ok=0)fiif test "$tcl_ok" = 0; then AC_CHECK_LIB(inet, strncasecmp, tcl_ok=1, tcl_ok=0)fiif test "$tcl_ok" = 0; then LIBOBJS="$LIBOBJS strncasecmp.o"fi#--------------------------------------------------------------------# The code below deals with several issues related to gettimeofday:# 1. Some systems don't provide a gettimeofday function at all# (set NO_GETTOD if this is the case).# 2. SGI systems don't use the BSD form of the gettimeofday function,# but they have a BSDgettimeofday function that can be used instead.# 3. See if gettimeofday is declared in the <sys/time.h> header file.# if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can# declare it.#--------------------------------------------------------------------AC_CHECK_FUNC(BSDgettimeofday, [AC_DEFINE(HAVE_BSDGETTIMEOFDAY)], [ AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD)])])AC_MSG_CHECKING([for gettimeofday declaration])AC_CACHE_VAL(tcl_cv_grep_gettimeofday, AC_EGREP_HEADER(gettimeofday, sys/time.h, tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing))AC_MSG_RESULT($tcl_cv_grep_gettimeofday)if test $tcl_cv_grep_gettimeofday = missing ; then AC_DEFINE(GETTOD_NOT_DECLARED)fi#--------------------------------------------------------------------# The following code checks to see whether it is possible to get# signed chars on this platform. This is needed in order to# properly generate sign-extended ints from character values.#--------------------------------------------------------------------AC_C_CHAR_UNSIGNEDAC_MSG_CHECKING([signed char declarations])AC_CACHE_VAL(tcl_cv_char_signed, AC_TRY_COMPILE(, [ signed char *p; p = 0; ], tcl_cv_char_signed=yes, tcl_cv_char_signed=no))AC_MSG_RESULT($tcl_cv_char_signed)if test $tcl_cv_char_signed = yes; then AC_DEFINE(HAVE_SIGNED_CHAR)fi#--------------------------------------------------------------------# Does putenv() copy or not? We need to know to avoid memory leaks.#--------------------------------------------------------------------AC_MSG_CHECKING([for a putenv() that copies the buffer])AC_CACHE_VAL(tcl_cv_putenv_copy, AC_TRY_RUN([ #include <stdlib.h> #define OURVAR "havecopy=yes" int main (int argc, char *argv[]) { char *foo, *bar; foo = (char *)strdup(OURVAR); putenv(foo); strcpy((char *)(strchr(foo, '=') + 1), "no"); bar = getenv("havecopy"); if (!strcmp(bar, "no")) { /* doesnt copy */ return 0; } else { /* does copy */ return 1; } } ], tcl_cv_putenv_copy=no, tcl_cv_putenv_copy=yes, tcl_cv_putenv_copy=no))AC_MSG_RESULT($tcl_cv_putenv_copy)if test $tcl_cv_putenv_copy = yes; then AC_DEFINE(HAVE_PUTENV_THAT_COPIES)fi#--------------------------------------------------------------------# Check for support of nl_langinfo function#--------------------------------------------------------------------SC_ENABLE_LANGINFO#--------------------------------------------------------------------# Look for libraries that we will need when compiling the Tcl shell#--------------------------------------------------------------------SC_TCL_LINK_LIBS# Add the threads support librariesLIBS="$LIBS$THREADS_LIBS"SC_ENABLE_SHARED#--------------------------------------------------------------------# The statements below define a collection of compile flags. This# macro depends on the value of SHARED_BUILD, and should be called# after SC_ENABLE_SHARED checks the configure switches.#--------------------------------------------------------------------SC_CONFIG_CFLAGSSC_ENABLE_SYMBOLSTCL_DBGX=${DBGX}#--------------------------------------------------------------------# 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.#--------------------------------------------------------------------SC_BLOCKING_STYLE#--------------------------------------------------------------------# The statements below define a collection of symbols related to# building libtcl as a shared library instead of a static library.#--------------------------------------------------------------------TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}"SC_ENABLE_FRAMEWORK# 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}"# 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 "$FRAMEWORK_BUILD" = "1" ; then TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl" TCL_LIB_SPEC="-framework Tcl" TCL_LIB_FILE="Tcl"elif test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then 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_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}"else TCL_BUILD_EXP_FILE="lib.exp" eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}" # Replace DBGX with TCL_DBGX eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\"" if test "$GCC" = "yes" ; then TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`" TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`" else TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}" TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}" fifiVERSION='${VERSION}'eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}"VERSION=${TCL_VERSION}#--------------------------------------------------------------------# 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 "$FRAMEWORK_BUILD" = "1" ; then TCL_PACKAGE_PATH="${libdir}/Resources/Scripts"elif test "$prefix" != "$exec_prefix"; then TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"else TCL_PACKAGE_PATH="${prefix}/lib"fi#--------------------------------------------------------------------# The statements below define various symbols relating to Tcl# stub support.#--------------------------------------------------------------------# Replace ${VERSION} with contents of ${TCL_VERSION}eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"# Replace DBGX with TCL_DBGXeval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}"else TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}"fiTCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}"TCL_STUB_LIB_SPEC="-L${libdir} ${TCL_STUB_LIB_FLAG}"TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}"TCL_STUB_LIB_PATH="${libdir}/${TCL_STUB_LIB_FILE}"# Install time header dir can be set via --includedireval "TCL_INCLUDE_SPEC=\"-I${includedir}\""#------------------------------------------------------------------------# tclConfig.sh refers to this by a different name#------------------------------------------------------------------------TCL_SHARED_BUILD=${SHARED_BUILD}AC_SUBST(TCL_VERSION)AC_SUBST(TCL_MAJOR_VERSION)AC_SUBST(TCL_MINOR_VERSION)AC_SUBST(TCL_PATCH_LEVEL)AC_SUBST(TCL_LIB_FILE)AC_SUBST(TCL_LIB_FLAG)AC_SUBST(TCL_LIB_SPEC)AC_SUBST(TCL_STUB_LIB_FILE)AC_SUBST(TCL_STUB_LIB_FLAG)AC_SUBST(TCL_STUB_LIB_SPEC)AC_SUBST(TCL_STUB_LIB_PATH)AC_SUBST(TCL_INCLUDE_SPEC)AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)AC_SUBST(TCL_BUILD_STUB_LIB_PATH)AC_SUBST(TCL_SRC_DIR)AC_SUBST(TCL_DBGX)AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)AC_SUBST(TCL_SHARED_BUILD)AC_SUBST(LD_LIBRARY_PATH_VAR)AC_SUBST(TCL_BUILD_LIB_SPEC)AC_SUBST(TCL_NEEDS_EXP_FILE)AC_SUBST(TCL_BUILD_EXP_FILE)AC_SUBST(TCL_EXP_FILE)AC_SUBST(TCL_LIB_VERSIONS_OK)AC_SUBST(TCL_SHARED_LIB_SUFFIX)AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)AC_SUBST(TCL_HAS_LONGLONG)AC_SUBST(BUILD_DLTEST)AC_SUBST(TCL_PACKAGE_PATH)AC_OUTPUT(Makefile dltest/Makefile tclConfig.sh)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -