]> git.pld-linux.org Git - packages/grep.git/blame - grep-m4.patch
- reverting last change: removing new macros from %p{re,ost}{,un}
[packages/grep.git] / grep-m4.patch
CommitLineData
df1a924c
AM
1diff -urN grep-2.5e.org/acinclude.m4 grep-2.5e/acinclude.m4
2--- grep-2.5e.org/acinclude.m4 Wed Mar 7 05:55:50 2001
3+++ grep-2.5e/acinclude.m4 Tue May 8 09:36:33 2001
4@@ -171,332 +171,6 @@
5 [the number of pending output bytes on stream `fp'])
6 fi
7 ])
8-# Macro to add for using GNU gettext.
9-# Ulrich Drepper <drepper@cygnus.com>, 1995.
10-#
11-# This file can be copied and used freely without restrictions. It can
12-# be used in projects which are not available under the GNU Public License
13-# but which still want to provide support for the GNU gettext functionality.
14-# Please note that the actual code is *not* freely available.
15-
16-# serial 105
17-
18-AC_DEFUN(AM_WITH_NLS,
19- [AC_MSG_CHECKING([whether NLS is requested])
20- dnl Default is enabled NLS
21- AC_ARG_ENABLE(nls,
22- [ --disable-nls do not use Native Language Support],
23- USE_NLS=$enableval, USE_NLS=yes)
24- AC_MSG_RESULT($USE_NLS)
25- AC_SUBST(USE_NLS)
26-
27- USE_INCLUDED_LIBINTL=no
28-
29- dnl If we use NLS figure out what method
30- if test "$USE_NLS" = "yes"; then
31- AC_DEFINE(ENABLE_NLS)
32- AC_MSG_CHECKING([whether included gettext is requested])
33- AC_ARG_WITH(included-gettext,
34- [ --with-included-gettext use the GNU gettext library included here],
35- nls_cv_force_use_gnu_gettext=$withval,
36- nls_cv_force_use_gnu_gettext=no)
37- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
38-
39- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
40- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
41- dnl User does not insist on using GNU NLS library. Figure out what
42- dnl to use. If gettext or catgets are available (in this order) we
43- dnl use this. Else we have to fall back to GNU NLS library.
44- dnl catgets is only used if permitted by option --with-catgets.
45- nls_cv_header_intl=
46- nls_cv_header_libgt=
47- CATOBJEXT=NONE
48-
49- AC_CHECK_HEADER(libintl.h,
50- [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
51- [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
52- gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
53-
54- if test "$gt_cv_func_gettext_libc" != "yes"; then
55- AC_CHECK_LIB(intl, bindtextdomain,
56- [AC_CACHE_CHECK([for gettext in libintl],
57- gt_cv_func_gettext_libintl,
58- [AC_CHECK_LIB(intl, gettext,
59- gt_cv_func_gettext_libintl=yes,
60- gt_cv_func_gettext_libintl=no)],
61- gt_cv_func_gettext_libintl=no)])
62-
63- if test "$gt_cv_func_gettext_libintl" = yes; then
64- LIBS="$LIBS -lintl"
65- fi
66-
67- fi
68-
69- if test "$gt_cv_func_gettext_libc" = "yes" \
70- || test "$gt_cv_func_gettext_libintl" = "yes"; then
71- AC_DEFINE(HAVE_GETTEXT)
72- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
73- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
74- if test "$MSGFMT" != "no"; then
75- AC_CHECK_FUNCS(dcgettext)
76- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
77- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
78- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
79- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
80- return _nl_msg_cat_cntr],
81- [CATOBJEXT=.gmo
82- DATADIRNAME=share],
83- [CATOBJEXT=.mo
84- DATADIRNAME=lib])
85- INSTOBJEXT=.mo
86- fi
87- fi
88- ])
89-
90- if test "$CATOBJEXT" = "NONE"; then
91- AC_MSG_CHECKING([whether catgets can be used])
92- AC_ARG_WITH(catgets,
93- [ --with-catgets use catgets functions if available],
94- nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
95- AC_MSG_RESULT($nls_cv_use_catgets)
96-
97- if test "$nls_cv_use_catgets" = "yes"; then
98- dnl No gettext in C library. Try catgets next.
99- AC_CHECK_LIB(i, main)
100- AC_CHECK_FUNC(catgets,
101- [AC_DEFINE(HAVE_CATGETS)
102- INTLOBJS="\$(CATOBJS)"
103- AC_PATH_PROG(GENCAT, gencat, no)dnl
104- if test "$GENCAT" != "no"; then
105- AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
106- if test "$GMSGFMT" = "no"; then
107- AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
108- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
109- fi
110- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
111- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
112- USE_INCLUDED_LIBINTL=yes
113- CATOBJEXT=.cat
114- INSTOBJEXT=.cat
115- DATADIRNAME=lib
116- INTLDEPS='$(top_builddir)/intl/libintl.a'
117- INTLLIBS=$INTLDEPS
118- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
119- nls_cv_header_intl=intl/libintl.h
120- nls_cv_header_libgt=intl/libgettext.h
121- fi])
122- fi
123- fi
124-
125- if test "$CATOBJEXT" = "NONE"; then
126- dnl Neither gettext nor catgets in included in the C library.
127- dnl Fall back on GNU gettext library.
128- nls_cv_use_gnu_gettext=yes
129- fi
130- fi
131-
132- if test "$nls_cv_use_gnu_gettext" = "yes"; then
133- dnl Mark actions used to generate GNU NLS library.
134- INTLOBJS="\$(GETTOBJS)"
135- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
136- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
137- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
138- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
139- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
140- AC_SUBST(MSGFMT)
141- USE_INCLUDED_LIBINTL=yes
142- CATOBJEXT=.gmo
143- INSTOBJEXT=.mo
144- DATADIRNAME=share
145- INTLDEPS='$(top_builddir)/intl/libintl.a'
146- INTLLIBS=$INTLDEPS
147- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
148- nls_cv_header_intl=intl/libintl.h
149- nls_cv_header_libgt=intl/libgettext.h
150- fi
151-
152- dnl Test whether we really found GNU xgettext.
153- if test "$XGETTEXT" != ":"; then
154- dnl If it is no GNU xgettext we define it as : so that the
155- dnl Makefiles still can work.
156- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
157- : ;
158- else
159- AC_MSG_RESULT(
160- [found xgettext program is not GNU xgettext; ignore it])
161- XGETTEXT=":"
162- fi
163- fi
164-
165- # We need to process the po/ directory.
166- POSUB=po
167- else
168- DATADIRNAME=share
169- nls_cv_header_intl=intl/libintl.h
170- nls_cv_header_libgt=intl/libgettext.h
171- fi
172- if test -z "$nsl_cv_header_intl"; then
173- # Clean out junk possibly left behind by a previous configuration.
174- rm -f intl/libintl.h
175- fi
176- AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
177- AC_OUTPUT_COMMANDS(
178- [case "$CONFIG_FILES" in *po/Makefile.in*)
179- sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
180- esac])
181-
182-
183- # If this is used in GNU gettext we have to set USE_NLS to `yes'
184- # because some of the sources are only built for this goal.
185- if test "$PACKAGE" = gettext; then
186- USE_NLS=yes
187- USE_INCLUDED_LIBINTL=yes
188- fi
189-
190- dnl These rules are solely for the distribution goal. While doing this
191- dnl we only have to keep exactly one list of the available catalogs
192- dnl in configure.in.
193- for lang in $ALL_LINGUAS; do
194- GMOFILES="$GMOFILES $lang.gmo"
195- POFILES="$POFILES $lang.po"
196- done
197-
198- dnl Make all variables we use known to autoconf.
199- AC_SUBST(USE_INCLUDED_LIBINTL)
200- AC_SUBST(CATALOGS)
201- AC_SUBST(CATOBJEXT)
202- AC_SUBST(DATADIRNAME)
203- AC_SUBST(GMOFILES)
204- AC_SUBST(INSTOBJEXT)
205- AC_SUBST(INTLDEPS)
206- AC_SUBST(INTLLIBS)
207- AC_SUBST(INTLOBJS)
208- AC_SUBST(POFILES)
209- AC_SUBST(POSUB)
210- ])
211-
212-AC_DEFUN(AM_GNU_GETTEXT,
213- [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
214- AC_REQUIRE([AC_PROG_CC])dnl
215- AC_REQUIRE([AC_PROG_RANLIB])dnl
216- AC_REQUIRE([AC_ISC_POSIX])dnl
217- AC_REQUIRE([AC_HEADER_STDC])dnl
218- AC_REQUIRE([AC_C_CONST])dnl
219- AC_REQUIRE([AC_C_INLINE])dnl
220- AC_REQUIRE([AC_TYPE_OFF_T])dnl
221- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
222- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
223- AC_REQUIRE([AC_FUNC_MMAP])dnl
224-
225- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
226-unistd.h sys/param.h])
227- AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
228-strdup __argz_count __argz_stringify __argz_next])
229-
230- if test "${ac_cv_func_stpcpy+set}" != "set"; then
231- AC_CHECK_FUNCS(stpcpy)
232- fi
233- if test "${ac_cv_func_stpcpy}" = "yes"; then
234- AC_DEFINE(HAVE_STPCPY)
235- fi
236-
237- AM_LC_MESSAGES
238- AM_WITH_NLS
239-
240- if test "x$CATOBJEXT" != "x"; then
241- if test "x$ALL_LINGUAS" = "x"; then
242- LINGUAS=
243- else
244- AC_MSG_CHECKING(for catalogs to be installed)
245- NEW_LINGUAS=
246- for lang in ${LINGUAS=$ALL_LINGUAS}; do
247- case "$ALL_LINGUAS" in
248- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
249- esac
250- done
251- LINGUAS=$NEW_LINGUAS
252- AC_MSG_RESULT($LINGUAS)
253- fi
254-
255- dnl Construct list of names of catalog files to be constructed.
256- if test -n "$LINGUAS"; then
257- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
258- fi
259- fi
260-
261- dnl The reference to <locale.h> in the installed <libintl.h> file
262- dnl must be resolved because we cannot expect the users of this
263- dnl to define HAVE_LOCALE_H.
264- if test $ac_cv_header_locale_h = yes; then
265- INCLUDE_LOCALE_H="#include <locale.h>"
266- else
267- INCLUDE_LOCALE_H="\
268-/* The system does not provide the header <locale.h>. Take care yourself. */"
269- fi
270- AC_SUBST(INCLUDE_LOCALE_H)
271-
272- dnl Determine which catalog format we have (if any is needed)
273- dnl For now we know about two different formats:
274- dnl Linux libc-5 and the normal X/Open format
275- test -d intl || mkdir intl
276- if test "$CATOBJEXT" = ".cat"; then
277- AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
278-
279- dnl Transform the SED scripts while copying because some dumb SEDs
280- dnl cannot handle comments.
281- sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
282- fi
283- dnl po2tbl.sed is always needed.
284- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
285- $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
286-
287- dnl In the intl/Makefile.in we have a special dependency which makes
288- dnl only sense for gettext. We comment this out for non-gettext
289- dnl packages.
290- if test "$PACKAGE" = "gettext"; then
291- GT_NO="#NO#"
292- GT_YES=
293- else
294- GT_NO=
295- GT_YES="#YES#"
296- fi
297- AC_SUBST(GT_NO)
298- AC_SUBST(GT_YES)
299-
300- dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
301- dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
302- dnl Try to locate is.
303- MKINSTALLDIRS=
304- if test -n "$ac_aux_dir"; then
305- MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
306- fi
307- if test -z "$MKINSTALLDIRS"; then
308- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
309- fi
310- AC_SUBST(MKINSTALLDIRS)
311-
312- dnl *** For now the libtool support in intl/Makefile is not for real.
313- l=
314- AC_SUBST(l)
315-
316- dnl Generate list of files to be processed by xgettext which will
317- dnl be included in po/Makefile.
318- test -d po || mkdir po
319- if test "x$srcdir" != "x."; then
320- changequote(, )dnl
321- if test "x`echo $srcdir | sed -e 's@^[A-z]:@@' -e 's@/.*@@'`" = "x"; then
322- posrcprefix="$srcdir/"
323- else
324- posrcprefix="../$srcdir/"
325- fi
326- changequote([, ])dnl
327- else
328- posrcprefix="../"
329- fi
330- rm -f po/POTFILES
331- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
332- < $srcdir/po/POTFILES.in > po/POTFILES
333- ])
334 dnl From Gordon Matzigkeit.
335 dnl Test for the GNU C Library.
336 dnl FIXME: this should migrate into libit.
337@@ -530,74 +204,6 @@
338 )
339 ]
340 )
341-# Like AC_CONFIG_HEADER, but automatically create stamp file.
342-
343-AC_DEFUN(AM_CONFIG_HEADER,
344-[AC_PREREQ([2.12])
345-AC_CONFIG_HEADER([$1])
346-dnl When config.status generates a header, we must update the stamp-h file.
347-dnl This file resides in the same directory as the config header
348-dnl that is generated. We must strip everything past the first ":",
349-dnl and everything past the last "/".
350-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
351-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
352-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
353-<<am_indx=1
354-for am_file in <<$1>>; do
355- case " <<$>>CONFIG_HEADERS " in
356- *" <<$>>am_file "*<<)>>
357- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
358- ;;
359- esac
360- am_indx=`expr "<<$>>am_indx" + 1`
361-done<<>>dnl>>)
362-changequote([,]))])
363-# Do all the work for Automake. This macro actually does too much --
364-# some checks are only needed if your package does certain things.
365-# But this isn't really a big deal.
366-
367-# serial 1
368-
369-dnl Usage:
370-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
371-
372-AC_DEFUN(AM_INIT_AUTOMAKE,
373-[AC_REQUIRE([AC_PROG_INSTALL])
374-PACKAGE=[$1]
375-AC_SUBST(PACKAGE)
376-VERSION=[$2]
377-AC_SUBST(VERSION)
378-dnl test to see if srcdir already configured
379-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
380- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
381-fi
382-ifelse([$3],,
383-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
384-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
385-AC_REQUIRE([AM_SANITY_CHECK])
386-AC_REQUIRE([AC_ARG_PROGRAM])
387-dnl FIXME This is truly gross.
388-missing_dir=`cd $ac_aux_dir && pwd`
389-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
390-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
391-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
392-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
393-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
394-AC_REQUIRE([AC_PROG_MAKE_SET])])
395-## --------------------------------------------------------- ##
396-## Use AC_PROG_INSTALL, supplementing it with INSTALL_SCRIPT ##
397-## substitution. ##
398-## From Franc,ois Pinard ##
399-## --------------------------------------------------------- ##
400-
401-# serial 1
402-
403-AC_DEFUN(AM_PROG_INSTALL,
404-[AC_REQUIRE([AC_PROG_INSTALL])
405-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
406-AC_SUBST(INSTALL_SCRIPT)dnl
407-])
408-#serial 3
409
410 dnl From Paul Eggert.
411
412@@ -765,26 +371,6 @@
413 esac])
414 fi
415 ])
416-# Check whether LC_MESSAGES is available in <locale.h>.
417-# Ulrich Drepper <drepper@cygnus.com>, 1995.
418-#
419-# This file can be copied and used freely without restrictions. It can
420-# be used in projects which are not available under the GNU Public License
421-# but which still want to provide support for the GNU gettext functionality.
422-# Please note that the actual code is *not* freely available.
423-
424-# serial 1
425-
426-AC_DEFUN(AM_LC_MESSAGES,
427- [if test $ac_cv_header_locale_h = yes; then
428- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
429- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
430- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
431- if test $am_cv_val_LC_MESSAGES = yes; then
432- AC_DEFINE(HAVE_LC_MESSAGES)
433- fi
434- fi])
435-#serial 3
436
437 dnl From Jim Meyering.
438 dnl Determine whether malloc accepts 0 as its argument.
This page took 0.074753 seconds and 4 git commands to generate.