?? aclocal.m4
字號:
dnl CF_GNAT_VERSION version: 11 updated: 2003/09/06 19:42:09dnl ---------------dnl Verify version of GNAT.AC_DEFUN([CF_GNAT_VERSION],[AC_MSG_CHECKING(for gnat version)cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[[0-9]].[[0-9]][[0-9]]*' |\ sed -e '2,$d' -e 's/[[^0-9 \.]]//g' -e 's/^[[ ]]*//' -e 's/ .*//'`AC_MSG_RESULT($cf_gnat_version)case $cf_gnat_version in 3.1[[1-9]]*|3.[[2-9]]*|[[4-9]].*) cf_cv_prog_gnat_correct=yes ;; *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding. cf_cv_prog_gnat_correct=no ;;esaccase $cf_gnat_version in 3.[[1-9]]*|[[4-9]].*) cf_compile_generics=generics cf_generic_objects="\$(GENOBJS)" ;; *) cf_compile_generics= cf_generic_objects= ;;esac])dnl ---------------------------------------------------------------------------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_GPP_LIBRARY version: 8 updated: 2003/02/02 01:41:46dnl --------------dnl If we're trying to use g++, test if libg++ is installed (a rather commondnl problem :-). If we have the compiler but no library, we'll be able todnl configure, but won't be able to build the c++ demo program.AC_DEFUN([CF_GPP_LIBRARY],[cf_cxx_library=unknowncase $cf_cv_system_name in #(vios2*) #(vi cf_gpp_libname=gpp ;;*) cf_gpp_libname=g++ ;;esacif test "$GXX" = yes; then AC_MSG_CHECKING([for lib$cf_gpp_libname]) cf_save="$LIBS" LIBS="$LIBS -l$cf_gpp_libname" AC_TRY_LINK([#include <$cf_gpp_libname/builtin.h> ], [two_arg_error_handler_t foo2 = lib_error_handler], [cf_cxx_library=yes CXXLIBS="$CXXLIBS -l$cf_gpp_libname" if test "$cf_gpp_libname" = cpp ; then AC_DEFINE(HAVE_GPP_BUILTIN_H) else AC_DEFINE(HAVE_GXX_BUILTIN_H) fi], [AC_TRY_LINK([#include <builtin.h> ], [two_arg_error_handler_t foo2 = lib_error_handler], [cf_cxx_library=yes CXXLIBS="$CXXLIBS -l$cf_gpp_libname" AC_DEFINE(HAVE_BUILTIN_H)], [cf_cxx_library=no])]) LIBS="$cf_save" AC_MSG_RESULT($cf_cxx_library)fi])dnldnl ---------------------------------------------------------------------------dnl CF_GXX_VERSION version: 3 updated: 2003/09/06 19:16:21dnl --------------dnl Check for version of g++AC_DEFUN([CF_GXX_VERSION],[AC_REQUIRE([AC_PROG_CPP])GXX_VERSION=noneif test "$GXX" = yes; then AC_MSG_CHECKING(version of g++) GXX_VERSION="`${CXX-g++} --version|sed -e '2,$d'`" AC_MSG_RESULT($GXX_VERSION)fi])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_ISASCII version: 3 updated: 2000/08/12 23:18:52dnl ----------dnl Check if we have either a function or macro for 'isascii()'.AC_DEFUN([CF_ISASCII],[AC_MSG_CHECKING(for isascii)AC_CACHE_VAL(cf_cv_have_isascii,[ AC_TRY_LINK([#include <ctype.h>],[int x = isascii(' ')], [cf_cv_have_isascii=yes], [cf_cv_have_isascii=no])])dnlAC_MSG_RESULT($cf_cv_have_isascii)test "$cf_cv_have_isascii" = yes && AC_DEFINE(HAVE_ISASCII)])dnldnl ---------------------------------------------------------------------------dnl CF_LIBUTF8 version: 2 updated: 2002/01/19 22:51:32dnl ----------dnl Check for libutf8AC_DEFUN([CF_LIBUTF8],[AC_CACHE_CHECK(for putwc in libutf8,cf_cv_libutf8,[ cf_save_LIBS="$LIBS" LIBS="-lutf8 $LIBS"AC_TRY_LINK([#include <libutf8.h>],[putwc(0,0);], [cf_cv_libutf8=yes], [cf_cv_libutf8=no]) LIBS="$cf_save_LIBS"])if test "$cf_cv_libutf8" = yes ; then AC_DEFINE(HAVE_LIBUTF8_H) LIBS="-lutf8 $LIBS"fi])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_LIB_RULES version: 30 updated: 2004/01/10 15:50:50dnl ------------dnl Append definitions and rules for the given models to the subdirectorydnl Makefiles, and the recursion rule for the top-level Makefile. If thednl subdirectory is a library-source directory, modify the LIBRARIES list indnl the corresponding makefile to list the models that we'll generate.dnldnl For shared libraries, make a list of symbolic links to construct whendnl generating each library. The convention used for Linux is the simplestdnl one:dnl lib<name>.so ->dnl lib<name>.so.<major> ->dnl lib<name>.so.<maj>.<minor>AC_DEFUN([CF_LIB_RULES],[CF_LIB_PREFIX(cf_prefix)AC_REQUIRE([CF_SUBST_NCURSES_VERSION])for cf_dir in $SRC_SUBDIRSdo if test -f $srcdir/$cf_dir/modules; then IMPORT_LIB= SHARED_LIB= LIBS_TO_MAKE= for cf_item in $CF_LIST_MODELS do CF_LIB_SUFFIX($cf_item,cf_suffix) if test $cf_item = shared ; then if test "$cf_cv_do_symlinks" = yes ; then case "$cf_cv_shlib_version" in #(vi rel) #(vi case "$cf_cv_system_name" in #(vi darwin*) cf_suffix='.$(REL_VERSION)'"$cf_suffix" ;; #(vi *) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;; esac ;; abi) case "$cf_cv_system_name" in #(vi darwin*) cf_suffix='.$(ABI_VERSION)'"$cf_suffix" ;; #(vi *) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;; esac ;; esac fi # cygwin needs import library, and has unique naming convention # use autodetected ${cf_prefix} for import lib and static lib, but # use 'cyg' prefix for shared lib. if test $cf_cv_shlib_version = cygdll ; then SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll" IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a" LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)" continue fi fi LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}" done if test $cf_dir = ncurses ; then cf_subsets="$LIB_SUBSETS" cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'` if test "$cf_termlib" != "$cf_subsets" ; then cf_item=`echo $LIBS_TO_MAKE |sed -e s%$LIB_NAME%$TINFO_NAME%g` LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE" fi else cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'` fi sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \ -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \ -e "s%@SHARED_LIB@%$SHARED_LIB%" \ $cf_dir/Makefile >$cf_dir/Makefile.out mv $cf_dir/Makefile.out $cf_dir/Makefile $AWK -f $srcdir/mk-0th.awk \ libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \ $srcdir/$cf_dir/modules >>$cf_dir/Makefile for cf_subset in $cf_subsets do cf_subdirs= for cf_item in $CF_LIST_MODELS do echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})" CF_UPPER(CF_ITEM,$cf_item) CF_LIB_SUFFIX($cf_item,cf_suffix) CF_OBJ_SUBDIR($cf_item,cf_subdir) # These dependencies really are for development, not # builds, but they are useful in porting, too. cf_depend="../include/ncurses_cfg.h" if test "$srcdir" = "."; then cf_reldir="." else cf_reldir="\$(srcdir)" fi if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h" elif test -f $srcdir/$cf_dir/curses.priv.h; then cf_depend="$cf_depend $cf_reldir/curses.priv.h" fi $AWK -f $srcdir/mk-1st.awk \ name=$cf_dir \ traces=$LIB_TRACING \ MODEL=$CF_ITEM \ model=$cf_subdir \ prefix=$cf_prefix \ suffix=$cf_suffix \ subset=$cf_subset \ ShlibVer=$cf_cv_shlib_version \ ShlibVerInfix=$cf_cv_shlib_version_infix \ DoLinks=$cf_cv_do_symlinks \ rmSoLocs=$cf_cv_rm_so_locs \ ldconfig="$LDCONFIG" \ overwrite=$WITH_OVERWRITE \ depend="$cf_depend" \ host="$host" \ $srcdir/$cf_dir/modules >>$cf_dir/Makefile for cf_subdir2 in $cf_subdirs lib do test $cf_subdir = $cf_subdir2 && break done test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \ $AWK -f $srcdir/mk-2nd.awk \ name=$cf_dir \ traces=$LIB_TRACING \ MODEL=$CF_ITEM \ model=$cf_subdir \ subset=$cf_subset \ srcdir=$srcdir \ echo=$WITH_ECHO \ $srcdir/$cf_dir/modules >>$cf_dir/Makefile cf_subdirs="$cf_subdirs $cf_subdir" done done fi echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) [$]@' >>Makefiledonefor cf_dir in $SRC_SUBDIRSdo if test -f $cf_dir/Makefile ; then case "$cf_dir" in Ada95) #(vi echo 'libs \' >> Makefile echo 'install.libs \' >> Makefile echo 'uninstall.libs ::' >> Makefile echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) [$]@' >> Makefile ;; esac fi if test -f $srcdir/$cf_dir/modules; then echo >> Makefile if test -f $srcdir/$cf_dir/headers; thencat >> Makefile <<CF_EOFinstall.includes \\uninstall.includes \\CF_EOF fiif test "$cf_dir" != "c++" ; thenecho 'lint \' >> Makefileficat >> Makefile <<CF_EOFlibs \\lintlib \\install.libs \\uninstall.libs \\install.$cf_dir \\uninstall.$cf_dir :: cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \[$]@CF_EOF elif test -f $srcdir/$cf_dir/headers; thencat >> Makefile <<CF_EOFlibs \\install.libs \\uninstall.libs \\install.includes \\uninstall.includes :: cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \[$]@CF_EOFfidonecat >> Makefile <<CF_EOFinstall.data \\uninstall.data ::$MAKE_TERMINFO cd misc && \$(MAKE) \$(CF_MFLAGS) \[$]@install.man \\uninstall.man :: cd man && \$(MAKE) \$(CF_MFLAGS) \[$]@distclean :: rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h rm -f headers.sh headers.sed rm -rf \$(DIRS_TO_MAKE)CF_EOF# Special case: tack's manpage lives in its own directory.if test -d tack ; thenif test -f $srcdir/$tack.h; thencat >> Makefile <<CF_EOFinstall.man \\uninstall.man :: cd tack && \$(MAKE) \$(CF_MFLAGS) \[$]@CF_EOFfifidnl If we're installing into a subdirectory of /usr/include, etc., we shoulddnl prepend the subdirectory's name to the "#include" paths. It won't hurtdnl anything, and will make it more standardized. It's awkward to decide thisdnl at configuration because of quoting, so we'll simply make all headersdnl installed via a script that can do the right thing.rm -f headers.sed headers.shdnl ( generating this script makes the makefiles a little tidier :-)echo creating headers.shcat >headers.sh <<CF_EOF#! /bin/sh# This shell script is generated by the 'configure' script. It is invoked in a# subdirectory of the build tree. It generates a sed-script in the parent# directory that is used to adjust includes for header files that reside in a# subdirectory of /usr/include, etc.PRG=""while test \[$]# != 3doPRG="\$PRG \[$]1"; shiftdoneDST=\[$]1REF=\[$]2SRC=\[$]3TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$echo installing \$SRC in \$DSTCF_EOFif test $WITH_CURSES_H = yes; then cat >>headers.sh <<CF_EOFcase \$DST in/*/include/*) END=\`basename \$DST\` for i in \`cat \$REF/../*/headers |fgrep -v "#"\` do NAME=\`basename \$i\` echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED done ;;*) echo "" >> \$TMPSED ;;esacCF_EOFelse cat >>headers.sh <<CF_EOFcase \$DST in/*/include/*) END=\`basename \$DST\` for i in \`cat \$REF/../*/headers |fgrep -v "#"\` do NAME=\`basename \$i\` if test "\$NAME" = "curses.h" then
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -