]> git.pld-linux.org Git - packages/smurf.git/blob - smurf-remove_private_gettext.m4.patch
- pl summary, release 2
[packages/smurf.git] / smurf-remove_private_gettext.m4.patch
1 --- smurf-0.52.1/acinclude.m4~  Wed May  2 23:44:50 2001
2 +++ smurf-0.52.1/acinclude.m4   Mon May 14 03:12:15 2001
3 @@ -646,386 +646,3 @@
4  
5  ])
6  
7 -# Macro to add for using GNU gettext.
8 -# Ulrich Drepper <drepper@cygnus.com>, 1995.
9 -#
10 -# This file can be copied and used freely without restrictions.  It can
11 -# be used in projects which are not available under the GNU Public License
12 -# but which still want to provide support for the GNU gettext functionality.
13 -# Please note that the actual code is *not* freely available.
14 -
15 -# serial 5
16 -
17 -AC_DEFUN(AM_WITH_NLS,
18 -  [AC_MSG_CHECKING([whether NLS is requested])
19 -    dnl Default is enabled NLS
20 -    AC_ARG_ENABLE(nls,
21 -      [  --disable-nls           do not use Native Language Support],
22 -      USE_NLS=$enableval, USE_NLS=yes)
23 -    AC_MSG_RESULT($USE_NLS)
24 -    AC_SUBST(USE_NLS)
25 -
26 -    USE_INCLUDED_LIBINTL=no
27 -
28 -    dnl If we use NLS figure out what method
29 -    if test "$USE_NLS" = "yes"; then
30 -      AC_DEFINE(ENABLE_NLS)
31 -      AC_MSG_CHECKING([whether included gettext is requested])
32 -      AC_ARG_WITH(included-gettext,
33 -        [  --with-included-gettext use the GNU gettext library included here],
34 -        nls_cv_force_use_gnu_gettext=$withval,
35 -        nls_cv_force_use_gnu_gettext=no)
36 -      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
37 -
38 -      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
39 -      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
40 -        dnl User does not insist on using GNU NLS library.  Figure out what
41 -        dnl to use.  If gettext or catgets are available (in this order) we
42 -        dnl use this.  Else we have to fall back to GNU NLS library.
43 -       dnl catgets is only used if permitted by option --with-catgets.
44 -       nls_cv_header_intl=
45 -       nls_cv_header_libgt=
46 -       CATOBJEXT=NONE
47 -
48 -       AC_CHECK_HEADER(libintl.h,
49 -         [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
50 -           [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
51 -              gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
52 -
53 -          if test "$gt_cv_func_gettext_libc" != "yes"; then
54 -            AC_CHECK_LIB(intl, bindtextdomain,
55 -              [AC_CACHE_CHECK([for gettext in libintl],
56 -                gt_cv_func_gettext_libintl,
57 -                [AC_CHECK_LIB(intl, gettext,
58 -                 gt_cv_func_gettext_libintl=yes,
59 -                 gt_cv_func_gettext_libintl=no)],
60 -                gt_cv_func_gettext_libintl=no)])
61 -          fi
62 -
63 -          if test "$gt_cv_func_gettext_libc" = "yes" \
64 -             || test "$gt_cv_func_gettext_libintl" = "yes"; then
65 -             AC_DEFINE(HAVE_GETTEXT)
66 -             AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
67 -               [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
68 -             if test "$MSGFMT" != "no"; then
69 -               AC_CHECK_FUNCS(dcgettext)
70 -               AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
71 -               AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
72 -                 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
73 -               AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
74 -                              return _nl_msg_cat_cntr],
75 -                 [CATOBJEXT=.gmo
76 -                  DATADIRNAME=share],
77 -                 [CATOBJEXT=.mo
78 -                  DATADIRNAME=lib])
79 -               INSTOBJEXT=.mo
80 -             fi
81 -           fi
82 -       ])
83 -
84 -        if test "$CATOBJEXT" = "NONE"; then
85 -         AC_MSG_CHECKING([whether catgets can be used])
86 -         AC_ARG_WITH(catgets,
87 -           [  --with-catgets          use catgets functions if available],
88 -           nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
89 -         AC_MSG_RESULT($nls_cv_use_catgets)
90 -
91 -         if test "$nls_cv_use_catgets" = "yes"; then
92 -           dnl No gettext in C library.  Try catgets next.
93 -           AC_CHECK_LIB(i, main)
94 -           AC_CHECK_FUNC(catgets,
95 -             [AC_DEFINE(HAVE_CATGETS)
96 -              INTLOBJS="\$(CATOBJS)"
97 -              AC_PATH_PROG(GENCAT, gencat, no)dnl
98 -              if test "$GENCAT" != "no"; then
99 -                AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
100 -                if test "$GMSGFMT" = "no"; then
101 -                  AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
102 -                   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
103 -                fi
104 -                AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
105 -                  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
106 -                USE_INCLUDED_LIBINTL=yes
107 -                CATOBJEXT=.cat
108 -                INSTOBJEXT=.cat
109 -                DATADIRNAME=lib
110 -                INTLDEPS='$(top_builddir)/intl/libintl.a'
111 -                INTLLIBS=$INTLDEPS
112 -                LIBS=`echo $LIBS | sed -e 's/-lintl//'`
113 -                nls_cv_header_intl=intl/libintl.h
114 -                nls_cv_header_libgt=intl/libgettext.h
115 -              fi])
116 -         fi
117 -        fi
118 -
119 -        if test "$CATOBJEXT" = "NONE"; then
120 -         dnl Neither gettext nor catgets in included in the C library.
121 -         dnl Fall back on GNU gettext library.
122 -         nls_cv_use_gnu_gettext=yes
123 -        fi
124 -      fi
125 -
126 -      if test "$nls_cv_use_gnu_gettext" = "yes"; then
127 -        dnl Mark actions used to generate GNU NLS library.
128 -        INTLOBJS="\$(GETTOBJS)"
129 -        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
130 -         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
131 -        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
132 -        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
133 -         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
134 -        AC_SUBST(MSGFMT)
135 -       USE_INCLUDED_LIBINTL=yes
136 -        CATOBJEXT=.gmo
137 -        INSTOBJEXT=.mo
138 -        DATADIRNAME=share
139 -       INTLDEPS='$(top_builddir)/intl/libintl.a'
140 -       INTLLIBS=$INTLDEPS
141 -       LIBS=`echo $LIBS | sed -e 's/-lintl//'`
142 -        nls_cv_header_intl=intl/libintl.h
143 -        nls_cv_header_libgt=intl/libgettext.h
144 -      fi
145 -
146 -      dnl Test whether we really found GNU xgettext.
147 -      if test "$XGETTEXT" != ":"; then
148 -       dnl If it is no GNU xgettext we define it as : so that the
149 -       dnl Makefiles still can work.
150 -       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
151 -         : ;
152 -       else
153 -         AC_MSG_RESULT(
154 -           [found xgettext program is not GNU xgettext; ignore it])
155 -         XGETTEXT=":"
156 -       fi
157 -      fi
158 -
159 -      # We need to process the po/ directory.
160 -      POSUB=po
161 -    else
162 -      DATADIRNAME=share
163 -      nls_cv_header_intl=intl/libintl.h
164 -      nls_cv_header_libgt=intl/libgettext.h
165 -    fi
166 -    AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
167 -    AC_OUTPUT_COMMANDS(
168 -     [case "$CONFIG_FILES" in *po/Makefile.in*)
169 -        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
170 -      esac])
171 -
172 -
173 -    # If this is used in GNU gettext we have to set USE_NLS to `yes'
174 -    # because some of the sources are only built for this goal.
175 -    if test "$PACKAGE" = gettext; then
176 -      USE_NLS=yes
177 -      USE_INCLUDED_LIBINTL=yes
178 -    fi
179 -
180 -    dnl These rules are solely for the distribution goal.  While doing this
181 -    dnl we only have to keep exactly one list of the available catalogs
182 -    dnl in configure.in.
183 -    for lang in $ALL_LINGUAS; do
184 -      GMOFILES="$GMOFILES $lang.gmo"
185 -      POFILES="$POFILES $lang.po"
186 -    done
187 -
188 -    dnl Make all variables we use known to autoconf.
189 -    AC_SUBST(USE_INCLUDED_LIBINTL)
190 -    AC_SUBST(CATALOGS)
191 -    AC_SUBST(CATOBJEXT)
192 -    AC_SUBST(DATADIRNAME)
193 -    AC_SUBST(GMOFILES)
194 -    AC_SUBST(INSTOBJEXT)
195 -    AC_SUBST(INTLDEPS)
196 -    AC_SUBST(INTLLIBS)
197 -    AC_SUBST(INTLOBJS)
198 -    AC_SUBST(POFILES)
199 -    AC_SUBST(POSUB)
200 -  ])
201 -
202 -AC_DEFUN(AM_GNU_GETTEXT,
203 -  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
204 -   AC_REQUIRE([AC_PROG_CC])dnl
205 -   AC_REQUIRE([AC_PROG_RANLIB])dnl
206 -   AC_REQUIRE([AC_ISC_POSIX])dnl
207 -   AC_REQUIRE([AC_HEADER_STDC])dnl
208 -   AC_REQUIRE([AC_C_CONST])dnl
209 -   AC_REQUIRE([AC_C_INLINE])dnl
210 -   AC_REQUIRE([AC_TYPE_OFF_T])dnl
211 -   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
212 -   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
213 -   AC_REQUIRE([AC_FUNC_MMAP])dnl
214 -
215 -   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
216 -unistd.h sys/param.h])
217 -   AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
218 -strdup __argz_count __argz_stringify __argz_next])
219 -
220 -   if test "${ac_cv_func_stpcpy+set}" != "set"; then
221 -     AC_CHECK_FUNCS(stpcpy)
222 -   fi
223 -   if test "${ac_cv_func_stpcpy}" = "yes"; then
224 -     AC_DEFINE(HAVE_STPCPY)
225 -   fi
226 -
227 -   AM_LC_MESSAGES
228 -   AM_WITH_NLS
229 -
230 -   if test "x$CATOBJEXT" != "x"; then
231 -     if test "x$ALL_LINGUAS" = "x"; then
232 -       LINGUAS=
233 -     else
234 -       AC_MSG_CHECKING(for catalogs to be installed)
235 -       NEW_LINGUAS=
236 -       for lang in ${LINGUAS=$ALL_LINGUAS}; do
237 -         case "$ALL_LINGUAS" in
238 -          *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
239 -         esac
240 -       done
241 -       LINGUAS=$NEW_LINGUAS
242 -       AC_MSG_RESULT($LINGUAS)
243 -     fi
244 -
245 -     dnl Construct list of names of catalog files to be constructed.
246 -     if test -n "$LINGUAS"; then
247 -       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
248 -     fi
249 -   fi
250 -
251 -   dnl The reference to <locale.h> in the installed <libintl.h> file
252 -   dnl must be resolved because we cannot expect the users of this
253 -   dnl to define HAVE_LOCALE_H.
254 -   if test $ac_cv_header_locale_h = yes; then
255 -     INCLUDE_LOCALE_H="#include <locale.h>"
256 -   else
257 -     INCLUDE_LOCALE_H="\
258 -/* The system does not provide the header <locale.h>.  Take care yourself.  */"
259 -   fi
260 -   AC_SUBST(INCLUDE_LOCALE_H)
261 -
262 -   dnl Determine which catalog format we have (if any is needed)
263 -   dnl For now we know about two different formats:
264 -   dnl   Linux libc-5 and the normal X/Open format
265 -   test -d intl || mkdir intl
266 -   if test "$CATOBJEXT" = ".cat"; then
267 -     AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
268 -
269 -     dnl Transform the SED scripts while copying because some dumb SEDs
270 -     dnl cannot handle comments.
271 -     sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
272 -   fi
273 -   dnl po2tbl.sed is always needed.
274 -   sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
275 -     $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
276 -
277 -   dnl In the intl/Makefile.in we have a special dependency which makes
278 -   dnl only sense for gettext.  We comment this out for non-gettext
279 -   dnl packages.
280 -   if test "$PACKAGE" = "gettext"; then
281 -     GT_NO="#NO#"
282 -     GT_YES=
283 -   else
284 -     GT_NO=
285 -     GT_YES="#YES#"
286 -   fi
287 -   AC_SUBST(GT_NO)
288 -   AC_SUBST(GT_YES)
289 -
290 -   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
291 -   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
292 -   dnl Try to locate is.
293 -   MKINSTALLDIRS=
294 -   if test -n "$ac_aux_dir"; then
295 -     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
296 -   fi
297 -   if test -z "$MKINSTALLDIRS"; then
298 -     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
299 -   fi
300 -   AC_SUBST(MKINSTALLDIRS)
301 -
302 -   dnl *** For now the libtool support in intl/Makefile is not for real.
303 -   l=
304 -   AC_SUBST(l)
305 -
306 -   dnl Generate list of files to be processed by xgettext which will
307 -   dnl be included in po/Makefile.
308 -   test -d po || mkdir po
309 -   if test "x$srcdir" != "x."; then
310 -     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
311 -       posrcprefix="$srcdir/"
312 -     else
313 -       posrcprefix="../$srcdir/"
314 -     fi
315 -   else
316 -     posrcprefix="../"
317 -   fi
318 -   rm -f po/POTFILES
319 -   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,        $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
320 -       < $srcdir/po/POTFILES.in > po/POTFILES
321 -  ])
322 -
323 -# Check whether LC_MESSAGES is available in <locale.h>.
324 -# Ulrich Drepper <drepper@cygnus.com>, 1995.
325 -#
326 -# This file can be copied and used freely without restrictions.  It can
327 -# be used in projects which are not available under the GNU Public License
328 -# but which still want to provide support for the GNU gettext functionality.
329 -# Please note that the actual code is *not* freely available.
330 -
331 -# serial 1
332 -
333 -AC_DEFUN(AM_LC_MESSAGES,
334 -  [if test $ac_cv_header_locale_h = yes; then
335 -    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
336 -      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
337 -       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
338 -    if test $am_cv_val_LC_MESSAGES = yes; then
339 -      AC_DEFINE(HAVE_LC_MESSAGES)
340 -    fi
341 -  fi])
342 -
343 -# Search path for a program which passes the given test.
344 -# Ulrich Drepper <drepper@cygnus.com>, 1996.
345 -#
346 -# This file can be copied and used freely without restrictions.  It can
347 -# be used in projects which are not available under the GNU Public License
348 -# but which still want to provide support for the GNU gettext functionality.
349 -# Please note that the actual code is *not* freely available.
350 -
351 -# serial 1
352 -
353 -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
354 -dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
355 -AC_DEFUN(AM_PATH_PROG_WITH_TEST,
356 -[# Extract the first word of "$2", so it can be a program name with args.
357 -set dummy $2; ac_word=[$]2
358 -AC_MSG_CHECKING([for $ac_word])
359 -AC_CACHE_VAL(ac_cv_path_$1,
360 -[case "[$]$1" in
361 -  /*)
362 -  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
363 -  ;;
364 -  *)
365 -  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
366 -  for ac_dir in ifelse([$5], , $PATH, [$5]); do
367 -    test -z "$ac_dir" && ac_dir=.
368 -    if test -f $ac_dir/$ac_word; then
369 -      if [$3]; then
370 -       ac_cv_path_$1="$ac_dir/$ac_word"
371 -       break
372 -      fi
373 -    fi
374 -  done
375 -  IFS="$ac_save_ifs"
376 -dnl If no 4th arg is given, leave the cache variable unset,
377 -dnl so AC_PATH_PROGS will keep looking.
378 -ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
379 -])dnl
380 -  ;;
381 -esac])dnl
382 -$1="$ac_cv_path_$1"
383 -if test -n "[$]$1"; then
384 -  AC_MSG_RESULT([$]$1)
385 -else
386 -  AC_MSG_RESULT(no)
387 -fi
388 -AC_SUBST($1)dnl
389 -])
This page took 0.108272 seconds and 3 git commands to generate.