1 diff -Nru lftp-2.3.9/Makefile.am lftp-2.3.9.new/Makefile.am
2 --- lftp-2.3.9/Makefile.am Thu Mar 22 13:56:34 2001
3 +++ lftp-2.3.9.new/Makefile.am Fri Apr 13 01:36:18 2001
5 AUTOMAKE_OPTIONS = foreign
7 ACLOCAL_AMFLAGS = -I $(M4DIR)
8 -ACINCLUDE_INPUTS = $(M4DIR)/gettext.m4 $(M4DIR)/lcmessage.m4 $(M4DIR)/progtest.m4
9 +ACINCLUDE_INPUTS = $(M4DIR)/lcmessage.m4 $(M4DIR)/progtest.m4
12 if [ ! -f $(DESTDIR)$(sysconfdir)/lftp.conf ]; then \
13 diff -Nru lftp-2.3.9/acinclude.m4 lftp-2.3.9.new/acinclude.m4
14 --- lftp-2.3.9/acinclude.m4 Thu Mar 22 13:58:35 2001
15 +++ lftp-2.3.9.new/acinclude.m4 Thu Jan 1 01:00:00 1970
17 -# Macro to add for using GNU gettext.
18 -# Ulrich Drepper <drepper@cygnus.com>, 1995.
20 -# This file can be copied and used freely without restrictions. It can
21 -# be used in projects which are not available under the GNU Public License
22 -# but which still want to provide support for the GNU gettext functionality.
23 -# Please note that the actual code is *not* freely available.
27 -AC_PREREQ(2.13) dnl Minimum Autoconf version required.
29 -AC_DEFUN(AM_WITH_NLS,
30 - [AC_MSG_CHECKING([whether NLS is requested])
31 - dnl Default is enabled NLS
33 - [ --disable-nls do not use Native Language Support],
34 - USE_NLS=$enableval, USE_NLS=yes)
35 - AC_MSG_RESULT($USE_NLS)
38 - USE_INCLUDED_LIBINTL=no
40 - AC_ARG_WITH(locale-dir,
41 - [ --with-locale-dir=DIR specify locale directory],
42 - LOCALE_DIR=$withval)
43 - test -z "$LOCALE_DIR" && LOCALE_DIR='$(datadir)/locale'
44 - AC_SUBST(LOCALE_DIR)
46 - AC_ARG_WITH(gnu-locale-dir,
47 - [ --with-gnu-locale-dir=DIR specify GNU locale directory],
48 - GNU_LOCALE_DIR=$withval)
49 - test -z "$GNU_LOCALE_DIR" && GNU_LOCALE_DIR='$(prefix)/share/locale'
50 - AC_SUBST(GNU_LOCALE_DIR)
52 - dnl If we use NLS figure out what method
53 - if test "$USE_NLS" = "yes"; then
54 - AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested.])
55 - AC_MSG_CHECKING([whether included gettext is requested])
56 - AC_ARG_WITH(included-gettext,
57 - [ --with-included-gettext use the GNU gettext library included here],
58 - nls_cv_force_use_gnu_gettext=$withval,
59 - nls_cv_force_use_gnu_gettext=no)
60 - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
62 - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
63 - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
64 - dnl User does not insist on using GNU NLS library. Figure out what
65 - dnl to use. If gettext or catgets are available (in this order) we
66 - dnl use this. Else we have to fall back to GNU NLS library.
67 - dnl catgets is only used if permitted by option --with-catgets.
69 - nls_cv_header_libgt=
72 - AC_CHECK_HEADER(libintl.h,
73 - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
74 - [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
75 - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
77 - if test "$gt_cv_func_gettext_libc" != "yes"; then
78 - AC_CHECK_LIB(intl, bindtextdomain,
79 - [AC_CHECK_LIB(intl, gettext)])
82 - if test "$gt_cv_func_gettext_libc" = "yes" \
83 - || test "$ac_cv_lib_intl_gettext" = "yes"; then
84 - AC_DEFINE(HAVE_GETTEXT, 1,
85 - [Define to 1 if you have gettext and don't want to use GNU gettext.])
86 - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
87 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
88 - if test "$MSGFMT" != "no"; then
89 - AC_CHECK_FUNCS(dcgettext)
90 - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
91 - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
92 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
93 - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
94 - return _nl_msg_cat_cntr],
104 - if test "$CATOBJEXT" = "NONE"; then
105 - AC_MSG_CHECKING([whether catgets can be used])
106 - AC_ARG_WITH(catgets,
107 - [ --with-catgets use catgets functions if available],
108 - nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
109 - AC_MSG_RESULT($nls_cv_use_catgets)
111 - if test "$nls_cv_use_catgets" = "yes"; then
112 - dnl No gettext in C library. Try catgets next.
113 - AC_CHECK_LIB(i, main)
114 - AC_CHECK_FUNC(catgets,
115 - [AC_DEFINE(HAVE_CATGETS, 1,
116 - [Define as 1 if you have catgets and don't want to use GNU gettext.])
117 - INTLOBJS="\$(CATOBJS)"
118 - AC_PATH_PROG(GENCAT, gencat, no)dnl
119 - if test "$GENCAT" != "no"; then
120 - AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
121 - if test "$GMSGFMT" = "no"; then
122 - AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
123 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
125 - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
126 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
127 - USE_INCLUDED_LIBINTL=yes
131 - INTLDEPS='$(top_builddir)/intl/libintl.a'
133 - LIBS=`echo $LIBS | sed -e 's/-lintl//'`
134 - nls_cv_header_intl=intl/libintl.h
135 - nls_cv_header_libgt=intl/libgettext.h
140 - if test "$CATOBJEXT" = "NONE"; then
141 - dnl Neither gettext nor catgets in included in the C library.
142 - dnl Fall back on GNU gettext library.
143 - nls_cv_use_gnu_gettext=yes
147 - if test "$nls_cv_use_gnu_gettext" = "yes"; then
148 - dnl Mark actions used to generate GNU NLS library.
149 - INTLOBJS="\$(GETTOBJS)"
150 - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
151 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
152 - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
153 - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
154 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
156 - USE_INCLUDED_LIBINTL=yes
160 - INTLDEPS='$(top_builddir)/intl/libintl.a'
162 - LIBS=`echo $LIBS | sed -e 's/-lintl//'`
163 - nls_cv_header_intl=intl/libintl.h
164 - nls_cv_header_libgt=intl/libgettext.h
167 - dnl Test whether we really found GNU xgettext.
168 - if test "$XGETTEXT" != ":"; then
169 - dnl If it is no GNU xgettext we define it as : so that the
170 - dnl Makefiles still can work.
171 - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
175 - [found xgettext program is not GNU xgettext; ignore it])
180 - # We need to process the po/ directory.
184 - nls_cv_header_intl=intl/libintl.h
185 - nls_cv_header_libgt=intl/libgettext.h
187 - if test -z "$nls_cv_header_intl"; then
188 - # Clean out junk possibly left behind by a previous configuration.
189 - rm -f intl/libintl.h
191 - AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
192 - AC_OUTPUT_COMMANDS(
193 - [case "$CONFIG_FILES" in *po/Makefile.in*)
194 - sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
198 - # If this is used in GNU gettext we have to set USE_NLS to `yes'
199 - # because some of the sources are only built for this goal.
200 - if test "$PACKAGE" = gettext; then
202 - USE_INCLUDED_LIBINTL=yes
205 - dnl These rules are solely for the distribution goal. While doing this
206 - dnl we only have to keep exactly one list of the available catalogs
207 - dnl in configure.in.
208 - for lang in $ALL_LINGUAS; do
209 - GMOFILES="$GMOFILES $lang.gmo"
210 - POFILES="$POFILES $lang.po"
213 - dnl Make all variables we use known to autoconf.
214 - AC_SUBST(USE_INCLUDED_LIBINTL)
216 - AC_SUBST(CATOBJEXT)
217 - AC_SUBST(DATADIRNAME)
219 - AC_SUBST(INSTOBJEXT)
227 -AC_DEFUN(AM_GNU_GETTEXT,
228 - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
229 - AC_REQUIRE([AC_PROG_CC])dnl
230 - AC_REQUIRE([AC_PROG_RANLIB])dnl
231 - AC_REQUIRE([AC_ISC_POSIX])dnl
232 - AC_REQUIRE([AC_HEADER_STDC])dnl
233 - AC_REQUIRE([AC_C_CONST])dnl
234 - AC_REQUIRE([AC_C_INLINE])dnl
235 - AC_REQUIRE([AC_TYPE_OFF_T])dnl
236 - AC_REQUIRE([AC_TYPE_SIZE_T])dnl
237 - AC_REQUIRE([AC_FUNC_ALLOCA])dnl
238 - AC_REQUIRE([AC_FUNC_MMAP])dnl
240 - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
241 -unistd.h sys/param.h])
242 - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
243 -strdup __argz_count __argz_stringify __argz_next])
245 - if test "${ac_cv_func_stpcpy+set}" != "set"; then
246 - AC_CHECK_FUNCS(stpcpy)
248 - if test "${ac_cv_func_stpcpy}" = "yes"; then
249 - AC_DEFINE(HAVE_STPCPY, 1, [Define to 1 if you have the stpcpy function.])
255 - if test "x$CATOBJEXT" != "x"; then
256 - if test "x$ALL_LINGUAS" = "x"; then
259 - AC_MSG_CHECKING(for catalogs to be installed)
261 - for lang in ${LINGUAS=$ALL_LINGUAS}; do
262 - case "$ALL_LINGUAS" in
263 - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
266 - LINGUAS=$NEW_LINGUAS
267 - AC_MSG_RESULT($LINGUAS)
270 - dnl Construct list of names of catalog files to be constructed.
271 - if test -n "$LINGUAS"; then
272 - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
276 - dnl The reference to <locale.h> in the installed <libintl.h> file
277 - dnl must be resolved because we cannot expect the users of this
278 - dnl to define HAVE_LOCALE_H.
279 - if test $ac_cv_header_locale_h = yes; then
280 - INCLUDE_LOCALE_H="#include <locale.h>"
282 - INCLUDE_LOCALE_H="\
283 -/* The system does not provide the header <locale.h>. Take care yourself. */"
285 - AC_SUBST(INCLUDE_LOCALE_H)
287 - dnl Determine which catalog format we have (if any is needed)
288 - dnl For now we know about two different formats:
289 - dnl Linux libc-5 and the normal X/Open format
290 - test -d intl || mkdir intl
291 - if test "$CATOBJEXT" = ".cat"; then
292 - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
294 - dnl Transform the SED scripts while copying because some dumb SEDs
295 - dnl cannot handle comments.
296 - sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
298 - dnl po2tbl.sed is always needed.
299 - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
300 - $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
302 - dnl In the intl/Makefile.in we have a special dependency which makes
303 - dnl only sense for gettext. We comment this out for non-gettext
305 - if test "$PACKAGE" = "gettext"; then
315 - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
316 - dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
317 - dnl Try to locate is.
319 - if test -n "$ac_aux_dir"; then
320 - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
322 - if test -z "$MKINSTALLDIRS"; then
323 - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
325 - AC_SUBST(MKINSTALLDIRS)
327 - dnl *** For now the libtool support in intl/Makefile is not for real.
331 - dnl Generate list of files to be processed by xgettext which will
332 - dnl be included in po/Makefile.
333 - test -d po || mkdir po
336 - posrcprefix="../" ;;
338 - posrcprefix="$srcdir/" ;;
340 - posrcprefix="../$srcdir/" ;;
343 - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
344 - < $srcdir/po/POTFILES.in > po/POTFILES
346 -# Check whether LC_MESSAGES is available in <locale.h>.
347 -# Ulrich Drepper <drepper@cygnus.com>, 1995.
349 -# This file can be copied and used freely without restrictions. It can
350 -# be used in projects which are not available under the GNU Public License
351 -# but which still want to provide support for the GNU gettext functionality.
352 -# Please note that the actual code is *not* freely available.
356 -AC_PREREQ(2.13) dnl Minimum Autoconf version required.
358 -AC_DEFUN(AM_LC_MESSAGES,
359 - [if test $ac_cv_header_locale_h = yes; then
360 - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
361 - [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
362 - am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
363 - if test $am_cv_val_LC_MESSAGES = yes; then
364 - AC_DEFINE(HAVE_LC_MESSAGES, 1,
365 - [Define if your locale.h file contains LC_MESSAGES.])
368 -# Search path for a program which passes the given test.
369 -# Ulrich Drepper <drepper@cygnus.com>, 1996.
371 -# This file can be copied and used freely without restrictions. It can
372 -# be used in projects which are not available under the GNU Public License
373 -# but which still want to provide support for the GNU gettext functionality.
374 -# Please note that the actual code is *not* freely available.
378 -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
379 -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
380 -AC_DEFUN(AM_PATH_PROG_WITH_TEST,
381 -[# Extract the first word of "$2", so it can be a program name with args.
382 -set dummy $2; ac_word=[$]2
383 -AC_MSG_CHECKING([for $ac_word])
384 -AC_CACHE_VAL(ac_cv_path_$1,
387 - ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
390 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
391 - for ac_dir in ifelse([$5], , $PATH, [$5]); do
392 - test -z "$ac_dir" && ac_dir=.
393 - if test -f $ac_dir/$ac_word; then
395 - ac_cv_path_$1="$ac_dir/$ac_word"
401 -dnl If no 4th arg is given, leave the cache variable unset,
402 -dnl so AC_PATH_PROGS will keep looking.
403 -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
408 -if test -n "[$]$1"; then
409 - AC_MSG_RESULT([$]$1)
415 diff -Nru lftp-2.3.9/m4/gettext.m4 lftp-2.3.9.new/m4/gettext.m4
416 --- lftp-2.3.9/m4/gettext.m4 Fri Feb 16 09:10:54 2001
417 +++ lftp-2.3.9.new/m4/gettext.m4 Thu Jan 1 01:00:00 1970
419 -# Macro to add for using GNU gettext.
420 -# Ulrich Drepper <drepper@cygnus.com>, 1995.
422 -# This file can be copied and used freely without restrictions. It can
423 -# be used in projects which are not available under the GNU Public License
424 -# but which still want to provide support for the GNU gettext functionality.
425 -# Please note that the actual code is *not* freely available.
429 -AC_PREREQ(2.13) dnl Minimum Autoconf version required.
431 -AC_DEFUN(AM_WITH_NLS,
432 - [AC_MSG_CHECKING([whether NLS is requested])
433 - dnl Default is enabled NLS
435 - [ --disable-nls do not use Native Language Support],
436 - USE_NLS=$enableval, USE_NLS=yes)
437 - AC_MSG_RESULT($USE_NLS)
440 - USE_INCLUDED_LIBINTL=no
442 - AC_ARG_WITH(locale-dir,
443 - [ --with-locale-dir=DIR specify locale directory],
444 - LOCALE_DIR=$withval)
445 - test -z "$LOCALE_DIR" && LOCALE_DIR='$(datadir)/locale'
446 - AC_SUBST(LOCALE_DIR)
448 - AC_ARG_WITH(gnu-locale-dir,
449 - [ --with-gnu-locale-dir=DIR specify GNU locale directory],
450 - GNU_LOCALE_DIR=$withval)
451 - test -z "$GNU_LOCALE_DIR" && GNU_LOCALE_DIR='$(prefix)/share/locale'
452 - AC_SUBST(GNU_LOCALE_DIR)
454 - dnl If we use NLS figure out what method
455 - if test "$USE_NLS" = "yes"; then
456 - AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested.])
457 - AC_MSG_CHECKING([whether included gettext is requested])
458 - AC_ARG_WITH(included-gettext,
459 - [ --with-included-gettext use the GNU gettext library included here],
460 - nls_cv_force_use_gnu_gettext=$withval,
461 - nls_cv_force_use_gnu_gettext=no)
462 - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
464 - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
465 - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
466 - dnl User does not insist on using GNU NLS library. Figure out what
467 - dnl to use. If gettext or catgets are available (in this order) we
468 - dnl use this. Else we have to fall back to GNU NLS library.
469 - dnl catgets is only used if permitted by option --with-catgets.
470 - nls_cv_header_intl=
471 - nls_cv_header_libgt=
474 - AC_CHECK_HEADER(libintl.h,
475 - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
476 - [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
477 - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
479 - if test "$gt_cv_func_gettext_libc" != "yes"; then
480 - AC_CHECK_LIB(intl, bindtextdomain,
481 - [AC_CHECK_LIB(intl, gettext)])
484 - if test "$gt_cv_func_gettext_libc" = "yes" \
485 - || test "$ac_cv_lib_intl_gettext" = "yes"; then
486 - AC_DEFINE(HAVE_GETTEXT, 1,
487 - [Define to 1 if you have gettext and don't want to use GNU gettext.])
488 - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
489 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
490 - if test "$MSGFMT" != "no"; then
491 - AC_CHECK_FUNCS(dcgettext)
492 - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
493 - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
494 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
495 - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
496 - return _nl_msg_cat_cntr],
498 - DATADIRNAME=share],
506 - if test "$CATOBJEXT" = "NONE"; then
507 - AC_MSG_CHECKING([whether catgets can be used])
508 - AC_ARG_WITH(catgets,
509 - [ --with-catgets use catgets functions if available],
510 - nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
511 - AC_MSG_RESULT($nls_cv_use_catgets)
513 - if test "$nls_cv_use_catgets" = "yes"; then
514 - dnl No gettext in C library. Try catgets next.
515 - AC_CHECK_LIB(i, main)
516 - AC_CHECK_FUNC(catgets,
517 - [AC_DEFINE(HAVE_CATGETS, 1,
518 - [Define as 1 if you have catgets and don't want to use GNU gettext.])
519 - INTLOBJS="\$(CATOBJS)"
520 - AC_PATH_PROG(GENCAT, gencat, no)dnl
521 - if test "$GENCAT" != "no"; then
522 - AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
523 - if test "$GMSGFMT" = "no"; then
524 - AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
525 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
527 - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
528 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
529 - USE_INCLUDED_LIBINTL=yes
533 - INTLDEPS='$(top_builddir)/intl/libintl.a'
535 - LIBS=`echo $LIBS | sed -e 's/-lintl//'`
536 - nls_cv_header_intl=intl/libintl.h
537 - nls_cv_header_libgt=intl/libgettext.h
542 - if test "$CATOBJEXT" = "NONE"; then
543 - dnl Neither gettext nor catgets in included in the C library.
544 - dnl Fall back on GNU gettext library.
545 - nls_cv_use_gnu_gettext=yes
549 - if test "$nls_cv_use_gnu_gettext" = "yes"; then
550 - dnl Mark actions used to generate GNU NLS library.
551 - INTLOBJS="\$(GETTOBJS)"
552 - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
553 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
554 - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
555 - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
556 - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
558 - USE_INCLUDED_LIBINTL=yes
562 - INTLDEPS='$(top_builddir)/intl/libintl.a'
564 - LIBS=`echo $LIBS | sed -e 's/-lintl//'`
565 - nls_cv_header_intl=intl/libintl.h
566 - nls_cv_header_libgt=intl/libgettext.h
569 - dnl Test whether we really found GNU xgettext.
570 - if test "$XGETTEXT" != ":"; then
571 - dnl If it is no GNU xgettext we define it as : so that the
572 - dnl Makefiles still can work.
573 - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
577 - [found xgettext program is not GNU xgettext; ignore it])
582 - # We need to process the po/ directory.
586 - nls_cv_header_intl=intl/libintl.h
587 - nls_cv_header_libgt=intl/libgettext.h
589 - if test -z "$nls_cv_header_intl"; then
590 - # Clean out junk possibly left behind by a previous configuration.
591 - rm -f intl/libintl.h
593 - AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
594 - AC_OUTPUT_COMMANDS(
595 - [case "$CONFIG_FILES" in *po/Makefile.in*)
596 - sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
600 - # If this is used in GNU gettext we have to set USE_NLS to `yes'
601 - # because some of the sources are only built for this goal.
602 - if test "$PACKAGE" = gettext; then
604 - USE_INCLUDED_LIBINTL=yes
607 - dnl These rules are solely for the distribution goal. While doing this
608 - dnl we only have to keep exactly one list of the available catalogs
609 - dnl in configure.in.
610 - for lang in $ALL_LINGUAS; do
611 - GMOFILES="$GMOFILES $lang.gmo"
612 - POFILES="$POFILES $lang.po"
615 - dnl Make all variables we use known to autoconf.
616 - AC_SUBST(USE_INCLUDED_LIBINTL)
618 - AC_SUBST(CATOBJEXT)
619 - AC_SUBST(DATADIRNAME)
621 - AC_SUBST(INSTOBJEXT)
629 -AC_DEFUN(AM_GNU_GETTEXT,
630 - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
631 - AC_REQUIRE([AC_PROG_CC])dnl
632 - AC_REQUIRE([AC_PROG_RANLIB])dnl
633 - AC_REQUIRE([AC_ISC_POSIX])dnl
634 - AC_REQUIRE([AC_HEADER_STDC])dnl
635 - AC_REQUIRE([AC_C_CONST])dnl
636 - AC_REQUIRE([AC_C_INLINE])dnl
637 - AC_REQUIRE([AC_TYPE_OFF_T])dnl
638 - AC_REQUIRE([AC_TYPE_SIZE_T])dnl
639 - AC_REQUIRE([AC_FUNC_ALLOCA])dnl
640 - AC_REQUIRE([AC_FUNC_MMAP])dnl
642 - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
643 -unistd.h sys/param.h])
644 - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
645 -strdup __argz_count __argz_stringify __argz_next])
647 - if test "${ac_cv_func_stpcpy+set}" != "set"; then
648 - AC_CHECK_FUNCS(stpcpy)
650 - if test "${ac_cv_func_stpcpy}" = "yes"; then
651 - AC_DEFINE(HAVE_STPCPY, 1, [Define to 1 if you have the stpcpy function.])
657 - if test "x$CATOBJEXT" != "x"; then
658 - if test "x$ALL_LINGUAS" = "x"; then
661 - AC_MSG_CHECKING(for catalogs to be installed)
663 - for lang in ${LINGUAS=$ALL_LINGUAS}; do
664 - case "$ALL_LINGUAS" in
665 - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
668 - LINGUAS=$NEW_LINGUAS
669 - AC_MSG_RESULT($LINGUAS)
672 - dnl Construct list of names of catalog files to be constructed.
673 - if test -n "$LINGUAS"; then
674 - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
678 - dnl The reference to <locale.h> in the installed <libintl.h> file
679 - dnl must be resolved because we cannot expect the users of this
680 - dnl to define HAVE_LOCALE_H.
681 - if test $ac_cv_header_locale_h = yes; then
682 - INCLUDE_LOCALE_H="#include <locale.h>"
684 - INCLUDE_LOCALE_H="\
685 -/* The system does not provide the header <locale.h>. Take care yourself. */"
687 - AC_SUBST(INCLUDE_LOCALE_H)
689 - dnl Determine which catalog format we have (if any is needed)
690 - dnl For now we know about two different formats:
691 - dnl Linux libc-5 and the normal X/Open format
692 - test -d intl || mkdir intl
693 - if test "$CATOBJEXT" = ".cat"; then
694 - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
696 - dnl Transform the SED scripts while copying because some dumb SEDs
697 - dnl cannot handle comments.
698 - sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
700 - dnl po2tbl.sed is always needed.
701 - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
702 - $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
704 - dnl In the intl/Makefile.in we have a special dependency which makes
705 - dnl only sense for gettext. We comment this out for non-gettext
707 - if test "$PACKAGE" = "gettext"; then
717 - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
718 - dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
719 - dnl Try to locate is.
721 - if test -n "$ac_aux_dir"; then
722 - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
724 - if test -z "$MKINSTALLDIRS"; then
725 - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
727 - AC_SUBST(MKINSTALLDIRS)
729 - dnl *** For now the libtool support in intl/Makefile is not for real.
733 - dnl Generate list of files to be processed by xgettext which will
734 - dnl be included in po/Makefile.
735 - test -d po || mkdir po
738 - posrcprefix="../" ;;
740 - posrcprefix="$srcdir/" ;;
742 - posrcprefix="../$srcdir/" ;;
745 - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
746 - < $srcdir/po/POTFILES.in > po/POTFILES