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

📄 aclocal.m4

📁 This version of dialog, formerly known as cdialog is based on the Debian package for dialog 0.9a (se
💻 M4
📖 第 1 页 / 共 5 页
字号:
[AC_REQUIRE([CF_UNION_WAIT])if test $cf_cv_type_unionwait = yes; then	AC_MSG_CHECKING(if union wait can be used as wait-arg)	AC_CACHE_VAL(cf_cv_arg_union_wait,[		AC_TRY_COMPILE($cf_wait_headers, 			[union wait x; wait(&x)],			[cf_cv_arg_union_wait=yes],			[cf_cv_arg_union_wait=no])		])	AC_MSG_RESULT($cf_cv_arg_union_wait)	test $cf_cv_arg_union_wait = yes && AC_DEFINE(WAIT_USES_UNION)	AC_MSG_CHECKING(if union wait can be used as waitpid-arg)	AC_CACHE_VAL(cf_cv_arg_union_waitpid,[		AC_TRY_COMPILE($cf_wait_headers, 			[union wait x; waitpid(0, &x, 0)],			[cf_cv_arg_union_waitpid=yes],			[cf_cv_arg_union_waitpid=no])		])	AC_MSG_RESULT($cf_cv_arg_union_waitpid)	test $cf_cv_arg_union_waitpid = yes && AC_DEFINE(WAITPID_USES_UNION)fi])dnldnl ---------------------------------------------------------------------------dnl CF_GCC_ATTRIBUTES version: 9 updated: 2002/12/21 19:25:52dnl -----------------dnl Test for availability of useful gcc __attribute__ directives to quietdnl compiler warnings.  Though useful, not all are supported -- and contrarydnl to documentation, unrecognized directives cause older compilers to barf.AC_DEFUN([CF_GCC_ATTRIBUTES],[if test "$GCC" = yesthencat > conftest.i <<EOF#ifndef GCC_PRINTF#define GCC_PRINTF 0#endif#ifndef GCC_SCANF#define GCC_SCANF 0#endif#ifndef GCC_NORETURN#define GCC_NORETURN /* nothing */#endif#ifndef GCC_UNUSED#define GCC_UNUSED /* nothing */#endifEOFif test "$GCC" = yesthen	AC_CHECKING([for $CC __attribute__ directives])cat > conftest.$ac_ext <<EOF#line __oline__ "configure"#include "confdefs.h"#include "conftest.h"#include "conftest.i"#if	GCC_PRINTF#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))#else#define GCC_PRINTFLIKE(fmt,var) /*nothing*/#endif#if	GCC_SCANF#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))#else#define GCC_SCANFLIKE(fmt,var)  /*nothing*/#endifextern void wow(char *,...) GCC_SCANFLIKE(1,2);extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;extern void foo(void) GCC_NORETURN;int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }EOF	for cf_attribute in scanf printf unused noreturn	do		CF_UPPER(CF_ATTRIBUTE,$cf_attribute)		cf_directive="__attribute__(($cf_attribute))"		echo "checking for $CC $cf_directive" 1>&AC_FD_CC		case $cf_attribute in		scanf|printf)		cat >conftest.h <<EOF#define GCC_$CF_ATTRIBUTE 1EOF			;;		*)		cat >conftest.h <<EOF#define GCC_$CF_ATTRIBUTE $cf_directiveEOF			;;		esac		if AC_TRY_EVAL(ac_compile); then			test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)			cat conftest.h >>confdefs.h		fi	doneelse	fgrep define conftest.i >>confdefs.hfirm -rf conftest*fi])dnldnl ---------------------------------------------------------------------------dnl CF_GCC_VERSION version: 3 updated: 2003/09/06 19:16:57dnl --------------dnl Find version of gccAC_DEFUN([CF_GCC_VERSION],[AC_REQUIRE([AC_PROG_CC])GCC_VERSION=noneif test "$GCC" = yes ; then	AC_MSG_CHECKING(version of $CC)	GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"	test -z "$GCC_VERSION" && GCC_VERSION=unknown	AC_MSG_RESULT($GCC_VERSION)fi])dnldnl ---------------------------------------------------------------------------dnl CF_GCC_WARNINGS version: 15 updated: 2003/07/05 18:42:30dnl ---------------dnl Check if the compiler supports useful warning options.  There's a few thatdnl we don't use, simply because they're too noisy:dnldnl	-Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)dnl	-Wredundant-decls (system headers make this too noisy)dnl	-Wtraditional (combines too many unrelated messages, only a few useful)dnl	-Wwrite-strings (too noisy, but should review occasionally).  Thisdnl		is enabled for ncurses using "--enable-const".dnl	-pedanticdnlAC_DEFUN([CF_GCC_WARNINGS],[AC_REQUIRE([CF_GCC_VERSION])if test "$GCC" = yesthen	cat > conftest.$ac_ext <<EOF#line __oline__ "configure"int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }EOF	AC_CHECKING([for $CC warning options])	cf_save_CFLAGS="$CFLAGS"	EXTRA_CFLAGS="-W -Wall"	cf_warn_CONST=""	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"	for cf_opt in \		Wbad-function-cast \		Wcast-align \		Wcast-qual \		Winline \		Wmissing-declarations \		Wmissing-prototypes \		Wnested-externs \		Wpointer-arith \		Wshadow \		Wstrict-prototypes \		Wundef $cf_warn_CONST	do		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"		if AC_TRY_EVAL(ac_compile); then			test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)			case $cf_opt in #(vi			Wcast-qual) #(vi				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"				;;			Winline) #(vi				case $GCC_VERSION in				3.3*)					CF_VERBOSE(feature is broken in gcc $GCC_VERSION)					continue;;				esac				;;			esac			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"		fi	done	rm -f conftest*	CFLAGS="$cf_save_CFLAGS"fiAC_SUBST(EXTRA_CFLAGS)])dnldnl ---------------------------------------------------------------------------dnl CF_GNU_SOURCE version: 3 updated: 2000/10/29 23:30:53dnl -------------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_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"])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_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23dnl ---------------dnl Insert text into the help-message, for readability, from AC_ARG_WITH.AC_DEFUN([CF_HELP_MESSAGE],[AC_DIVERT_HELP([$1])dnl])dnldnl ---------------------------------------------------------------------------dnl CF_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15dnl ---------------dnl Construct the list of include-options according to whether we're buildingdnl in the source directory or using '--srcdir=DIR' option.  If we're buildingdnl with gcc, don't append the includedir if it happens to be /usr/include,dnl since that usually breaks gcc's shadow-includes.AC_DEFUN([CF_INCLUDE_DIRS],[CPPFLAGS="-I. -I../include $CPPFLAGS"if test "$srcdir" != "."; then	CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"fiif test "$GCC" != yes; then	CPPFLAGS="$CPPFLAGS -I\$(includedir)"elif test "$includedir" != "/usr/include"; then	if test "$includedir" = '${prefix}/include' ; then		if test $prefix != /usr ; then			CPPFLAGS="$CPPFLAGS -I\$(includedir)"		fi	else		CPPFLAGS="$CPPFLAGS -I\$(includedir)"	fifiAC_SUBST(CPPFLAGS)])dnldnl ---------------------------------------------------------------------------dnl CF_INCLUDE_PATH version: 4 updated: 2001/04/15 21:21:45dnl ---------------dnl	Adds to the include-pathdnldnl	Autoconf 1.11 should have provided a way to add include path options todnl	the cpp-tests.dnlAC_DEFUN([CF_INCLUDE_PATH],[for cf_path in $1do	cf_result="no"	AC_MSG_CHECKING(for directory $cf_path)	if test -d $cf_path	then		INCLUDES="$INCLUDES -I$cf_path"		ac_cpp="${ac_cpp} -I$cf_path"		CFLAGS="$CFLAGS -I$cf_path"		cf_result="yes"		case $cf_path in		/usr/include|/usr/include/*)			;;		*)			CF_DIRNAME(cf_temp,$cf_path)			case $cf_temp in			*/include)				INCLUDES="$INCLUDES -I$cf_temp"				ac_cpp="${ac_cpp} -I$cf_temp"				CFLAGS="$CFLAGS -I$cf_temp"				;;			esac		esac	fi	AC_MSG_RESULT($cf_result)done])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_LIB_PREFIX version: 7 updated: 2001/01/12 01:23:48dnl -------------dnl Compute the library-prefix for the given host systemdnl $1 = variable to setAC_DEFUN([CF_LIB_PREFIX],[	case $cf_cv_system_name in	OS/2*)	LIB_PREFIX=''     ;;	os2*)	LIB_PREFIX=''     ;;	*)	LIB_PREFIX='lib'  ;;	esacifelse($1,,,[$1=$LIB_PREFIX])	AC_SUBST(LIB_PREFIX)])dnldnl ---------------------------------------------------------------------------dnl CF_MAKEFLAGS version: 9 updated: 2001/12/30 18:17:27dnl ------------dnl Some 'make' programs support $(MAKEFLAGS), some $(MFLAGS), to pass 'make'dnl options to lower-levels.  It's very useful for "make -n" -- if we have it.dnl (GNU 'make' does both, something POSIX 'make', which happens to make thednl $(MAKEFLAGS) variable incompatible because it adds the assignments :-)AC_DEFUN([CF_MAKEFLAGS],[AC_CACHE_CHECK(for makeflags variable, cf_cv_makeflags,[	cf_cv_makeflags=''	for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'	do		cat >cf_makeflags.tmp <<CF_EOFSHELL = /bin/shall :	@ echo '.$cf_option'CF_EOF		cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`		case "$cf_result" in		.*k)			cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`			case "$cf_result" in			.*CC=*)	cf_cv_makeflags=				;;			*)	cf_cv_makeflags=$cf_option				;;			esac			break			;;		*)	echo no match "$cf_result"			;;		esac	done	rm -f cf_makeflags.tmp])AC_SUBST(cf_cv_makeflags)])dnldnl ---------------------------------------------------------------------------dnl CF_MAKE_TAGS version: 2 updated: 2000/10/04 09:18:40dnl ------------dnl Generate tags/TAGS targets for makefiles.  Do not generate TAGS if we havednl a monocase filesystem.AC_DEFUN([CF_MAKE_TAGS],[AC_REQUIRE([CF_MIXEDCASE_FILENAMES])AC_CHECK_PROG(MAKE_LOWER_TAGS, ctags, yes, no)if test "$cf_cv_mixedcase" = yes ; then	AC_CHECK_PROG(MAKE_UPPER_TAGS, etags, yes, no)else	MAKE_UPPER_TAGS=nofiif test "$MAKE_UPPER_TAGS" = yes ; then	MAKE_UPPER_TAGS=else	MAKE_UPPER_TAGS="#"fiAC_SUBST(MAKE_UPPER_TAGS)if test "$MAKE_LOWER_TAGS" = yes ; then	MAKE_LOWER_TAGS=else	MAKE_LOWER_TAGS="#"fiAC_SUBST(MAKE_LOWER_TAGS)])dnldnl ---------------------------------------------------------------------------dnl CF_MATH_LIB version: 5 updated: 2000/05/28 01:39:10dnl -----------dnl Checks for libraries.  At least one UNIX system, Apple Macintoshdnl Rhapsody 5.5, does not have -lm.  We cannot use the simplerdnl AC_CHECK_LIB(m,sin), because that fails for C++.AC_DEFUN([CF_MATH_LIB],[AC_CACHE_CHECK(if -lm needed for math functions,	cf_cv_need_libm,[	AC_TRY_LINK([

⌨️ 快捷键说明

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