?? aclocal.m4
字號:
fiAC_MSG_RESULT($MANPAGE_RENAMES)AC_SUBST(MANPAGE_RENAMES)])dnldnl ---------------------------------------------------------------------------dnl CF_MANPAGE_SYMLINKS version: 4 updated: 2003/12/13 18:01:58dnl -------------------dnl Some people expect each tool to make all aliases for manpages in thednl man-directory. This accommodates the older, less-capable implementationsdnl of 'man', and is optional.AC_DEFUN([CF_MANPAGE_SYMLINKS],[AC_MSG_CHECKING(if manpage aliases will be installed)AC_ARG_WITH(manpage-aliases, [ --with-manpage-aliases specify manpage-aliases using .so], [MANPAGE_ALIASES=$withval], [MANPAGE_ALIASES=yes])AC_MSG_RESULT($MANPAGE_ALIASES)if test "$LN_S" = "ln -s"; then cf_use_symlinks=yeselse cf_use_symlinks=nofiMANPAGE_SYMLINKS=noif test "$MANPAGE_ALIASES" = yes ; thenAC_MSG_CHECKING(if manpage symlinks should be used)AC_ARG_WITH(manpage-symlinks, [ --with-manpage-symlinks specify manpage-aliases using symlinks], [MANPAGE_SYMLINKS=$withval], [MANPAGE_SYMLINKS=$cf_use_symlinks])if test "$$cf_use_symlinks" = no; thenif test "$MANPAGE_SYMLINKS" = yes ; then AC_MSG_WARN(cannot make symlinks, will use .so files) MANPAGE_SYMLINKS=nofifiAC_MSG_RESULT($MANPAGE_SYMLINKS)fi])dnldnl ---------------------------------------------------------------------------dnl CF_MANPAGE_TBL version: 3 updated: 2002/01/19 22:51:32dnl --------------dnl This option causes manpages to be run through tbl(1) to generate tablesdnl correctly.AC_DEFUN([CF_MANPAGE_TBL],[AC_MSG_CHECKING(for manpage tbl)AC_ARG_WITH(manpage-tbl, [ --with-manpage-tbl specify manpage processing with tbl], [MANPAGE_TBL=$withval], [MANPAGE_TBL=no])AC_MSG_RESULT($MANPAGE_TBL)])dnldnl ---------------------------------------------------------------------------dnl CF_MAN_PAGES version: 27 updated: 2003/12/20 20:39:45dnl ------------dnl Try to determine if the man-pages on the system are compressed, and ifdnl so, what format is used. Use this information to construct a script thatdnl will install man-pages.AC_DEFUN([CF_MAN_PAGES],[CF_HELP_MESSAGE(Options to Specify How Manpages are Installed:)CF_MANPAGE_FORMATCF_MANPAGE_RENAMESCF_MANPAGE_SYMLINKSCF_MANPAGE_TBL if test "$prefix" = "NONE" ; then cf_prefix="$ac_default_prefix" else cf_prefix="$prefix" fi case "$MANPAGE_FORMAT" in # (vi *catonly*) # (vi cf_format=yes cf_inboth=no ;; *formatted*) # (vi cf_format=yes cf_inboth=yes ;; *) cf_format=no cf_inboth=no ;; esactest ! -d man && mkdir mancf_so_strip=cf_compress=case "$MANPAGE_FORMAT" in #(vi*compress*) #(vi cf_so_strip="Z" cf_compress=compress ;;*gzip*) #(vi cf_so_strip="gz" cf_compress=gzip ;;esaccf_edit_man=man/edit_man.shcat >$cf_edit_man <<CF_EOF#! /bin/sh# this script is generated by the configure-script CF_MAN_PAGES macro.prefix="$cf_prefix"datadir="$datadir"NCURSES_OSPEED="$NCURSES_OSPEED"TERMINFO="$TERMINFO"MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"INSTALL="$INSTALL"INSTALL_DATA="$INSTALL_DATA"transform="$program_transform_name"TMP=\${TMPDIR-/tmp}/man\$\$trap "rm -f \$TMP" 0 1 2 5 15form=\[$]1shift || exit 1verb=\[$]1shift || exit 1mandir=\[$]1shift || exit 1srcdir=\[$]1shift || exit 1if test "\$form" = normal ; then if test "$cf_format" = yes ; then if test "$cf_inboth" = no ; then sh \[$]0 format \$verb \$mandir \$srcdir \[$]* exit $? fi fi cf_subdir=\$mandir/man cf_tables=$MANPAGE_TBLelse cf_subdir=\$mandir/cat cf_tables=yesfi# process the list of source-filesfor i in \[$]* ; docase \$i in #(vi*.orig|*.rej) ;; #(vi*.[[0-9]]*) section=\`expr "\$i" : '.*\\.\\([[0-9]]\\)[[xm]]*'\`; if test \$verb = installing ; then if test ! -d \$cf_subdir\${section} ; then \$MKDIRS \$cf_subdir\$section fi fi aliases= source=\`basename \$i\` inalias=\$source test ! -f \$inalias && inalias="\$srcdir/\$inalias" if test ! -f \$inalias ; then echo .. skipped \$source continue fiCF_EOFif test "$MANPAGE_ALIASES" != no ; thencat >>$cf_edit_man <<CF_EOF aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`CF_EOFfiif test "$MANPAGE_RENAMES" = no ; thencat >>$cf_edit_man <<CF_EOF # perform program transformations for section 1 man pages if test \$section = 1 ; then target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\` else target=\$cf_subdir\${section}/\$source fiCF_EOFelsecat >>$cf_edit_man <<CF_EOF target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \[$]2}'\` if test -z "\$target" ; then echo '? missing rename for '\$source target="\$source" fi target="\$cf_subdir\${section}/\${target}"CF_EOFfi # replace variables in man page ifelse($1,,,[ for cf_name in $1 docat >>$cf_edit_man <<CF_EOF prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`CF_EOF done ])cat >>$cf_edit_man <<CF_EOF sed -e "s,@DATADIR@,\$datadir," \\ -e "s,@TERMINFO@,\$TERMINFO," \\ -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\CF_EOF ifelse($1,,,[ for cf_name in $1 do cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`cat >>$cf_edit_man <<CF_EOF -e "s,@$cf_NAME@,\$prog_$cf_name," \\CF_EOF done ])if test -f $MANPAGE_RENAMES ; thencat >>$cf_edit_man <<CF_EOF < \$i | sed -f $srcdir/edit_man.sed >\$TMPCF_EOFelsecat >>$cf_edit_man <<CF_EOF < \$i >\$TMPCF_EOFficat >>$cf_edit_man <<CF_EOFif test \$cf_tables = yes ; then tbl \$TMP >\$TMP.out mv \$TMP.out \$TMPfiCF_EOFif test $with_curses_h != yes ; thencat >>$cf_edit_man <<CF_EOF sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out mv \$TMP.out \$TMPCF_EOFficat >>$cf_edit_man <<CF_EOF if test \$form = format ; then nroff -man \$TMP >\$TMP.out mv \$TMP.out \$TMP fiCF_EOFif test -n "$cf_compress" ; thencat >>$cf_edit_man <<CF_EOF if test \$verb = installing ; then if ( $cf_compress -f \$TMP ) then mv \$TMP.$cf_so_strip \$TMP fi fi target="\$target.$cf_so_strip"CF_EOFficase "$MANPAGE_FORMAT" in #(vi*BSDI*)cat >>$cf_edit_man <<CF_EOF if test \$form = format ; then # BSDI installs only .0 suffixes in the cat directories target="\`echo \$target|sed -e 's/\.[[1-9]]\+[[a-z]]*/.0/'\`" fiCF_EOF ;;esaccat >>$cf_edit_man <<CF_EOF suffix=\`basename \$target | sed -e 's%^[[^.]]*%%'\` if test \$verb = installing ; then echo \$verb \$target \$INSTALL_DATA \$TMP \$target test -n "\$aliases" && ( cd \$cf_subdir\${section} && ( source=\`echo \$target |sed -e 's%^.*/\([[^/]][[^/]]*/[[^/]][[^/]]*$\)%\1%'\` test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\` target=\`basename \$target\` for cf_alias in \$aliases do if test \$section = 1 ; then cf_alias=\`echo \$cf_alias|sed "\${transform}"\` fi if test "$MANPAGE_SYMLINKS" = yes ; then if test -f \$cf_alias\${suffix} ; then if ( cmp -s \$target \$cf_alias\${suffix} ) then continue fi fi echo .. \$verb alias \$cf_alias\${suffix} rm -f \$cf_alias\${suffix} $LN_S \$target \$cf_alias\${suffix} elif test "\$target" != "\$cf_alias\${suffix}" ; then echo ".so \$source" >\$TMPCF_EOFif test -n "$cf_compress" ; thencat >>$cf_edit_man <<CF_EOF if test -n "$cf_so_strip" ; then $cf_compress -f \$TMP mv \$TMP.$cf_so_strip \$TMP fiCF_EOFficat >>$cf_edit_man <<CF_EOF echo .. \$verb alias \$cf_alias\${suffix} rm -f \$cf_alias\${suffix} \$INSTALL_DATA \$TMP \$cf_alias\${suffix} fi done ) ) elif test \$verb = removing ; then echo \$verb \$target rm -f \$target test -n "\$aliases" && ( cd \$cf_subdir\${section} && ( for cf_alias in \$aliases do if test \$section = 1 ; then cf_alias=\`echo \$cf_alias|sed "\${transform}"\` fi echo .. \$verb alias \$cf_alias\${suffix} rm -f \$cf_alias\${suffix} done ) ) else# echo ".hy 0" cat \$TMP fi ;;esacdoneif test $cf_inboth = yes ; thenif test \$form != format ; then sh \[$]0 format \$verb \$mandir \$srcdir \[$]*fifiexit 0CF_EOFchmod 755 $cf_edit_man])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([ #include <stdio.h> #include <math.h> ], [double x = rand(); printf("result = %g\n", ]ifelse($2,,sin(x),$2)[)], [cf_cv_need_libm=no], [cf_cv_need_libm=yes])])if test "$cf_cv_need_libm" = yesthenifelse($1,,[ LIBS="$LIBS -lm"],[$1=-lm])fi])dnl ---------------------------------------------------------------------------dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55dnl ----------------------dnl Check if the file-system supports mixed-case filenames. If we're able todnl create a lowercase name and see it as uppercase, it doesn't support that.AC_DEFUN([CF_MIXEDCASE_FILENAMES],[AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[if test "$cross_compiling" = yes ; then case $target_alias in #(vi *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi cf_cv_mixedcase=no ;; *) cf_cv_mixedcase=yes ;; esacelse rm -f conftest CONFTEST echo test >conftest if test -f CONFTEST ; then cf_cv_mixedcase=no else cf_cv_mixedcase=yes fi rm -f conftest CONFTESTfi])test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)])dnldnl ---------------------------------------------------------------------------dnl CF_MKSTEMP version: 3 updated: 2001/11/08 20:59:59dnl ----------dnl Check for a working mkstemp. This creates two files, checks that they arednl successfully created and distinct (AmigaOS apparently fails on the last).AC_DEFUN([CF_MKSTEMP],[AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[rm -f conftest*AC_TRY_RUN([#include <sys/types.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <sys/stat.h>int main(){ char *tmpl = "conftestXXXXXX"; char name[2][80]; int n; int result = 0; int fd; struct stat sb; umask(077); for (n = 0; n < 2; ++n) { strcpy(name[n], tmpl); if ((fd = mkstemp(name[n])) >= 0) { if (!strcmp(name[n], tmpl) || stat(name[n], &sb) != 0 || (sb.st_mode & S_IFMT) != S_IFREG || (sb.st_mode & 077) != 0) { result = 1; } close(fd); } } if (result == 0 && !strcmp(name[0], name[1])) result = 1; exit(result);}],[cf_cv_func_mkstemp=yes],[cf_cv_func_mkstemp=no],[AC_CHECK_FUNC(mkstemp)])])if test "$cf_cv_func_mkstemp" = yes ; then AC_DEFINE(HAVE_MKSTEMP)fi])dnldnl ---------------------------------------------------------------------------dnl CF_NUMBE
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -