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

📄 aclocal.m4

📁 This version of dialog, formerly known as cdialog is based on the Debian package for dialog 0.9a (se
💻 M4
📖 第 1 页 / 共 5 页
字号:
dnl CF_CHECK_CACHE version: 7 updated: 2001/12/19 00:50:10dnl --------------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.AC_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_CURSES_CHTYPE version: 6 updated: 2003/11/06 19:59:57dnl ----------------dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses).AC_DEFUN([CF_CURSES_CHTYPE],[AC_REQUIRE([CF_CURSES_CPPFLAGS])dnlAC_CACHE_CHECK(for chtype typedef,cf_cv_chtype_decl,[	AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>],		[chtype foo],		[cf_cv_chtype_decl=yes],		[cf_cv_chtype_decl=no])])if test $cf_cv_chtype_decl = yes ; then	AC_DEFINE(HAVE_TYPE_CHTYPE)	AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[		AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>],			[chtype foo; long x = foo],			[cf_cv_chtype_type=scalar],			[cf_cv_chtype_type=struct])])	if test $cf_cv_chtype_type = scalar ; then		AC_DEFINE(TYPE_CHTYPE_IS_SCALAR)	fifi])dnldnl ---------------------------------------------------------------------------dnl CF_CURSES_CPPFLAGS version: 7 updated: 2003/06/06 00:48:41dnl ------------------dnl Look for the curses headers.AC_DEFUN([CF_CURSES_CPPFLAGS],[AC_CACHE_CHECK(for extra include directories,cf_cv_curses_incdir,[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"	;;esac])test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[cf_cv_ncurses_header=nonefor cf_header in \	curses.h \	ncurses.h \	ncurses/curses.h \	ncurses/ncurses.hdoAC_TRY_COMPILE([#include <${cf_header}>],	[initscr(); tgoto("?", 0,0)],	[cf_cv_ncurses_header=$cf_header; break],[])done])if test "$cf_cv_ncurses_header" = none ; then	AC_MSG_ERROR(No curses header-files found)fi# cheat, to get the right #define's for HAVE_NCURSES_H, etc.AC_CHECK_HEADERS($cf_cv_ncurses_header)])dnldnl ---------------------------------------------------------------------------dnl CF_CURSES_FUNCS version: 12 updated: 2003/11/06 19:59:57dnl ---------------dnl Curses-functions are a little complicated, since a lot of them are macros.AC_DEFUN([CF_CURSES_FUNCS],[AC_REQUIRE([CF_CURSES_CPPFLAGS])dnlAC_REQUIRE([CF_XOPEN_CURSES])AC_REQUIRE([CF_CURSES_TERM_H])for cf_func in $1do	CF_UPPER(cf_tr_func,$cf_func)	AC_MSG_CHECKING(for ${cf_func})	CF_MSG_LOG(${cf_func})	AC_CACHE_VAL(cf_cv_func_$cf_func,[		eval cf_result='$ac_cv_func_'$cf_func		if test ".$cf_result" != ".no"; then			AC_TRY_LINK([#ifdef HAVE_XCURSES#include <xcurses.h>char * XCursesProgramName = "test";#else#include <${cf_cv_ncurses_header-curses.h}>#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)#include <ncursesw/term.h>#else#if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)#include <ncurses/term.h>#else#ifdef HAVE_TERM_H#include <term.h>#endif#endif#endif#endif],			[#ifndef ${cf_func}long foo = (long)(&${cf_func});exit(foo == 0);#endif			],			[cf_result=yes],			[cf_result=no])		fi		eval 'cf_cv_func_'$cf_func'=$cf_result'	])	# use the computed/retrieved cache-value:	eval 'cf_result=$cf_cv_func_'$cf_func	AC_MSG_RESULT($cf_result)	if test $cf_result != no; then		AC_DEFINE_UNQUOTED(HAVE_${cf_tr_func})	fidone])dnldnl ---------------------------------------------------------------------------dnl CF_CURSES_LIBS version: 23 updated: 2003/11/06 19:59:57dnl --------------dnl Look for the curses libraries.  Older curses implementations may requirednl termcap/termlib to be linked as well.  Call CF_CURSES_CPPFLAGS first.AC_DEFUN([CF_CURSES_LIBS],[AC_REQUIRE([CF_CURSES_CPPFLAGS])dnlAC_MSG_CHECKING(if we have identified curses libraries)AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],	[initscr(); tgoto("?", 0,0)],	cf_result=yes,	cf_result=no)AC_MSG_RESULT($cf_result)if test "$cf_result" = no ; thencase $host_os in #(vifreebsd*) #(vi	AC_CHECK_LIB(mytinfo,tgoto,[LIBS="-lmytinfo $LIBS"])	;;hpux10.*|hpux11.*) #(vi	AC_CHECK_LIB(cur_colr,initscr,[		LIBS="-lcur_colr $LIBS"		ac_cv_func_initscr=yes		],[	AC_CHECK_LIB(Hcurses,initscr,[		# 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		])])	;;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.	AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[		for cf_term_lib in $cf_check_list termcap termlib unknown		do			AC_CHECK_LIB($cf_term_lib,tgoto,[break])		done	])	# 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		AC_CHECK_LIB($cf_curs_lib,initscr,[break])	done	test $cf_curs_lib = unknown && AC_ERROR(no curses library found)	LIBS="-l$cf_curs_lib $cf_save_LIBS"	if test "$cf_term_lib" = unknown ; then		AC_MSG_CHECKING(if we can link with $cf_curs_lib library)		AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],			[initscr()],			[cf_result=yes],			[cf_result=no])		AC_MSG_RESULT($cf_result)		test $cf_result = no && AC_ERROR(Cannot link curses library)	elif test "$cf_curs_lib" = "$cf_term_lib" ; then		:	elif test "$cf_term_lib" != predefined ; then		AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)		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_TERM_H version: 6 updated: 2003/11/06 19:59:57dnl ----------------dnl SVr4 curses should have term.h as well (where it puts the definitions ofdnl the low-level interface).  This may not be true in old/broken implementations,dnl as well as in misconfigured systems (e.g., gcc configured for Solaris 2.4dnl running with Solaris 2.5.1).AC_DEFUN([CF_CURSES_TERM_H],[AC_CACHE_CHECK(for term.h, cf_cv_term_header,[AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look# for <term.h> if we do not find the variant.for cf_header in \	`echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \	term.hdo	AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>#include <${cf_header}>],	[WINDOW *x],	[cf_cv_term_header=$cf_header	 break],	[cf_cv_term_header=no])done])case $cf_cv_term_header in #(viterm.h) #(vi	AC_DEFINE(HAVE_TERM_H)	;;ncurses/term.h)	AC_DEFINE(HAVE_NCURSES_TERM_H)	;;ncursesw/term.h)	AC_DEFINE(HAVE_NCURSESW_TERM_H)	;;esac])dnldnl ---------------------------------------------------------------------------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_DISABLE_ECHO version: 10 updated: 2003/04/17 22:27:11dnl ---------------dnl You can always use "make -n" to see the actual options, but it's hard todnl pick out/analyze warning messages when the compile-line is long.dnldnl Sets:dnl	ECHO_LT - symbol to control if libtool is verbosednl	ECHO_LD - symbol to prefix "cc -o" linesdnl	RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)dnl	SHOW_CC - symbol to put before explicit "cc -c" linesdnl	ECHO_CC - symbol to put before any "cc" linednlAC_DEFUN([CF_DISABLE_ECHO],[AC_MSG_CHECKING(if you want to see long compiling messages)CF_ARG_DISABLE(echo,	[  --disable-echo          display "compiling" commands],	[    ECHO_LT='--silent'    ECHO_LD='@echo linking [$]@;'    RULE_CC='	@echo compiling [$]<'    SHOW_CC='	@echo compiling [$]@'    ECHO_CC='@'],[    ECHO_LT=''    ECHO_LD=''    RULE_CC='# compiling'    SHOW_CC='# compiling'    ECHO_CC=''])AC_MSG_RESULT($enableval)AC_SUBST(ECHO_LT)AC_SUBST(ECHO_LD)AC_SUBST(RULE_CC)AC_SUBST(SHOW_CC)AC_SUBST(ECHO_CC)])dnldnl ---------------------------------------------------------------------------dnl CF_FIND_LIBRARY version: 7 updated: 2000/04/13 21:38:04dnl ---------------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 causes 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_WAIT version: 2 updated: 1997/10/21 19:45:33dnl ------------dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()'dnl and/or 'waitpid()'.dnldnl Note that we cannot simply grep for 'union wait' in the wait.h file,dnl because some Posix systems turn this on only when a BSD variable isdnl defined.dnldnl I don't use AC_HEADER_SYS_WAIT, because it defines HAVE_SYS_WAIT_H, whichdnl would conflict with an attempt to test that header directly.dnlAC_DEFUN([CF_FUNC_WAIT],

⌨️ 快捷键说明

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