📄 configure
字号:
#ifdef _XOPEN_SOURCEmake an error#endif; return 0; }EOFif { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_gnu_source=noelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cf_cv_gnu_source=yesfirm -f conftest* CPPFLAGS="$cf_save" firm -f conftest*fiecho "$ac_t""$cf_cv_gnu_source" 1>&6test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"fi ;;mirbsd*) #(vi # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h> ;;netbsd*) #(vi # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw ;;openbsd*) #(vi # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw ;;osf[45]*) #(vi CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE" ;;sco*) #(vi # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer ;;solaris*) #(vi CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__" ;;*) echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6echo "configure:1462: checking if we should define _XOPEN_SOURCE" >&5if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1468 "configure"#include "confdefs.h"#include <sys/types.h>int main() {#ifndef _XOPEN_SOURCEmake an error#endif; return 0; }EOFif { (eval echo configure:1478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_xopen_source=noelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE" cat > conftest.$ac_ext <<EOF#line 1488 "configure"#include "confdefs.h"#include <sys/types.h>int main() {#ifdef _XOPEN_SOURCEmake an error#endif; return 0; }EOFif { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_xopen_source=noelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cf_cv_xopen_source=$cf_XOPEN_SOURCEfirm -f conftest* CPPFLAGS="$cf_save" firm -f conftest*fiecho "$ac_t""$cf_cv_xopen_source" 1>&6test "$cf_cv_xopen_source" != no && CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE -D_XOPEN_SOURCE=$cf_cv_xopen_source" cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCEecho $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6echo "configure:1520: checking if we should define _POSIX_C_SOURCE" >&5if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else echo "(line 1526) testing if the symbol is already defined go no further ..." 1>&5 cat > conftest.$ac_ext <<EOF#line 1529 "configure"#include "confdefs.h"#include <sys/types.h>int main() {#ifndef _POSIX_C_SOURCEmake an error#endif; return 0; }EOFif { (eval echo configure:1539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_posix_c_source=noelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cf_want_posix_source=no case .$cf_POSIX_C_SOURCE in .[12]??*) cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" ;; .2) cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE" cf_want_posix_source=yes ;; .*) cf_want_posix_source=yes ;; esac if test "$cf_want_posix_source" = yes ; then cat > conftest.$ac_ext <<EOF#line 1561 "configure"#include "confdefs.h"#include <sys/types.h>int main() {#ifdef _POSIX_SOURCEmake an error#endif; return 0; }EOFif { (eval echo configure:1571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then :else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cf_cv_posix_c_source="$cf_cv_posix_c_source -U_POSIX_SOURCE -D_POSIX_SOURCE"firm -f conftest* fi echo "(line 1582) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5 cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source" echo "(line 1587) testing if the second compile does not leave our definition intact error ..." 1>&5 cat > conftest.$ac_ext <<EOF#line 1590 "configure"#include "confdefs.h"#include <sys/types.h>int main() {#ifndef _POSIX_C_SOURCEmake an error#endif; return 0; }EOFif { (eval echo configure:1600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then :else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* cf_cv_posix_c_source=nofirm -f conftest* CPPFLAGS="$cf_save" firm -f conftest*fiecho "$ac_t""$cf_cv_posix_c_source" 1>&6test "$cf_cv_posix_c_source" != no && CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source" ;;esac# Check whether --with-curses-dir or --without-curses-dir was given.if test "${with_curses_dir+set}" = set; then withval="$with_curses_dir" case ".$withval" in #(vi.\$\(*\)*|.\'*\'*) #(vi ;;..|./*|.\\*) #(vi ;;.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX ;;.\${*prefix}*) #(vi eval withval="$withval" case ".$withval" in #(vi .NONE/*) withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%` ;; esac ;; #(vi.NONE/*) withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%` ;;*) { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; } ;;esac cf_cv_curses_dir=$withvalelse cf_cv_curses_dir=nofi# Check whether --with-5lib or --without-5lib was given.if test "${with_5lib+set}" = set; then withval="$with_5lib" LIBS="-L/usr/5lib $LIBS" CPPFLAGS="$CPPFLAGS -I/usr/5include"fi# Check whether --with-ncursesw or --without-ncursesw was given.if test "${with_ncursesw+set}" = set; then withval="$with_ncursesw" cf_cv_screen=ncurseswfi# Check whether --with-ncurses or --without-ncurses was given.if test "${with_ncurses+set}" = set; then withval="$with_ncurses" cf_cv_screen=ncursesficase $cf_cv_screen incurses) echo $ac_n "checking for extra include directories""... $ac_c" 1>&6echo "configure:1689: checking for extra include directories" >&5if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cf_cv_curses_incdir=nocase $host_os in #(vihpux10.*|hpux11.*) #(vi test -d /usr/include/curses_colr && \ cf_cv_curses_incdir="-I/usr/include/curses_colr" ;;sunos3*|sunos4*) test -d /usr/5lib && \ test -d /usr/5include && \ cf_cv_curses_incdir="-I/usr/5include" ;;esacfiecho "$ac_t""$cf_cv_curses_incdir" 1>&6test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6echo "configure:1713: checking if we have identified curses headers" >&5if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cf_cv_ncurses_header=nonefor cf_header in \ curses.h \ ncurses.h \ ncurses/curses.h \ ncurses/ncurses.hdocat > conftest.$ac_ext <<EOF#line 1726 "configure"#include "confdefs.h"#include <${cf_header}>int main() {initscr(); tgoto("?", 0,0); return 0; }EOFif { (eval echo configure:1733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_header=$cf_header; breakelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5firm -f conftest*donefiecho "$ac_t""$cf_cv_ncurses_header" 1>&6if test "$cf_cv_ncurses_header" = none ; then { echo "configure: error: No curses header-files found" 1>&2; exit 1; }fi# cheat, to get the right #define's for HAVE_NCURSES_H, etc.for ac_hdr in $cf_cv_ncurses_headerdoac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6echo "configure:1756: checking for $ac_hdr" >&5if 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 1761 "configure"#include "confdefs.h"#include <$ac_hdr>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&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 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <<EOF#define $ac_tr_hdr 1EOF else echo "$ac_t""no" 1>&6fidone echo $ac_n "checking for ncurses version""... $ac_c" 1>&6echo "configure:1796: checking for ncurses version" >&5if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cf_cv_ncurses_version=no cf_tempfile=out$$ rm -f $cf_tempfile if test "$cross_compiling" = yes; then # This will not work if the preprocessor splits the line after the # Autoconf token. The 'unproto' program does that. cat > conftest.$ac_ext <<EOF#include <${cf_cv_ncurses_header-curses.h}>#undef Autoconf#ifdef NCURSES_VERSIONAutoconf NCURSES_VERSION#else#ifdef __NCURSES_HAutoconf "old"#endif;#endifEOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" { (eval echo configure:1822: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } if test -f conftest.out ; then cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" rm -f conftest.out fielse cat > conftest.$ac_ext <<EOF#line 1831 "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:1855: \"$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:1879: checking if we have identified curses libraries" >&5cat > conftest.$ac_ext <<EOF#line 1881 "configure"#include "confdefs.h"#include <${cf_cv_ncurses_header-curses.h}>int main() {initscr(); tgoto("?", 0,0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -