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

📄 aclocal.m4

📁 ncurses-5.4
💻 M4
📖 第 1 页 / 共 5 页
字号:
dnl***************************************************************************dnl Copyright (c) 1998-2003,2004 Free Software Foundation, Inc.              *dnl                                                                          *dnl Permission is hereby granted, free of charge, to any person obtaining a  *dnl copy of this software and associated documentation files (the            *dnl "Software"), to deal in the Software without restriction, including      *dnl without limitation the rights to use, copy, modify, merge, publish,      *dnl distribute, distribute with modifications, sublicense, and/or sell       *dnl copies of the Software, and to permit persons to whom the Software is    *dnl furnished to do so, subject to the following conditions:                 *dnl                                                                          *dnl The above copyright notice and this permission notice shall be included  *dnl in all copies or substantial portions of the Software.                   *dnl                                                                          *dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *dnl                                                                          *dnl Except as contained in this notice, the name(s) of the above copyright   *dnl holders shall not be used in advertising or otherwise to promote the     *dnl sale, use or other dealings in this Software without prior written       *dnl authorization.                                                           *dnl***************************************************************************dnldnl Author: Thomas E. Dickey 1995-2003dnldnl $Id: aclocal.m4,v 1.333 2004/01/30 20:59:56 tom Exp $dnl Macros used in NCURSES auto-configuration script.dnldnl See http://invisible-island.net/autoconf/ for additional information.dnldnl ---------------------------------------------------------------------------dnl ---------------------------------------------------------------------------dnl CF_ADA_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15dnl -------------------dnl Construct the list of include-options for the C programs in the Ada95dnl binding.AC_DEFUN([CF_ADA_INCLUDE_DIRS],[ACPPFLAGS="-I. -I../../include $ACPPFLAGS"if test "$srcdir" != "."; then	ACPPFLAGS="-I\$(srcdir)/../../include $ACPPFLAGS"fiif test "$GCC" != yes; then	ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"elif test "$includedir" != "/usr/include"; then	if test "$includedir" = '${prefix}/include' ; then		if test $prefix != /usr ; then			ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"		fi	else		ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"	fifiAC_SUBST(ACPPFLAGS)])dnldnl ---------------------------------------------------------------------------dnl CF_ADD_CFLAGS version: 5 updated: 2002/12/01 00:12:15dnl -------------dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGSdnl The second parameter if given makes this macro verbose.AC_DEFUN([CF_ADD_CFLAGS],[cf_new_cflags=cf_new_cppflags=for cf_add_cflags in $1do	case $cf_add_cflags in #(vi	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi		case "$CPPFLAGS" in		*$cf_add_cflags) #(vi			;;		*) #(vi			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"			;;		esac		;;	*)		cf_new_cflags="$cf_new_cflags $cf_add_cflags"		;;	esacdoneif test -n "$cf_new_cflags" ; then	ifelse($2,,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)])	CFLAGS="$CFLAGS $cf_new_cflags"fiif test -n "$cf_new_cppflags" ; then	ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"fi])dnldnl ---------------------------------------------------------------------------dnl CF_ANSI_CC_CHECK version: 9 updated: 2001/12/30 17:53:34dnl ----------------dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'dnl in the sharutils 4.2 distribution.AC_DEFUN([CF_ANSI_CC_CHECK],[AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C, cf_cv_ansi_cc,[cf_cv_ansi_cc=nocf_save_CFLAGS="$CFLAGS"cf_save_CPPFLAGS="$CPPFLAGS"# Don't try gcc -ansi; that turns off useful extensions and# breaks some systems' header files.# AIX			-qlanglvl=ansi# Ultrix and OSF/1	-std1# HP-UX			-Aa -D_HPUX_SOURCE# SVR4			-Xc# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)for cf_arg in "-DCC_HAS_PROTOS" \	"" \	-qlanglvl=ansi \	-std1 \	-Ae \	"-Aa -D_HPUX_SOURCE" \	-Xcdo	CF_ADD_CFLAGS($cf_arg)	AC_TRY_COMPILE([#ifndef CC_HAS_PROTOS#if !defined(__STDC__) || (__STDC__ != 1)choke me#endif#endif],[	int test (int i, double x);	struct s1 {int (*f) (int a);};	struct s2 {int (*f) (double a);};],	[cf_cv_ansi_cc="$cf_arg"; break])doneCFLAGS="$cf_save_CFLAGS"CPPFLAGS="$cf_save_CPPFLAGS"])if test "$cf_cv_ansi_cc" != "no"; thenif test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then	CF_ADD_CFLAGS($cf_cv_ansi_cc)else	AC_DEFINE(CC_HAS_PROTOS)fifi])dnldnl ---------------------------------------------------------------------------dnl CF_ANSI_CC_REQD version: 3 updated: 1997/09/06 13:40:44dnl ---------------dnl For programs that must use an ANSI compiler, obtain compiler options thatdnl will make it recognize prototypes.  We'll do preprocessor checks in otherdnl macros, since tools such as unproto can fake prototypes, but only part ofdnl the preprocessor.AC_DEFUN([CF_ANSI_CC_REQD],[AC_REQUIRE([CF_ANSI_CC_CHECK])if test "$cf_cv_ansi_cc" = "no"; then	AC_ERROR([Your compiler does not appear to recognize prototypes.You have the following choices:	a. adjust your compiler options	b. get an up-to-date compiler	c. use a wrapper such as unproto])fi])dnldnl ---------------------------------------------------------------------------dnl CF_BOOL_DECL version: 8 updated: 2004/01/30 15:51:18dnl ------------dnl Test if 'bool' is a builtin type in the configured C++ compiler.  Somednl older compilers (e.g., gcc 2.5.8) don't support 'bool' directly; gccdnl 2.6.3 does, in anticipation of the ANSI C++ standard.dnldnl Treat the configuration-variable specially here, since we're directlydnl substituting its value (i.e., 1/0).dnldnl $1 is the shell variable to store the result in, if not $cv_cv_builtin_boolAC_DEFUN([CF_BOOL_DECL],[AC_MSG_CHECKING(if we should include stdbool.h)AC_CACHE_VAL(cf_cv_header_stdbool_h,[	AC_TRY_COMPILE([],[bool foo = false],		[cf_cv_header_stdbool_h=0],		[AC_TRY_COMPILE([#ifndef __BEOS__#include <stdbool.h>#endif],[bool foo = false],			[cf_cv_header_stdbool_h=1],			[cf_cv_header_stdbool_h=0])])])if test "$cf_cv_header_stdbool_h" = 1then	AC_MSG_RESULT(yes)else	AC_MSG_RESULT(no)fiAC_MSG_CHECKING([for builtin bool type])AC_CACHE_VAL(ifelse($1,,cf_cv_builtin_bool,[$1]),[	AC_TRY_COMPILE([#include <stdio.h>#include <sys/types.h>],[bool x = false],		[ifelse($1,,cf_cv_builtin_bool,[$1])=1],		[ifelse($1,,cf_cv_builtin_bool,[$1])=0])	])if test "$ifelse($1,,cf_cv_builtin_bool,[$1])" = 1then	AC_MSG_RESULT(yes)else	AC_MSG_RESULT(no)fi])dnldnl ---------------------------------------------------------------------------dnl CF_BOOL_SIZE version: 10 updated: 2002/02/23 20:38:31dnl ------------dnl Test for the size of 'bool' in the configured C++ compiler (e.g., a type).dnl Don't bother looking for bool.h, since it's been deprecated.dnldnl If the current compiler is C rather than C++, we get the bool definitiondnl from <stdbool.h>.AC_DEFUN([CF_BOOL_SIZE],[AC_MSG_CHECKING([for size of bool])AC_CACHE_VAL(cf_cv_type_of_bool,[	rm -f cf_test.out	AC_TRY_RUN([#include <stdlib.h>#include <stdio.h>#if defined(__cplusplus)#ifdef HAVE_GXX_BUILTIN_H#include <g++/builtin.h>#elif HAVE_GPP_BUILTIN_H#include <gpp/builtin.h>#elif HAVE_BUILTIN_H#include <builtin.h>#endif#else#if $cf_cv_header_stdbool_h#include <stdbool.h>#endif#endifmain(){	FILE *fp = fopen("cf_test.out", "w");	if (fp != 0) {		bool x = true;		if ((bool)(-x) >= 0)			fputs("unsigned ", fp);		if (sizeof(x) == sizeof(int))       fputs("int",  fp);		else if (sizeof(x) == sizeof(char)) fputs("char", fp);		else if (sizeof(x) == sizeof(short))fputs("short",fp);		else if (sizeof(x) == sizeof(long)) fputs("long", fp);		fclose(fp);	}	exit(0);}		],		[cf_cv_type_of_bool=`cat cf_test.out`		 if test -z "$cf_cv_type_of_bool"; then		   cf_cv_type_of_bool=unknown		 fi],		[cf_cv_type_of_bool=unknown],		[cf_cv_type_of_bool=unknown])	])	rm -f cf_test.outAC_MSG_RESULT($cf_cv_type_of_bool)if test "$cf_cv_type_of_bool" = unknown ; then	case .$NCURSES_BOOL in #(vi	.auto|.) NCURSES_BOOL=unsigned;;	esac	AC_MSG_WARN(Assuming $NCURSES_BOOL for type of bool)	cf_cv_type_of_bool=$NCURSES_BOOLfi])dnldnl ---------------------------------------------------------------------------dnl CF_CFG_DEFAULTS version: 6 updated: 2003/07/12 15:15:19dnl ---------------dnl Determine the default configuration into which we'll install ncurses.  Thisdnl can be overridden by the user's command-line options.  There's two items todnl look for:dnl	1. the prefix (e.g., /usr)dnl	2. the header files (e.g., /usr/include/ncurses)dnl We'll look for a previous installation of ncurses and use the same defaults.dnldnl We don't use AC_PREFIX_DEFAULT, because it gets evaluated too soon, anddnl we don't use AC_PREFIX_PROGRAM, because we cannot distinguish ncurses'sdnl programs from a vendor's.AC_DEFUN([CF_CFG_DEFAULTS],[AC_MSG_CHECKING(for prefix)if test "x$prefix" = "xNONE" ; then	case "$cf_cv_system_name" in		# non-vendor systems don't have a conflict	openbsd*|netbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)		prefix=/usr		;;	*)	prefix=$ac_default_prefix		;;	esacfiAC_MSG_RESULT($prefix)if test "x$prefix" = "xNONE" ; thenAC_MSG_CHECKING(for default include-directory)test -n "$verbose" && echo 1>&AC_FD_MSGfor cf_symbol in \	$includedir \	$includedir/ncurses \	$prefix/include \	$prefix/include/ncurses \	/usr/local/include \	/usr/local/include/ncurses \	/usr/include \	/usr/include/ncursesdo	cf_dir=`eval echo $cf_symbol`	if test -f $cf_dir/curses.h ; then	if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then		includedir="$cf_symbol"		test -n "$verbose"  && echo $ac_n "	found " 1>&AC_FD_MSG		break	fi	fi	test -n "$verbose"  && echo "	tested $cf_dir" 1>&AC_FD_MSGdoneAC_MSG_RESULT($includedir)fi])dnldnl ---------------------------------------------------------------------------dnl CF_CGETENT version: 3 updated: 2000/08/12 23:18:52dnl ----------dnl Check if the terminal-capability database functions are available.  If not,dnl ncurses has a much-reduced version.AC_DEFUN([CF_CGETENT],[AC_MSG_CHECKING(for terminal-capability database functions)AC_CACHE_VAL(cf_cv_cgetent,[AC_TRY_LINK([#include <stdlib.h>],[	char temp[128];	char *buf = temp;	char *db_array = temp;	cgetent(&buf, /* int *, */ &db_array, "vt100");	cgetcap(buf, "tc", '=');	cgetmatch(buf, "tc");	],	[cf_cv_cgetent=yes],	[cf_cv_cgetent=no])])AC_MSG_RESULT($cf_cv_cgetent)test "$cf_cv_cgetent" = yes && AC_DEFINE(HAVE_BSD_CGETENT)])dnldnl ---------------------------------------------------------------------------dnl CF_CHECK_CACHE version: 9 updated: 2004/01/30 15:59:13dnl --------------dnl Check if we're accidentally using a cache from a different machine.dnl Derive the system name, as a check for reusing the autoconf cache.dnldnl If we've packaged config.guess and config.sub, run that (since it does adnl better job than uname).  Normally we'll use AC_CANONICAL_HOST, but allowdnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEMdnl which is useful in cross-compiles.dnldnl Note: we would use $ac_config_sub, but that is one of the places wherednl autoconf 2.5x broke compatibility with autoconf 2.13AC_DEFUN([CF_CHECK_CACHE],[if test -f $srcdir/config.guess ; then	ifelse([$1],,[AC_CANONICAL_HOST],[$1])	system_name="$host_os"else	system_name="`(uname -s -r) 2>/dev/null`"	if test -z "$system_name" ; then		system_name="`(hostname) 2>/dev/null`"	fifitest -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])test -z "$system_name" && system_name="$cf_cv_system_name"test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)if test ".$system_name" != ".$cf_cv_system_name" ; then	AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))	AC_ERROR("Please remove config.cache and try again.")fi])dnldnl ---------------------------------------------------------------------------dnl CF_CHECK_ERRNO version: 9 updated: 2001/12/30 18:03:23dnl --------------dnl Check for data that is usually declared in <stdio.h> or <errno.h>, e.g.,dnl the 'errno' variable.  Define a DECL_xxx symbol if we must declare itdnl ourselves.dnldnl $1 = the name to checkAC_DEFUN([CF_CHECK_ERRNO],[AC_CACHE_CHECK(if external $1 is declared, cf_cv_dcl_$1,[    AC_TRY_COMPILE([#ifdef HAVE_STDLIB_H#include <stdlib.h>#endif#include <stdio.h>#include <sys/types.h>#include <errno.h> ],    [long x = (long) $1],    [cf_cv_dcl_$1=yes],    [cf_cv_dcl_$1=no])])if test "$cf_cv_dcl_$1" = no ; then    CF_UPPER(cf_result,decl_$1)    AC_DEFINE_UNQUOTED($cf_result)fi# It's possible (for near-UNIX clones) that the data doesn't existCF_CHECK_EXTERN_DATA($1,int)])dnldnl ---------------------------------------------------------------------------dnl CF_CHECK_EXTERN_DATA version: 3 updated: 2001/12/30 18:03:23dnl --------------------dnl Check for existence of external data in the current set of libraries.  Ifdnl we can modify it, it's real enough.dnl $1 = the name to checkdnl $2 = its typeAC_DEFUN([CF_CHECK_EXTERN_DATA],[AC_CACHE_CHECK(if external $1 exists, cf_cv_have_$1,[    AC_TRY_LINK([#undef $1extern $2 $1;],    [$1 = 2],    [cf_cv_have_$1=yes],    [cf_cv_have_$1=no])])if test "$cf_cv_have_$1" = yes ; then    CF_UPPER(cf_result,have_$1)    AC_DEFINE_UNQUOTED($cf_result)fi])dnldnl ---------------------------------------------------------------------------dnl CF_CPP_PARAM_INIT version: 4 updated: 2001/04/07 22:31:18dnl -----------------dnl Check if the C++ compiler accepts duplicate parameter initialization.  Thisdnl is a late feature for the standard and is not in some recent compilersdnl (1999/9/11).AC_DEFUN([CF_CPP_PARAM_INIT],[if test -n "$CXX"; thenAC_CACHE_CHECK(if $CXX accepts parameter initialization,cf_cv_cpp_param_init,[	AC_LANG_SAVE	AC_LANG_CPLUSPLUS	AC_TRY_RUN([class TEST {private:	int value;public:	TEST(int x = 1);	~TEST();

⌨️ 快捷键说明

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