cSvn-UI for SVN Repositories

cGit-UI – is a web interface for Subversion (SVN) Repositories. cSvn CGI script is writen in C and therefore it's fast enough

15 Commits   0 Branches   1 Tag
     5         kx # gettext.m4 serial 68 (gettext-0.19.8)
     5         kx dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
     5         kx dnl This file is free software; the Free Software Foundation
     5         kx dnl gives unlimited permission to copy and/or distribute it,
     5         kx dnl with or without modifications, as long as this notice is preserved.
     5         kx dnl
     5         kx dnl This file can be used in projects which are not available under
     5         kx dnl the GNU General Public License or the GNU Library General Public
     5         kx dnl License but which still want to provide support for the GNU gettext
     5         kx dnl functionality.
     5         kx dnl Please note that the actual code of the GNU gettext library is covered
     5         kx dnl by the GNU Library General Public License, and the rest of the GNU
     5         kx dnl gettext package is covered by the GNU General Public License.
     5         kx dnl They are *not* in the public domain.
     5         kx 
     5         kx dnl Authors:
     5         kx dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
     5         kx dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
     5         kx 
     5         kx dnl Macro to add for using GNU gettext.
     5         kx 
     5         kx dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
     5         kx dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
     5         kx dnl    default (if it is not specified or empty) is 'no-libtool'.
     5         kx dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
     5         kx dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
     5         kx dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
     5         kx dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
     5         kx dnl    depending on --{enable,disable}-{shared,static} and on the presence of
     5         kx dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
     5         kx dnl    $(top_builddir)/intl/libintl.a will be created.
     5         kx dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
     5         kx dnl    implementations (in libc or libintl) without the ngettext() function
     5         kx dnl    will be ignored.  If NEEDSYMBOL is specified and is
     5         kx dnl    'need-formatstring-macros', then GNU gettext implementations that don't
     5         kx dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
     5         kx dnl INTLDIR is used to find the intl libraries.  If empty,
     5         kx dnl    the value '$(top_builddir)/intl/' is used.
     5         kx dnl
     5         kx dnl The result of the configuration is one of three cases:
     5         kx dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
     5         kx dnl    and used.
     5         kx dnl    Catalog format: GNU --> install in $(datadir)
     5         kx dnl    Catalog extension: .mo after installation, .gmo in source tree
     5         kx dnl 2) GNU gettext has been found in the system's C library.
     5         kx dnl    Catalog format: GNU --> install in $(datadir)
     5         kx dnl    Catalog extension: .mo after installation, .gmo in source tree
     5         kx dnl 3) No internationalization, always use English msgid.
     5         kx dnl    Catalog format: none
     5         kx dnl    Catalog extension: none
     5         kx dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
     5         kx dnl The use of .gmo is historical (it was needed to avoid overwriting the
     5         kx dnl GNU format catalogs when building on a platform with an X/Open gettext),
     5         kx dnl but we keep it in order not to force irrelevant filename changes on the
     5         kx dnl maintainers.
     5         kx dnl
     5         kx AC_DEFUN([AM_GNU_GETTEXT],
     5         kx [
     5         kx   dnl Argument checking.
     5         kx   ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
     5         kx     [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
     5         kx ])])])])])
     5         kx   ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
     5         kx     [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
     5         kx   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
     5         kx     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
     5         kx ])])])])
     5         kx   define([gt_included_intl],
     5         kx     ifelse([$1], [external],
     5         kx       ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
     5         kx       [yes]))
     5         kx   define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
     5         kx   gt_NEEDS_INIT
     5         kx   AM_GNU_GETTEXT_NEED([$2])
     5         kx 
     5         kx   AC_REQUIRE([AM_PO_SUBDIRS])dnl
     5         kx   ifelse(gt_included_intl, yes, [
     5         kx     AC_REQUIRE([AM_INTL_SUBDIR])dnl
     5         kx   ])
     5         kx 
     5         kx   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
     5         kx   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
     5         kx   AC_REQUIRE([AC_LIB_RPATH])
     5         kx 
     5         kx   dnl Sometimes libintl requires libiconv, so first search for libiconv.
     5         kx   dnl Ideally we would do this search only after the
     5         kx   dnl      if test "$USE_NLS" = "yes"; then
     5         kx   dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
     5         kx   dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
     5         kx   dnl the configure script would need to contain the same shell code
     5         kx   dnl again, outside any 'if'. There are two solutions:
     5         kx   dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
     5         kx   dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
     5         kx   dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
     5         kx   dnl documented, we avoid it.
     5         kx   ifelse(gt_included_intl, yes, , [
     5         kx     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
     5         kx   ])
     5         kx 
     5         kx   dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
     5         kx   gt_INTL_MACOSX
     5         kx 
     5         kx   dnl Set USE_NLS.
     5         kx   AC_REQUIRE([AM_NLS])
     5         kx 
     5         kx   ifelse(gt_included_intl, yes, [
     5         kx     BUILD_INCLUDED_LIBINTL=no
     5         kx     USE_INCLUDED_LIBINTL=no
     5         kx   ])
     5         kx   LIBINTL=
     5         kx   LTLIBINTL=
     5         kx   POSUB=
     5         kx 
     5         kx   dnl Add a version number to the cache macros.
     5         kx   case " $gt_needs " in
     5         kx     *" need-formatstring-macros "*) gt_api_version=3 ;;
     5         kx     *" need-ngettext "*) gt_api_version=2 ;;
     5         kx     *) gt_api_version=1 ;;
     5         kx   esac
     5         kx   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
     5         kx   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
     5         kx 
     5         kx   dnl If we use NLS figure out what method
     5         kx   if test "$USE_NLS" = "yes"; then
     5         kx     gt_use_preinstalled_gnugettext=no
     5         kx     ifelse(gt_included_intl, yes, [
     5         kx       AC_MSG_CHECKING([whether included gettext is requested])
     5         kx       AC_ARG_WITH([included-gettext],
     5         kx         [  --with-included-gettext use the GNU gettext library included here],
     5         kx         nls_cv_force_use_gnu_gettext=$withval,
     5         kx         nls_cv_force_use_gnu_gettext=no)
     5         kx       AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
     5         kx 
     5         kx       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
     5         kx       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
     5         kx     ])
     5         kx         dnl User does not insist on using GNU NLS library.  Figure out what
     5         kx         dnl to use.  If GNU gettext is available we use this.  Else we have
     5         kx         dnl to fall back to GNU NLS library.
     5         kx 
     5         kx         if test $gt_api_version -ge 3; then
     5         kx           gt_revision_test_code='
     5         kx #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
     5         kx #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
     5         kx #endif
     5         kx changequote(,)dnl
     5         kx typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
     5         kx changequote([,])dnl
     5         kx '
     5         kx         else
     5         kx           gt_revision_test_code=
     5         kx         fi
     5         kx         if test $gt_api_version -ge 2; then
     5         kx           gt_expression_test_code=' + * ngettext ("", "", 0)'
     5         kx         else
     5         kx           gt_expression_test_code=
     5         kx         fi
     5         kx 
     5         kx         AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
     5         kx          [AC_LINK_IFELSE(
     5         kx             [AC_LANG_PROGRAM(
     5         kx                [[
     5         kx #include <libintl.h>
     5         kx #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
     5         kx extern int _nl_msg_cat_cntr;
     5         kx extern int *_nl_domain_bindings;
     5         kx #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
     5         kx #else
     5         kx #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
     5         kx #endif
     5         kx $gt_revision_test_code
     5         kx                ]],
     5         kx                [[
     5         kx bindtextdomain ("", "");
     5         kx return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
     5         kx                ]])],
     5         kx             [eval "$gt_func_gnugettext_libc=yes"],
     5         kx             [eval "$gt_func_gnugettext_libc=no"])])
     5         kx 
     5         kx         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
     5         kx           dnl Sometimes libintl requires libiconv, so first search for libiconv.
     5         kx           ifelse(gt_included_intl, yes, , [
     5         kx             AM_ICONV_LINK
     5         kx           ])
     5         kx           dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
     5         kx           dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
     5         kx           dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
     5         kx           dnl even if libiconv doesn't exist.
     5         kx           AC_LIB_LINKFLAGS_BODY([intl])
     5         kx           AC_CACHE_CHECK([for GNU gettext in libintl],
     5         kx             [$gt_func_gnugettext_libintl],
     5         kx            [gt_save_CPPFLAGS="$CPPFLAGS"
     5         kx             CPPFLAGS="$CPPFLAGS $INCINTL"
     5         kx             gt_save_LIBS="$LIBS"
     5         kx             LIBS="$LIBS $LIBINTL"
     5         kx             dnl Now see whether libintl exists and does not depend on libiconv.
     5         kx             AC_LINK_IFELSE(
     5         kx               [AC_LANG_PROGRAM(
     5         kx                  [[
     5         kx #include <libintl.h>
     5         kx #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
     5         kx extern int _nl_msg_cat_cntr;
     5         kx extern
     5         kx #ifdef __cplusplus
     5         kx "C"
     5         kx #endif
     5         kx const char *_nl_expand_alias (const char *);
     5         kx #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
     5         kx #else
     5         kx #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
     5         kx #endif
     5         kx $gt_revision_test_code
     5         kx                  ]],
     5         kx                  [[
     5         kx bindtextdomain ("", "");
     5         kx return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
     5         kx                  ]])],
     5         kx               [eval "$gt_func_gnugettext_libintl=yes"],
     5         kx               [eval "$gt_func_gnugettext_libintl=no"])
     5         kx             dnl Now see whether libintl exists and depends on libiconv.
     5         kx             if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
     5         kx               LIBS="$LIBS $LIBICONV"
     5         kx               AC_LINK_IFELSE(
     5         kx                 [AC_LANG_PROGRAM(
     5         kx                    [[
     5         kx #include <libintl.h>
     5         kx #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
     5         kx extern int _nl_msg_cat_cntr;
     5         kx extern
     5         kx #ifdef __cplusplus
     5         kx "C"
     5         kx #endif
     5         kx const char *_nl_expand_alias (const char *);
     5         kx #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
     5         kx #else
     5         kx #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
     5         kx #endif
     5         kx $gt_revision_test_code
     5         kx                    ]],
     5         kx                    [[
     5         kx bindtextdomain ("", "");
     5         kx return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
     5         kx                    ]])],
     5         kx                 [LIBINTL="$LIBINTL $LIBICONV"
     5         kx                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"
     5         kx                  eval "$gt_func_gnugettext_libintl=yes"
     5         kx                 ])
     5         kx             fi
     5         kx             CPPFLAGS="$gt_save_CPPFLAGS"
     5         kx             LIBS="$gt_save_LIBS"])
     5         kx         fi
     5         kx 
     5         kx         dnl If an already present or preinstalled GNU gettext() is found,
     5         kx         dnl use it.  But if this macro is used in GNU gettext, and GNU
     5         kx         dnl gettext is already preinstalled in libintl, we update this
     5         kx         dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
     5         kx         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
     5         kx            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
     5         kx                 && test "$PACKAGE" != gettext-runtime \
     5         kx                 && test "$PACKAGE" != gettext-tools; }; then
     5         kx           gt_use_preinstalled_gnugettext=yes
     5         kx         else
     5         kx           dnl Reset the values set by searching for libintl.
     5         kx           LIBINTL=
     5         kx           LTLIBINTL=
     5         kx           INCINTL=
     5         kx         fi
     5         kx 
     5         kx     ifelse(gt_included_intl, yes, [
     5         kx         if test "$gt_use_preinstalled_gnugettext" != "yes"; then
     5         kx           dnl GNU gettext is not found in the C library.
     5         kx           dnl Fall back on included GNU gettext library.
     5         kx           nls_cv_use_gnu_gettext=yes
     5         kx         fi
     5         kx       fi
     5         kx 
     5         kx       if test "$nls_cv_use_gnu_gettext" = "yes"; then
     5         kx         dnl Mark actions used to generate GNU NLS library.
     5         kx         BUILD_INCLUDED_LIBINTL=yes
     5         kx         USE_INCLUDED_LIBINTL=yes
     5         kx         LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
     5         kx         LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
     5         kx         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
     5         kx       fi
     5         kx 
     5         kx       CATOBJEXT=
     5         kx       if test "$gt_use_preinstalled_gnugettext" = "yes" \
     5         kx          || test "$nls_cv_use_gnu_gettext" = "yes"; then
     5         kx         dnl Mark actions to use GNU gettext tools.
     5         kx         CATOBJEXT=.gmo
     5         kx       fi
     5         kx     ])
     5         kx 
     5         kx     if test -n "$INTL_MACOSX_LIBS"; then
     5         kx       if test "$gt_use_preinstalled_gnugettext" = "yes" \
     5         kx          || test "$nls_cv_use_gnu_gettext" = "yes"; then
     5         kx         dnl Some extra flags are needed during linking.
     5         kx         LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
     5         kx         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
     5         kx       fi
     5         kx     fi
     5         kx 
     5         kx     if test "$gt_use_preinstalled_gnugettext" = "yes" \
     5         kx        || test "$nls_cv_use_gnu_gettext" = "yes"; then
     5         kx       AC_DEFINE([ENABLE_NLS], [1],
     5         kx         [Define to 1 if translation of program messages to the user's native language
     5         kx    is requested.])
     5         kx     else
     5         kx       USE_NLS=no
     5         kx     fi
     5         kx   fi
     5         kx 
     5         kx   AC_MSG_CHECKING([whether to use NLS])
     5         kx   AC_MSG_RESULT([$USE_NLS])
     5         kx   if test "$USE_NLS" = "yes"; then
     5         kx     AC_MSG_CHECKING([where the gettext function comes from])
     5         kx     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
     5         kx       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
     5         kx         gt_source="external libintl"
     5         kx       else
     5         kx         gt_source="libc"
     5         kx       fi
     5         kx     else
     5         kx       gt_source="included intl directory"
     5         kx     fi
     5         kx     AC_MSG_RESULT([$gt_source])
     5         kx   fi
     5         kx 
     5         kx   if test "$USE_NLS" = "yes"; then
     5         kx 
     5         kx     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
     5         kx       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
     5         kx         AC_MSG_CHECKING([how to link with libintl])
     5         kx         AC_MSG_RESULT([$LIBINTL])
     5         kx         AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
     5         kx       fi
     5         kx 
     5         kx       dnl For backward compatibility. Some packages may be using this.
     5         kx       AC_DEFINE([HAVE_GETTEXT], [1],
     5         kx        [Define if the GNU gettext() function is already present or preinstalled.])
     5         kx       AC_DEFINE([HAVE_DCGETTEXT], [1],
     5         kx        [Define if the GNU dcgettext() function is already present or preinstalled.])
     5         kx     fi
     5         kx 
     5         kx     dnl We need to process the po/ directory.
     5         kx     POSUB=po
     5         kx   fi
     5         kx 
     5         kx   ifelse(gt_included_intl, yes, [
     5         kx     dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
     5         kx     dnl to 'yes' because some of the testsuite requires it.
     5         kx     if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
     5         kx       BUILD_INCLUDED_LIBINTL=yes
     5         kx     fi
     5         kx 
     5         kx     dnl Make all variables we use known to autoconf.
     5         kx     AC_SUBST([BUILD_INCLUDED_LIBINTL])
     5         kx     AC_SUBST([USE_INCLUDED_LIBINTL])
     5         kx     AC_SUBST([CATOBJEXT])
     5         kx 
     5         kx     dnl For backward compatibility. Some configure.ins may be using this.
     5         kx     nls_cv_header_intl=
     5         kx     nls_cv_header_libgt=
     5         kx 
     5         kx     dnl For backward compatibility. Some Makefiles may be using this.
     5         kx     DATADIRNAME=share
     5         kx     AC_SUBST([DATADIRNAME])
     5         kx 
     5         kx     dnl For backward compatibility. Some Makefiles may be using this.
     5         kx     INSTOBJEXT=.mo
     5         kx     AC_SUBST([INSTOBJEXT])
     5         kx 
     5         kx     dnl For backward compatibility. Some Makefiles may be using this.
     5         kx     GENCAT=gencat
     5         kx     AC_SUBST([GENCAT])
     5         kx 
     5         kx     dnl For backward compatibility. Some Makefiles may be using this.
     5         kx     INTLOBJS=
     5         kx     if test "$USE_INCLUDED_LIBINTL" = yes; then
     5         kx       INTLOBJS="\$(GETTOBJS)"
     5         kx     fi
     5         kx     AC_SUBST([INTLOBJS])
     5         kx 
     5         kx     dnl Enable libtool support if the surrounding package wishes it.
     5         kx     INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
     5         kx     AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
     5         kx   ])
     5         kx 
     5         kx   dnl For backward compatibility. Some Makefiles may be using this.
     5         kx   INTLLIBS="$LIBINTL"
     5         kx   AC_SUBST([INTLLIBS])
     5         kx 
     5         kx   dnl Make all documented variables known to autoconf.
     5         kx   AC_SUBST([LIBINTL])
     5         kx   AC_SUBST([LTLIBINTL])
     5         kx   AC_SUBST([POSUB])
     5         kx ])
     5         kx 
     5         kx 
     5         kx dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
     5         kx m4_define([gt_NEEDS_INIT],
     5         kx [
     5         kx   m4_divert_text([DEFAULTS], [gt_needs=])
     5         kx   m4_define([gt_NEEDS_INIT], [])
     5         kx ])
     5         kx 
     5         kx 
     5         kx dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
     5         kx AC_DEFUN([AM_GNU_GETTEXT_NEED],
     5         kx [
     5         kx   m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
     5         kx ])
     5         kx 
     5         kx 
     5         kx dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
     5         kx AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
     5         kx 
     5         kx 
     5         kx dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
     5         kx AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])