?? configure
字號:
test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" rm -f conftest.out fielse cat > conftest.$ac_ext <<EOF#line 1358 "configure"#include "confdefs.h"#include <${cf_cv_ncurses_header-curses.h}>#include <stdio.h>int main(){ FILE *fp = fopen("$cf_tempfile", "w");#ifdef NCURSES_VERSION# ifdef NCURSES_VERSION_PATCH fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);# else fprintf(fp, "%s\n", NCURSES_VERSION);# endif#else# ifdef __NCURSES_H fprintf(fp, "old\n");# else make an error# endif#endif exit(0);}EOFif { (eval echo configure:1382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/nullthen cf_cv_ncurses_version=`cat $cf_tempfile`else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5firm -fr conftest*fi rm -f $cf_tempfilefiecho "$ac_t""$cf_cv_ncurses_version" 1>&6test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF#define NCURSES 1EOF echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6echo "configure:1406: checking if we have identified curses libraries" >&5cat > conftest.$ac_ext <<EOF#line 1408 "configure"#include "confdefs.h"#include <${cf_cv_ncurses_header-curses.h}>int main() {initscr(); tgoto("?", 0,0); return 0; }EOFif { (eval echo configure:1415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cf_result=nofirm -f conftest*echo "$ac_t""$cf_result" 1>&6if test "$cf_result" = no ; thencase $host_os in #(vifreebsd*) #(vi echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6echo "configure:1431: checking for tgoto in -lmytinfo" >&5ac_lib_var=`echo mytinfo'_'tgoto | 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="-lmytinfo $LIBS"cat > conftest.$ac_ext <<EOF#line 1439 "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 tgoto();int main() {tgoto(); return 0; }EOFif { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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="-lmytinfo $LIBS"else echo "$ac_t""no" 1>&6fi ;;hpux10.*|hpux11.*) #(vi echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6echo "configure:1473: checking for initscr in -lcur_colr" >&5ac_lib_var=`echo cur_colr'_'initscr | 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="-lcur_colr $LIBS"cat > conftest.$ac_ext <<EOF#line 1481 "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 initscr();int main() {initscr(); return 0; }EOFif { (eval echo configure:1492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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="-lcur_colr $LIBS" ac_cv_func_initscr=yes else echo "$ac_t""no" 1>&6 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6echo "configure:1515: checking for initscr in -lHcurses" >&5ac_lib_var=`echo Hcurses'_'initscr | 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="-lHcurses $LIBS"cat > conftest.$ac_ext <<EOF#line 1523 "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 initscr();int main() {initscr(); return 0; }EOFif { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 # HP's header uses __HP_CURSES, but user claims _HP_CURSES. LIBS="-lHcurses $LIBS" CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS" ac_cv_func_initscr=yes else echo "$ac_t""no" 1>&6fifi ;;linux*) # Suse Linux does not follow /usr/lib convention LIBS="$LIBS -L/lib" ;;sunos3*|sunos4*) test -d /usr/5lib && \ LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap" ac_cv_func_initscr=yes ;;esacif test ".$ac_cv_func_initscr" != .yes ; then cf_save_LIBS="$LIBS" cf_term_lib="" cf_curs_lib="" if test ".${cf_cv_ncurses_version-no}" != .no then cf_check_list="ncurses curses cursesX" else cf_check_list="cursesX curses ncurses" fi # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. echo $ac_n "checking for tgoto""... $ac_c" 1>&6echo "configure:1587: checking for tgoto" >&5if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1592 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char tgoto(); 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 tgoto();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_tgoto) || defined (__stub___tgoto)choke me#elsetgoto();#endif; return 0; }EOFif { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_tgoto=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_tgoto=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then echo "$ac_t""yes" 1>&6 cf_term_lib=predefinedelse echo "$ac_t""no" 1>&6 for cf_term_lib in $cf_check_list termcap termlib unknown do echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6echo "configure:1636: checking for tgoto in -l$cf_term_lib" >&5ac_lib_var=`echo $cf_term_lib'_'tgoto | 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="-l$cf_term_lib $LIBS"cat > conftest.$ac_ext <<EOF#line 1644 "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 tgoto();int main() {tgoto(); return 0; }EOFif { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 breakelse echo "$ac_t""no" 1>&6fi done fi # Check for library containing initscr test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" for cf_curs_lib in $cf_check_list xcurses jcurses unknown do echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6echo "configure:1685: checking for initscr in -l$cf_curs_lib" >&5ac_lib_var=`echo $cf_curs_lib'_'initscr | 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="-l$cf_curs_lib $LIBS"cat > conftest.$ac_ext <<EOF#line 1693 "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 initscr();int main() {initscr(); return 0; }EOFif { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 breakelse echo "$ac_t""no" 1>&6fi done test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; } LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6echo "configure:1730: checking if we can link with $cf_curs_lib library" >&5 cat > conftest.$ac_ext <<EOF#line 1732 "configure"#include "confdefs.h"#include <${cf_cv_ncurses_header-curses.h}>int main() {initscr(); return 0; }EOFif { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cf_result=nofirm -f conftest* echo "$ac_t""$cf_result" 1>&6 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; } elif test "$cf_curs_lib" = "$cf_term_lib" ; then : elif test "$cf_term_lib" != predefined ; then echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6echo "configure:1755: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 cat > conftest.$ac_ext <<EOF#line 1757 "configure"#include "confdefs.h"#include <${cf_cv_ncurses_header-curses.h}>int main() {initscr(); tgoto((char *)0, 0, 0);; return 0; }EOFif { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=noelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" cat > conftest.$ac_ext <<EOF#line 1774 "configure"#include "confdefs.h"#include <${cf_cv_ncurses_header-curses.h}>int main() {initscr(); return 0; }EOFif { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cf_result=errorfirm -f conftest* firm -f conftest* echo "$ac_t""$cf_result" 1>&6 fififi ;;ncurses)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -