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

📄 aclocal.m4

📁 一套客户/服务器模式的备份系统代码,跨平台,支持linux,AIX, IRIX, FreeBSD, Digital Unix (OSF1), Solaris and HP-UX.
💻 M4
📖 第 1 页 / 共 2 页
字号:
################### Start of $RCSfile: aclocal.m4,v $ #################### $Source: /home/alb/afbackup/afbackup-3.3.8.1/RCS/aclocal.m4,v $# $Id: aclocal.m4,v 1.3 2004/07/08 20:34:42 alb Exp alb $# $Date: 2004/07/08 20:34:42 $# $Author: alb $######### description ######################################################################################################################## Macro to add for using GNU gettext.# Ulrich Drepper <drepper@cygnus.com>, 1995.## This file can be copied and used freely without restrictions.  It can# be used in projects which are not available under the GNU Public License# but which still want to provide support for the GNU gettext functionality.# Please note that the actual code is *not* freely available.# serial 5AC_DEFUN(AM_WITH_NLS,  [AC_MSG_CHECKING([whether NLS is requested])    dnl Default is enabled NLS    AC_ARG_ENABLE(nls,      [  --disable-nls           do not use Native Language Support],      USE_NLS=$enableval, USE_NLS=yes)    AC_MSG_RESULT($USE_NLS)    AC_SUBST(USE_NLS)    USE_INCLUDED_LIBINTL=no    dnl If we use NLS figure out what method    if test "$USE_NLS" = "yes"; then      AC_PATH_PROG(GETTEXT, gettext, no)      AC_DEFINE(ENABLE_NLS)      AC_MSG_CHECKING([whether included gettext is requested])      AC_ARG_WITH(included-gettext,        [  --with-included-gettext use the GNU gettext library included here],        nls_cv_force_use_gnu_gettext=$withval,        nls_cv_force_use_gnu_gettext=no)      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then        dnl User does not insist on using GNU NLS library.  Figure out what        dnl to use.  If gettext or catgets are available (in this order) we        dnl use this.  Else we have to fall back to GNU NLS library.	dnl catgets is only used if permitted by option --with-catgets.	nls_cv_header_intl=	nls_cv_header_libgt=	CATOBJEXT=NONE	AC_CHECK_HEADER(libintl.h,	  [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,	    [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],	       gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])	   if test "$gt_cv_func_gettext_libc" != "yes"; then	     AC_CHECK_LIB(intl, bindtextdomain,	       [AC_CACHE_CHECK([for gettext in libintl],		 gt_cv_func_gettext_libintl,		 [AC_CHECK_LIB(intl, gettext,		  gt_cv_func_gettext_libintl=yes,		  gt_cv_func_gettext_libintl=no)],		 gt_cv_func_gettext_libintl=no)])	   fi	   if test "$gt_cv_func_gettext_libc" = "yes" \	      || test "$gt_cv_func_gettext_libintl" = "yes"; then	      AC_DEFINE(HAVE_GETTEXT)	      AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,		[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl	      if test "$MSGFMT" != "no"; then		AC_CHECK_FUNCS(dcgettext)		AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)		AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,		  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)		ISGNULIBINTL=no		ORGLIBS="$LIBS"		if test "$gt_cv_func_gettext_libintl" = "yes" ; then		  LIBS="$LIBS -lintl"		fi		/bin/rm -rf intl/gnu		AC_MSG_CHECKING([whether gettext is GNU's])		dnl Very cheap trick: try to output "translated" word		dnl GNU from GNU gettext message file intl/gnu.mo		AC_TRY_LINK_WITH_TEST([#include <locale.h>], [			setlocale(LC_ALL, ""); bindtextdomain("gnu", "intl");			textdomain("gnu"); printf("%s\n", gettext("GNU")); ],		  [ ( mkdir -p intl/gnu;			ln -s '..' intl/gnu/LC_MESSAGES;			for v in `env|grep '^LC_'|sed 's/=.*$//g'` ; do				unset $v			done			unset LINGUAS			LANG=gnu; LANGUAGE="$LANG"			export LANG; export LANGUAGE			$ac_word 2>&1 | grep '^Yes$' >/dev/null 2>&1;			EST=$?;			/bin/rm intl/gnu/LC_MESSAGES;			rmdir intl/gnu;			exit $EST ) ],		  [ISGNULIBINTL=yes])		if test "$ISGNULIBINTL" = "yes" ; then		  AC_MSG_RESULT([yes])		else		  AC_MSG_RESULT([no])		fi		LIBS="$ORGLIBS"		INSTOBJEXT=.mo		if test "$ISGNULIBINTL" != "yes" ; then		  $MSGFMT --version 2>&1 | grep GNU >/dev/null		  if test $? -eq 0 ; then		    AC_MSG_CHECKING([whether system's own msgfmt should be used])		    dnl This is GNU msgfmt, but not GNU libintl		    dnl Try to find system's own msgfmt		    SYSMSGFMT=NO		    SYSGETTEXT=NO		    for dir in `echo $PATH | tr : ' '` ; do		      if test -x "$dir"/msgfmt ; then			"$dir"/msgfmt --version 2>&1 | grep GNU >/dev/null			if test $? -ne 0 ; then			  SYSMSGFMT="$dir"/msgfmt			fi		      fi		      if test -x "$dir"/gettext ; then			"$dir"/gettext --version 2>&1 | grep GNU >/dev/null			if test $? -ne 0 ; then			  SYSGETTEXT="$dir"/gettext			fi		      fi		    done		    if test "$SYSMSGFMT" = NO ; then		      AC_MSG_RESULT([only GNU msgfmt found and libintl is not GNU's])		    else		      MSGFMT="$SYSMSGFMT"		      AC_MSG_RESULT([using system's msgfmt])		    fi		    if test "$SYSGETTEXT" = NO ; then		      AC_MSG_RESULT([only GNU gettext found and libintl is not GNU's])		    else		      GETTEXT="$SYSGETTEXT"		      AC_MSG_RESULT([using system's gettext])		    fi		  fi		fi		if test "$ISGNULIBINTL" = "yes" ; then		  CATOBJEXT=.gmo		  DATADIRNAME=share		else		  CATOBJEXT=.mo		  DATADIRNAME=lib		fi	      fi	   fi	])        if test "$CATOBJEXT" = "NONE"; then	  AC_MSG_CHECKING([whether catgets can be used])	  AC_ARG_WITH(catgets,	    [  --with-catgets          use catgets functions if available],	    nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)	  AC_MSG_RESULT($nls_cv_use_catgets)	  if test "$nls_cv_use_catgets" = "yes"; then	    dnl No gettext in C library.  Try catgets next.	    AC_CHECK_LIB(i, main)	    AC_CHECK_FUNC(catgets,	      [AC_DEFINE(HAVE_CATGETS)	       INTLOBJS="\$(CATOBJS)"	       AC_PATH_PROG(GENCAT, gencat, no)dnl	       if test "$GENCAT" != "no"; then		 AC_PATH_PROG(GMSGFMT, gmsgfmt, no)		 if test "$GMSGFMT" = "no"; then		   AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,		    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)		 fi		 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,		   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)		 USE_INCLUDED_LIBINTL=yes		 CATOBJEXT=.cat		 INSTOBJEXT=.cat		 DATADIRNAME=lib		 INTLDEPS='intl/libintl.a'		 INTLLIBS=$INTLDEPS		 LIBS=`echo $LIBS | sed -e 's/-lintl//'`		 nls_cv_header_intl=intl/libintl.h		 nls_cv_header_libgt=intl/libgettext.h	       fi])	  fi        fi        if test "$CATOBJEXT" = "NONE"; then	  dnl Neither gettext nor catgets in included in the C library.	  dnl Fall back on GNU gettext library.	  nls_cv_use_gnu_gettext=yes        fi      fi      if test "$nls_cv_use_gnu_gettext" = "yes"; then        dnl Mark actions used to generate GNU NLS library.        INTLOBJS="\$(GETTOBJS)"        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)        AC_SUBST(MSGFMT)	USE_INCLUDED_LIBINTL=yes        CATOBJEXT=.gmo        INSTOBJEXT=.mo        DATADIRNAME=share	INTLDEPS='intl/libintl.a'	INTLLIBS=$INTLDEPS	LIBS=`echo $LIBS | sed -e 's/-lintl//'`        nls_cv_header_intl=intl/libintl.h        nls_cv_header_libgt=intl/libgettext.h      fi      dnl Test whether we really found GNU xgettext.      if test "$XGETTEXT" != ":"; then	dnl If it is no GNU xgettext we define it as : so that the	dnl Makefiles still can work.	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then	  : ;	else	  AC_MSG_RESULT(	    [found xgettext program is not GNU xgettext; ignore it])	  XGETTEXT=":"	fi      fi      # We need to process the po/ directory.      POSUB=po    else      DATADIRNAME=share      nls_cv_header_intl=intl/libintl.h      nls_cv_header_libgt=intl/libgettext.h    fi    if test _"$nls_cv_header_intl" != _ ; then      AC_DEFINE(HAVE_INTL_LIBINTL_H)    fi    AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)    AC_OUTPUT_COMMANDS(     [case "$CONFIG_FILES" in *po/Makefile.in*)        sed -e "/POTFILES =/r po/POTFILES.all" po/Makefile.in > po/Makefile      esac])    # If this is used in GNU gettext we have to set USE_NLS to `yes'    # because some of the sources are only built for this goal.    if test "$PACKAGE" = gettext; then      USE_NLS=yes      USE_INCLUDED_LIBINTL=yes    fi    dnl These rules are solely for the distribution goal.  While doing this    dnl we only have to keep exactly one list of the available catalogs

⌨️ 快捷键说明

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