📄 configure
字号:
# 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}"fiif 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_LD_SEARCH_FLAGS, which causes a substitution of the# variable LIB_RUNTIME_DIR.eval "TK_CC_SEARCH_FLAGS=\"$TCL_LD_SEARCH_FLAGS\""TK_LD_SEARCH_FLAGS=`echo ${TK_CC_SEARCH_FLAGS} |sed -e "s|-Wl,||g" -e "s|,| |g"`#--------------------------------------------------------------------# 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.#--------------------------------------------------------------------echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6echo "configure:1784: checking for main in -lXbsd" >&5ac_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>&6else ac_save_LIBS="$LIBS"LIBS="-lXbsd $LIBS"cat > conftest.$ac_ext <<EOF#line 1792 "configure"#include "confdefs.h"int main() {main(); return 0; }EOFif { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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"firm -f conftest*LIBS="$ac_save_LIBS"fiif 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>&6fitk_checkBoth=0echo $ac_n "checking for connect""... $ac_c" 1>&6echo "configure:1822: checking for connect" >&5if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1827 "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#elseconnect();#endif; return 0; }EOFif { (eval echo configure:1850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then echo "$ac_t""yes" 1>&6 tk_checkSocket=0else echo "$ac_t""no" 1>&6tk_checkSocket=1fiif test "$tk_checkSocket" = 1; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6echo "configure:1872: checking for main in -lsocket" >&5ac_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>&6else ac_save_LIBS="$LIBS"LIBS="-lsocket $LIBS"cat > conftest.$ac_ext <<EOF#line 1880 "configure"#include "confdefs.h"int main() {main(); return 0; }EOFif { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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"firm -f conftest*LIBS="$ac_save_LIBS"fiif 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>&6tk_checkBoth=1fifiif test "$tk_checkBoth" = 1; then tk_oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6echo "configure:1913: checking for accept" >&5if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1918 "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#elseaccept();#endif; return 0; }EOFif { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then echo "$ac_t""yes" 1>&6 tk_checkNsl=0else echo "$ac_t""no" 1>&6LIBS=$tk_oldLibsfifiecho $ac_n "checking for gethostbyname""... $ac_c" 1>&6echo "configure:1963: checking for gethostbyname" >&5if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1968 "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#elsegethostbyname();#endif; return 0; }EOFif { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then echo "$ac_t""yes" 1>&6 :else echo "$ac_t""no" 1>&6echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6echo "configure:2009: checking for main in -lnsl" >&5ac_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>&6else ac_save_LIBS="$LIBS"LIBS="-lnsl $LIBS"cat > conftest.$ac_ext <<EOF#line 2017 "configure"#include "confdefs.h"int main() {main(); return 0; }EOFif { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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"firm -f conftest*LIBS="$ac_save_LIBS"fiif 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>&6fifi#--------------------------------------------------------------------# 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 ; then echo $ac_n "checking MIT X libraries""... $ac_c" 1>&6echo "configure:2060: 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 2066 "configure"#include "confdefs.h" #include <X11/Xlib.h> int main() { XOpenDisplay(0); ; return 0; }EOFif { (eval echo configure:2077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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>&6firm -f conftest* CFLAGS=$tk_oldCFlags LIBS=$tk_oldLibsfi#--------------------------------------------------------------------# On a few very rare systems, all of the libm.a stuff is# already in libc.a. Set compiler flags accordingly.# Also, Linux requires the "ieee" library for math to# work right (and it must appear before "-lm").#--------------------------------------------------------------------MATH_LIBS=""echo $ac_n "checking for sin""... $ac_c" 1>&6echo "configure:2104: checking for sin" >&5if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 2109 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char sin(); 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 sin();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_sin) || defined (__stub___sin)choke me#elsesin();#endif; return 0; }EOFif { (eval echo configure:2132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_sin=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_sin=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then echo "$ac_t""yes" 1>&6 :else echo "$ac_t""no" 1>&6MATH_LIBS="-lm"fiecho $ac_n "checking for main in -lieee""... $ac_c" 1>&6echo "configure:2153: checking for main in -lieee" >&5ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lieee $LIBS"cat > conftest.$ac_ext <<EOF#line 2161 "configure"#include "confdefs.h"int main() {main(); return 0; }EOFif { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conf
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -