comparison aclocal.m4 @ 7:5551ab2301fe

* Fixed a DND crash * When running a SSH bookmark, make sure need_userpass is enabled for that connection * moved anonymous ftp stuff from gtk port to rfc959.c * call bind_textdomain_codeset in gtk+ port * translation fixes for menus (from Owen Taylor <otaylor@redhat.com>)
author masneyb
date Fri, 23 Aug 2002 12:40:44 +0000
parents 8b1883341c6f
children ddb983d8574b
comparison
equal deleted inserted replaced
6:5678b5179c35 7:5551ab2301fe
123 $1="$3/missing $2" 123 $1="$3/missing $2"
124 AC_MSG_RESULT(missing) 124 AC_MSG_RESULT(missing)
125 fi 125 fi
126 AC_SUBST($1)]) 126 AC_SUBST($1)])
127 127
128 #serial 1 128 # isc-posix.m4 serial 2 (gettext-0.11.2)
129 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
130 dnl This file is free software, distributed under the terms of the GNU
131 dnl General Public License. As a special exception to the GNU General
132 dnl Public License, this file may be distributed as part of a program
133 dnl that contains a configuration script generated by Autoconf, under
134 dnl the same distribution terms as the rest of that program.
135
136 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
137
129 # This test replaces the one in autoconf. 138 # This test replaces the one in autoconf.
130 # Currently this macro should have the same name as the autoconf macro 139 # Currently this macro should have the same name as the autoconf macro
131 # because gettext's gettext.m4 (distributed in the automake package) 140 # because gettext's gettext.m4 (distributed in the automake package)
132 # still uses it. Otherwise, the use in gettext.m4 makes autoheader 141 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
133 # give these diagnostics: 142 # give these diagnostics:
591 AC_SUBST(GTK_CFLAGS) 600 AC_SUBST(GTK_CFLAGS)
592 AC_SUBST(GTK_LIBS) 601 AC_SUBST(GTK_LIBS)
593 rm -f conf.gtktest 602 rm -f conf.gtktest
594 ]) 603 ])
595 604
596 # Macro to add for using GNU gettext. 605 # gettext.m4 serial 17 (gettext-0.11.5)
597 # Ulrich Drepper <drepper@cygnus.com>, 1995. 606 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
598 # 607 dnl This file is free software, distributed under the terms of the GNU
599 # This file can be copied and used freely without restrictions. It can 608 dnl General Public License. As a special exception to the GNU General
600 # be used in projects which are not available under the GNU General Public 609 dnl Public License, this file may be distributed as part of a program
601 # License or the GNU Library General Public License but which still want 610 dnl that contains a configuration script generated by Autoconf, under
602 # to provide support for the GNU gettext functionality. 611 dnl the same distribution terms as the rest of that program.
603 # Please note that the actual code of the GNU gettext library is covered 612 dnl
604 # by the GNU Library General Public License, and the rest of the GNU 613 dnl This file can can be used in projects which are not available under
605 # gettext package package is covered by the GNU General Public License. 614 dnl the GNU General Public License or the GNU Library General Public
606 # They are *not* in the public domain. 615 dnl License but which still want to provide support for the GNU gettext
607 616 dnl functionality.
608 # serial 10 617 dnl Please note that the actual code of the GNU gettext library is covered
609 618 dnl by the GNU Library General Public License, and the rest of the GNU
610 dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]). 619 dnl gettext package package is covered by the GNU General Public License.
611 dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library 620 dnl They are *not* in the public domain.
621
622 dnl Authors:
623 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
624 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
625
626 dnl Macro to add for using GNU gettext.
627
628 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
629 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
630 dnl default (if it is not specified or empty) is 'no-libtool'.
631 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
632 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
633 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
612 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, 634 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
613 dnl depending on --{enable,disable}-{shared,static} and on the presence of 635 dnl depending on --{enable,disable}-{shared,static} and on the presence of
614 dnl AM-DISABLE-SHARED). Otherwise, a static library 636 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
615 dnl $(top_builddir)/intl/libintl.a will be created. 637 dnl $(top_builddir)/intl/libintl.a will be created.
616 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext 638 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
617 dnl implementations (in libc or libintl) without the ngettext() function 639 dnl implementations (in libc or libintl) without the ngettext() function
618 dnl will be ignored. 640 dnl will be ignored. If NEEDSYMBOL is specified and is
619 dnl LIBDIR is used to find the intl libraries. If empty, 641 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
642 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
643 dnl INTLDIR is used to find the intl libraries. If empty,
620 dnl the value `$(top_builddir)/intl/' is used. 644 dnl the value `$(top_builddir)/intl/' is used.
621 dnl 645 dnl
622 dnl The result of the configuration is one of three cases: 646 dnl The result of the configuration is one of three cases:
623 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled 647 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
624 dnl and used. 648 dnl and used.
628 dnl Catalog format: GNU --> install in $(datadir) 652 dnl Catalog format: GNU --> install in $(datadir)
629 dnl Catalog extension: .mo after installation, .gmo in source tree 653 dnl Catalog extension: .mo after installation, .gmo in source tree
630 dnl 3) No internationalization, always use English msgid. 654 dnl 3) No internationalization, always use English msgid.
631 dnl Catalog format: none 655 dnl Catalog format: none
632 dnl Catalog extension: none 656 dnl Catalog extension: none
657 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
633 dnl The use of .gmo is historical (it was needed to avoid overwriting the 658 dnl The use of .gmo is historical (it was needed to avoid overwriting the
634 dnl GNU format catalogs when building on a platform with an X/Open gettext), 659 dnl GNU format catalogs when building on a platform with an X/Open gettext),
635 dnl but we keep it in order not to force irrelevant filename changes on the 660 dnl but we keep it in order not to force irrelevant filename changes on the
636 dnl maintainers. 661 dnl maintainers.
637 dnl 662 dnl
638 AC_DEFUN([AM_WITH_NLS], 663 AC_DEFUN([AM_GNU_GETTEXT],
639 [AC_MSG_CHECKING([whether NLS is requested]) 664 [
640 dnl Default is enabled NLS 665 dnl Argument checking.
641 AC_ARG_ENABLE(nls, 666 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
642 [ --disable-nls do not use Native Language Support], 667 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
643 USE_NLS=$enableval, USE_NLS=yes) 668 ])])])])])
644 AC_MSG_RESULT($USE_NLS) 669 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
645 AC_SUBST(USE_NLS) 670 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
646 671 ])])])])
672 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
673 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
674
675 AC_REQUIRE([AM_PO_SUBDIRS])dnl
676 ifelse(gt_included_intl, yes, [
677 AC_REQUIRE([AM_INTL_SUBDIR])dnl
678 ])
679
680 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
681 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
682 AC_REQUIRE([AC_LIB_RPATH])
683
684 dnl Sometimes libintl requires libiconv, so first search for libiconv.
685 dnl Ideally we would do this search only after the
686 dnl if test "$USE_NLS" = "yes"; then
687 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
688 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
689 dnl the configure script would need to contain the same shell code
690 dnl again, outside any 'if'. There are two solutions:
691 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
692 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
693 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
694 dnl documented, we avoid it.
695 ifelse(gt_included_intl, yes, , [
696 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
697 ])
698
699 AC_MSG_CHECKING([whether NLS is requested])
700 dnl Default is enabled NLS
701 AC_ARG_ENABLE(nls,
702 [ --disable-nls do not use Native Language Support],
703 USE_NLS=$enableval, USE_NLS=yes)
704 AC_MSG_RESULT($USE_NLS)
705 AC_SUBST(USE_NLS)
706
707 ifelse(gt_included_intl, yes, [
647 BUILD_INCLUDED_LIBINTL=no 708 BUILD_INCLUDED_LIBINTL=no
648 USE_INCLUDED_LIBINTL=no 709 USE_INCLUDED_LIBINTL=no
649 INTLLIBS= 710 ])
650 711 LIBINTL=
651 dnl If we use NLS figure out what method 712 LTLIBINTL=
652 if test "$USE_NLS" = "yes"; then 713 POSUB=
653 AC_DEFINE(ENABLE_NLS, 1, 714
654 [Define to 1 if translation of program messages to the user's native language 715 dnl If we use NLS figure out what method
655 is requested.]) 716 if test "$USE_NLS" = "yes"; then
717 gt_use_preinstalled_gnugettext=no
718 ifelse(gt_included_intl, yes, [
656 AC_MSG_CHECKING([whether included gettext is requested]) 719 AC_MSG_CHECKING([whether included gettext is requested])
657 AC_ARG_WITH(included-gettext, 720 AC_ARG_WITH(included-gettext,
658 [ --with-included-gettext use the GNU gettext library included here], 721 [ --with-included-gettext use the GNU gettext library included here],
659 nls_cv_force_use_gnu_gettext=$withval, 722 nls_cv_force_use_gnu_gettext=$withval,
660 nls_cv_force_use_gnu_gettext=no) 723 nls_cv_force_use_gnu_gettext=no)
661 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) 724 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
662 725
663 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" 726 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
664 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then 727 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
728 ])
665 dnl User does not insist on using GNU NLS library. Figure out what 729 dnl User does not insist on using GNU NLS library. Figure out what
666 dnl to use. If GNU gettext is available we use this. Else we have 730 dnl to use. If GNU gettext is available we use this. Else we have
667 dnl to fall back to GNU NLS library. 731 dnl to fall back to GNU NLS library.
668 CATOBJEXT=NONE
669 732
670 dnl Add a version number to the cache macros. 733 dnl Add a version number to the cache macros.
671 define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc]) 734 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
672 define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl]) 735 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
673 736 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
674 AC_CHECK_HEADER(libintl.h, 737
675 [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, 738 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
676 [AC_TRY_LINK([#include <libintl.h> 739 [AC_TRY_LINK([#include <libintl.h>
677 extern int _nl_msg_cat_cntr;], 740 ]ifelse([$2], [need-formatstring-macros],
678 [bindtextdomain ("", ""); 741 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
679 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], 742 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
680 gt_cv_func_gnugettext_libc=yes, 743 #endif
681 gt_cv_func_gnugettext_libc=no)]) 744 changequote(,)dnl
682 745 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
683 if test "$gt_cv_func_gnugettext_libc" != "yes"; then 746 changequote([,])dnl
684 AC_CACHE_CHECK([for GNU gettext in libintl], 747 ], [])[extern int _nl_msg_cat_cntr;
685 gt_cv_func_gnugettext_libintl, 748 extern int *_nl_domain_bindings;],
686 [gt_save_LIBS="$LIBS" 749 [bindtextdomain ("", "");
687 LIBS="$LIBS -lintl $LIBICONV" 750 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
688 AC_TRY_LINK([#include <libintl.h> 751 gt_cv_func_gnugettext_libc=yes,
689 extern int _nl_msg_cat_cntr;], 752 gt_cv_func_gnugettext_libc=no)])
690 [bindtextdomain ("", ""); 753
691 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr], 754 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
692 gt_cv_func_gnugettext_libintl=yes, 755 dnl Sometimes libintl requires libiconv, so first search for libiconv.
693 gt_cv_func_gnugettext_libintl=no) 756 ifelse(gt_included_intl, yes, , [
694 LIBS="$gt_save_LIBS"]) 757 AM_ICONV_LINK
695 fi 758 ])
696 759 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
697 dnl If an already present or preinstalled GNU gettext() is found, 760 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
698 dnl use it. But if this macro is used in GNU gettext, and GNU 761 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
699 dnl gettext is already preinstalled in libintl, we update this 762 dnl even if libiconv doesn't exist.
700 dnl libintl. (Cf. the install rule in intl/Makefile.in.) 763 AC_LIB_LINKFLAGS_BODY([intl])
701 if test "$gt_cv_func_gnugettext_libc" = "yes" \ 764 AC_CACHE_CHECK([for GNU gettext in libintl],
702 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ 765 gt_cv_func_gnugettext_libintl,
703 && test "$PACKAGE" != gettext; }; then 766 [gt_save_CPPFLAGS="$CPPFLAGS"
704 AC_DEFINE(HAVE_GETTEXT, 1, 767 CPPFLAGS="$CPPFLAGS $INCINTL"
705 [Define if the GNU gettext() function is already present or preinstalled.]) 768 gt_save_LIBS="$LIBS"
706 769 LIBS="$LIBS $LIBINTL"
707 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then 770 dnl Now see whether libintl exists and does not depend on libiconv.
708 dnl If iconv() is in a separate libiconv library, then anyone 771 AC_TRY_LINK([#include <libintl.h>
709 dnl linking with libintl{.a,.so} also needs to link with 772 ]ifelse([$2], [need-formatstring-macros],
710 dnl libiconv. 773 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
711 INTLLIBS="-lintl $LIBICONV" 774 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
712 fi 775 #endif
713 776 changequote(,)dnl
714 gt_save_LIBS="$LIBS" 777 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
715 LIBS="$LIBS $INTLLIBS" 778 changequote([,])dnl
716 AC_CHECK_FUNCS(dcgettext) 779 ], [])[extern int _nl_msg_cat_cntr;
717 LIBS="$gt_save_LIBS" 780 extern
718 781 #ifdef __cplusplus
719 dnl Search for GNU msgfmt in the PATH. 782 "C"
720 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 783 #endif
721 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :) 784 const char *_nl_expand_alias ();],
722 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 785 [bindtextdomain ("", "");
723 786 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
724 dnl Search for GNU xgettext in the PATH. 787 gt_cv_func_gnugettext_libintl=yes,
725 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 788 gt_cv_func_gnugettext_libintl=no)
726 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :) 789 dnl Now see whether libintl exists and depends on libiconv.
727 790 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
728 CATOBJEXT=.gmo 791 LIBS="$LIBS $LIBICONV"
729 fi 792 AC_TRY_LINK([#include <libintl.h>
730 ]) 793 ]ifelse([$2], [need-formatstring-macros],
731 794 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
732 if test "$CATOBJEXT" = "NONE"; then 795 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
733 dnl GNU gettext is not found in the C library. 796 #endif
734 dnl Fall back on GNU gettext library. 797 changequote(,)dnl
735 nls_cv_use_gnu_gettext=yes 798 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
799 changequote([,])dnl
800 ], [])[extern int _nl_msg_cat_cntr;
801 extern
802 #ifdef __cplusplus
803 "C"
804 #endif
805 const char *_nl_expand_alias ();],
806 [bindtextdomain ("", "");
807 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
808 [LIBINTL="$LIBINTL $LIBICONV"
809 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
810 gt_cv_func_gnugettext_libintl=yes
811 ])
812 fi
813 CPPFLAGS="$gt_save_CPPFLAGS"
814 LIBS="$gt_save_LIBS"])
815 fi
816
817 dnl If an already present or preinstalled GNU gettext() is found,
818 dnl use it. But if this macro is used in GNU gettext, and GNU
819 dnl gettext is already preinstalled in libintl, we update this
820 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
821 if test "$gt_cv_func_gnugettext_libc" = "yes" \
822 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
823 && test "$PACKAGE" != gettext; }; then
824 gt_use_preinstalled_gnugettext=yes
825 else
826 dnl Reset the values set by searching for libintl.
827 LIBINTL=
828 LTLIBINTL=
829 INCINTL=
830 fi
831
832 ifelse(gt_included_intl, yes, [
833 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
834 dnl GNU gettext is not found in the C library.
835 dnl Fall back on included GNU gettext library.
836 nls_cv_use_gnu_gettext=yes
736 fi 837 fi
737 fi 838 fi
738 839
739 if test "$nls_cv_use_gnu_gettext" = "yes"; then 840 if test "$nls_cv_use_gnu_gettext" = "yes"; then
740 dnl Mark actions used to generate GNU NLS library. 841 dnl Mark actions used to generate GNU NLS library.
741 INTLOBJS="\$(GETTOBJS)" 842 INTLOBJS="\$(GETTOBJS)"
742 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, 843 BUILD_INCLUDED_LIBINTL=yes
743 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :) 844 USE_INCLUDED_LIBINTL=yes
744 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) 845 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
745 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, 846 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
746 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :) 847 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
747 AC_SUBST(MSGFMT) 848 fi
748 BUILD_INCLUDED_LIBINTL=yes 849
749 USE_INCLUDED_LIBINTL=yes 850 if test "$gt_use_preinstalled_gnugettext" = "yes" \
851 || test "$nls_cv_use_gnu_gettext" = "yes"; then
852 dnl Mark actions to use GNU gettext tools.
750 CATOBJEXT=.gmo 853 CATOBJEXT=.gmo
751 INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
752 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
753 fi 854 fi
754 855 ])
755 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 856
756 dnl Test whether we really found GNU msgfmt. 857 if test "$gt_use_preinstalled_gnugettext" = "yes" \
757 if test "$GMSGFMT" != ":"; then 858 || test "$nls_cv_use_gnu_gettext" = "yes"; then
758 dnl If it is no GNU msgfmt we define it as : so that the 859 AC_DEFINE(ENABLE_NLS, 1,
759 dnl Makefiles still can work. 860 [Define to 1 if translation of program messages to the user's native language
760 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then 861 is requested.])
761 : ; 862 else
762 else 863 USE_NLS=no
763 AC_MSG_RESULT( 864 fi
764 [found msgfmt program is not GNU msgfmt; ignore it]) 865 fi
765 GMSGFMT=":" 866
766 fi 867 if test "$USE_NLS" = "yes"; then
868
869 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
870 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
871 AC_MSG_CHECKING([how to link with libintl])
872 AC_MSG_RESULT([$LIBINTL])
873 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
767 fi 874 fi
768 875
769 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. 876 dnl For backward compatibility. Some packages may be using this.
770 dnl Test whether we really found GNU xgettext. 877 AC_DEFINE(HAVE_GETTEXT, 1,
771 if test "$XGETTEXT" != ":"; then 878 [Define if the GNU gettext() function is already present or preinstalled.])
772 dnl If it is no GNU xgettext we define it as : so that the 879 AC_DEFINE(HAVE_DCGETTEXT, 1,
773 dnl Makefiles still can work. 880 [Define if the GNU dcgettext() function is already present or preinstalled.])
774 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
775 : ;
776 else
777 AC_MSG_RESULT(
778 [found xgettext program is not GNU xgettext; ignore it])
779 XGETTEXT=":"
780 fi
781 fi
782
783 dnl We need to process the po/ directory.
784 POSUB=po
785 fi 881 fi
786 AC_OUTPUT_COMMANDS( 882
787 [for ac_file in $CONFIG_FILES; do 883 dnl We need to process the po/ directory.
788 # Support "outfile[:infile[:infile...]]" 884 POSUB=po
789 case "$ac_file" in 885 fi
790 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 886
791 esac 887 ifelse(gt_included_intl, yes, [
792 # PO directories have a Makefile.in generated from Makefile.in.in.
793 case "$ac_file" in */Makefile.in)
794 # Adjust a relative srcdir.
795 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
796 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
797 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
798 # In autoconf-2.13 it is called $ac_given_srcdir.
799 # In autoconf-2.50 it is called $srcdir.
800 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
801 case "$ac_given_srcdir" in
802 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
803 /*) top_srcdir="$ac_given_srcdir" ;;
804 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
805 esac
806 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
807 rm -f "$ac_dir/POTFILES"
808 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
809 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
810 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
811 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
812 fi
813 ;;
814 esac
815 done])
816
817
818 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL 888 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
819 dnl to 'yes' because some of the testsuite requires it. 889 dnl to 'yes' because some of the testsuite requires it.
820 if test "$PACKAGE" = gettext; then 890 if test "$PACKAGE" = gettext; then
821 BUILD_INCLUDED_LIBINTL=yes 891 BUILD_INCLUDED_LIBINTL=yes
822 fi 892 fi
823 893
824 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
825 dnl because plural.y uses bison specific features. It requires at least
826 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
827 dnl compile.
828 dnl bison is only needed for the maintainer (who touches plural.y). But in
829 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
830 dnl the rule in general Makefile. Now, some people carelessly touch the
831 dnl files or have a broken "make" program, hence the plural.c rule will
832 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
833 dnl present or too old.
834 AC_CHECK_PROGS([INTLBISON], [bison])
835 if test -z "$INTLBISON"; then
836 ac_verc_fail=yes
837 else
838 dnl Found it, now check the version.
839 AC_MSG_CHECKING([version of bison])
840 changequote(<<,>>)dnl
841 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
842 case $ac_prog_version in
843 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
844 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
845 changequote([,])dnl
846 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
847 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
848 esac
849 AC_MSG_RESULT([$ac_prog_version])
850 fi
851 if test $ac_verc_fail = yes; then
852 INTLBISON=:
853 fi
854
855 dnl These rules are solely for the distribution goal. While doing this
856 dnl we only have to keep exactly one list of the available catalogs
857 dnl in configure.in.
858 for lang in $ALL_LINGUAS; do
859 GMOFILES="$GMOFILES $lang.gmo"
860 POFILES="$POFILES $lang.po"
861 done
862
863 dnl Make all variables we use known to autoconf. 894 dnl Make all variables we use known to autoconf.
864 AC_SUBST(BUILD_INCLUDED_LIBINTL) 895 AC_SUBST(BUILD_INCLUDED_LIBINTL)
865 AC_SUBST(USE_INCLUDED_LIBINTL) 896 AC_SUBST(USE_INCLUDED_LIBINTL)
866 AC_SUBST(CATALOGS)
867 AC_SUBST(CATOBJEXT) 897 AC_SUBST(CATOBJEXT)
868 AC_SUBST(GMOFILES)
869 AC_SUBST(INTLLIBS)
870 AC_SUBST(INTLOBJS) 898 AC_SUBST(INTLOBJS)
871 AC_SUBST(POFILES)
872 AC_SUBST(POSUB)
873 899
874 dnl For backward compatibility. Some configure.ins may be using this. 900 dnl For backward compatibility. Some configure.ins may be using this.
875 nls_cv_header_intl= 901 nls_cv_header_intl=
876 nls_cv_header_libgt= 902 nls_cv_header_libgt=
877 903
884 AC_SUBST(INSTOBJEXT) 910 AC_SUBST(INSTOBJEXT)
885 911
886 dnl For backward compatibility. Some Makefiles may be using this. 912 dnl For backward compatibility. Some Makefiles may be using this.
887 GENCAT=gencat 913 GENCAT=gencat
888 AC_SUBST(GENCAT) 914 AC_SUBST(GENCAT)
915
916 dnl Enable libtool support if the surrounding package wishes it.
917 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
918 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
889 ]) 919 ])
890 920
891 dnl Usage: Just like AM_WITH_NLS, which see. 921 dnl For backward compatibility. Some Makefiles may be using this.
892 AC_DEFUN([AM_GNU_GETTEXT], 922 INTLLIBS="$LIBINTL"
893 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl 923 AC_SUBST(INTLLIBS)
894 AC_REQUIRE([AC_PROG_CC])dnl 924
895 AC_REQUIRE([AC_CANONICAL_HOST])dnl 925 dnl Make all documented variables known to autoconf.
896 AC_REQUIRE([AC_PROG_RANLIB])dnl 926 AC_SUBST(LIBINTL)
897 AC_REQUIRE([AC_ISC_POSIX])dnl 927 AC_SUBST(LTLIBINTL)
898 AC_REQUIRE([AC_HEADER_STDC])dnl 928 AC_SUBST(POSUB)
899 AC_REQUIRE([AC_C_CONST])dnl 929 ])
900 AC_REQUIRE([AC_C_INLINE])dnl 930
901 AC_REQUIRE([AC_TYPE_OFF_T])dnl 931
902 AC_REQUIRE([AC_TYPE_SIZE_T])dnl 932 dnl Checks for all prerequisites of the po subdirectory,
903 AC_REQUIRE([AC_FUNC_ALLOCA])dnl 933 dnl except for USE_NLS.
904 AC_REQUIRE([AC_FUNC_MMAP])dnl 934 AC_DEFUN([AM_PO_SUBDIRS],
905 AC_REQUIRE([jm_GLIBC21])dnl 935 [
906 936 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
907 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ 937 AC_REQUIRE([AC_PROG_INSTALL])dnl
938 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
939
940 dnl Perform the following tests also if --disable-nls has been given,
941 dnl because they are needed for "make dist" to work.
942
943 dnl Search for GNU msgfmt in the PATH.
944 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
945 dnl The second test excludes FreeBSD msgfmt.
946 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
947 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
948 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
949 :)
950 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
951
952 dnl Search for GNU xgettext 0.11 or newer in the PATH.
953 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
954 dnl The second test excludes FreeBSD xgettext.
955 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
956 [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
957 (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
958 :)
959 dnl Remove leftover from FreeBSD xgettext call.
960 rm -f messages.po
961
962 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
963 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
964 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
965
966 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
967 dnl Test whether we really found GNU msgfmt.
968 if test "$GMSGFMT" != ":"; then
969 dnl If it is no GNU msgfmt we define it as : so that the
970 dnl Makefiles still can work.
971 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
972 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
973 : ;
974 else
975 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
976 AC_MSG_RESULT(
977 [found $GMSGFMT program is not GNU msgfmt; ignore it])
978 GMSGFMT=":"
979 fi
980 fi
981
982 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
983 dnl Test whether we really found GNU xgettext.
984 if test "$XGETTEXT" != ":"; then
985 dnl If it is no GNU xgettext we define it as : so that the
986 dnl Makefiles still can work.
987 if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
988 (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
989 : ;
990 else
991 AC_MSG_RESULT(
992 [found xgettext program is not GNU xgettext; ignore it])
993 XGETTEXT=":"
994 fi
995 dnl Remove leftover from FreeBSD xgettext call.
996 rm -f messages.po
997 fi
998
999 AC_OUTPUT_COMMANDS([
1000 for ac_file in $CONFIG_FILES; do
1001 # Support "outfile[:infile[:infile...]]"
1002 case "$ac_file" in
1003 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1004 esac
1005 # PO directories have a Makefile.in generated from Makefile.in.in.
1006 case "$ac_file" in */Makefile.in)
1007 # Adjust a relative srcdir.
1008 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1009 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1010 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1011 # In autoconf-2.13 it is called $ac_given_srcdir.
1012 # In autoconf-2.50 it is called $srcdir.
1013 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1014 case "$ac_given_srcdir" in
1015 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1016 /*) top_srcdir="$ac_given_srcdir" ;;
1017 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
1018 esac
1019 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1020 rm -f "$ac_dir/POTFILES"
1021 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1022 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1023 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
1024 # on $ac_dir but don't depend on user-specified configuration
1025 # parameters.
1026 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1027 # The LINGUAS file contains the set of available languages.
1028 if test -n "$ALL_LINGUAS"; then
1029 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1030 fi
1031 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1032 # Hide the ALL_LINGUAS assigment from automake.
1033 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1034 fi
1035 case "$ac_given_srcdir" in
1036 .) srcdirpre= ;;
1037 *) srcdirpre='$(srcdir)/' ;;
1038 esac
1039 POFILES=
1040 GMOFILES=
1041 UPDATEPOFILES=
1042 DUMMYPOFILES=
1043 for lang in $ALL_LINGUAS; do
1044 POFILES="$POFILES $srcdirpre$lang.po"
1045 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1046 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1047 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1048 done
1049 # CATALOGS depends on both $ac_dir and the user's LINGUAS
1050 # environment variable.
1051 INST_LINGUAS=
1052 if test -n "$ALL_LINGUAS"; then
1053 for presentlang in $ALL_LINGUAS; do
1054 useit=no
1055 if test "%UNSET%" != "$LINGUAS"; then
1056 desiredlanguages="$LINGUAS"
1057 else
1058 desiredlanguages="$ALL_LINGUAS"
1059 fi
1060 for desiredlang in $desiredlanguages; do
1061 # Use the presentlang catalog if desiredlang is
1062 # a. equal to presentlang, or
1063 # b. a variant of presentlang (because in this case,
1064 # presentlang can be used as a fallback for messages
1065 # which are not translated in the desiredlang catalog).
1066 case "$desiredlang" in
1067 "$presentlang"*) useit=yes;;
1068 esac
1069 done
1070 if test $useit = yes; then
1071 INST_LINGUAS="$INST_LINGUAS $presentlang"
1072 fi
1073 done
1074 fi
1075 CATALOGS=
1076 if test -n "$INST_LINGUAS"; then
1077 for lang in $INST_LINGUAS; do
1078 CATALOGS="$CATALOGS $lang.gmo"
1079 done
1080 fi
1081 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1082 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1083 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1084 if test -f "$f"; then
1085 case "$f" in
1086 *.orig | *.bak | *~) ;;
1087 *) cat "$f" >> "$ac_dir/Makefile" ;;
1088 esac
1089 fi
1090 done
1091 fi
1092 ;;
1093 esac
1094 done],
1095 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1096 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
1097 # from automake.
1098 eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
1099 # Capture the value of LINGUAS because we need it to compute CATALOGS.
1100 LINGUAS="${LINGUAS-%UNSET%}"
1101 ])
1102 ])
1103
1104
1105 dnl Checks for all prerequisites of the intl subdirectory,
1106 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
1107 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
1108 AC_DEFUN([AM_INTL_SUBDIR],
1109 [
1110 AC_REQUIRE([AC_PROG_INSTALL])dnl
1111 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
1112 AC_REQUIRE([AC_PROG_CC])dnl
1113 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1114 AC_REQUIRE([AC_PROG_RANLIB])dnl
1115 AC_REQUIRE([AC_ISC_POSIX])dnl
1116 AC_REQUIRE([AC_HEADER_STDC])dnl
1117 AC_REQUIRE([AC_C_CONST])dnl
1118 AC_REQUIRE([AC_C_INLINE])dnl
1119 AC_REQUIRE([AC_TYPE_OFF_T])dnl
1120 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1121 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1122 AC_REQUIRE([AC_FUNC_MMAP])dnl
1123 AC_REQUIRE([jm_GLIBC21])dnl
1124 AC_REQUIRE([gt_INTDIV0])dnl
1125 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
1126 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
1127 AC_REQUIRE([gt_INTTYPES_PRI])dnl
1128
1129 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
908 stdlib.h string.h unistd.h sys/param.h]) 1130 stdlib.h string.h unistd.h sys/param.h])
909 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \ 1131 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
910 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \ 1132 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
911 strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) 1133 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
912 1134
913 AM_ICONV 1135 AM_ICONV
914 AM_LANGINFO_CODESET 1136 AM_LANGINFO_CODESET
915 AM_LC_MESSAGES 1137 if test $ac_cv_header_locale_h = yes; then
916 AM_WITH_NLS([$1],[$2],[$3]) 1138 AM_LC_MESSAGES
917 1139 fi
918 if test "x$CATOBJEXT" != "x"; then 1140
919 if test "x$ALL_LINGUAS" = "x"; then 1141 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
920 LINGUAS= 1142 dnl because plural.y uses bison specific features. It requires at least
921 else 1143 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
922 AC_MSG_CHECKING(for catalogs to be installed) 1144 dnl compile.
923 NEW_LINGUAS= 1145 dnl bison is only needed for the maintainer (who touches plural.y). But in
924 for presentlang in $ALL_LINGUAS; do 1146 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
925 useit=no 1147 dnl the rule in general Makefile. Now, some people carelessly touch the
926 for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do 1148 dnl files or have a broken "make" program, hence the plural.c rule will
927 # Use the presentlang catalog if desiredlang is 1149 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
928 # a. equal to presentlang, or 1150 dnl present or too old.
929 # b. a variant of presentlang (because in this case, 1151 AC_CHECK_PROGS([INTLBISON], [bison])
930 # presentlang can be used as a fallback for messages 1152 if test -z "$INTLBISON"; then
931 # which are not translated in the desiredlang catalog). 1153 ac_verc_fail=yes
932 case "$desiredlang" in 1154 else
933 "$presentlang"*) useit=yes;; 1155 dnl Found it, now check the version.
934 esac 1156 AC_MSG_CHECKING([version of bison])
935 done 1157 changequote(<<,>>)dnl
936 if test $useit = yes; then 1158 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
937 NEW_LINGUAS="$NEW_LINGUAS $presentlang" 1159 case $ac_prog_version in
938 fi 1160 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
939 done 1161 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
940 LINGUAS=$NEW_LINGUAS 1162 changequote([,])dnl
941 AC_MSG_RESULT($LINGUAS) 1163 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
942 fi 1164 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
943 1165 esac
944 dnl Construct list of names of catalog files to be constructed. 1166 AC_MSG_RESULT([$ac_prog_version])
945 if test -n "$LINGUAS"; then 1167 fi
946 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done 1168 if test $ac_verc_fail = yes; then
947 fi 1169 INTLBISON=:
948 fi 1170 fi
949 1171 ])
950 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly 1172
951 dnl find the mkinstalldirs script in another subdir but $(top_srcdir). 1173
952 dnl Try to locate is. 1174 AC_DEFUN([AM_MKINSTALLDIRS],
953 MKINSTALLDIRS= 1175 [
954 if test -n "$ac_aux_dir"; then 1176 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
955 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" 1177 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
956 fi 1178 dnl Try to locate is.
957 if test -z "$MKINSTALLDIRS"; then 1179 MKINSTALLDIRS=
958 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" 1180 if test -n "$ac_aux_dir"; then
959 fi 1181 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
960 AC_SUBST(MKINSTALLDIRS) 1182 fi
961 1183 if test -z "$MKINSTALLDIRS"; then
962 dnl Enable libtool support if the surrounding package wishes it. 1184 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
963 INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], []) 1185 fi
964 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) 1186 AC_SUBST(MKINSTALLDIRS)
1187 ])
1188
1189
1190 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
1191 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
1192
1193 # lib-link.m4 serial 3 (gettext-0.11.3)
1194 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1195 dnl This file is free software, distributed under the terms of the GNU
1196 dnl General Public License. As a special exception to the GNU General
1197 dnl Public License, this file may be distributed as part of a program
1198 dnl that contains a configuration script generated by Autoconf, under
1199 dnl the same distribution terms as the rest of that program.
1200
1201 dnl From Bruno Haible.
1202
1203 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1204 dnl the libraries corresponding to explicit and implicit dependencies.
1205 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1206 dnl augments the CPPFLAGS variable.
1207 AC_DEFUN([AC_LIB_LINKFLAGS],
1208 [
1209 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1210 AC_REQUIRE([AC_LIB_RPATH])
1211 define([Name],[translit([$1],[./-], [___])])
1212 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1213 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1214 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1215 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1216 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1217 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1218 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
965 ]) 1219 ])
1220 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1221 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1222 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1223 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1224 AC_SUBST([LIB]NAME)
1225 AC_SUBST([LTLIB]NAME)
1226 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1227 dnl results of this search when this library appears as a dependency.
1228 HAVE_LIB[]NAME=yes
1229 undefine([Name])
1230 undefine([NAME])
1231 ])
1232
1233 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1234 dnl searches for libname and the libraries corresponding to explicit and
1235 dnl implicit dependencies, together with the specified include files and
1236 dnl the ability to compile and link the specified testcode. If found, it
1237 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1238 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1239 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1240 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1241 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1242 [
1243 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1244 AC_REQUIRE([AC_LIB_RPATH])
1245 define([Name],[translit([$1],[./-], [___])])
1246 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1247 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1248
1249 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1250 dnl accordingly.
1251 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1252
1253 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1254 dnl because if the user has installed lib[]Name and not disabled its use
1255 dnl via --without-lib[]Name-prefix, he wants to use it.
1256 ac_save_CPPFLAGS="$CPPFLAGS"
1257 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1258
1259 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1260 ac_save_LIBS="$LIBS"
1261 LIBS="$LIBS $LIB[]NAME"
1262 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1263 LIBS="$ac_save_LIBS"
1264 ])
1265 if test "$ac_cv_lib[]Name" = yes; then
1266 HAVE_LIB[]NAME=yes
1267 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1268 AC_MSG_CHECKING([how to link with lib[]$1])
1269 AC_MSG_RESULT([$LIB[]NAME])
1270 else
1271 HAVE_LIB[]NAME=no
1272 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1273 dnl $INC[]NAME either.
1274 CPPFLAGS="$ac_save_CPPFLAGS"
1275 LIB[]NAME=
1276 LTLIB[]NAME=
1277 fi
1278 AC_SUBST([HAVE_LIB]NAME)
1279 AC_SUBST([LIB]NAME)
1280 AC_SUBST([LTLIB]NAME)
1281 undefine([Name])
1282 undefine([NAME])
1283 ])
1284
1285 dnl Determine the platform dependent parameters needed to use rpath:
1286 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1287 dnl hardcode_direct, hardcode_minus_L,
1288 dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
1289 AC_DEFUN([AC_LIB_RPATH],
1290 [
1291 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1292 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1293 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1294 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1295 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1296 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1297 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1298 . ./conftest.sh
1299 rm -f ./conftest.sh
1300 acl_cv_rpath=done
1301 ])
1302 wl="$acl_cv_wl"
1303 libext="$acl_cv_libext"
1304 shlibext="$acl_cv_shlibext"
1305 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1306 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1307 hardcode_direct="$acl_cv_hardcode_direct"
1308 hardcode_minus_L="$acl_cv_hardcode_minus_L"
1309 sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
1310 sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
1311 dnl Determine whether the user wants rpath handling at all.
1312 AC_ARG_ENABLE(rpath,
1313 [ --disable-rpath do not hardcode runtime library paths],
1314 :, enable_rpath=yes)
1315 ])
1316
1317 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1318 dnl the libraries corresponding to explicit and implicit dependencies.
1319 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1320 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1321 [
1322 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1323 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1324 dnl By default, look in $includedir and $libdir.
1325 use_additional=yes
1326 AC_LIB_WITH_FINAL_PREFIX([
1327 eval additional_includedir=\"$includedir\"
1328 eval additional_libdir=\"$libdir\"
1329 ])
1330 AC_ARG_WITH([lib$1-prefix],
1331 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1332 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1333 [
1334 if test "X$withval" = "Xno"; then
1335 use_additional=no
1336 else
1337 if test "X$withval" = "X"; then
1338 AC_LIB_WITH_FINAL_PREFIX([
1339 eval additional_includedir=\"$includedir\"
1340 eval additional_libdir=\"$libdir\"
1341 ])
1342 else
1343 additional_includedir="$withval/include"
1344 additional_libdir="$withval/lib"
1345 fi
1346 fi
1347 ])
1348 dnl Search the library and its dependencies in $additional_libdir and
1349 dnl $LDFLAGS. Using breadth-first-seach.
1350 LIB[]NAME=
1351 LTLIB[]NAME=
1352 INC[]NAME=
1353 rpathdirs=
1354 ltrpathdirs=
1355 names_already_handled=
1356 names_next_round='$1 $2'
1357 while test -n "$names_next_round"; do
1358 names_this_round="$names_next_round"
1359 names_next_round=
1360 for name in $names_this_round; do
1361 already_handled=
1362 for n in $names_already_handled; do
1363 if test "$n" = "$name"; then
1364 already_handled=yes
1365 break
1366 fi
1367 done
1368 if test -z "$already_handled"; then
1369 names_already_handled="$names_already_handled $name"
1370 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1371 dnl or AC_LIB_HAVE_LINKFLAGS call.
1372 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1373 eval value=\"\$HAVE_LIB$uppername\"
1374 if test -n "$value"; then
1375 if test "$value" = yes; then
1376 eval value=\"\$LIB$uppername\"
1377 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1378 eval value=\"\$LTLIB$uppername\"
1379 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1380 else
1381 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1382 dnl that this library doesn't exist. So just drop it.
1383 :
1384 fi
1385 else
1386 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1387 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1388 found_dir=
1389 found_la=
1390 found_so=
1391 found_a=
1392 if test $use_additional = yes; then
1393 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1394 found_dir="$additional_libdir"
1395 found_so="$additional_libdir/lib$name.$shlibext"
1396 if test -f "$additional_libdir/lib$name.la"; then
1397 found_la="$additional_libdir/lib$name.la"
1398 fi
1399 else
1400 if test -f "$additional_libdir/lib$name.$libext"; then
1401 found_dir="$additional_libdir"
1402 found_a="$additional_libdir/lib$name.$libext"
1403 if test -f "$additional_libdir/lib$name.la"; then
1404 found_la="$additional_libdir/lib$name.la"
1405 fi
1406 fi
1407 fi
1408 fi
1409 if test "X$found_dir" = "X"; then
1410 for x in $LDFLAGS $LTLIB[]NAME; do
1411 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1412 case "$x" in
1413 -L*)
1414 dir=`echo "X$x" | sed -e 's/^X-L//'`
1415 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1416 found_dir="$dir"
1417 found_so="$dir/lib$name.$shlibext"
1418 if test -f "$dir/lib$name.la"; then
1419 found_la="$dir/lib$name.la"
1420 fi
1421 else
1422 if test -f "$dir/lib$name.$libext"; then
1423 found_dir="$dir"
1424 found_a="$dir/lib$name.$libext"
1425 if test -f "$dir/lib$name.la"; then
1426 found_la="$dir/lib$name.la"
1427 fi
1428 fi
1429 fi
1430 ;;
1431 esac
1432 if test "X$found_dir" != "X"; then
1433 break
1434 fi
1435 done
1436 fi
1437 if test "X$found_dir" != "X"; then
1438 dnl Found the library.
1439 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1440 if test "X$found_so" != "X"; then
1441 dnl Linking with a shared library. We attempt to hardcode its
1442 dnl directory into the executable's runpath, unless it's the
1443 dnl standard /usr/lib.
1444 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1445 dnl No hardcoding is needed.
1446 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1447 else
1448 dnl Use an explicit option to hardcode DIR into the resulting
1449 dnl binary.
1450 dnl Potentially add DIR to ltrpathdirs.
1451 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1452 haveit=
1453 for x in $ltrpathdirs; do
1454 if test "X$x" = "X$found_dir"; then
1455 haveit=yes
1456 break
1457 fi
1458 done
1459 if test -z "$haveit"; then
1460 ltrpathdirs="$ltrpathdirs $found_dir"
1461 fi
1462 dnl The hardcoding into $LIBNAME is system dependent.
1463 if test "$hardcode_direct" = yes; then
1464 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1465 dnl resulting binary.
1466 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1467 else
1468 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1469 dnl Use an explicit option to hardcode DIR into the resulting
1470 dnl binary.
1471 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1472 dnl Potentially add DIR to rpathdirs.
1473 dnl The rpathdirs will be appended to $LIBNAME at the end.
1474 haveit=
1475 for x in $rpathdirs; do
1476 if test "X$x" = "X$found_dir"; then
1477 haveit=yes
1478 break
1479 fi
1480 done
1481 if test -z "$haveit"; then
1482 rpathdirs="$rpathdirs $found_dir"
1483 fi
1484 else
1485 dnl Rely on "-L$found_dir".
1486 dnl But don't add it if it's already contained in the LDFLAGS
1487 dnl or the already constructed $LIBNAME
1488 haveit=
1489 for x in $LDFLAGS $LIB[]NAME; do
1490 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1491 if test "X$x" = "X-L$found_dir"; then
1492 haveit=yes
1493 break
1494 fi
1495 done
1496 if test -z "$haveit"; then
1497 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1498 fi
1499 if test "$hardcode_minus_L" != no; then
1500 dnl FIXME: Not sure whether we should use
1501 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1502 dnl here.
1503 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1504 else
1505 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1506 dnl here, because this doesn't fit in flags passed to the
1507 dnl compiler. So give up. No hardcoding. This affects only
1508 dnl very old systems.
1509 dnl FIXME: Not sure whether we should use
1510 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1511 dnl here.
1512 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1513 fi
1514 fi
1515 fi
1516 fi
1517 else
1518 if test "X$found_a" != "X"; then
1519 dnl Linking with a static library.
1520 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1521 else
1522 dnl We shouldn't come here, but anyway it's good to have a
1523 dnl fallback.
1524 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1525 fi
1526 fi
1527 dnl Assume the include files are nearby.
1528 additional_includedir=
1529 case "$found_dir" in
1530 */lib | */lib/)
1531 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1532 additional_includedir="$basedir/include"
1533 ;;
1534 esac
1535 if test "X$additional_includedir" != "X"; then
1536 dnl Potentially add $additional_includedir to $INCNAME.
1537 dnl But don't add it
1538 dnl 1. if it's the standard /usr/include,
1539 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1540 dnl 3. if it's already present in $CPPFLAGS or the already
1541 dnl constructed $INCNAME,
1542 dnl 4. if it doesn't exist as a directory.
1543 if test "X$additional_includedir" != "X/usr/include"; then
1544 haveit=
1545 if test "X$additional_includedir" = "X/usr/local/include"; then
1546 if test -n "$GCC"; then
1547 case $host_os in
1548 linux*) haveit=yes;;
1549 esac
1550 fi
1551 fi
1552 if test -z "$haveit"; then
1553 for x in $CPPFLAGS $INC[]NAME; do
1554 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1555 if test "X$x" = "X-I$additional_includedir"; then
1556 haveit=yes
1557 break
1558 fi
1559 done
1560 if test -z "$haveit"; then
1561 if test -d "$additional_includedir"; then
1562 dnl Really add $additional_includedir to $INCNAME.
1563 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1564 fi
1565 fi
1566 fi
1567 fi
1568 fi
1569 dnl Look for dependencies.
1570 if test -n "$found_la"; then
1571 dnl Read the .la file. It defines the variables
1572 dnl dlname, library_names, old_library, dependency_libs, current,
1573 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1574 save_libdir="$libdir"
1575 case "$found_la" in
1576 */* | *\\*) . "$found_la" ;;
1577 *) . "./$found_la" ;;
1578 esac
1579 libdir="$save_libdir"
1580 dnl We use only dependency_libs.
1581 for dep in $dependency_libs; do
1582 case "$dep" in
1583 -L*)
1584 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1585 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1586 dnl But don't add it
1587 dnl 1. if it's the standard /usr/lib,
1588 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1589 dnl 3. if it's already present in $LDFLAGS or the already
1590 dnl constructed $LIBNAME,
1591 dnl 4. if it doesn't exist as a directory.
1592 if test "X$additional_libdir" != "X/usr/lib"; then
1593 haveit=
1594 if test "X$additional_libdir" = "X/usr/local/lib"; then
1595 if test -n "$GCC"; then
1596 case $host_os in
1597 linux*) haveit=yes;;
1598 esac
1599 fi
1600 fi
1601 if test -z "$haveit"; then
1602 haveit=
1603 for x in $LDFLAGS $LIB[]NAME; do
1604 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1605 if test "X$x" = "X-L$additional_libdir"; then
1606 haveit=yes
1607 break
1608 fi
1609 done
1610 if test -z "$haveit"; then
1611 if test -d "$additional_libdir"; then
1612 dnl Really add $additional_libdir to $LIBNAME.
1613 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1614 fi
1615 fi
1616 haveit=
1617 for x in $LDFLAGS $LTLIB[]NAME; do
1618 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1619 if test "X$x" = "X-L$additional_libdir"; then
1620 haveit=yes
1621 break
1622 fi
1623 done
1624 if test -z "$haveit"; then
1625 if test -d "$additional_libdir"; then
1626 dnl Really add $additional_libdir to $LTLIBNAME.
1627 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1628 fi
1629 fi
1630 fi
1631 fi
1632 ;;
1633 -R*)
1634 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1635 if test "$enable_rpath" != no; then
1636 dnl Potentially add DIR to rpathdirs.
1637 dnl The rpathdirs will be appended to $LIBNAME at the end.
1638 haveit=
1639 for x in $rpathdirs; do
1640 if test "X$x" = "X$dir"; then
1641 haveit=yes
1642 break
1643 fi
1644 done
1645 if test -z "$haveit"; then
1646 rpathdirs="$rpathdirs $dir"
1647 fi
1648 dnl Potentially add DIR to ltrpathdirs.
1649 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1650 haveit=
1651 for x in $ltrpathdirs; do
1652 if test "X$x" = "X$dir"; then
1653 haveit=yes
1654 break
1655 fi
1656 done
1657 if test -z "$haveit"; then
1658 ltrpathdirs="$ltrpathdirs $dir"
1659 fi
1660 fi
1661 ;;
1662 -l*)
1663 dnl Handle this in the next round.
1664 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1665 ;;
1666 *.la)
1667 dnl Handle this in the next round. Throw away the .la's
1668 dnl directory; it is already contained in a preceding -L
1669 dnl option.
1670 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1671 ;;
1672 *)
1673 dnl Most likely an immediate library name.
1674 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1675 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1676 ;;
1677 esac
1678 done
1679 fi
1680 else
1681 dnl Didn't find the library; assume it is in the system directories
1682 dnl known to the linker and runtime loader. (All the system
1683 dnl directories known to the linker should also be known to the
1684 dnl runtime loader, otherwise the system is severely misconfigured.)
1685 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1686 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1687 fi
1688 fi
1689 fi
1690 done
1691 done
1692 if test "X$rpathdirs" != "X"; then
1693 if test -n "$hardcode_libdir_separator"; then
1694 dnl Weird platform: only the last -rpath option counts, the user must
1695 dnl pass all path elements in one option. We can arrange that for a
1696 dnl single library, but not when more than one $LIBNAMEs are used.
1697 alldirs=
1698 for found_dir in $rpathdirs; do
1699 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1700 done
1701 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1702 acl_save_libdir="$libdir"
1703 libdir="$alldirs"
1704 eval flag=\"$hardcode_libdir_flag_spec\"
1705 libdir="$acl_save_libdir"
1706 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1707 else
1708 dnl The -rpath options are cumulative.
1709 for found_dir in $rpathdirs; do
1710 acl_save_libdir="$libdir"
1711 libdir="$found_dir"
1712 eval flag=\"$hardcode_libdir_flag_spec\"
1713 libdir="$acl_save_libdir"
1714 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1715 done
1716 fi
1717 fi
1718 if test "X$ltrpathdirs" != "X"; then
1719 dnl When using libtool, the option that works for both libraries and
1720 dnl executables is -R. The -R options are cumulative.
1721 for found_dir in $ltrpathdirs; do
1722 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1723 done
1724 fi
1725 ])
1726
1727 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1728 dnl unless already present in VAR.
1729 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1730 dnl contains two or three consecutive elements that belong together.
1731 AC_DEFUN([AC_LIB_APPENDTOVAR],
1732 [
1733 for element in [$2]; do
1734 haveit=
1735 for x in $[$1]; do
1736 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1737 if test "X$x" = "X$element"; then
1738 haveit=yes
1739 break
1740 fi
1741 done
1742 if test -z "$haveit"; then
1743 [$1]="${[$1]}${[$1]:+ }$element"
1744 fi
1745 done
1746 ])
1747
1748 # lib-prefix.m4 serial 1 (gettext-0.11)
1749 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
1750 dnl This file is free software, distributed under the terms of the GNU
1751 dnl General Public License. As a special exception to the GNU General
1752 dnl Public License, this file may be distributed as part of a program
1753 dnl that contains a configuration script generated by Autoconf, under
1754 dnl the same distribution terms as the rest of that program.
1755
1756 dnl From Bruno Haible.
1757
1758 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1759 dnl to access previously installed libraries. The basic assumption is that
1760 dnl a user will want packages to use other packages he previously installed
1761 dnl with the same --prefix option.
1762 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1763 dnl libraries, but is otherwise very convenient.
1764 AC_DEFUN([AC_LIB_PREFIX],
1765 [
1766 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1767 AC_REQUIRE([AC_PROG_CC])
1768 AC_REQUIRE([AC_CANONICAL_HOST])
1769 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1770 dnl By default, look in $includedir and $libdir.
1771 use_additional=yes
1772 AC_LIB_WITH_FINAL_PREFIX([
1773 eval additional_includedir=\"$includedir\"
1774 eval additional_libdir=\"$libdir\"
1775 ])
1776 AC_ARG_WITH([lib-prefix],
1777 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1778 --without-lib-prefix don't search for libraries in includedir and libdir],
1779 [
1780 if test "X$withval" = "Xno"; then
1781 use_additional=no
1782 else
1783 if test "X$withval" = "X"; then
1784 AC_LIB_WITH_FINAL_PREFIX([
1785 eval additional_includedir=\"$includedir\"
1786 eval additional_libdir=\"$libdir\"
1787 ])
1788 else
1789 additional_includedir="$withval/include"
1790 additional_libdir="$withval/lib"
1791 fi
1792 fi
1793 ])
1794 if test $use_additional = yes; then
1795 dnl Potentially add $additional_includedir to $CPPFLAGS.
1796 dnl But don't add it
1797 dnl 1. if it's the standard /usr/include,
1798 dnl 2. if it's already present in $CPPFLAGS,
1799 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1800 dnl 4. if it doesn't exist as a directory.
1801 if test "X$additional_includedir" != "X/usr/include"; then
1802 haveit=
1803 for x in $CPPFLAGS; do
1804 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1805 if test "X$x" = "X-I$additional_includedir"; then
1806 haveit=yes
1807 break
1808 fi
1809 done
1810 if test -z "$haveit"; then
1811 if test "X$additional_includedir" = "X/usr/local/include"; then
1812 if test -n "$GCC"; then
1813 case $host_os in
1814 linux*) haveit=yes;;
1815 esac
1816 fi
1817 fi
1818 if test -z "$haveit"; then
1819 if test -d "$additional_includedir"; then
1820 dnl Really add $additional_includedir to $CPPFLAGS.
1821 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1822 fi
1823 fi
1824 fi
1825 fi
1826 dnl Potentially add $additional_libdir to $LDFLAGS.
1827 dnl But don't add it
1828 dnl 1. if it's the standard /usr/lib,
1829 dnl 2. if it's already present in $LDFLAGS,
1830 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1831 dnl 4. if it doesn't exist as a directory.
1832 if test "X$additional_libdir" != "X/usr/lib"; then
1833 haveit=
1834 for x in $LDFLAGS; do
1835 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1836 if test "X$x" = "X-L$additional_libdir"; then
1837 haveit=yes
1838 break
1839 fi
1840 done
1841 if test -z "$haveit"; then
1842 if test "X$additional_libdir" = "X/usr/local/lib"; then
1843 if test -n "$GCC"; then
1844 case $host_os in
1845 linux*) haveit=yes;;
1846 esac
1847 fi
1848 fi
1849 if test -z "$haveit"; then
1850 if test -d "$additional_libdir"; then
1851 dnl Really add $additional_libdir to $LDFLAGS.
1852 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1853 fi
1854 fi
1855 fi
1856 fi
1857 fi
1858 ])
1859
1860 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1861 dnl acl_final_exec_prefix, containing the values to which $prefix and
1862 dnl $exec_prefix will expand at the end of the configure script.
1863 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1864 [
1865 dnl Unfortunately, prefix and exec_prefix get only finally determined
1866 dnl at the end of configure.
1867 if test "X$prefix" = "XNONE"; then
1868 acl_final_prefix="$ac_default_prefix"
1869 else
1870 acl_final_prefix="$prefix"
1871 fi
1872 if test "X$exec_prefix" = "XNONE"; then
1873 acl_final_exec_prefix='${prefix}'
1874 else
1875 acl_final_exec_prefix="$exec_prefix"
1876 fi
1877 acl_save_prefix="$prefix"
1878 prefix="$acl_final_prefix"
1879 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1880 prefix="$acl_save_prefix"
1881 ])
1882
1883 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1884 dnl variables prefix and exec_prefix bound to the values they will have
1885 dnl at the end of the configure script.
1886 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1887 [
1888 acl_save_prefix="$prefix"
1889 prefix="$acl_final_prefix"
1890 acl_save_exec_prefix="$exec_prefix"
1891 exec_prefix="$acl_final_exec_prefix"
1892 $1
1893 exec_prefix="$acl_save_exec_prefix"
1894 prefix="$acl_save_prefix"
1895 ])
1896
1897 # lib-ld.m4 serial 1 (gettext-0.11)
1898 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
1899 dnl This file is free software, distributed under the terms of the GNU
1900 dnl General Public License. As a special exception to the GNU General
1901 dnl Public License, this file may be distributed as part of a program
1902 dnl that contains a configuration script generated by Autoconf, under
1903 dnl the same distribution terms as the rest of that program.
1904
1905 dnl Subroutines of libtool.m4,
1906 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
1907 dnl with libtool.m4.
1908
1909 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
1910 AC_DEFUN([AC_LIB_PROG_LD_GNU],
1911 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
1912 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
1913 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1914 acl_cv_prog_gnu_ld=yes
1915 else
1916 acl_cv_prog_gnu_ld=no
1917 fi])
1918 with_gnu_ld=$acl_cv_prog_gnu_ld
1919 ])
1920
1921 dnl From libtool-1.4. Sets the variable LD.
1922 AC_DEFUN([AC_LIB_PROG_LD],
1923 [AC_ARG_WITH(gnu-ld,
1924 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
1925 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
1926 AC_REQUIRE([AC_PROG_CC])dnl
1927 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1928 ac_prog=ld
1929 if test "$GCC" = yes; then
1930 # Check if gcc -print-prog-name=ld gives a path.
1931 AC_MSG_CHECKING([for ld used by GCC])
1932 case $host in
1933 *-*-mingw*)
1934 # gcc leaves a trailing carriage return which upsets mingw
1935 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1936 *)
1937 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1938 esac
1939 case $ac_prog in
1940 # Accept absolute paths.
1941 [[\\/]* | [A-Za-z]:[\\/]*)]
1942 [re_direlt='/[^/][^/]*/\.\./']
1943 # Canonicalize the path of ld
1944 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1945 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1946 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1947 done
1948 test -z "$LD" && LD="$ac_prog"
1949 ;;
1950 "")
1951 # If it fails, then pretend we aren't using GCC.
1952 ac_prog=ld
1953 ;;
1954 *)
1955 # If it is relative, then search for the first ld in PATH.
1956 with_gnu_ld=unknown
1957 ;;
1958 esac
1959 elif test "$with_gnu_ld" = yes; then
1960 AC_MSG_CHECKING([for GNU ld])
1961 else
1962 AC_MSG_CHECKING([for non-GNU ld])
1963 fi
1964 AC_CACHE_VAL(acl_cv_path_LD,
1965 [if test -z "$LD"; then
1966 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1967 for ac_dir in $PATH; do
1968 test -z "$ac_dir" && ac_dir=.
1969 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1970 acl_cv_path_LD="$ac_dir/$ac_prog"
1971 # Check to see if the program is GNU ld. I'd rather use --version,
1972 # but apparently some GNU ld's only accept -v.
1973 # Break only if it was the GNU/non-GNU ld that we prefer.
1974 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1975 test "$with_gnu_ld" != no && break
1976 else
1977 test "$with_gnu_ld" != yes && break
1978 fi
1979 fi
1980 done
1981 IFS="$ac_save_ifs"
1982 else
1983 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1984 fi])
1985 LD="$acl_cv_path_LD"
1986 if test -n "$LD"; then
1987 AC_MSG_RESULT($LD)
1988 else
1989 AC_MSG_RESULT(no)
1990 fi
1991 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1992 AC_LIB_PROG_LD_GNU
1993 ])
1994
1995 # iconv.m4 serial AM4 (gettext-0.11.3)
1996 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
1997 dnl This file is free software, distributed under the terms of the GNU
1998 dnl General Public License. As a special exception to the GNU General
1999 dnl Public License, this file may be distributed as part of a program
2000 dnl that contains a configuration script generated by Autoconf, under
2001 dnl the same distribution terms as the rest of that program.
2002
2003 dnl From Bruno Haible.
2004
2005 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
2006 [
2007 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
2008 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
2009 AC_REQUIRE([AC_LIB_RPATH])
2010
2011 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2012 dnl accordingly.
2013 AC_LIB_LINKFLAGS_BODY([iconv])
2014 ])
2015
2016 AC_DEFUN([AM_ICONV_LINK],
2017 [
2018 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2019 dnl those with the standalone portable GNU libiconv installed).
2020
2021 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
2022 dnl accordingly.
2023 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
2024
2025 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
2026 dnl because if the user has installed libiconv and not disabled its use
2027 dnl via --without-libiconv-prefix, he wants to use it. The first
2028 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
2029 am_save_CPPFLAGS="$CPPFLAGS"
2030 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
2031
2032 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2033 am_cv_func_iconv="no, consider installing GNU libiconv"
2034 am_cv_lib_iconv=no
2035 AC_TRY_LINK([#include <stdlib.h>
2036 #include <iconv.h>],
2037 [iconv_t cd = iconv_open("","");
2038 iconv(cd,NULL,NULL,NULL,NULL);
2039 iconv_close(cd);],
2040 am_cv_func_iconv=yes)
2041 if test "$am_cv_func_iconv" != yes; then
2042 am_save_LIBS="$LIBS"
2043 LIBS="$LIBS $LIBICONV"
2044 AC_TRY_LINK([#include <stdlib.h>
2045 #include <iconv.h>],
2046 [iconv_t cd = iconv_open("","");
2047 iconv(cd,NULL,NULL,NULL,NULL);
2048 iconv_close(cd);],
2049 am_cv_lib_iconv=yes
2050 am_cv_func_iconv=yes)
2051 LIBS="$am_save_LIBS"
2052 fi
2053 ])
2054 if test "$am_cv_func_iconv" = yes; then
2055 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2056 fi
2057 if test "$am_cv_lib_iconv" = yes; then
2058 AC_MSG_CHECKING([how to link with libiconv])
2059 AC_MSG_RESULT([$LIBICONV])
2060 else
2061 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
2062 dnl either.
2063 CPPFLAGS="$am_save_CPPFLAGS"
2064 LIBICONV=
2065 LTLIBICONV=
2066 fi
2067 AC_SUBST(LIBICONV)
2068 AC_SUBST(LTLIBICONV)
2069 ])
2070
2071 AC_DEFUN([AM_ICONV],
2072 [
2073 AM_ICONV_LINK
2074 if test "$am_cv_func_iconv" = yes; then
2075 AC_MSG_CHECKING([for iconv declaration])
2076 AC_CACHE_VAL(am_cv_proto_iconv, [
2077 AC_TRY_COMPILE([
2078 #include <stdlib.h>
2079 #include <iconv.h>
2080 extern
2081 #ifdef __cplusplus
2082 "C"
2083 #endif
2084 #if defined(__STDC__) || defined(__cplusplus)
2085 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2086 #else
2087 size_t iconv();
2088 #endif
2089 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2090 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
2091 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2092 AC_MSG_RESULT([$]{ac_t:-
2093 }[$]am_cv_proto_iconv)
2094 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2095 [Define as const if the declaration of iconv() needs const.])
2096 fi
2097 ])
2098
2099 # progtest.m4 serial 2 (gettext-0.10.40)
2100 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
2101 dnl This file is free software, distributed under the terms of the GNU
2102 dnl General Public License. As a special exception to the GNU General
2103 dnl Public License, this file may be distributed as part of a program
2104 dnl that contains a configuration script generated by Autoconf, under
2105 dnl the same distribution terms as the rest of that program.
2106 dnl
2107 dnl This file can can be used in projects which are not available under
2108 dnl the GNU General Public License or the GNU Library General Public
2109 dnl License but which still want to provide support for the GNU gettext
2110 dnl functionality.
2111 dnl Please note that the actual code of the GNU gettext library is covered
2112 dnl by the GNU Library General Public License, and the rest of the GNU
2113 dnl gettext package package is covered by the GNU General Public License.
2114 dnl They are *not* in the public domain.
2115
2116 dnl Authors:
2117 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
966 2118
967 # Search path for a program which passes the given test. 2119 # Search path for a program which passes the given test.
968 # Ulrich Drepper <drepper@cygnus.com>, 1996.
969 #
970 # This file can be copied and used freely without restrictions. It can
971 # be used in projects which are not available under the GNU General Public
972 # License or the GNU Library General Public License but which still want
973 # to provide support for the GNU gettext functionality.
974 # Please note that the actual code of the GNU gettext library is covered
975 # by the GNU Library General Public License, and the rest of the GNU
976 # gettext package package is covered by the GNU General Public License.
977 # They are *not* in the public domain.
978
979 # serial 2
980 2120
981 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 2121 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
982 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 2122 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
983 AC_DEFUN([AM_PATH_PROG_WITH_TEST], 2123 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
984 [# Extract the first word of "$2", so it can be a program name with args. 2124 [# Extract the first word of "$2", so it can be a program name with args.
1014 AC_MSG_RESULT(no) 2154 AC_MSG_RESULT(no)
1015 fi 2155 fi
1016 AC_SUBST($1)dnl 2156 AC_SUBST($1)dnl
1017 ]) 2157 ])
1018 2158
1019 #serial 2 2159 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
2160 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2161 dnl This file is free software, distributed under the terms of the GNU
2162 dnl General Public License. As a special exception to the GNU General
2163 dnl Public License, this file may be distributed as part of a program
2164 dnl that contains a configuration script generated by Autoconf, under
2165 dnl the same distribution terms as the rest of that program.
1020 2166
1021 # Test for the GNU C Library, version 2.1 or newer. 2167 # Test for the GNU C Library, version 2.1 or newer.
1022 # From Bruno Haible. 2168 # From Bruno Haible.
1023 2169
1024 AC_DEFUN([jm_GLIBC21], 2170 AC_DEFUN([jm_GLIBC21],
1041 AC_SUBST(GLIBC21) 2187 AC_SUBST(GLIBC21)
1042 GLIBC21="$ac_cv_gnu_library_2_1" 2188 GLIBC21="$ac_cv_gnu_library_2_1"
1043 ] 2189 ]
1044 ) 2190 )
1045 2191
1046 #serial AM2 2192 # intdiv0.m4 serial 1 (gettext-0.11.3)
2193 dnl Copyright (C) 2002 Free Software Foundation, Inc.
2194 dnl This file is free software, distributed under the terms of the GNU
2195 dnl General Public License. As a special exception to the GNU General
2196 dnl Public License, this file may be distributed as part of a program
2197 dnl that contains a configuration script generated by Autoconf, under
2198 dnl the same distribution terms as the rest of that program.
1047 2199
1048 dnl From Bruno Haible. 2200 dnl From Bruno Haible.
1049 2201
1050 AC_DEFUN([AM_ICONV], 2202 AC_DEFUN([gt_INTDIV0],
1051 [ 2203 [
1052 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 2204 AC_REQUIRE([AC_PROG_CC])dnl
1053 dnl those with the standalone portable GNU libiconv installed). 2205 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1054 2206
1055 AC_ARG_WITH([libiconv-prefix], 2207 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
1056 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ 2208 gt_cv_int_divbyzero_sigfpe,
1057 for dir in `echo "$withval" | tr : ' '`; do 2209 [
1058 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi 2210 AC_TRY_RUN([
1059 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi 2211 #include <stdlib.h>
1060 done 2212 #include <signal.h>
1061 ]) 2213
1062 2214 static void
1063 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 2215 #ifdef __cplusplus
1064 am_cv_func_iconv="no, consider installing GNU libiconv" 2216 sigfpe_handler (int sig)
1065 am_cv_lib_iconv=no 2217 #else
1066 AC_TRY_LINK([#include <stdlib.h> 2218 sigfpe_handler (sig) int sig;
1067 #include <iconv.h>], 2219 #endif
1068 [iconv_t cd = iconv_open("",""); 2220 {
1069 iconv(cd,NULL,NULL,NULL,NULL); 2221 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
1070 iconv_close(cd);], 2222 exit (sig != SIGFPE);
1071 am_cv_func_iconv=yes) 2223 }
1072 if test "$am_cv_func_iconv" != yes; then 2224
1073 am_save_LIBS="$LIBS" 2225 int x = 1;
1074 LIBS="$LIBS -liconv" 2226 int y = 0;
1075 AC_TRY_LINK([#include <stdlib.h> 2227 int z;
1076 #include <iconv.h>], 2228 int nan;
1077 [iconv_t cd = iconv_open("",""); 2229
1078 iconv(cd,NULL,NULL,NULL,NULL); 2230 int main ()
1079 iconv_close(cd);], 2231 {
1080 am_cv_lib_iconv=yes 2232 signal (SIGFPE, sigfpe_handler);
1081 am_cv_func_iconv=yes) 2233 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
1082 LIBS="$am_save_LIBS" 2234 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
1083 fi 2235 signal (SIGTRAP, sigfpe_handler);
2236 #endif
2237 /* Linux/SPARC yields signal SIGILL. */
2238 #if defined (__sparc__) && defined (__linux__)
2239 signal (SIGILL, sigfpe_handler);
2240 #endif
2241
2242 z = x / y;
2243 nan = y / y;
2244 exit (1);
2245 }
2246 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
2247 [
2248 # Guess based on the CPU.
2249 case "$host_cpu" in
2250 alpha* | i[34567]86 | m68k | s390*)
2251 gt_cv_int_divbyzero_sigfpe="guessing yes";;
2252 *)
2253 gt_cv_int_divbyzero_sigfpe="guessing no";;
2254 esac
2255 ])
2256 ])
2257 case "$gt_cv_int_divbyzero_sigfpe" in
2258 *yes) value=1;;
2259 *) value=0;;
2260 esac
2261 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
2262 [Define if integer division by zero raises signal SIGFPE.])
2263 ])
2264
2265 # uintmax_t.m4 serial 6 (gettext-0.11)
2266 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2267 dnl This file is free software, distributed under the terms of the GNU
2268 dnl General Public License. As a special exception to the GNU General
2269 dnl Public License, this file may be distributed as part of a program
2270 dnl that contains a configuration script generated by Autoconf, under
2271 dnl the same distribution terms as the rest of that program.
2272
2273 dnl From Paul Eggert.
2274
2275 AC_PREREQ(2.13)
2276
2277 # Define uintmax_t to `unsigned long' or `unsigned long long'
2278 # if <inttypes.h> does not exist.
2279
2280 AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
2281 [
2282 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
2283 AC_REQUIRE([jm_AC_HEADER_STDINT_H])
2284 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
2285 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
2286 test $ac_cv_type_unsigned_long_long = yes \
2287 && ac_type='unsigned long long' \
2288 || ac_type='unsigned long'
2289 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
2290 [Define to unsigned long or unsigned long long
2291 if <inttypes.h> and <stdint.h> don't define.])
2292 fi
2293 ])
2294
2295 # inttypes_h.m4 serial 4 (gettext-0.11.4)
2296 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2297 dnl This file is free software, distributed under the terms of the GNU
2298 dnl General Public License. As a special exception to the GNU General
2299 dnl Public License, this file may be distributed as part of a program
2300 dnl that contains a configuration script generated by Autoconf, under
2301 dnl the same distribution terms as the rest of that program.
2302
2303 dnl From Paul Eggert.
2304
2305 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
2306 # doesn't clash with <sys/types.h>, and declares uintmax_t.
2307
2308 AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
2309 [
2310 AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
2311 [AC_TRY_COMPILE(
2312 [#include <sys/types.h>
2313 #include <inttypes.h>],
2314 [uintmax_t i = (uintmax_t) -1;],
2315 jm_ac_cv_header_inttypes_h=yes,
2316 jm_ac_cv_header_inttypes_h=no)])
2317 if test $jm_ac_cv_header_inttypes_h = yes; then
2318 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
2319 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
2320 and declares uintmax_t. ])
2321 fi
2322 ])
2323
2324 # stdint_h.m4 serial 2 (gettext-0.11.4)
2325 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2326 dnl This file is free software, distributed under the terms of the GNU
2327 dnl General Public License. As a special exception to the GNU General
2328 dnl Public License, this file may be distributed as part of a program
2329 dnl that contains a configuration script generated by Autoconf, under
2330 dnl the same distribution terms as the rest of that program.
2331
2332 dnl From Paul Eggert.
2333
2334 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
2335 # doesn't clash with <sys/types.h>, and declares uintmax_t.
2336
2337 AC_DEFUN([jm_AC_HEADER_STDINT_H],
2338 [
2339 AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
2340 [AC_TRY_COMPILE(
2341 [#include <sys/types.h>
2342 #include <stdint.h>],
2343 [uintmax_t i = (uintmax_t) -1;],
2344 jm_ac_cv_header_stdint_h=yes,
2345 jm_ac_cv_header_stdint_h=no)])
2346 if test $jm_ac_cv_header_stdint_h = yes; then
2347 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
2348 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
2349 and declares uintmax_t. ])
2350 fi
2351 ])
2352
2353 # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
2354 dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
2355 dnl This file is free software, distributed under the terms of the GNU
2356 dnl General Public License. As a special exception to the GNU General
2357 dnl Public License, this file may be distributed as part of a program
2358 dnl that contains a configuration script generated by Autoconf, under
2359 dnl the same distribution terms as the rest of that program.
2360
2361 dnl From Paul Eggert.
2362
2363 AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
2364 [
2365 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
2366 [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
2367 [unsigned long long ullmax = (unsigned long long) -1;
2368 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
2369 ac_cv_type_unsigned_long_long=yes,
2370 ac_cv_type_unsigned_long_long=no)])
2371 if test $ac_cv_type_unsigned_long_long = yes; then
2372 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
2373 [Define if you have the unsigned long long type.])
2374 fi
2375 ])
2376
2377 # inttypes.m4 serial 1 (gettext-0.11.4)
2378 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2379 dnl This file is free software, distributed under the terms of the GNU
2380 dnl General Public License. As a special exception to the GNU General
2381 dnl Public License, this file may be distributed as part of a program
2382 dnl that contains a configuration script generated by Autoconf, under
2383 dnl the same distribution terms as the rest of that program.
2384
2385 dnl From Paul Eggert.
2386
2387 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
2388 # <sys/types.h>.
2389
2390 AC_DEFUN([gt_HEADER_INTTYPES_H],
2391 [
2392 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
2393 [
2394 AC_TRY_COMPILE(
2395 [#include <sys/types.h>
2396 #include <inttypes.h>],
2397 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
1084 ]) 2398 ])
1085 if test "$am_cv_func_iconv" = yes; then 2399 if test $gt_cv_header_inttypes_h = yes; then
1086 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 2400 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
1087 AC_MSG_CHECKING([for iconv declaration]) 2401 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
1088 AC_CACHE_VAL(am_cv_proto_iconv, [ 2402 fi
1089 AC_TRY_COMPILE([ 2403 ])
1090 #include <stdlib.h> 2404
1091 #include <iconv.h> 2405 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
1092 extern 2406 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
1093 #ifdef __cplusplus 2407 dnl This file is free software, distributed under the terms of the GNU
1094 "C" 2408 dnl General Public License. As a special exception to the GNU General
2409 dnl Public License, this file may be distributed as part of a program
2410 dnl that contains a configuration script generated by Autoconf, under
2411 dnl the same distribution terms as the rest of that program.
2412
2413 dnl From Bruno Haible.
2414
2415 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
2416 # macros to non-string values. This is the case on AIX 4.3.3.
2417
2418 AC_DEFUN([gt_INTTYPES_PRI],
2419 [
2420 AC_REQUIRE([gt_HEADER_INTTYPES_H])
2421 if test $gt_cv_header_inttypes_h = yes; then
2422 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
2423 gt_cv_inttypes_pri_broken,
2424 [
2425 AC_TRY_COMPILE([#include <inttypes.h>
2426 #ifdef PRId32
2427 char *p = PRId32;
1095 #endif 2428 #endif
1096 #if defined(__STDC__) || defined(__cplusplus) 2429 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
1097 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 2430 ])
1098 #else 2431 fi
1099 size_t iconv(); 2432 if test "$gt_cv_inttypes_pri_broken" = yes; then
1100 #endif 2433 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
1101 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 2434 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
1102 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 2435 fi
1103 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 2436 ])
1104 AC_MSG_RESULT([$]{ac_t:- 2437
1105 }[$]am_cv_proto_iconv) 2438 # codeset.m4 serial AM1 (gettext-0.10.40)
1106 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 2439 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
1107 [Define as const if the declaration of iconv() needs const.]) 2440 dnl This file is free software, distributed under the terms of the GNU
1108 fi 2441 dnl General Public License. As a special exception to the GNU General
1109 LIBICONV= 2442 dnl Public License, this file may be distributed as part of a program
1110 if test "$am_cv_lib_iconv" = yes; then 2443 dnl that contains a configuration script generated by Autoconf, under
1111 LIBICONV="-liconv" 2444 dnl the same distribution terms as the rest of that program.
1112 fi
1113 AC_SUBST(LIBICONV)
1114 ])
1115
1116 #serial AM1
1117 2445
1118 dnl From Bruno Haible. 2446 dnl From Bruno Haible.
1119 2447
1120 AC_DEFUN([AM_LANGINFO_CODESET], 2448 AC_DEFUN([AM_LANGINFO_CODESET],
1121 [ 2449 [
1129 AC_DEFINE(HAVE_LANGINFO_CODESET, 1, 2457 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
1130 [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) 2458 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
1131 fi 2459 fi
1132 ]) 2460 ])
1133 2461
2462 # lcmessage.m4 serial 3 (gettext-0.11.3)
2463 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2464 dnl This file is free software, distributed under the terms of the GNU
2465 dnl General Public License. As a special exception to the GNU General
2466 dnl Public License, this file may be distributed as part of a program
2467 dnl that contains a configuration script generated by Autoconf, under
2468 dnl the same distribution terms as the rest of that program.
2469 dnl
2470 dnl This file can can be used in projects which are not available under
2471 dnl the GNU General Public License or the GNU Library General Public
2472 dnl License but which still want to provide support for the GNU gettext
2473 dnl functionality.
2474 dnl Please note that the actual code of the GNU gettext library is covered
2475 dnl by the GNU Library General Public License, and the rest of the GNU
2476 dnl gettext package package is covered by the GNU General Public License.
2477 dnl They are *not* in the public domain.
2478
2479 dnl Authors:
2480 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
2481
1134 # Check whether LC_MESSAGES is available in <locale.h>. 2482 # Check whether LC_MESSAGES is available in <locale.h>.
1135 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1136 #
1137 # This file can be copied and used freely without restrictions. It can
1138 # be used in projects which are not available under the GNU General Public
1139 # License or the GNU Library General Public License but which still want
1140 # to provide support for the GNU gettext functionality.
1141 # Please note that the actual code of the GNU gettext library is covered
1142 # by the GNU Library General Public License, and the rest of the GNU
1143 # gettext package package is covered by the GNU General Public License.
1144 # They are *not* in the public domain.
1145
1146 # serial 2
1147 2483
1148 AC_DEFUN([AM_LC_MESSAGES], 2484 AC_DEFUN([AM_LC_MESSAGES],
1149 [if test $ac_cv_header_locale_h = yes; then 2485 [
1150 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, 2486 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1151 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], 2487 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1152 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 2488 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1153 if test $am_cv_val_LC_MESSAGES = yes; then 2489 if test $am_cv_val_LC_MESSAGES = yes; then
1154 AC_DEFINE(HAVE_LC_MESSAGES, 1, 2490 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1155 [Define if your <locale.h> file defines LC_MESSAGES.]) 2491 [Define if your <locale.h> file defines LC_MESSAGES.])
1156 fi 2492 fi
1157 fi]) 2493 ])
1158 2494