# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
-# serial 5
+# serial 109
+
+AC_PREREQ(2.13) dnl Minimum Autoconf version required.
AC_DEFUN(AM_WITH_NLS,
[AC_MSG_CHECKING([whether NLS is requested])
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
- AC_DEFINE(ENABLE_NLS)
+ AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested.])
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
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
- AC_DEFINE(HAVE_GETTEXT)
+ || 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,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
dnl No gettext in C library. Try catgets next.
AC_CHECK_LIB(i, main)
AC_CHECK_FUNC(catgets,
- [AC_DEFINE(HAVE_CATGETS)
+ [AC_DEFINE(HAVE_CATGETS, 1,
+ [Define as 1 if you have catgets and don't want to use GNU gettext.])
INTLOBJS="\$(CATOBJS)"
AC_PATH_PROG(GENCAT, gencat, no)dnl
if test "$GENCAT" != "no"; then
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
AC_CHECK_FUNCS(stpcpy)
fi
if test "${ac_cv_func_stpcpy}" = "yes"; then
- AC_DEFINE(HAVE_STPCPY)
+ AC_DEFINE(HAVE_STPCPY, 1, [Define to 1 if you have the stpcpy function.])
fi
AM_LC_MESSAGES
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"
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 '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