]> git.pld-linux.org Git - packages/recode.git/blob - recode-am.patch
explicitly define encoding for texinfo file
[packages/recode.git] / recode-am.patch
1 --- recode-3.5d.orig/acinclude.m4       Fri Dec  3 12:03:01 1999
2 +++ recode-3.5d/acinclude.m4    Thu Oct 18 22:02:10 2001
3 @@ -1,430 +1,312 @@
4 -## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
5 -## Copyright (C) 1996-1999 Free Software Foundation, Inc.
6 -## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7 -##
8 -## This program is free software; you can redistribute it and/or modify
9 -## it under the terms of the GNU General Public License as published by
10 -## the Free Software Foundation; either version 2 of the License, or
11 -## (at your option) any later version.
12 -##
13 -## This program is distributed in the hope that it will be useful, but
14 -## WITHOUT ANY WARRANTY; without even the implied warranty of
15 -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 -## General Public License for more details.
17 -##
18 -## You should have received a copy of the GNU General Public License
19 -## along with this program; if not, write to the Free Software
20 -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 -##
22 -## As a special exception to the GNU General Public License, if you
23 -## distribute this file as part of a program that contains a
24 -## configuration script generated by Autoconf, you may include it under
25 -## the same distribution terms that you use for the rest of that program.
26 -
27 -# serial 40 AC_PROG_LIBTOOL
28 -AC_DEFUN(AC_PROG_LIBTOOL,
29 -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
30 -
31 -# Save cache, so that ltconfig can load it
32 -AC_CACHE_SAVE
33 -
34 -# Actually configure libtool.  ac_aux_dir is where install-sh is found.
35 -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
36 -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
37 -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
38 -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
39 -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
40 -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
41 -|| AC_MSG_ERROR([libtool configure failed])
42 -
43 -# Reload cache, that may have been modified by ltconfig
44 -AC_CACHE_LOAD
45 -
46 -# This can be used to rebuild libtool when needed
47 -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
48 -
49 -# Always use our own libtool.
50 -LIBTOOL='$(SHELL) $(top_builddir)/libtool'
51 -AC_SUBST(LIBTOOL)dnl
52 -
53 -# Redirect the config.log output again, so that the ltconfig log is not
54 -# clobbered by the next message.
55 -exec 5>>./config.log
56 -])
57 +# The argument (often `../src') says where are the built sources to test,
58 +# relative to the built test directory.  Empty for a flat distribution, as
59 +# `.' gets always added in front of the search path by the `atconfig' script.
60  
61 -AC_DEFUN(AC_LIBTOOL_SETUP,
62 -[AC_PREREQ(2.13)dnl
63 -AC_REQUIRE([AC_ENABLE_SHARED])dnl
64 -AC_REQUIRE([AC_ENABLE_STATIC])dnl
65 -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
66 -AC_REQUIRE([AC_CANONICAL_HOST])dnl
67 -AC_REQUIRE([AC_CANONICAL_BUILD])dnl
68 -AC_REQUIRE([AC_PROG_RANLIB])dnl
69 -AC_REQUIRE([AC_PROG_CC])dnl
70 -AC_REQUIRE([AC_PROG_LD])dnl
71 -AC_REQUIRE([AC_PROG_NM])dnl
72 -AC_REQUIRE([AC_PROG_LN_S])dnl
73 -dnl
74 +AC_DEFUN(AT_CONFIG,
75 +[AT_TESTPATH=$1
76 +AC_SUBST(AT_TESTPATH)
77 +fp_PROG_ECHO
78 +])
79  
80 -case "$target" in
81 -NONE) lt_target="$host" ;;
82 -*) lt_target="$target" ;;
83 -esac
84  
85 -# Check for any special flags to pass to ltconfig.
86 -libtool_flags="--cache-file=$cache_file"
87 -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
88 -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
89 -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
90 -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
91 -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
92 -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
93 -[libtool_flags="$libtool_flags --enable-dlopen"])
94 -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
95 -[libtool_flags="$libtool_flags --enable-win32-dll"])
96 -AC_ARG_ENABLE(libtool-lock,
97 -  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
98 -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
99 -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
100 -
101 -# Some flags need to be propagated to the compiler or linker for good
102 -# libtool support.
103 -case "$lt_target" in
104 -*-*-irix6*)
105 -  # Find out which ABI we are using.
106 -  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
107 -  if AC_TRY_EVAL(ac_compile); then
108 -    case "`/usr/bin/file conftest.o`" in
109 -    *32-bit*)
110 -      LD="${LD-ld} -32"
111 -      ;;
112 -    *N32*)
113 -      LD="${LD-ld} -n32"
114 -      ;;
115 -    *64-bit*)
116 -      LD="${LD-ld} -64"
117 -      ;;
118 -    esac
119 -  fi
120 -  rm -rf conftest*
121 -  ;;
122 +# Once this macro is called, you may output with no echo in a Makefile or
123 +# script using:  echo @ECHO_N@ "STRING_TO_OUTPUT@ECHO_C@".
124  
125 -*-*-sco3.2v5*)
126 -  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
127 -  SAVE_CFLAGS="$CFLAGS"
128 -  CFLAGS="$CFLAGS -belf"
129 -  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
130 -    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
131 -  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
132 -    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
133 -    CFLAGS="$SAVE_CFLAGS"
134 +AC_DEFUN(fp_PROG_ECHO,
135 +[AC_CACHE_CHECK(how to suppress newlines using echo, fp_cv_prog_echo_nonl,
136 +[if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
137 +  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
138 +    fp_cv_prog_echo_nonl=no
139 +  else
140 +    fp_cv_prog_echo_nonl=option
141    fi
142 -  ;;
143 -
144 -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
145 -[*-*-cygwin* | *-*-mingw*)
146 -  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
147 -  AC_CHECK_TOOL(AS, as, false)
148 -  AC_CHECK_TOOL(OBJDUMP, objdump, false)
149 -  ;;
150 +else
151 +  fp_cv_prog_echo_nonl=escape
152 +fi
153  ])
154 +test $fp_cv_prog_echo_nonl = no \
155 +  && echo 2>&1 "WARNING: \`echo' not powerful enough for \`make check'"
156 +case $fp_cv_prog_echo_nonl in
157 +  no) ECHO_N= ECHO_C= ;;
158 +  option) ECHO_N=-n ECHO_C= ;;
159 +  escape) ECHO_N= ECHO_C='\c' ;;
160  esac
161 +AC_SUBST(ECHO_N)dnl
162 +AC_SUBST(ECHO_C)dnl
163  ])
164  
165 -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
166 -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
167 +# serial 2
168  
169 -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
170 -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
171 +dnl ad_AC_PROG_FLEX
172 +dnl Look for flex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
173 +AC_DEFUN(ad_AC_PROG_FLEX,
174 +[AC_CHECK_PROGS(LEX, flex, missing)
175 +if test "$LEX" = missing; then
176 +  LEX="\$(top_srcdir)/$ac_aux_dir/missing flex"
177 +  LEX_OUTPUT_ROOT=lex.yy
178 +  AC_SUBST(LEX_OUTPUT_ROOT)dnl
179 +else
180 +  AC_PROG_LEX
181 +  AC_DECL_YYTEXT
182 +fi])
183  
184 -# AC_ENABLE_SHARED - implement the --enable-shared flag
185 -# Usage: AC_ENABLE_SHARED[(DEFAULT)]
186 -#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
187 -#   `yes'.
188 -AC_DEFUN(AC_ENABLE_SHARED, [dnl
189 -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
190 -AC_ARG_ENABLE(shared,
191 -changequote(<<, >>)dnl
192 -<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
193 -changequote([, ])dnl
194 -[p=${PACKAGE-default}
195 -case "$enableval" in
196 -yes) enable_shared=yes ;;
197 -no) enable_shared=no ;;
198 -*)
199 -  enable_shared=no
200 -  # Look at the argument we got.  We use all the common list separators.
201 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
202 -  for pkg in $enableval; do
203 -    if test "X$pkg" = "X$p"; then
204 -      enable_shared=yes
205 -    fi
206 -  done
207 -  IFS="$ac_save_ifs"
208 -  ;;
209 -esac],
210 -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
211 +#serial 2
212 +
213 +dnl From Jim Meyering
214 +
215 +dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared --
216 +dnl usually in <utime.h>.
217 +dnl Some systems have utime.h but don't declare the struct anywhere.
218 +
219 +AC_DEFUN(jm_STRUCT_UTIMBUF,
220 +[
221 +  AC_CHECK_HEADERS(utime.h)
222 +  AC_REQUIRE([AC_HEADER_TIME])
223 +  AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf,
224 +    [AC_TRY_COMPILE(
225 +      [
226 +#ifdef TIME_WITH_SYS_TIME
227 +# include <sys/time.h>
228 +# include <time.h>
229 +#else
230 +# ifdef HAVE_SYS_TIME_H
231 +#  include <sys/time.h>
232 +# else
233 +#  include <time.h>
234 +# endif
235 +#endif
236 +#ifdef HAVE_UTIME_H
237 +# include <utime.h>
238 +#endif
239 +      ],
240 +      [static struct utimbuf x; x.actime = x.modtime;],
241 +      fu_cv_sys_struct_utimbuf=yes,
242 +      fu_cv_sys_struct_utimbuf=no)
243 +    ])
244 +
245 +  if test $fu_cv_sys_struct_utimbuf = yes; then
246 +    AC_DEFINE_UNQUOTED(HAVE_STRUCT_UTIMBUF, 1,
247 +[Define if struct utimbuf is declared -- usually in <utime.h>.
248 +   Some systems have utime.h but don't declare the struct anywhere. ])
249 +  fi
250  ])
251  
252 -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
253 -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
254 -AC_ENABLE_SHARED(no)])
255 -
256 -# AC_ENABLE_STATIC - implement the --enable-static flag
257 -# Usage: AC_ENABLE_STATIC[(DEFAULT)]
258 -#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
259 -#   `yes'.
260 -AC_DEFUN(AC_ENABLE_STATIC, [dnl
261 -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
262 -AC_ARG_ENABLE(static,
263 -changequote(<<, >>)dnl
264 -<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
265 -changequote([, ])dnl
266 -[p=${PACKAGE-default}
267 -case "$enableval" in
268 -yes) enable_static=yes ;;
269 -no) enable_static=no ;;
270 -*)
271 -  enable_static=no
272 -  # Look at the argument we got.  We use all the common list separators.
273 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
274 -  for pkg in $enableval; do
275 -    if test "X$pkg" = "X$p"; then
276 -      enable_static=yes
277 -    fi
278 -  done
279 -  IFS="$ac_save_ifs"
280 -  ;;
281 -esac],
282 -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
283 +#serial 3
284 +
285 +dnl From Jim Meyering.
286 +dnl Determine whether malloc accepts 0 as its argument.
287 +dnl If it doesn't, arrange to use the replacement function.
288 +dnl
289 +
290 +AC_DEFUN(jm_FUNC_MALLOC,
291 +[
292 + dnl xmalloc.c requires that this symbol be defined so it doesn't
293 + dnl mistakenly use a broken malloc -- as it might if this test were omitted.
294 + AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
295 +                    [Define if the malloc check has been performed. ])
296 +
297 + AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
298 +  [AC_TRY_RUN([
299 +    char *malloc ();
300 +    int
301 +    main ()
302 +    {
303 +      exit (malloc (0) ? 0 : 1);
304 +    }
305 +         ],
306 +        jm_cv_func_working_malloc=yes,
307 +        jm_cv_func_working_malloc=no,
308 +        dnl When crosscompiling, assume malloc is broken.
309 +        jm_cv_func_working_malloc=no)
310 +  ])
311 +  if test $jm_cv_func_working_malloc = no; then
312 +    AC_SUBST(LIBOBJS)
313 +    LIBOBJS="$LIBOBJS malloc.$ac_objext"
314 +    AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
315 +      [Define to rpl_malloc if the replacement function should be used.])
316 +  fi
317  ])
318  
319 -# AC_DISABLE_STATIC - set the default static flag to --disable-static
320 -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
321 -AC_ENABLE_STATIC(no)])
322 -
323 -
324 -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
325 -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
326 -#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
327 -#   `yes'.
328 -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
329 -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
330 -AC_ARG_ENABLE(fast-install,
331 -changequote(<<, >>)dnl
332 -<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
333 -changequote([, ])dnl
334 -[p=${PACKAGE-default}
335 -case "$enableval" in
336 -yes) enable_fast_install=yes ;;
337 -no) enable_fast_install=no ;;
338 -*)
339 -  enable_fast_install=no
340 -  # Look at the argument we got.  We use all the common list separators.
341 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
342 -  for pkg in $enableval; do
343 -    if test "X$pkg" = "X$p"; then
344 -      enable_fast_install=yes
345 -    fi
346 -  done
347 -  IFS="$ac_save_ifs"
348 -  ;;
349 -esac],
350 -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
351 +#serial 3
352 +
353 +dnl From Jim Meyering.
354 +dnl Determine whether realloc works when both arguments are 0.
355 +dnl If it doesn't, arrange to use the replacement function.
356 +dnl
357 +
358 +AC_DEFUN(jm_FUNC_REALLOC,
359 +[
360 + dnl xmalloc.c requires that this symbol be defined so it doesn't
361 + dnl mistakenly use a broken realloc -- as it might if this test were omitted.
362 + AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
363 +                    [Define if the realloc check has been performed. ])
364 +
365 + AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
366 +  [AC_TRY_RUN([
367 +    char *realloc ();
368 +    int
369 +    main ()
370 +    {
371 +      exit (realloc (0, 0) ? 0 : 1);
372 +    }
373 +         ],
374 +        jm_cv_func_working_realloc=yes,
375 +        jm_cv_func_working_realloc=no,
376 +        dnl When crosscompiling, assume realloc is broken.
377 +        jm_cv_func_working_realloc=no)
378 +  ])
379 +  if test $jm_cv_func_working_realloc = no; then
380 +    AC_SUBST(LIBOBJS)
381 +    LIBOBJS="$LIBOBJS realloc.$ac_objext"
382 +    AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
383 +      [Define to rpl_realloc if the replacement function should be used.])
384 +  fi
385  ])
386  
387 -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
388 -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
389 -AC_ENABLE_FAST_INSTALL(no)])
390 -
391 -# AC_PROG_LD - find the path to the GNU or non-GNU linker
392 -AC_DEFUN(AC_PROG_LD,
393 -[AC_ARG_WITH(gnu-ld,
394 -[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
395 -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
396 -AC_REQUIRE([AC_PROG_CC])dnl
397 -AC_REQUIRE([AC_CANONICAL_HOST])dnl
398 -AC_REQUIRE([AC_CANONICAL_BUILD])dnl
399 -ac_prog=ld
400 -if test "$ac_cv_prog_gcc" = yes; then
401 -  # Check if gcc -print-prog-name=ld gives a path.
402 -  AC_MSG_CHECKING([for ld used by GCC])
403 -  ac_prog=`($CC -print-prog-name=ld) 2>&5`
404 -  case "$ac_prog" in
405 -    # Accept absolute paths.
406 -changequote(,)dnl
407 -    [\\/]* | [A-Za-z]:[\\/]*)
408 -      re_direlt='/[^/][^/]*/\.\./'
409 -changequote([,])dnl
410 -      # Canonicalize the path of ld
411 -      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
412 -      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
413 -       ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
414 -      done
415 -      test -z "$LD" && LD="$ac_prog"
416 -      ;;
417 -  "")
418 -    # If it fails, then pretend we aren't using GCC.
419 -    ac_prog=ld
420 -    ;;
421 -  *)
422 -    # If it is relative, then search for the first ld in PATH.
423 -    with_gnu_ld=unknown
424 -    ;;
425 -  esac
426 -elif test "$with_gnu_ld" = yes; then
427 -  AC_MSG_CHECKING([for GNU ld])
428 -else
429 -  AC_MSG_CHECKING([for non-GNU ld])
430 -fi
431 -AC_CACHE_VAL(ac_cv_path_LD,
432 -[if test -z "$LD"; then
433 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
434 -  for ac_dir in $PATH; do
435 -    test -z "$ac_dir" && ac_dir=.
436 -    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
437 -      ac_cv_path_LD="$ac_dir/$ac_prog"
438 -      # Check to see if the program is GNU ld.  I'd rather use --version,
439 -      # but apparently some GNU ld's only accept -v.
440 -      # Break only if it was the GNU/non-GNU ld that we prefer.
441 -      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
442 -       test "$with_gnu_ld" != no && break
443 -      else
444 -       test "$with_gnu_ld" != yes && break
445 -      fi
446 -    fi
447 -  done
448 -  IFS="$ac_save_ifs"
449 -else
450 -  ac_cv_path_LD="$LD" # Let the user override the test with a path.
451 -fi])
452 -LD="$ac_cv_path_LD"
453 -if test -n "$LD"; then
454 -  AC_MSG_RESULT($LD)
455 +
456 +AC_DEFUN(fp_OS_MICROSOFT,
457 +[AC_CACHE_CHECK([for MSDOS, Win95 or WinNT], fp_cv_os_microsoft,
458 +[if test -n "$COMSPEC"; then
459 +  # MSDOS or Win95
460 +   fp_cv_os_microsoft=yes
461 +elif test -n "$ComSpec"; then
462 +  # WinNT
463 +  fp_cv_os_microsoft=yes
464  else
465 -  AC_MSG_RESULT(no)
466 +  fp_cv_os_microsoft=no
467  fi
468 -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
469 -AC_PROG_LD_GNU
470 -])
471 +])])
472  
473 -AC_DEFUN(AC_PROG_LD_GNU,
474 -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
475 -[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
476 -if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
477 -  ac_cv_prog_gnu_ld=yes
478 -else
479 -  ac_cv_prog_gnu_ld=no
480 -fi])
481 -])
482 +# Select gettext and choose translations to install.   -*- shell-script -*-
483 +# François Pinard <pinard@iro.umontreal.ca>, 1998.
484  
485 -# AC_PROG_NM - find the path to a BSD-compatible name lister
486 -AC_DEFUN(AC_PROG_NM,
487 -[AC_MSG_CHECKING([for BSD-compatible nm])
488 -AC_CACHE_VAL(ac_cv_path_NM,
489 -[if test -n "$NM"; then
490 -  # Let the user override the test.
491 -  ac_cv_path_NM="$NM"
492 -else
493 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
494 -  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
495 -    test -z "$ac_dir" && ac_dir=.
496 -    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
497 -      # Check to see if the nm accepts a BSD-compat flag.
498 -      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
499 -      #   nm: unknown option "B" ignored
500 -      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
501 -       ac_cv_path_NM="$ac_dir/nm -B"
502 -       break
503 -      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
504 -       ac_cv_path_NM="$ac_dir/nm -p"
505 -       break
506 -      else
507 -       ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
508 -       continue # so that we can try to find one that supports BSD flags
509 +# Here is a check list about how one could use this macro.
510 +# - In the build directory, execute `make distclean'.
511 +# - Rename `po/' to `i18n/'.
512 +# - Recursively delete directory `intl/'.
513 +# - Add the following files:
514 +#    . `i18n/Makefile.am'
515 +#    . `m4/gettext.m4'
516 +#    . `lib/gettext.c'
517 +#    . `lib/gettext.h'.
518 +# - In top level `configure.in':
519 +#    . use `fp_WITH_GETTEXT'.
520 +#    . delete `AM_GNU_GETTEXT' and any `AC_LINK_FILES' for $nls variables.
521 +#    . add `i18n/Makefile' to `AC_OUTPUT'.
522 +#    . delete `intl/Makefile' and `po/Makefile.in' from `AC_OUTPUT'.
523 +# - In top level `Makefile.am':
524 +#    . add `i18n' in SUBDIRS, and remove `intl' and `po'.
525 +#    . define `POTFILES' (peek at previous `i18n/POTFILES.in).
526 +#    . add `$(srcdir)/stamp-pot' to `all-local'.
527 +#    . add rule for `$(srcdir)/stamp-pot'.
528 +# - In top level `acconfig.h':
529 +#    . document `HAVE_DCGETTEXT' and `LOCALEDIR'.
530 +#    . delete documentation for `HAVE_CATGETS'.
531 +# - In `lib/Makefile.am':
532 +#    . add `gettext.c' to `EXTRA_DIST'.
533 +#    . add `gettext.h' to `noinstl_HEADERS'.
534 +#    . add definitions for `localdir' and `aliaspath'.
535 +#    . add special rules for `gettext.o' and `gettext._o'.
536 +# - In `m4/Makefile.am':
537 +#    . add `gettext.m4' to `EXTRA_DIST'.
538 +# - In `src/Makefile.am':
539 +#    . delete `-I/..intl' from `INCLUDES'.
540 +#    . delete `@INTLLIBS@' from `LDADD'.
541 +#    . delete `localedir' and its references.
542 +# - Clean up directory `i18n/':
543 +#    . delete `Makefile.in.in' and `POTFILES.in'.
544 +#    . delete all `*.gmo' files, `cat-id-tbl.c' and `stamp-cat-id'.
545 +# - In the top level distribution directory:
546 +#    . run `aclocal -I m4'.
547 +#    . run `autoreconf'.
548 +# - In the build directory:
549 +#    . run `$top_srcdir/configure'.
550 +#    . run `make check'.
551 +
552 +AC_DEFUN(fp_WITH_GETTEXT, [
553 +
554 +  AC_MSG_CHECKING(whether NLS is wanted)
555 +  AC_ARG_ENABLE(nls,
556 +    [  --disable-nls           disallow Native Language Support],
557 +    enable_nls=$enableval, enable_nls=yes)
558 +  AC_MSG_RESULT($enable_nls)
559 +  use_nls=$enable_nls
560 +  AM_CONDITIONAL(USE_NLS, test $use_nls = yes)
561 +
562 +  if test $enable_nls = yes; then
563 +    AC_DEFINE(ENABLE_NLS)
564 +
565 +    AC_ARG_WITH(catgets,
566 +      [  --with-catgets          say that catgets is not supported],
567 +      [AC_MSG_WARN([catgets not supported, --with-catgets ignored])])
568 +
569 +    AC_CHECK_FUNCS(gettext)
570 +    AC_CHECK_LIB(intl, gettext, :)
571 +    if test $ac_cv_lib_intl_gettext$ac_cv_func_gettext != nono; then
572 +      AC_MSG_CHECKING(whether the included gettext is preferred)
573 +      AC_ARG_WITH(included-gettext,
574 +       [  --without-included-gettext avoid our provided version of gettext],
575 +       with_included_gettext=$withval, with_included_gettext=yes)
576 +      AC_MSG_RESULT($with_included_gettext)
577 +      if test $with_included_gettext$ac_cv_func_gettext = nono; then
578 +        LIBS="$LIBS -lintl"
579        fi
580 +    else
581 +      with_included_gettext=yes
582 +    fi
583 +    if test $with_included_gettext = yes; then
584 +      LIBOBJS="$LIBOBJS gettext.o"
585 +      AC_DEFINE(HAVE_GETTEXT)
586 +      AC_DEFINE(HAVE_DCGETTEXT)
587 +    else
588 +      AC_CHECK_HEADERS(libintl.h)
589 +      AC_CHECK_FUNCS(dcgettext gettext)
590      fi
591 -  done
592 -  IFS="$ac_save_ifs"
593 -  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
594 -fi])
595 -NM="$ac_cv_path_NM"
596 -AC_MSG_RESULT([$NM])
597 -])
598 -
599 -# AC_CHECK_LIBM - check for math library
600 -AC_DEFUN(AC_CHECK_LIBM,
601 -[AC_REQUIRE([AC_CANONICAL_HOST])dnl
602 -LIBM=
603 -case "$lt_target" in
604 -*-*-beos* | *-*-cygwin*)
605 -  # These system don't have libm
606 -  ;;
607 -*-ncr-sysv4.3*)
608 -  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
609 -  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
610 -  ;;
611 -*)
612 -  AC_CHECK_LIB(m, main, LIBM="-lm")
613 -  ;;
614 -esac
615 -])
616  
617 -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
618 -# the libltdl convenience library, adds --enable-ltdl-convenience to
619 -# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
620 -# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
621 -# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
622 -# '${top_builddir}/' (note the single quotes!) if your package is not
623 -# flat, and, if you're not using automake, define top_builddir as
624 -# appropriate in the Makefiles.
625 -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
626 -  case "$enable_ltdl_convenience" in
627 -  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
628 -  "") enable_ltdl_convenience=yes
629 -      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
630 -  esac
631 -  LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
632 -  INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
633 -])
634 +    AC_CHECK_HEADERS(locale.h)
635 +    AC_CHECK_FUNCS(getcwd setlocale stpcpy)
636 +    AM_LC_MESSAGES
637 +
638 +    if test -z "$ALL_LINGUAS"; then
639 +      AC_MSG_WARN(This package does not install translations yet.)
640 +    else
641 +      ac_items="$ALL_LINGUAS"
642 +      for ac_item in $ac_items; do
643 +       ALL_POFILES="$ALL_POFILES $ac_item.po"
644 +       ALL_MOFILES="$ALL_MOFILES $ac_item.mo"
645 +      done
646 +    fi
647 +    AC_SUBST(ALL_LINGUAS)
648 +    AC_SUBST(ALL_POFILES)
649 +    AC_SUBST(ALL_MOFILES)
650 +
651 +    AC_MSG_CHECKING(which translations to install)
652 +    if test -z "$LINGUAS"; then
653 +      ac_print="$ALL_LINGUAS"
654 +      MOFILES="$ALL_MOFILES"
655 +    else
656 +      ac_items="$LINGUAS"
657 +      for ac_item in $ac_items; do
658 +       case "$ALL_LINGUAS" in
659 +         *$ac_item*)
660 +           ac_print="$ac_print $ac_item"
661 +           MOFILES="$MOFILES $ac_item.mo"
662 +           ;;
663 +       esac
664 +      done
665 +    fi
666 +    AC_SUBST(MOFILES)
667 +    if test -z "$ac_print"; then
668 +      AC_MSG_RESULT(none)
669 +    else
670 +      AC_MSG_RESULT($ac_print)
671 +    fi
672  
673 -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
674 -# the libltdl installable library, and adds --enable-ltdl-install to
675 -# the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
676 -# is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
677 -# to be `${top_builddir}/libltdl'.  Make sure you start DIR with
678 -# '${top_builddir}/' (note the single quotes!) if your package is not
679 -# flat, and, if you're not using automake, define top_builddir as
680 -# appropriate in the Makefiles.
681 -# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
682 -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
683 -  AC_CHECK_LIB(ltdl, main,
684 -  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
685 -  [if test x"$enable_ltdl_install" = xno; then
686 -     AC_MSG_WARN([libltdl not installed, but installation disabled])
687 -   else
688 -     enable_ltdl_install=yes
689 -   fi
690 -  ])
691 -  if test x"$enable_ltdl_install" = x"yes"; then
692 -    ac_configure_args="$ac_configure_args --enable-ltdl-install"
693 -    LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
694 -    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
695 -  else
696 -    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
697 -    LIBLTDL="-lltdl"
698 -    INCLTDL=
699 -  fi
700 -])
701 +    if test "x$prefix" = xNONE; then
702 +      AC_DEFINE_UNQUOTED(LOCALEDIR, "$ac_default_prefix/share/locale")
703 +    else
704 +      AC_DEFINE_UNQUOTED(LOCALEDIR, "$prefix/share/locale")
705 +    fi
706 +  fi])
707  
708 -dnl old names
709 -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
710 -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
711 -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
712 -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
713 -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
714 -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
715 -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
716  
717 -dnl This is just to silence aclocal about the macro not being used
718 -ifelse([AC_DISABLE_FAST_INSTALL])dnl
This page took 0.166613 seconds and 3 git commands to generate.