1 | dnl aclocal.m4 generated automatically by aclocal 1.4-p5 |
---|
2 | |
---|
3 | dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
---|
4 | dnl This file is free software; the Free Software Foundation |
---|
5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
6 | dnl with or without modifications, as long as this notice is preserved. |
---|
7 | |
---|
8 | dnl This program is distributed in the hope that it will be useful, |
---|
9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
11 | dnl PARTICULAR PURPOSE. |
---|
12 | |
---|
13 | |
---|
14 | dnl AC_PROG_INTLTOOL([MINIMUM-VERSION]) |
---|
15 | # serial 1 AC_PROG_INTLTOOL |
---|
16 | AC_DEFUN(AC_PROG_INTLTOOL, |
---|
17 | [ |
---|
18 | |
---|
19 | if test -n "$1"; then |
---|
20 | AC_MSG_CHECKING(for intltool >= $1) |
---|
21 | |
---|
22 | INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'` |
---|
23 | INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < intltool-update.in` |
---|
24 | changequote({{,}}) |
---|
25 | INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < intltool-update.in` |
---|
26 | changequote([,]) |
---|
27 | |
---|
28 | if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then |
---|
29 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) |
---|
30 | else |
---|
31 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.]) |
---|
32 | exit 1 |
---|
33 | fi |
---|
34 | fi |
---|
35 | |
---|
36 | INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
37 | INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
38 | INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -k -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
39 | INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p' |
---|
40 | INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
41 | INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
42 | INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
43 | INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
44 | INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
45 | INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -x -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
46 | INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
47 | |
---|
48 | AC_SUBST(INTLTOOL_DESKTOP_RULE) |
---|
49 | AC_SUBST(INTLTOOL_DIRECTORY_RULE) |
---|
50 | AC_SUBST(INTLTOOL_KEYS_RULE) |
---|
51 | AC_SUBST(INTLTOOL_OAF_RULE) |
---|
52 | AC_SUBST(INTLTOOL_PONG_RULE) |
---|
53 | AC_SUBST(INTLTOOL_SERVER_RULE) |
---|
54 | AC_SUBST(INTLTOOL_SHEET_RULE) |
---|
55 | AC_SUBST(INTLTOOL_SOUNDLIST_RULE) |
---|
56 | AC_SUBST(INTLTOOL_UI_RULE) |
---|
57 | AC_SUBST(INTLTOOL_XML_RULE) |
---|
58 | AC_SUBST(INTLTOOL_CAVES_RULE) |
---|
59 | |
---|
60 | # Use the tools built into the package, not the ones that are installed. |
---|
61 | |
---|
62 | INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' |
---|
63 | INTLTOOL_MERGE='$(top_builddir)/intltool-merge' |
---|
64 | INTLTOOL_UPDATE='$(top_builddir)/intltool-update' |
---|
65 | |
---|
66 | AC_SUBST(INTLTOOL_EXTRACT) |
---|
67 | AC_SUBST(INTLTOOL_MERGE) |
---|
68 | AC_SUBST(INTLTOOL_UPDATE) |
---|
69 | |
---|
70 | AC_PATH_PROG(INTLTOOL_PERL, perl) |
---|
71 | if test -z "$INTLTOOL_PERL"; then |
---|
72 | AC_MSG_ERROR([perl not found; required for intltool]) |
---|
73 | fi |
---|
74 | if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then |
---|
75 | AC_MSG_ERROR([perl 5.x required for intltool]) |
---|
76 | fi |
---|
77 | |
---|
78 | # Remove file type tags (using []) from po/POTFILES. |
---|
79 | |
---|
80 | ifdef([AC_DIVERSION_ICMDS],[ |
---|
81 | AC_DIVERT_PUSH(AC_DIVERSION_ICMDS) |
---|
82 | changequote(,) |
---|
83 | mv -f po/POTFILES po/POTFILES.tmp |
---|
84 | sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
85 | rm -f po/POTFILES.tmp |
---|
86 | changequote([,]) |
---|
87 | AC_DIVERT_POP() |
---|
88 | ],[ |
---|
89 | ifdef([AC_CONFIG_COMMANDS_PRE],[ |
---|
90 | AC_CONFIG_COMMANDS_PRE([ |
---|
91 | changequote(,) |
---|
92 | mv -f po/POTFILES po/POTFILES.tmp |
---|
93 | sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
94 | rm -f po/POTFILES.tmp |
---|
95 | changequote([,]) |
---|
96 | ]) |
---|
97 | ]) |
---|
98 | ]) |
---|
99 | |
---|
100 | # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT. |
---|
101 | |
---|
102 | AC_OUTPUT_COMMANDS([ |
---|
103 | |
---|
104 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out |
---|
105 | if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then |
---|
106 | rm -f intltool-extract.out |
---|
107 | else |
---|
108 | mv -f intltool-extract.out intltool-extract |
---|
109 | fi |
---|
110 | chmod ugo+x intltool-extract |
---|
111 | chmod u+w intltool-extract |
---|
112 | |
---|
113 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out |
---|
114 | if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then |
---|
115 | rm -f intltool-merge.out |
---|
116 | else |
---|
117 | mv -f intltool-merge.out intltool-merge |
---|
118 | fi |
---|
119 | chmod ugo+x intltool-merge |
---|
120 | chmod u+w intltool-merge |
---|
121 | |
---|
122 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out |
---|
123 | if cmp -s intltool-update intltool-update.out 2>/dev/null; then |
---|
124 | rm -f intltool-update.out |
---|
125 | else |
---|
126 | mv -f intltool-update.out intltool-update |
---|
127 | fi |
---|
128 | chmod ugo+x intltool-update |
---|
129 | chmod u+w intltool-update |
---|
130 | |
---|
131 | ], INTLTOOL_PERL=${INTLTOOL_PERL}) |
---|
132 | |
---|
133 | ]) |
---|
134 | |
---|
135 | # Macro to add for using GNU gettext. |
---|
136 | # Ulrich Drepper <drepper@cygnus.com>, 1995. |
---|
137 | # |
---|
138 | # Modified to never use included libintl. |
---|
139 | # Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
---|
140 | # |
---|
141 | # |
---|
142 | # This file can be copied and used freely without restrictions. It can |
---|
143 | # be used in projects which are not available under the GNU Public License |
---|
144 | # but which still want to provide support for the GNU gettext functionality. |
---|
145 | # Please note that the actual code is *not* freely available. |
---|
146 | # |
---|
147 | # |
---|
148 | # If you make changes to this file, you MUST update the copy in |
---|
149 | # acinclude.m4. [ aclocal dies on duplicate macros, so if |
---|
150 | # we run 'aclocal -I macros/' then we'll run into problems |
---|
151 | # once we've installed glib-gettext.m4 :-( ] |
---|
152 | # |
---|
153 | |
---|
154 | # serial 5 |
---|
155 | |
---|
156 | AC_DEFUN(AM_GLIB_WITH_NLS, |
---|
157 | dnl NLS is obligatory |
---|
158 | [USE_NLS=yes |
---|
159 | AC_SUBST(USE_NLS) |
---|
160 | |
---|
161 | dnl Figure out what method |
---|
162 | nls_cv_force_use_gnu_gettext="no" |
---|
163 | |
---|
164 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" |
---|
165 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then |
---|
166 | dnl User does not insist on using GNU NLS library. Figure out what |
---|
167 | dnl to use. If gettext or catgets are available (in this order) we |
---|
168 | dnl use this. Else we have to fall back to GNU NLS library. |
---|
169 | dnl catgets is only used if permitted by option --with-catgets. |
---|
170 | nls_cv_header_intl= |
---|
171 | nls_cv_header_libgt= |
---|
172 | CATOBJEXT=NONE |
---|
173 | |
---|
174 | AC_CHECK_HEADER(libintl.h, |
---|
175 | [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, |
---|
176 | [AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")], |
---|
177 | gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)]) |
---|
178 | |
---|
179 | if test "$gt_cv_func_dgettext_libc" != "yes"; then |
---|
180 | AC_CHECK_LIB(intl, bindtextdomain, |
---|
181 | [AC_CACHE_CHECK([for dgettext in libintl], |
---|
182 | gt_cv_func_dgettext_libintl, |
---|
183 | [AC_CHECK_LIB(intl, dgettext, |
---|
184 | gt_cv_func_dgettext_libintl=yes, |
---|
185 | gt_cv_func_dgettext_libintl=no)], |
---|
186 | gt_cv_func_dgettext_libintl=no)]) |
---|
187 | fi |
---|
188 | |
---|
189 | if test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
190 | LIBS="$LIBS -lintl"; |
---|
191 | fi |
---|
192 | |
---|
193 | if test "$gt_cv_func_dgettext_libc" = "yes" \ |
---|
194 | || test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
195 | AC_DEFINE(HAVE_GETTEXT,1, |
---|
196 | [Define if the GNU gettext() function is already present or preinstalled.]) |
---|
197 | AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
---|
198 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
---|
199 | if test "$MSGFMT" != "no"; then |
---|
200 | AC_CHECK_FUNCS(dcgettext) |
---|
201 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
---|
202 | AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
---|
203 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
---|
204 | AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
---|
205 | return _nl_msg_cat_cntr], |
---|
206 | [CATOBJEXT=.gmo |
---|
207 | DATADIRNAME=share], |
---|
208 | [CATOBJEXT=.mo |
---|
209 | DATADIRNAME=lib]) |
---|
210 | INSTOBJEXT=.mo |
---|
211 | fi |
---|
212 | fi |
---|
213 | |
---|
214 | # Added by Martin Baulig 12/15/98 for libc5 systems |
---|
215 | if test "$gt_cv_func_dgettext_libc" != "yes" \ |
---|
216 | && test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
217 | INTLLIBS=-lintl |
---|
218 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` |
---|
219 | fi |
---|
220 | ]) |
---|
221 | |
---|
222 | if test "$CATOBJEXT" = "NONE"; then |
---|
223 | dnl Neither gettext nor catgets in included in the C library. |
---|
224 | dnl Fall back on GNU gettext library. |
---|
225 | nls_cv_use_gnu_gettext=yes |
---|
226 | fi |
---|
227 | fi |
---|
228 | |
---|
229 | if test "$nls_cv_use_gnu_gettext" != "yes"; then |
---|
230 | AC_DEFINE(ENABLE_NLS, 1, |
---|
231 | [always defined to indicate that i18n is enabled]) |
---|
232 | else |
---|
233 | dnl Unset this variable since we use the non-zero value as a flag. |
---|
234 | CATOBJEXT= |
---|
235 | fi |
---|
236 | |
---|
237 | dnl Test whether we really found GNU xgettext. |
---|
238 | if test "$XGETTEXT" != ":"; then |
---|
239 | dnl If it is no GNU xgettext we define it as : so that the |
---|
240 | dnl Makefiles still can work. |
---|
241 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
---|
242 | : ; |
---|
243 | else |
---|
244 | AC_MSG_RESULT( |
---|
245 | [found xgettext program is not GNU xgettext; ignore it]) |
---|
246 | XGETTEXT=":" |
---|
247 | fi |
---|
248 | fi |
---|
249 | |
---|
250 | # We need to process the po/ directory. |
---|
251 | POSUB=po |
---|
252 | |
---|
253 | AC_OUTPUT_COMMANDS( |
---|
254 | [case "$CONFIG_FILES" in *po/Makefile.in*) |
---|
255 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
---|
256 | esac]) |
---|
257 | |
---|
258 | dnl These rules are solely for the distribution goal. While doing this |
---|
259 | dnl we only have to keep exactly one list of the available catalogs |
---|
260 | dnl in configure.in. |
---|
261 | for lang in $ALL_LINGUAS; do |
---|
262 | GMOFILES="$GMOFILES $lang.gmo" |
---|
263 | POFILES="$POFILES $lang.po" |
---|
264 | done |
---|
265 | |
---|
266 | dnl Make all variables we use known to autoconf. |
---|
267 | AC_SUBST(CATALOGS) |
---|
268 | AC_SUBST(CATOBJEXT) |
---|
269 | AC_SUBST(DATADIRNAME) |
---|
270 | AC_SUBST(GMOFILES) |
---|
271 | AC_SUBST(INSTOBJEXT) |
---|
272 | AC_SUBST(INTLDEPS) |
---|
273 | AC_SUBST(INTLLIBS) |
---|
274 | AC_SUBST(INTLOBJS) |
---|
275 | AC_SUBST(POFILES) |
---|
276 | AC_SUBST(POSUB) |
---|
277 | ]) |
---|
278 | |
---|
279 | AC_DEFUN(AM_GLIB_GNU_GETTEXT, |
---|
280 | [AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
---|
281 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
282 | AC_REQUIRE([AC_PROG_RANLIB])dnl |
---|
283 | AC_REQUIRE([AC_HEADER_STDC])dnl |
---|
284 | AC_REQUIRE([AC_C_CONST])dnl |
---|
285 | AC_REQUIRE([AC_C_INLINE])dnl |
---|
286 | AC_REQUIRE([AC_TYPE_OFF_T])dnl |
---|
287 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl |
---|
288 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl |
---|
289 | AC_REQUIRE([AC_FUNC_MMAP])dnl |
---|
290 | |
---|
291 | AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ |
---|
292 | unistd.h sys/param.h]) |
---|
293 | AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ |
---|
294 | strdup __argz_count __argz_stringify __argz_next]) |
---|
295 | |
---|
296 | AM_LC_MESSAGES |
---|
297 | AM_GLIB_WITH_NLS |
---|
298 | |
---|
299 | if test "x$CATOBJEXT" != "x"; then |
---|
300 | if test "x$ALL_LINGUAS" = "x"; then |
---|
301 | LINGUAS= |
---|
302 | else |
---|
303 | AC_MSG_CHECKING(for catalogs to be installed) |
---|
304 | NEW_LINGUAS= |
---|
305 | for lang in ${LINGUAS=$ALL_LINGUAS}; do |
---|
306 | case "$ALL_LINGUAS" in |
---|
307 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; |
---|
308 | esac |
---|
309 | done |
---|
310 | LINGUAS=$NEW_LINGUAS |
---|
311 | AC_MSG_RESULT($LINGUAS) |
---|
312 | fi |
---|
313 | |
---|
314 | dnl Construct list of names of catalog files to be constructed. |
---|
315 | if test -n "$LINGUAS"; then |
---|
316 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
---|
317 | fi |
---|
318 | fi |
---|
319 | |
---|
320 | dnl Determine which catalog format we have (if any is needed) |
---|
321 | dnl For now we know about two different formats: |
---|
322 | dnl Linux libc-5 and the normal X/Open format |
---|
323 | test -d po || mkdir po |
---|
324 | if test "$CATOBJEXT" = ".cat"; then |
---|
325 | AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) |
---|
326 | |
---|
327 | dnl Transform the SED scripts while copying because some dumb SEDs |
---|
328 | dnl cannot handle comments. |
---|
329 | sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed |
---|
330 | fi |
---|
331 | |
---|
332 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
---|
333 | dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
---|
334 | dnl Try to locate is. |
---|
335 | MKINSTALLDIRS= |
---|
336 | # |
---|
337 | # jwz: fuck this! it puts hardcoded pathnames into the generated Makefiles! |
---|
338 | # |
---|
339 | # if test -n "$ac_aux_dir"; then |
---|
340 | # MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
---|
341 | # fi |
---|
342 | if test -z "$MKINSTALLDIRS"; then |
---|
343 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
---|
344 | fi |
---|
345 | |
---|
346 | # jwz: you know what, screw it. Let's just use the version that I |
---|
347 | # already computed in configure.in, instead of this version that came |
---|
348 | # with the i18n crud, ok? |
---|
349 | MKINSTALLDIRS="$INSTALL_DIRS" |
---|
350 | |
---|
351 | |
---|
352 | AC_SUBST(MKINSTALLDIRS) |
---|
353 | |
---|
354 | dnl Generate list of files to be processed by xgettext which will |
---|
355 | dnl be included in po/Makefile. |
---|
356 | test -d po || mkdir po |
---|
357 | if test "x$srcdir" != "x."; then |
---|
358 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
---|
359 | posrcprefix="$srcdir/" |
---|
360 | else |
---|
361 | posrcprefix="../$srcdir/" |
---|
362 | fi |
---|
363 | else |
---|
364 | posrcprefix="../" |
---|
365 | fi |
---|
366 | rm -f po/POTFILES |
---|
367 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
---|
368 | < $srcdir/po/POTFILES.in > po/POTFILES |
---|
369 | ]) |
---|
370 | |
---|
371 | |
---|
372 | # Search path for a program which passes the given test. |
---|
373 | # Ulrich Drepper <drepper@cygnus.com>, 1996. |
---|
374 | # |
---|
375 | # This file can be copied and used freely without restrictions. It can |
---|
376 | # be used in projects which are not available under the GNU Public License |
---|
377 | # but which still want to provide support for the GNU gettext functionality. |
---|
378 | # Please note that the actual code is *not* freely available. |
---|
379 | |
---|
380 | # serial 1 |
---|
381 | |
---|
382 | dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
---|
383 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
---|
384 | AC_DEFUN([AM_PATH_PROG_WITH_TEST], |
---|
385 | [# Extract the first word of "$2", so it can be a program name with args. |
---|
386 | set dummy $2; ac_word=[$]2 |
---|
387 | AC_MSG_CHECKING([for $ac_word]) |
---|
388 | AC_CACHE_VAL(ac_cv_path_$1, |
---|
389 | [case "[$]$1" in |
---|
390 | /*) |
---|
391 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
---|
392 | ;; |
---|
393 | *) |
---|
394 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
---|
395 | for ac_dir in ifelse([$5], , $PATH, [$5]); do |
---|
396 | test -z "$ac_dir" && ac_dir=. |
---|
397 | if test -f $ac_dir/$ac_word; then |
---|
398 | if [$3]; then |
---|
399 | ac_cv_path_$1="$ac_dir/$ac_word" |
---|
400 | break |
---|
401 | fi |
---|
402 | fi |
---|
403 | done |
---|
404 | IFS="$ac_save_ifs" |
---|
405 | dnl If no 4th arg is given, leave the cache variable unset, |
---|
406 | dnl so AC_PATH_PROGS will keep looking. |
---|
407 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
---|
408 | ])dnl |
---|
409 | ;; |
---|
410 | esac])dnl |
---|
411 | $1="$ac_cv_path_$1" |
---|
412 | if test -n "[$]$1"; then |
---|
413 | AC_MSG_RESULT([$]$1) |
---|
414 | else |
---|
415 | AC_MSG_RESULT(no) |
---|
416 | fi |
---|
417 | AC_SUBST($1)dnl |
---|
418 | ]) |
---|
419 | |
---|
420 | # Check whether LC_MESSAGES is available in <locale.h>. |
---|
421 | # Ulrich Drepper <drepper@cygnus.com>, 1995. |
---|
422 | # |
---|
423 | # This file can be copied and used freely without restrictions. It can |
---|
424 | # be used in projects which are not available under the GNU Public License |
---|
425 | # but which still want to provide support for the GNU gettext functionality. |
---|
426 | # Please note that the actual code is *not* freely available. |
---|
427 | |
---|
428 | # serial 2 |
---|
429 | |
---|
430 | AC_DEFUN([AM_LC_MESSAGES], |
---|
431 | [if test $ac_cv_header_locale_h = yes; then |
---|
432 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
---|
433 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
---|
434 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
---|
435 | if test $am_cv_val_LC_MESSAGES = yes; then |
---|
436 | AC_DEFINE(HAVE_LC_MESSAGES, 1, |
---|
437 | [Define if your <locale.h> file defines LC_MESSAGES.]) |
---|
438 | fi |
---|
439 | fi]) |
---|
440 | |
---|