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