⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcl.m4

📁 这是leon3处理器的交叉编译链
💻 M4
📖 第 1 页 / 共 2 页
字号:
#------------------------------------------------------------------------# SC_PATH_TCLCONFIG --##	Locate the tclConfig.sh file and perform a sanity check on#	the Tcl compile flags#	Currently a no-op for Windows## Arguments:#	PATCH_LEVEL	The patch level for Tcl if any.## Results:##	Adds the following arguments to configure:#		--with-tcl=...##	Sets the following vars:#		TCL_BIN_DIR	Full path to the tclConfig.sh file#------------------------------------------------------------------------AC_DEFUN(SC_PATH_TCLCONFIG, [    AC_MSG_CHECKING([the location of tclConfig.sh])    if test -d ../../tcl8.4$1/win;  then	TCL_BIN_DIR_DEFAULT=../../tcl8.4$1/win    elif test -d ../../tcl8.4/win;  then	TCL_BIN_DIR_DEFAULT=../../tcl8.4/win    else	TCL_BIN_DIR_DEFAULT=../../tcl/win    fi        AC_ARG_WITH(tcl, [  --with-tcl=DIR          use Tcl 8.4 binaries from DIR],	    TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DIR_DEFAULT; pwd`)    if test ! -d $TCL_BIN_DIR; then	AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist)    fi    if test ! -f $TCL_BIN_DIR/tclConfig.sh; then	AC_MSG_ERROR(There is no tclConfig.sh in $TCL_BIN_DIR:  perhaps you did not specify the Tcl *build* directory (not the toplevel Tcl directory) or you forgot to configure Tcl?)    fi    AC_MSG_RESULT($TCL_BIN_DIR/tclConfig.sh)])#------------------------------------------------------------------------# SC_PATH_TKCONFIG --##	Locate the tkConfig.sh file#	Currently a no-op for Windows## Arguments:#	none## Results:##	Adds the following arguments to configure:#		--with-tk=...##	Sets the following vars:#		TK_BIN_DIR	Full path to the tkConfig.sh file#------------------------------------------------------------------------AC_DEFUN(SC_PATH_TKCONFIG, [    AC_MSG_CHECKING([the location of tkConfig.sh])    if test -d ../../tk8.4$1/win;  then	TK_BIN_DIR_DEFAULT=../../tk8.4$1/win    elif test -d ../../tk8.4/win;  then	TK_BIN_DIR_DEFAULT=../../tk8.4/win    else	TK_BIN_DIR_DEFAULT=../../tk/win    fi        AC_ARG_WITH(tk, [  --with-tk=DIR          use Tk 8.4 binaries from DIR],	    TK_BIN_DIR=$withval, TK_BIN_DIR=`cd $TK_BIN_DIR_DEFAULT; pwd`)    if test ! -d $TK_BIN_DIR; then	AC_MSG_ERROR(Tk directory $TK_BIN_DIR does not exist)    fi    if test ! -f $TK_BIN_DIR/tkConfig.sh; then	AC_MSG_ERROR(There is no tkConfig.sh in $TK_BIN_DIR:  perhaps you did not specify the Tk *build* directory (not the toplevel Tk directory) or you forgot to configure Tk?)    fi    AC_MSG_RESULT([$TK_BIN_DIR/tkConfig.sh])])#------------------------------------------------------------------------# SC_LOAD_TCLCONFIG --##	Load the tclConfig.sh file#	Currently a no-op for Windows## Arguments:#	#	Requires the following vars to be set:#		TCL_BIN_DIR## Results:##	Subst the following vars:#		TCL_BIN_DIR#		TCL_SRC_DIR#		TCL_LIB_FILE##------------------------------------------------------------------------AC_DEFUN(SC_LOAD_TCLCONFIG, [    AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then        AC_MSG_RESULT([loading])	. $TCL_BIN_DIR/tclConfig.sh    else        AC_MSG_RESULT([file not found])    fi    #    # If the TCL_BIN_DIR is the build directory (not the install directory),    # then set the common variable name to the value of the build variables.    # For example, the variable TCL_LIB_SPEC will be set to the value    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC    # instead of TCL_BUILD_LIB_SPEC since it will work with both an    # installed and uninstalled version of Tcl.    #    if test -f $TCL_BIN_DIR/Makefile ; then        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}    fi    #    # eval is required to do the TCL_DBGX substitution    #    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""    AC_SUBST(TCL_VERSION)    AC_SUBST(TCL_BIN_DIR)    AC_SUBST(TCL_SRC_DIR)    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)])#------------------------------------------------------------------------# SC_LOAD_TKCONFIG --##	Load the tkConfig.sh file#	Currently a no-op for Windows## Arguments:#	#	Requires the following vars to be set:#		TK_BIN_DIR## Results:##	Sets the following vars that should be in tkConfig.sh:#		TK_BIN_DIR#------------------------------------------------------------------------AC_DEFUN(SC_LOAD_TKCONFIG, [    AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh])    if test -f "$TK_BIN_DIR/tkConfig.sh" ; then        AC_MSG_RESULT([loading])	. $TK_BIN_DIR/tkConfig.sh    else        AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh])    fi    AC_SUBST(TK_BIN_DIR)    AC_SUBST(TK_SRC_DIR)    AC_SUBST(TK_LIB_FILE)])#------------------------------------------------------------------------# SC_ENABLE_SHARED --##	Allows the building of shared libraries## Arguments:#	none#	# Results:##	Adds the following arguments to configure:#		--enable-shared=yes|no##	Defines the following vars:#		STATIC_BUILD	Used for building import/export libraries#				on Windows.##	Sets the following vars:#		SHARED_BUILD	Value of 1 or 0#------------------------------------------------------------------------AC_DEFUN(SC_ENABLE_SHARED, [    AC_MSG_CHECKING([how to build libraries])    AC_ARG_ENABLE(shared,	[  --enable-shared         build and link with shared libraries [--enable-shared]],    [tcl_ok=$enableval], [tcl_ok=yes])    if test "${enable_shared+set}" = set; then	enableval="$enable_shared"	tcl_ok=$enableval    else	tcl_ok=yes    fi    if test "$tcl_ok" = "yes" ; then	AC_MSG_RESULT([shared])	SHARED_BUILD=1    else	AC_MSG_RESULT([static])	SHARED_BUILD=0	AC_DEFINE(STATIC_BUILD)    fi])#------------------------------------------------------------------------# SC_ENABLE_THREADS --##	Specify if thread support should be enabled## Arguments:#	none#	# Results:##	Adds the following arguments to configure:#		--enable-threads=yes|no##	Defines the following vars:#		TCL_THREADS#------------------------------------------------------------------------AC_DEFUN(SC_ENABLE_THREADS, [    AC_MSG_CHECKING(for building with threads)    AC_ARG_ENABLE(threads, [  --enable-threads        build with threads],	[tcl_ok=$enableval], [tcl_ok=no])    if test "$tcl_ok" = "yes"; then	AC_MSG_RESULT(yes)	TCL_THREADS=1	AC_DEFINE(TCL_THREADS)	# USE_THREAD_ALLOC tells us to try the special thread-based	# allocator that significantly reduces lock contention	AC_DEFINE(USE_THREAD_ALLOC)    else	TCL_THREADS=0	AC_MSG_RESULT([no (default)])    fi    AC_SUBST(TCL_THREADS)])#------------------------------------------------------------------------# SC_ENABLE_SYMBOLS --##	Specify if debugging symbols should be used#	Memory (TCL_MEM_DEBUG) and compile (TCL_COMPILE_DEBUG) debugging#	can also be enabled.## Arguments:#	none#	#	Requires the following vars to be set in the Makefile:#		CFLAGS_DEBUG#		CFLAGS_OPTIMIZE#	# Results:##	Adds the following arguments to configure:#		--enable-symbols##	Defines the following vars:#		CFLAGS_DEFAULT	Sets to $(CFLAGS_DEBUG) if true#				Sets to $(CFLAGS_OPTIMIZE) if false#		LDFLAGS_DEFAULT	Sets to $(LDFLAGS_DEBUG) if true#				Sets to $(LDFLAGS_OPTIMIZE) if false#		DBGX		Debug library extension##------------------------------------------------------------------------AC_DEFUN(SC_ENABLE_SYMBOLS, [    AC_MSG_CHECKING([for build with symbols])    AC_ARG_ENABLE(symbols, [  --enable-symbols        build with debugging symbols [--disable-symbols]],    [tcl_ok=$enableval], [tcl_ok=no])# 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=""	AC_MSG_RESULT([no])    else	CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'	LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'	DBGX=g	if test "$tcl_ok" = "yes"; then	    AC_MSG_RESULT([yes (standard debugging)])	fi    fi    AC_SUBST(CFLAGS_DEFAULT)    AC_SUBST(LDFLAGS_DEFAULT)    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then	AC_DEFINE(TCL_MEM_DEBUG)    fi    if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then	AC_DEFINE(TCL_COMPILE_DEBUG)	AC_DEFINE(TCL_COMPILE_STATS)    fi    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then	if test "$tcl_ok" = "all"; then	    AC_MSG_RESULT([enabled symbols mem compile debugging])	else	    AC_MSG_RESULT([enabled $tcl_ok debugging])	fi    fi])#--------------------------------------------------------------------# SC_CONFIG_CFLAGS##	Try to determine the proper flags to pass to the compiler#	for building shared libraries and other such nonsense.##	NOTE: The backslashes in quotes below are substituted twice#	due to the fact that they are in a macro and then inlined#	in the final configure script.## Arguments:#	none## Results:##	Can the following vars:#		EXTRA_CFLAGS#		CFLAGS_DEBUG#		CFLAGS_OPTIMIZE#		CFLAGS_WARNING#		LDFLAGS_DEBUG#		LDFLAGS_OPTIMIZE#		LDFLAGS_CONSOLE#		LDFLAGS_WINDOW#		CC_OBJNAME#		CC_EXENAME#		CYGPATH#		STLIB_LD#		SHLIB_LD

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -