⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aclocal.m4

📁 ncurses 库 可能有用酒用 没用就算了 我觉得还可以用
💻 M4
📖 第 1 页 / 共 3 页
字号:
		AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],			[initscr(); tgoto((char *)0, 0, 0);],			[cf_result=no],			[			LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"			AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],				[initscr()],				[cf_result=yes],				[cf_result=error])			])		AC_MSG_RESULT($cf_result)	fififi])dnldnl ---------------------------------------------------------------------------dnl CF_CURSES_WACS_MAP version: 3 updated: 2003/05/17 22:19:02dnl ------------------dnl Check for likely values of wacs_map[]:AC_DEFUN([CF_CURSES_WACS_MAP],[AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[	cf_cv_curses_wacs_map=unknown	for name in wacs_map _wacs_map __wacs_map _nc_wacs	do	AC_TRY_LINK([#ifndef _XOPEN_SOURCE_EXTENDED#define _XOPEN_SOURCE_EXTENDED#endif#include <${cf_cv_ncurses_header-curses.h}>],	[$name['k'] = *WACS_PLUS],	[cf_cv_curses_wacs_map=$name	 break])	done])])dnl ---------------------------------------------------------------------------dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52dnl ----------dnl "dirname" is not portable, so we fake it with a shell script.AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnldnl ---------------------------------------------------------------------------dnl CF_FIND_LIBRARY version: 8 updated: 2004/11/23 20:14:58dnl ---------------dnl Look for a non-standard library, given parameters for AC_TRY_LINK.  Wednl prefer a standard location, and use -L options only if we do not find thednl library in the standard library location(s).dnl	$1 = library namednl	$2 = library class, usually the same as library namednl	$3 = includesdnl	$4 = code fragment to compile/linkdnl	$5 = corresponding function-namednl	$6 = flag, nonnull if failure should not cause an error-exitdnldnl Sets the variable "$cf_libdir" as a side-effect, so we can see if we haddnl to use a -L option.AC_DEFUN([CF_FIND_LIBRARY],[	eval 'cf_cv_have_lib_'$1'=no'	cf_libdir=""	AC_CHECK_FUNC($5,		eval 'cf_cv_have_lib_'$1'=yes',[		cf_save_LIBS="$LIBS"		AC_MSG_CHECKING(for $5 in -l$1)		LIBS="-l$1 $LIBS"		AC_TRY_LINK([$3],[$4],			[AC_MSG_RESULT(yes)			 eval 'cf_cv_have_lib_'$1'=yes'			],			[AC_MSG_RESULT(no)			CF_LIBRARY_PATH(cf_search,$2)			for cf_libdir in $cf_search			do				AC_MSG_CHECKING(for -l$1 in $cf_libdir)				LIBS="-L$cf_libdir -l$1 $cf_save_LIBS"				AC_TRY_LINK([$3],[$4],					[AC_MSG_RESULT(yes)			 		 eval 'cf_cv_have_lib_'$1'=yes'					 break],					[AC_MSG_RESULT(no)					 LIBS="$cf_save_LIBS"])			done			])		])eval 'cf_found_library=[$]cf_cv_have_lib_'$1ifelse($6,,[if test $cf_found_library = no ; then	AC_ERROR(Cannot link $1 library)fi])])dnldnl ---------------------------------------------------------------------------dnl CF_FUNC_CURSES_VERSION version: 3 updated: 2003/05/17 22:19:02dnl ----------------------dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS.dnl It's a character string "SVR4", not documented.AC_DEFUN([CF_FUNC_CURSES_VERSION],[AC_CACHE_CHECK(for function curses_version, cf_cv_func_curses_version,[AC_TRY_RUN([#include <${cf_cv_ncurses_header-curses.h}>int main(){	char temp[1024];	sprintf(temp, "%s\n", curses_version());	exit(0);}],[cf_cv_func_curses_version=yes],[cf_cv_func_curses_version=no],[cf_cv_func_curses_version=unknown])rm -f core])test "$cf_cv_func_curses_version" = yes && AC_DEFINE(HAVE_CURSES_VERSION)])dnl ---------------------------------------------------------------------------dnl CF_GNU_SOURCE version: 4 updated: 2004/12/03 20:43:00dnl -------------dnl Check if we must define _GNU_SOURCE to get a reasonable value fordnl _XOPEN_SOURCE, upon which many POSIX definitions depend.  This is a defectdnl (or misfeature) of glibc2, which breaks portability of many applications,dnl since it is interwoven with GNU extensions.dnldnl Well, yes we could work around it...AC_DEFUN([CF_GNU_SOURCE],[AC_REQUIRE([CF_INTEL_COMPILER])if test "$INTEL_COMPILER" = no ; thenAC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[AC_TRY_COMPILE([#include <sys/types.h>],[#ifndef _XOPEN_SOURCEmake an error#endif],	[cf_cv_gnu_source=no],	[cf_save="$CPPFLAGS"	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"	 AC_TRY_COMPILE([#include <sys/types.h>],[#ifdef _XOPEN_SOURCEmake an error#endif],	[cf_cv_gnu_source=no],	[cf_cv_gnu_source=yes])	CPPFLAGS="$cf_save"	])])test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"fi])dnldnl ---------------------------------------------------------------------------dnl CF_HEADER_PATH version: 8 updated: 2002/11/10 14:46:59dnl --------------dnl Construct a search-list for a nonstandard header-fileAC_DEFUN([CF_HEADER_PATH],[CF_SUBDIR_PATH($1,$2,include)test "$includedir" != NONE && \test "$includedir" != "/usr/include" && \test -d "$includedir" && {	test -d $includedir &&    $1="[$]$1 $includedir"	test -d $includedir/$2 && $1="[$]$1 $includedir/$2"}test "$oldincludedir" != NONE && \test "$oldincludedir" != "/usr/include" && \test -d "$oldincludedir" && {	test -d $oldincludedir    && $1="[$]$1 $oldincludedir"	test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2"}])dnldnl ---------------------------------------------------------------------------dnl CF_INHERIT_SCRIPT version: 2 updated: 2003/03/01 23:50:42dnl -----------------dnl If we do not have a given script, look for it in the parent directory.AC_DEFUN([CF_INHERIT_SCRIPT],[test -f $1 || ( test -f ../$1 && cp ../$1 ./ )])dnldnl ---------------------------------------------------------------------------dnl CF_INTEL_COMPILER version: 1 updated: 2004/12/03 20:27:48dnl -----------------dnl Check if the given compiler is really the Intel compiler for Linux.dnl It tries to imitate gcc, but does not return an error when it finds adnl mismatch between prototypes, e.g., as exercised by CF_MISSING_CHECK.dnldnl This macro should be run "soon" after AC_PROG_CC, to ensure that it isdnl not mistaken for gcc.AC_DEFUN([CF_INTEL_COMPILER],[AC_REQUIRE([AC_PROG_CC])INTEL_COMPILER=noif test "$GCC" = yes ; then	case $host_os in	linux*|gnu*)		AC_MSG_CHECKING(if this is really Intel compiler)		cf_save_CFLAGS="$CFLAGS"		CFLAGS="$CFLAGS -no-gcc"		AC_TRY_COMPILE([],[#ifdef __INTEL_COMPILER#elsemake an error#endif],[INTEL_COMPILER=yescf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"],[])		CFLAGS="$cf_save_CFLAGS"		AC_MSG_RESULT($INTEL_COMPILER)		;;	esacfi])dnldnl ---------------------------------------------------------------------------dnl CF_LIBRARY_PATH version: 7 updated: 2002/11/10 14:46:59dnl ---------------dnl Construct a search-list for a nonstandard library-fileAC_DEFUN([CF_LIBRARY_PATH],[CF_SUBDIR_PATH($1,$2,lib)])dnldnl ---------------------------------------------------------------------------dnl CF_MSG_LOG version: 3 updated: 1997/09/07 14:05:52dnl ----------dnl Write a debug message to config.log, along with the line number in thednl configure script.AC_DEFUN([CF_MSG_LOG],[echo "(line __oline__) testing $* ..." 1>&AC_FD_CC])dnldnl ---------------------------------------------------------------------------dnl CF_NCURSES_CC_CHECK version: 3 updated: 2003/01/12 18:59:28dnl -------------------dnl Check if we can compile with ncurses' header filednl $1 is the cache variable to setdnl $2 is the header-file to includednl $3 is the root name (ncurses or ncursesw)AC_DEFUN([CF_NCURSES_CC_CHECK],[	AC_TRY_COMPILE([]ifelse($3,ncursesw,[#define _XOPEN_SOURCE_EXTENDED#undef  HAVE_LIBUTF8_H	/* in case we used CF_UTF8_LIB */#define HAVE_LIBUTF8_H	/* to force ncurses' header file to use cchar_t */])[#include <$2>],[#ifdef NCURSES_VERSION]ifelse($3,ncursesw,[#ifndef WACS_BSSB	make an error#endif])[printf("%s\n", NCURSES_VERSION);#else#ifdef __NCURSES_Hprintf("old\n");#else	make an error#endif#endif	]	,[$1=$cf_header]	,[$1=no])])dnldnl ---------------------------------------------------------------------------dnl CF_NCURSES_CPPFLAGS version: 17 updated: 2003/11/06 19:59:57dnl -------------------dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjustingdnl the CPPFLAGS variable so we can include its header.dnldnl The header files may be installed as either curses.h, or ncurses.h (woulddnl be obsolete, except that some packagers prefer this name to distinguish itdnl from a "native" curses implementation).  If not installed for overwrite,dnl the curses.h file would be in an ncurses subdirectory (e.g.,dnl /usr/include/ncurses), but someone may have installed overwriting thednl vendor's curses.  Only very old versions (pre-1.9.2d, the first autoconf'ddnl version) of ncurses don't define either __NCURSES_H or NCURSES_VERSION indnl the header.dnldnl If the installer has set $CFLAGS or $CPPFLAGS so that the ncurses headerdnl is already in the include-path, don't even bother with this, since we cannotdnl easily determine which file it is.  In this case, it has to be <curses.h>.dnldnl The optional parameter gives the root name of the library, in case it isdnl not installed as the default curses library.  That is how thednl wide-character version of ncurses is installed.AC_DEFUN([CF_NCURSES_CPPFLAGS],[AC_REQUIRE([CF_WITH_CURSES_DIR])AC_PROVIDE([CF_CURSES_CPPFLAGS])dnlcf_ncuhdr_root=ifelse($1,,ncurses,$1)test -n "$cf_cv_curses_dir" && \test "$cf_cv_curses_dir" != "no" && \CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"	for cf_header in $cf_header_list	do		CF_NCURSES_CC_CHECK(cf_cv_ncurses_h,$cf_header,$1)		test "$cf_cv_ncurses_h" != no && break	done])if test "$cf_cv_ncurses_h" != no ; then	cf_cv_ncurses_header=$cf_cv_ncurses_helseAC_CACHE_CHECK(for $cf_ncuhdr_root include-path, cf_cv_ncurses_h2,[	test -n "$verbose" && echo	CF_HEADER_PATH(cf_search,$cf_ncuhdr_root)	test -n "$verbose" && echo search path $cf_search	cf_save2_CPPFLAGS="$CPPFLAGS"	for cf_incdir in $cf_search	do		CF_ADD_INCDIR($cf_incdir)		for cf_header in \			ncurses.h \			curses.h		do			CF_NCURSES_CC_CHECK(cf_cv_ncurses_h2,$cf_header,$1)			if test "$cf_cv_ncurses_h2" != no ; then				cf_cv_ncurses_h2=$cf_incdir/$cf_header				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&AC_FD_MSG				break			fi			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&AC_FD_MSG		done		CPPFLAGS="$cf_save2_CPPFLAGS"		test "$cf_cv_ncurses_h2" != no && break	done	test "$cf_cv_ncurses_h2" = no && AC_ERROR(not found)	])	CF_DIRNAME(cf_1st_incdir,$cf_cv_ncurses_h2)	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header	fi	CF_ADD_INCDIR($cf_1st_incdir)fiAC_DEFINE(NCURSES)case $cf_cv_ncurses_header in # (vi*ncurses.h)	AC_DEFINE(HAVE_NCURSES_H)	;;esaccase $cf_cv_ncurses_header in # (vincurses/curses.h|ncurses/ncurses.h)	AC_DEFINE(HAVE_NCURSES_NCURSES_H)	;;ncursesw/curses.h|ncursesw/ncurses.h)	AC_DEFINE(HAVE_NCURSESW_NCURSES_H)	;;esacCF_NCURSES_VERSION])dnldnl ---------------------------------------------------------------------------dnl CF_NCURSES_LIBS version: 12 updated: 2004/04/27 16:26:05dnl ---------------dnl Look for the ncurses library.  This is a little complicated on Linux,dnl because it may be linked with the gpm (general purpose mouse) library.dnl Some distributions have gpm linked with (bsd) curses, which makes itdnl unusable with ncurses.  However, we don't want to link with gpm unlessdnl ncurses has a dependency, since gpm is normally set up as a shared library,dnl and the linker will record a dependency.dnldnl The optional parameter gives the root name of the library, in case it isdnl not installed as the default curses library.  That is how thednl wide-character version of ncurses is installed.AC_DEFUN([CF_NCURSES_LIBS],[AC_REQUIRE([CF_NCURSES_CPPFLAGS])cf_nculib_root=ifelse($1,,ncurses,$1)	# This works, except for the special case where we find gpm, but	# ncurses is in a nonstandard location via $LIBS, and we really want	# to link gpm.cf_ncurses_LIBS=""cf_ncurses_SAVE="$LIBS"AC_CHECK_LIB(gpm,Gpm_Open,	[AC_CHECK_LIB(gpm,initscr,		[LIBS="$cf_ncurses_SAVE"],		[cf_ncurses_LIBS="-lgpm"])])case $host_os in #(vifreebsd*)	# This is only necessary if you are linking against an obsolete	# version of ncurses (but it should do no harm, since it's static).	if test "$cf_nculib_root" = ncurses ; then		AC_CHECK_LIB(mytinfo,tgoto,[cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"])	fi	;;esacLIBS="$cf_ncurses_LIBS $LIBS"if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )then

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -