📄 configure
字号:
/usr/local/tk3.3 \ /usr/local/tcl7.0-tk3.3 \ /usr/contrib \ /usr/contrib/tk3.6 \ /usr/contrib/tcl7.3-tk3.6 \ /usr/contrib/tk3.3 \ /usr/contrib/tcl7.0-tk3.3 \ $HOME/tcl \ $HOME/tcl7.3 \ /opt/Tcl \ /opt/local \ /opt/local/tk3.6 \ /usr/bin \ /Tools/tk \ /usr/sgitcl \ /usr/pkg \ /software/$archdir/apps/packages/tcl* \ /local/encap/tk-3.4 $TCL_DIR ; do if test -r $dir/include/tk.h ; then # Check for correct version tkversion=`grep 'TK_MAJOR_VERSION' $dir/include/tk.h | \ sed -e 's/^.*TK_MAJOR_VERSION[^0-9]*\([0-9]*\).*$/\1/'` tk2version=`grep 'TK_MINOR_VERSION' $dir/include/tk.h | \ sed -e 's/^.*TK_MINOR_VERSION[^0-9]*\([0-9]*\).*$/\1/'` tkupversion="$tkversion.$tk2version" if test "$tkversion" != "3" ; then # Try for later versions for UPSHOT if test -z "$TK_UPDIR" -a $tkversion -ge 3 ; then TK_UPDIR=$dir TK_UPVERSION=$tkversion if test -r $TK_UPDIR/lib/libtk.a -o \ -r $TK_UPDIR/lib/libtk.so ; then continue elif test -r $TK_UPDIR/lib/libtk$tkupversion.a -o \ -r $TK_UPDIR/lib/libtk$tkupversion.so ; then continue else TK_UPDIR="" TK_UPVERSION="" fi fi # Skip if it is the wrong version foundversion=$tkversion continue fi if test -r $dir/lib/libtk.a -o -r $dir/lib/libtk.so ; then TK_DIR=$dir break fi for file in $dir/lib/libtk*.a ; do if test -r $file ; then TK_DIR_W="$TK_DIR_W $file" fi done fidonefiif test -n "$TK_DIR" ; then if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""found $TK_DIR/include/tk.h and $TK_DIR/lib/libtk"elseecho "$ac_t""found $TK_DIR/include/tk.h and $TK_DIR/lib/libtk" 1>&1fi FOUND_TK36=1else FOUND_TK36=0 if test -n "$TK_DIR_W" ; then if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""found $TK_DIR_W but need libtk.a (and version 3.6) "elseecho "$ac_t""found $TK_DIR_W but need libtk.a (and version 3.6) " 1>&1fi else if test -z "$foundversion" ; then if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""no"elseecho "$ac_t""no" 1>&1fi else if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""no: found version $foundversion but need 3.6"elseecho "$ac_t""no: found version $foundversion but need 3.6" 1>&1fi FOUND_TK=$TK_UPVERSION fi fififiif test -z "$TCL_DIR" ; then print_error "Could not find libraries for TCL (needed for Upshot)" print_error "Please specify them with the -tcldir=path option." print_error "Aborting build of nupshot" exit 1fiif test -z "$TK_DIR" ; then print_error "Could not find libraries for TK (needed for Upshot)" print_error "Please specify them with the -tkdir=path option." print_error "Aborting build of nupshot" exit 1fiif test -z "$ac_echo_n" ; thenac_echo_n=yesif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c='' ac_t=' ' else ac_n=-n ac_c= ac_t= fielse ac_n= ac_c='\c' ac_t=fiac_echo_test=`echo foo 1>&1`if test -z "$ac_echo_test" ; then print_error "Your sh shell does not handle the output redirection" print_error "1>&1 correctly. Configure will work around this problem," print_error "but you should report the problem to your vendor."fifiif test -z "$ac_echo_test" -a 1 = 1 ; thenecho $ac_n "checking for version of TK""... $ac_c"elseecho $ac_n "checking for version of TK""... $ac_c" 1>&1fi/bin/rm -f conftestval## Some systems have a separate tcl dir; since we need both tcl and tk# we include both directories# Tk is going to load X11; if no X11, skip this stepif test -z "$no_x" -a -n "$TK_DIR" -a -n "$TCL_DIR" ; then CFLAGSsave="$CFLAGS" CFLAGS="$CFLAGS -I$TK_DIR/include -I$TCL_DIR/include $XINCLUDES" if test -n "$TKINCDIR" ; then CFLAGS="$CFLAGS -I$TKINCDIR/include" fi if test -n "$pac_cv_cross_compiling" ; then if test "$pac_cv_cross_compiling" = "yes" ; then cross_compiling=1 fielse if test -z "$ac_echo_n" ; thenac_echo_n=yesif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c='' ac_t=' ' else ac_n=-n ac_c= ac_t= fielse ac_n= ac_c='\c' ac_t=fiac_echo_test=`echo foo 1>&1`if test -z "$ac_echo_test" ; then print_error "Your sh shell does not handle the output redirection" print_error "1>&1 correctly. Configure will work around this problem," print_error "but you should report the problem to your vendor."fifiif test -z "$ac_echo_test" -a 1 = 1 ; thenecho $ac_n "checking whether cross-compiling""... $ac_c"elseecho $ac_n "checking whether cross-compiling""... $ac_c" 1>&1fi # If we cannot run a trivial program, we must be cross compiling. cat > conftest.c <<EOF#include "confdefs.h"main(){exit(0);}EOFeval $compileif test -s conftest && (./conftest; exit) 2>/dev/null; then pac_ok=1else pac_ok=0firm -fr conftest* if test $pac_ok = 1 ; then cat > conftest.c <<EOF#include "confdefs.h"main(){exit(1);}EOFeval $compileif test -s conftest && (./conftest; exit) 2>/dev/null; then pac_ok=0 firm -fr conftest* if test $pac_ok = 1 ; then pac_cv_cross_compiling="no" if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""no"elseecho "$ac_t""no" 1>&1fi else cross_compiling=1 pac_cv_cross_compiling="yes" if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""yes"elseecho "$ac_t""yes" 1>&1fi fi else cross_compiling=1 pac_cv_cross_compiling="yes" if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""yes"elseecho "$ac_t""yes" 1>&1fi fifiif test "$cross_compiling" = 1 -a -z "$TESTCC" ; then Pac_CV_NAME=0else if test -n "$TESTCC" ; then CCsav="$CC" CC="$TESTCC" fi cat > conftest.c <<EOF#include "confdefs.h"#include "tk.h"#include <stdio.h>main() { FILE *fp = fopen( "conftestval", "w" ); fprintf( fp, "%d.%d", TK_MAJOR_VERSION, TK_MINOR_VERSION );return 0; }EOF if test -n "$compile" ; then eval $compile else eval $ac_compile eval $ac_link fi if test ! -s conftest ; then echo "Could not build executable program:" echo "${CC-cc} $CFLAGS conftest.c -o conftest $LDFLAGS $LIBS" ${CC-cc} $CFLAGS conftest.c -o conftest $LDFLAGS $LIBS TK_VERSION="unavailable" else /bin/rm -f conftestout if test -s conftest && (./conftest; exit) 2>conftestout; then TK_VERSION=`cat conftestval` else TK_VERSION="unavailable" if test -s conftestout ; then cat conftestout >> config.log ; fi echo "Test program was" >> config.log cat conftest.c >> config.log fi fi if test -n "$TESTCC" ; then CC="$CCsav" fi rm -fr conftest*fi CFLAGS="$CFLAGSsave"elif test -n "$wishloc" ; then # It is possible to use a wish program with # set tk_version [ string range $tk_patchLevel 0 2 ] # puts stdout $tk_version TK_VERSION="unavailable"else TK_VERSION="unavailable"fiif test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""$TK_VERSION"elseecho "$ac_t""$TK_VERSION" 1>&1fiif test "$TK_VERSION" != 3.6 ; then print_error "This version of nupshot requires tk 3.6 The version in" print_error "$TK_DIR seems to be version $TK_VERSION." print_error "Aborting build of nupshot" exit 1fi## Some damaged implementations of tk (SGI's is known to be one)# require an ADDITIONAL library, which may be in the TK lib directory OR# in the X directory. This library is libXpm, it contains routines# like Xpm... which, as should be expected, are undocumented.# if test -s $TK_DIR/lib/libXpm.a ; then XPMLIB=-lXpmelse LIBS_save="${LIBS}"LIBS="${LIBS} -lXpm"have_lib=""if test -z "$ac_echo_n" ; thenac_echo_n=yesif (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c='' ac_t=' ' else ac_n=-n ac_c= ac_t= fielse ac_n= ac_c='\c' ac_t=fiac_echo_test=`echo foo 1>&1`if test -z "$ac_echo_test" ; then print_error "Your sh shell does not handle the output redirection" print_error "1>&1 correctly. Configure will work around this problem," print_error "but you should report the problem to your vendor."fifiif test -z "$ac_echo_test" -a 1 = 1 ; thenecho $ac_n "checking for -lXpm""... $ac_c"elseecho $ac_n "checking for -lXpm""... $ac_c" 1>&1fiif test ! -f confdefs.h ; then if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t"""!! SHELL ERROR !!""elseecho "$ac_t"""!! SHELL ERROR !!"" 1>&1fi echo "The file confdefs.h created by configure has been removed" echo "This may be a problem with your shell; some versions of LINUX" echo "have this problem. See the Installation guide for more" echo "information." exit 1ficat > conftest.c <<EOF#include "confdefs.h"int main() { exit(0); }int t() { main(); }EOFif eval $compile; then if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""yes"elseecho "$ac_t""yes" 1>&1fi have_lib="1" else if test -z "$ac_echo_test" -a 1 = 1 ; thenecho "$ac_t""no"elseecho "$ac_t""no" 1>&1fi expandcompile=`echo "$compile" | sed -e 's/>.*//'` eval echo "configure:$expandcompile" >> config.log echo "configure: failed program was:" >>config.log cat confdefs.h >> config.log cat conftest.c >> config.log if test -s conftest.out ; then cat conftest.out >> config.log else ${CC-cc} $CFLAGS conftest.c -o conftest $LDFLAGS $LIBS >> config.log 2>&1 fifirm -f conftest*LIBS="${LIBS_save}"if test -n "${have_lib}"; then :; XPMLIB="-lXpm"else :; fifiif test -z "$TKINCDIR" -a -s $TK_DIR/include/tk.h ; then TKINCDIR=$TK_DIRfiif test -z "$TCLINCDIR" -a -s $TCL_DIR/include/tcl.h ; then TCLINCDIR=$TCL_DIRfi# Set default prefixes.if test -n "$prefix"; then test -z "$exec_prefix" && exec_prefix='${prefix}' prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"fiif test -n "$exec_prefix"; then prsub="$prsubs%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"fi# Quote sed substitution magic chars in DEFS.cat >conftest.def <<EOF$DEFSEOFescape_ampersand_and_backslash='s%[&\\]%\\&%g'DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`rm -f conftest.def# Substitute for predefined variables.trap 'rm -f config.status; exit 1' 1 3 15echo creating config.statusrm -f config.statuscat > config.status <<EOF#!/bin/sh# Generated automatically by configure.# Run this file to recreate the current configuration.# This directory was configured as follows,# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:## $0 $configure_argsfor argdo case "\$arg" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;; *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; esacdonetrap 'rm -f Makefile; exit 1' 1 3 15NUPSHOT_HOME='$NUPSHOT_HOME'CC='$CC'CPP='$CPP'VPATH='$VPATH'tk_ok='$tk_ok'XINCLUDES='$XINCLUDES'XLIBSW='$XLIBSW'XPMLIB='$XPMLIB'TCL_DIR='$TCL_DIR'TK_DIR='$TK_DIR'TCLINCDIR='$TCLINCDIR'TKINCDIR='$TKINCDIR'USER_CFLAGS='$USER_CFLAGS'OPTFLAGS='$OPTFLAGS'LIBS='$LIBS'srcdir='$srcdir'DEFS='$DEFS'prefix='$prefix'exec_prefix='$exec_prefix'prsub='$prsub'extrasub='$extrasub'EOFcat >> config.status <<\EOFtop_srcdir=$srcdirCONFIG_FILES=${CONFIG_FILES-"Makefile"}for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then srcdir=$top_srcdir # Remove last slash and all that follows it. Not all systems have dirname. dir=`echo $file|sed 's%/[^/][^/]*$%%'` if test "$dir" != "$file"; then test "$top_srcdir" != . && srcdir=$top_srcdir/$dir test ! -d $dir && mkdir $dir fi echo creating $file rm -f $file echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $filecat $top_srcdir/${file}.in | sed -e "$prsub$extrasubs%@NUPSHOT_HOME@%$NUPSHOT_HOME%gs%@CC@%$CC%gs%@CPP@%$CPP%gs%@VPATH@%$VPATH%gs%@tk_ok@%$tk_ok%gs%@XINCLUDES@%$XINCLUDES%gs%@XLIBSW@%$XLIBSW%gs%@XPMLIB@%$XPMLIB%gs%@TCL_DIR@%$TCL_DIR%gs%@TK_DIR@%$TK_DIR%gs%@TCLINCDIR@%$TCLINCDIR%gs%@TKINCDIR@%$TKINCDIR%gs%@USER_CFLAGS@%$USER_CFLAGS%gs%@OPTFLAGS@%$OPTFLAGS%gs%@LIBS@%$LIBS%gs%@srcdir@%$srcdir%gs%@DEFS@%$DEFS%" >> $filefi; doneexit 0EOFchmod +x config.status${CONFIG_SHELL-/bin/sh} ./config.status
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -