X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgettext.m4;h=3c68b52b5d522e233523c0d968cd5c62deb82809;hb=c0a697412199aa57fe24b7d2a11b58d78c410c2f;hp=a12bdbf08debd239c497529f0eb613aee3ca618d;hpb=7defc1e9104ebecae380e0567d7f31f84c2f73de;p=gnulib.git diff --git a/m4/gettext.m4 b/m4/gettext.m4 index a12bdbf08..3c68b52b5 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -6,7 +6,7 @@ # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. -# serial 106 +# serial 109 AC_PREREQ(2.13) dnl Minimum Autoconf version required. @@ -48,21 +48,11 @@ AC_DEFUN(AM_WITH_NLS, if test "$gt_cv_func_gettext_libc" != "yes"; then AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_CHECK_LIB(intl, gettext, - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)], - gt_cv_func_gettext_libintl=no)]) - - if test "$gt_cv_func_gettext_libintl" = yes; then - LIBS="$LIBS -lintl" - fi - + [AC_CHECK_LIB(intl, gettext)]) fi if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then + || test "$ac_cv_lib_intl_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT, 1, [Define to 1 if you have gettext and don't want to use GNU gettext.]) AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, @@ -166,11 +156,11 @@ AC_DEFUN(AM_WITH_NLS, nls_cv_header_intl=intl/libintl.h nls_cv_header_libgt=intl/libgettext.h fi - if test -z "$nsl_cv_header_intl"; then + if test -z "$nls_cv_header_intl"; then # Clean out junk possibly left behind by a previous configuration. rm -f intl/libintl.h fi - AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) + AC_CONFIG_LINKS($nls_cv_header_intl:$nls_cv_header_libgt) AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile @@ -296,7 +286,7 @@ strdup __argz_count __argz_stringify __argz_next]) dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). - dnl Try to locate is. + dnl Try to locate it. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" @@ -313,15 +303,14 @@ strdup __argz_count __argz_stringify __argz_next]) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed -e 's@^[A-z]:@@' -e 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi + case "$srcdir" in + .) + posrcprefix="../" ;; + /* | [[A-Za-z]]:*) + posrcprefix="$srcdir/" ;; + *) + posrcprefix="../$srcdir/" ;; + esac rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES