📄 configure
字号:
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"fifi fi eval "$ac_cv_have_x"fi # $with_x != noif test "$have_x" != yes; then echo "$ac_t""$have_x" 1>&6 no_x=yeselse # 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>&6fiif test "$no_x" = "yes" ; then { echo "configure: error: Can't find X11 header files." 1>&2; exit 1; }fiif test "$x_includes" != "" ; then INC="$INC -I$x_includes"fiif test "$x_libraries" != "" ; then if test "$solaris" = 1 ; then LDFLAGS="$LDFLAGS -R$x_libraries" fi LDFLAGS="$LDFLAGS -L$x_libraries"fiX11_LIB="-lX11"# XXX any other X libs?#----------------------------------------# Find Tcl/Tk (need versions >= 7.5/4.1)#----------------------------------------# Find Tclfound_tcl_h="no"libtcl="no"# Check whether --with-tcl or --without-tcl was given.if test "${with_tcl+set}" = set; then withval="$with_tcl" dir=$withvalelse dir="none"fiif test "$dir" = "none" ; then ac_safe=`echo "tcl.h" | tr './\055' '___'`echo $ac_n "checking for tcl.h""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1412 "configure"#include "confdefs.h"#include <tcl.h>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 found_tcl_h="yes"else echo "$ac_t""no" 1>&6found_tcl_h="no"fi echo $ac_n "checking for -ltcl7.6""... $ac_c" 1>&6ac_lib_var=`echo tcl7.6'_'Tcl_Init | tr './+\055' '__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="-ltcl7.6 $LIBS"cat > conftest.$ac_ext <<EOF#line 1445 "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 Tcl_Init();int main() { return 0; }int t() {Tcl_Init(); return 0; }EOFif { (eval echo configure:1457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else 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 libtcl="-ltcl7.6"else echo "$ac_t""no" 1>&6libtcl="no"fi if test "$libtcl" = "no" ; then echo $ac_n "checking for -ltcl7.5""... $ac_c" 1>&6ac_lib_var=`echo tcl7.5'_'Tcl_Init | tr './+\055' '__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="-ltcl7.5 $LIBS"cat > conftest.$ac_ext <<EOF#line 1485 "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 Tcl_Init();int main() { return 0; }int t() {Tcl_Init(); return 0; }EOFif { (eval echo configure:1497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else 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 libtcl="-ltcl7.5"else echo "$ac_t""no" 1>&6libtcl="no"fi fi if test "$libtcl" = "no" ; then echo $ac_n "checking for -ltcl""... $ac_c" 1>&6ac_lib_var=`echo tcl'_'Tcl_Init | tr './+\055' '__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="-ltcl $LIBS"cat > conftest.$ac_ext <<EOF#line 1526 "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 Tcl_Init();int main() { return 0; }int t() {Tcl_Init(); return 0; }EOFif { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else 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 libtcl="-ltcl"else echo "$ac_t""no" 1>&6libtcl="no"fi fifiif test "$found_tcl_h" = "no" ; then echo $ac_n "checking for tcl.h""... $ac_c" 1>&6 places="$dir/include \ ../tcl7.6/generic \ /usr/src/tcl7.6/generic \ /usr/local/src/tcl7.6/generic \ /usr/src/local/tcl7.6/generic \ ../tcl7.5/generic \ /usr/src/tcl7.5/generic \ /usr/local/src/tcl7.5/generic \ /usr/src/local/tcl7.5/generic \ /usr/include \ /usr/local/include \ /usr/contrib/include \ $prefix/include \ $x_includes" for place in $places ; do if test -r $place/tcl.h ; then echo "$ac_t""$place" 1>&6 INC="$INC -I$place" found_tcl_h="yes" break fi done if test "$libtcl" = "-ltcl" ; then echo "configure: warning: Tcl library may be too old (need verion 7.5 or later)" 1>&2 fi if test "$found_tcl_h" = "no" ; then echo "$ac_t""nope" 1>&6 { echo "configure: error: Can't find tcl.h. Try the --with-tcl option." 1>&2; exit 1; } fifiif test "$libtcl" = "no" ; then echo $ac_n "checking for libtcl""... $ac_c" 1>&6 places="$dir/lib \ ../tcl7.6/unix \ /usr/src/tcl7.6/unix \ /usr/local/src/tcl7.6/unix \ /usr/src/local/tcl7.6/unix \ ../tcl7.5/unix \ /usr/src/tcl7.5/unix \ /usr/local/src/tcl7.5/unix \ /usr/src/local/tcl7.5/unix \ /usr/lib \ /usr/local/lib \ /usr/contrib/lib \ $prefix/lib \ $x_libraries" for place in $places; do if test "$solaris" = 1 ; then if test -r $place/libtcl7.6.so ; then echo "$ac_t""$place/libtcl7.6.so" 1>&6 LDFLAGS="$LDFLAGS -R$place -L$place" libtcl="-ltcl7.6" elif test -r $place/libtcl7.5.so ; then echo "$ac_t""$place/libtcl7.5.so" 1>&6 LDFLAGS="$LDFLAGS -R$place -L$place" libtcl="-ltcl7.5" elif test -r $place/lib/libtcl.so ; then echo "$ac_t""$place/libtcl.so" 1>&6 LDFLAGS="$LDFLAGS -R$place -L$place" libtcl="-ltcl" fi fi if test "$sunos" = 1 ; then if test -r $place/libtcl76.a ; then echo "$ac_t""$place/libtcl76.a" 1>&6 LDFLAGS="$LDFLAGS -L$place" libtcl="-ltcl76" elif test -r $place/libtcl75.a ; then echo "$ac_t""$place/libtcl75.a" 1>&6 LDFLAGS="$LDFLAGS -L$place" libtcl="-ltcl75" fi fi if test "$libtcl" = "no" ; then if test -r $place/libtcl7.6.a ; then echo "$ac_t""$place/libtcl7.6.a" 1>&6 LDFLAGS="$LDFLAGS -L$place" libtcl="-ltcl7.6" elif test -r $place/libtcl7.5.a ; then echo "$ac_t""$place/libtcl7.5.a" 1>&6 LDFLAGS="$LDFLAGS -L$place" libtcl="-ltcl7.5" elif test -r $place/libtcl.a ; then echo "$ac_t""$place/libtcl.a" 1>&6 LDFLAGS="$LDFLAGS -L$place" libtcl="-ltcl" fi fi if test "$libtcl" != "no" ; then break fi done if test "$libtcl" = "no" ; then echo "$ac_t""nope" 1>&6 { echo "configure: error: Can't find libtcl. Try the --with-tcl option." 1>&2; exit 1; } fififound_init_tcl="no"echo $ac_n "checking for Tcl runtime libraries""... $ac_c" 1>&6places="$dir/lib/tcl7.6 \ $dir/share/lib/tcl7.6 \ ../tcl7.6/library \ /usr/src/tcl7.6/library \ /usr/local/src/tcl7.6/library \ /usr/src/local/tcl7.6/library \ /usr/lib/tcl7.6 \ /usr/share/lib/tcl7.6 \ /usr/local/lib/tcl7.6 \ /usr/local/share/lib/tcl7.6 \ /usr/contrib/lib/tcl7.6 \ /usr/contrib/share/lib/tcl7.6 \ $prefix/lib/tcl7.6 \ $prefix/share/lib/tcl7.6 \ $x_libraries/tcl7.6 \ $dir/lib/tcl7.5 \ $dir/share/lib/tcl7.5 \ ../tcl7.5/library \ /usr/src/tcl7.5/library \ /usr/local/src/tcl7.5/library \ /usr/src/local/tcl7.5/library \ /usr/lib/tcl7.5 \ /usr/share/lib/tcl7.5 \ /usr/local/lib/tcl7.5 \ /usr/local/share/lib/tcl7.5 \ /usr/contrib/lib/tcl7.5 \ /usr/contrib/share/lib/tcl7.5 \ $prefix/lib/tcl7.5 \ $prefix/share/lib/tcl7.5 \ $x_libraries/tcl7.5"for place in $places; do if test -r $place/init.tcl ; then echo "$ac_t""$place" 1>&6 TCL_LIB=$place found_init_tcl="yes" break fidoneif test "$found_init_tcl" = "no" ; then echo "$ac_t""nope" 1>&6 { echo "configure: error: Can't find init.tcl. Try the --with-tcl option." 1>&2; exit 1; }fi# Find Tkfound_tk_h="no"libtk="no"# Check whether --with-tk or --without-tk was given.if test "${with_tk+set}" = set; then withval="$with_tk" dir=$withvalelse dir="none"fiif test "$dir" = "none" ; then ac_safe=`echo "tk.h" | tr './\055' '___'`echo $ac_n "checking for tk.h""... $ac_c" 1>&6if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1737 "configure"#include "confdefs.h"#include <tk.h>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 found_tk_h="yes"else echo "$ac_t""no" 1>&6found_tk_h="no"fi if test "$sunos" = 1 ; then echo $ac_n "checking for -ltk42""... $ac_c" 1>&6ac_lib_var=`echo tk42'_'Tk_Init | tr './+\055' '__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="-ltk42 $LIBS"cat > conftest.$ac_ext <<EOF#line 1771 "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 Tk_Init();int main() { return 0; }int t() {Tk_Init(); return 0; }EOFif { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -