1 | dnl aclocal.m4 generated automatically by aclocal 1.4-p6 |
---|
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 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
---|
14 | |
---|
15 | AC_DEFUN([AM_CONFIG_HEADER], |
---|
16 | [AC_PREREQ([2.12]) |
---|
17 | AC_CONFIG_HEADER([$1]) |
---|
18 | dnl When config.status generates a header, we must update the stamp-h file. |
---|
19 | dnl This file resides in the same directory as the config header |
---|
20 | dnl that is generated. We must strip everything past the first ":", |
---|
21 | dnl and everything past the last "/". |
---|
22 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
---|
23 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
---|
24 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
---|
25 | <<am_indx=1 |
---|
26 | for am_file in <<$1>>; do |
---|
27 | case " <<$>>CONFIG_HEADERS " in |
---|
28 | *" <<$>>am_file "*<<)>> |
---|
29 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
---|
30 | ;; |
---|
31 | esac |
---|
32 | am_indx=`expr "<<$>>am_indx" + 1` |
---|
33 | done<<>>dnl>>) |
---|
34 | changequote([,]))]) |
---|
35 | |
---|
36 | # Do all the work for Automake. This macro actually does too much -- |
---|
37 | # some checks are only needed if your package does certain things. |
---|
38 | # But this isn't really a big deal. |
---|
39 | |
---|
40 | # serial 1 |
---|
41 | |
---|
42 | dnl Usage: |
---|
43 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
44 | |
---|
45 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
46 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
---|
47 | AC_REQUIRE([AC_PROG_INSTALL]) |
---|
48 | PACKAGE=[$1] |
---|
49 | AC_SUBST(PACKAGE) |
---|
50 | VERSION=[$2] |
---|
51 | AC_SUBST(VERSION) |
---|
52 | dnl test to see if srcdir already configured |
---|
53 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
54 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
55 | fi |
---|
56 | ifelse([$3],, |
---|
57 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
58 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
59 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
60 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
61 | dnl FIXME This is truly gross. |
---|
62 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
63 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) |
---|
64 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
65 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) |
---|
66 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
67 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
68 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
69 | |
---|
70 | # Copyright 2002 Free Software Foundation, Inc. |
---|
71 | |
---|
72 | # This program is free software; you can redistribute it and/or modify |
---|
73 | # it under the terms of the GNU General Public License as published by |
---|
74 | # the Free Software Foundation; either version 2, or (at your option) |
---|
75 | # any later version. |
---|
76 | |
---|
77 | # This program is distributed in the hope that it will be useful, |
---|
78 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
79 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
80 | # GNU General Public License for more details. |
---|
81 | |
---|
82 | # You should have received a copy of the GNU General Public License |
---|
83 | # along with this program; if not, write to the Free Software |
---|
84 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
85 | |
---|
86 | # AM_AUTOMAKE_VERSION(VERSION) |
---|
87 | # ---------------------------- |
---|
88 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
---|
89 | # generated from the m4 files accompanying Automake X.Y. |
---|
90 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) |
---|
91 | |
---|
92 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
---|
93 | # ------------------------------- |
---|
94 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
---|
95 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
---|
96 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
---|
97 | [AM_AUTOMAKE_VERSION([1.4-p6])]) |
---|
98 | |
---|
99 | # |
---|
100 | # Check to make sure that the build environment is sane. |
---|
101 | # |
---|
102 | |
---|
103 | AC_DEFUN([AM_SANITY_CHECK], |
---|
104 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
105 | # Just in case |
---|
106 | sleep 1 |
---|
107 | echo timestamp > conftestfile |
---|
108 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
109 | # arguments. Must try -L first in case configure is actually a |
---|
110 | # symlink; some systems play weird games with the mod time of symlinks |
---|
111 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
112 | # directory). |
---|
113 | if ( |
---|
114 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
115 | if test "[$]*" = "X"; then |
---|
116 | # -L didn't work. |
---|
117 | set X `ls -t $srcdir/configure conftestfile` |
---|
118 | fi |
---|
119 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
120 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
121 | |
---|
122 | # If neither matched, then we have a broken ls. This can happen |
---|
123 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
124 | # broken ls alias from the environment. This has actually |
---|
125 | # happened. Such a system could not be considered "sane". |
---|
126 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
127 | alias in your environment]) |
---|
128 | fi |
---|
129 | |
---|
130 | test "[$]2" = conftestfile |
---|
131 | ) |
---|
132 | then |
---|
133 | # Ok. |
---|
134 | : |
---|
135 | else |
---|
136 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
137 | Check your system clock]) |
---|
138 | fi |
---|
139 | rm -f conftest* |
---|
140 | AC_MSG_RESULT(yes)]) |
---|
141 | |
---|
142 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
143 | dnl The program must properly implement --version. |
---|
144 | AC_DEFUN([AM_MISSING_PROG], |
---|
145 | [AC_MSG_CHECKING(for working $2) |
---|
146 | # Run test in a subshell; some versions of sh will print an error if |
---|
147 | # an executable is not found, even if stderr is redirected. |
---|
148 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
149 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
150 | $1=$2 |
---|
151 | AC_MSG_RESULT(found) |
---|
152 | else |
---|
153 | $1="$3/missing $2" |
---|
154 | AC_MSG_RESULT(missing) |
---|
155 | fi |
---|
156 | AC_SUBST($1)]) |
---|
157 | |
---|
158 | # Add --enable-maintainer-mode option to configure. |
---|
159 | # From Jim Meyering |
---|
160 | |
---|
161 | # serial 1 |
---|
162 | |
---|
163 | AC_DEFUN([AM_MAINTAINER_MODE], |
---|
164 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
165 | dnl maintainer-mode is disabled by default |
---|
166 | AC_ARG_ENABLE(maintainer-mode, |
---|
167 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
168 | (and sometimes confusing) to the casual installer], |
---|
169 | USE_MAINTAINER_MODE=$enableval, |
---|
170 | USE_MAINTAINER_MODE=no) |
---|
171 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
172 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
173 | MAINT=$MAINTAINER_MODE_TRUE |
---|
174 | AC_SUBST(MAINT)dnl |
---|
175 | ] |
---|
176 | ) |
---|
177 | |
---|
178 | # Define a conditional. |
---|
179 | |
---|
180 | AC_DEFUN([AM_CONDITIONAL], |
---|
181 | [AC_SUBST($1_TRUE) |
---|
182 | AC_SUBST($1_FALSE) |
---|
183 | if $2; then |
---|
184 | $1_TRUE= |
---|
185 | $1_FALSE='#' |
---|
186 | else |
---|
187 | $1_TRUE='#' |
---|
188 | $1_FALSE= |
---|
189 | fi]) |
---|
190 | |
---|
191 | |
---|
192 | dnl AC_PROG_INTLTOOL([MINIMUM-VERSION]) |
---|
193 | # serial 1 AC_PROG_INTLTOOL |
---|
194 | AC_DEFUN(AC_PROG_INTLTOOL, |
---|
195 | [ |
---|
196 | |
---|
197 | if test -n "$1"; then |
---|
198 | AC_MSG_CHECKING(for intltool >= $1) |
---|
199 | |
---|
200 | INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'` |
---|
201 | INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${srcdir}/intltool-update.in` |
---|
202 | changequote({{,}}) |
---|
203 | INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${srcdir}/intltool-update.in` |
---|
204 | changequote([,]) |
---|
205 | |
---|
206 | if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then |
---|
207 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) |
---|
208 | else |
---|
209 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.]) |
---|
210 | exit 1 |
---|
211 | fi |
---|
212 | fi |
---|
213 | |
---|
214 | 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' |
---|
215 | 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' |
---|
216 | 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' |
---|
217 | INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
218 | INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p' |
---|
219 | 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' |
---|
220 | 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' |
---|
221 | 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' |
---|
222 | 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' |
---|
223 | 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' |
---|
224 | 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' |
---|
225 | 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' |
---|
226 | INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -s -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
227 | INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u -c $(top_builddir)/po/.intltool-merge-cache' |
---|
228 | |
---|
229 | AC_SUBST(INTLTOOL_DESKTOP_RULE) |
---|
230 | AC_SUBST(INTLTOOL_DIRECTORY_RULE) |
---|
231 | AC_SUBST(INTLTOOL_KEYS_RULE) |
---|
232 | AC_SUBST(INTLTOOL_PROP_RULE) |
---|
233 | AC_SUBST(INTLTOOL_OAF_RULE) |
---|
234 | AC_SUBST(INTLTOOL_PONG_RULE) |
---|
235 | AC_SUBST(INTLTOOL_SERVER_RULE) |
---|
236 | AC_SUBST(INTLTOOL_SHEET_RULE) |
---|
237 | AC_SUBST(INTLTOOL_SOUNDLIST_RULE) |
---|
238 | AC_SUBST(INTLTOOL_UI_RULE) |
---|
239 | AC_SUBST(INTLTOOL_XML_RULE) |
---|
240 | AC_SUBST(INTLTOOL_CAVES_RULE) |
---|
241 | AC_SUBST(INTLTOOL_SCHEMAS_RULE) |
---|
242 | AC_SUBST(INTLTOOL_THEME_RULE) |
---|
243 | |
---|
244 | # Use the tools built into the package, not the ones that are installed. |
---|
245 | |
---|
246 | INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' |
---|
247 | INTLTOOL_MERGE='$(top_builddir)/intltool-merge' |
---|
248 | INTLTOOL_UPDATE='$(top_builddir)/intltool-update' |
---|
249 | |
---|
250 | AC_SUBST(INTLTOOL_EXTRACT) |
---|
251 | AC_SUBST(INTLTOOL_MERGE) |
---|
252 | AC_SUBST(INTLTOOL_UPDATE) |
---|
253 | |
---|
254 | AC_PATH_PROG(INTLTOOL_PERL, perl) |
---|
255 | if test -z "$INTLTOOL_PERL"; then |
---|
256 | AC_MSG_ERROR([perl not found; required for intltool]) |
---|
257 | fi |
---|
258 | if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then |
---|
259 | AC_MSG_ERROR([perl 5.x required for intltool]) |
---|
260 | fi |
---|
261 | |
---|
262 | # Remove file type tags (using []) from po/POTFILES. |
---|
263 | |
---|
264 | ifdef([AC_DIVERSION_ICMDS],[ |
---|
265 | AC_DIVERT_PUSH(AC_DIVERSION_ICMDS) |
---|
266 | changequote(,) |
---|
267 | mv -f po/POTFILES po/POTFILES.tmp |
---|
268 | sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
269 | rm -f po/POTFILES.tmp |
---|
270 | changequote([,]) |
---|
271 | AC_DIVERT_POP() |
---|
272 | ],[ |
---|
273 | ifdef([AC_CONFIG_COMMANDS_PRE],[ |
---|
274 | AC_CONFIG_COMMANDS_PRE([ |
---|
275 | changequote(,) |
---|
276 | mv -f po/POTFILES po/POTFILES.tmp |
---|
277 | sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
278 | rm -f po/POTFILES.tmp |
---|
279 | changequote([,]) |
---|
280 | ]) |
---|
281 | ]) |
---|
282 | ]) |
---|
283 | |
---|
284 | # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT. |
---|
285 | |
---|
286 | AC_OUTPUT_COMMANDS([ |
---|
287 | |
---|
288 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out |
---|
289 | if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then |
---|
290 | rm -f intltool-extract.out |
---|
291 | else |
---|
292 | mv -f intltool-extract.out intltool-extract |
---|
293 | fi |
---|
294 | chmod ugo+x intltool-extract |
---|
295 | chmod u+w intltool-extract |
---|
296 | |
---|
297 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out |
---|
298 | if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then |
---|
299 | rm -f intltool-merge.out |
---|
300 | else |
---|
301 | mv -f intltool-merge.out intltool-merge |
---|
302 | fi |
---|
303 | chmod ugo+x intltool-merge |
---|
304 | chmod u+w intltool-merge |
---|
305 | |
---|
306 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out |
---|
307 | if cmp -s intltool-update intltool-update.out 2>/dev/null; then |
---|
308 | rm -f intltool-update.out |
---|
309 | else |
---|
310 | mv -f intltool-update.out intltool-update |
---|
311 | fi |
---|
312 | chmod ugo+x intltool-update |
---|
313 | chmod u+w intltool-update |
---|
314 | |
---|
315 | ], INTLTOOL_PERL=${INTLTOOL_PERL}) |
---|
316 | |
---|
317 | ]) |
---|
318 | |
---|
319 | # Macro to add for using GNU gettext. |
---|
320 | # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 |
---|
321 | # |
---|
322 | # Modified to never use included libintl. |
---|
323 | # Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
---|
324 | # |
---|
325 | # Major rework to remove unused code |
---|
326 | # Owen Taylor <otaylor@redhat.com>, 12/11/2002 |
---|
327 | # |
---|
328 | # This file can be copied and used freely without restrictions. It can |
---|
329 | # be used in projects which are not available under the GNU Public License |
---|
330 | # but which still want to provide support for the GNU gettext functionality. |
---|
331 | # |
---|
332 | |
---|
333 | # |
---|
334 | # We need this here as well, since someone might use autoconf-2.5x |
---|
335 | # to configure GLib then an older version to configure a package |
---|
336 | # using AM_GLIB_GNU_GETTEXT |
---|
337 | AC_PREREQ(2.53) |
---|
338 | |
---|
339 | dnl |
---|
340 | dnl We go to great lengths to make sure that aclocal won't |
---|
341 | dnl try to pull in the installed version of these macros |
---|
342 | dnl when running aclocal in the glib directory. |
---|
343 | dnl |
---|
344 | m4_copy([AC_DEFUN],[glib_DEFUN]) |
---|
345 | m4_copy([AC_REQUIRE],[glib_REQUIRE]) |
---|
346 | dnl |
---|
347 | dnl At the end, if we're not within glib, we'll define the public |
---|
348 | dnl definitions in terms of our private definitions. |
---|
349 | dnl |
---|
350 | |
---|
351 | # GLIB_LC_MESSAGES |
---|
352 | #-------------------- |
---|
353 | glib_DEFUN([GLIB_LC_MESSAGES], |
---|
354 | [AC_CHECK_HEADERS([locale.h]) |
---|
355 | if test $ac_cv_header_locale_h = yes; then |
---|
356 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
---|
357 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
---|
358 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
---|
359 | if test $am_cv_val_LC_MESSAGES = yes; then |
---|
360 | AC_DEFINE(HAVE_LC_MESSAGES, 1, |
---|
361 | [Define if your <locale.h> file defines LC_MESSAGES.]) |
---|
362 | fi |
---|
363 | fi]) |
---|
364 | |
---|
365 | # GLIB_PATH_PROG_WITH_TEST |
---|
366 | #---------------------------- |
---|
367 | dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
---|
368 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
---|
369 | glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], |
---|
370 | [# Extract the first word of "$2", so it can be a program name with args. |
---|
371 | set dummy $2; ac_word=[$]2 |
---|
372 | AC_MSG_CHECKING([for $ac_word]) |
---|
373 | AC_CACHE_VAL(ac_cv_path_$1, |
---|
374 | [case "[$]$1" in |
---|
375 | /*) |
---|
376 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
---|
377 | ;; |
---|
378 | *) |
---|
379 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
---|
380 | for ac_dir in ifelse([$5], , $PATH, [$5]); do |
---|
381 | test -z "$ac_dir" && ac_dir=. |
---|
382 | if test -f $ac_dir/$ac_word; then |
---|
383 | if [$3]; then |
---|
384 | ac_cv_path_$1="$ac_dir/$ac_word" |
---|
385 | break |
---|
386 | fi |
---|
387 | fi |
---|
388 | done |
---|
389 | IFS="$ac_save_ifs" |
---|
390 | dnl If no 4th arg is given, leave the cache variable unset, |
---|
391 | dnl so AC_PATH_PROGS will keep looking. |
---|
392 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
---|
393 | ])dnl |
---|
394 | ;; |
---|
395 | esac])dnl |
---|
396 | $1="$ac_cv_path_$1" |
---|
397 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
---|
398 | AC_MSG_RESULT([$]$1) |
---|
399 | else |
---|
400 | AC_MSG_RESULT(no) |
---|
401 | fi |
---|
402 | AC_SUBST($1)dnl |
---|
403 | ]) |
---|
404 | |
---|
405 | # GLIB_WITH_NLS |
---|
406 | #----------------- |
---|
407 | glib_DEFUN([GLIB_WITH_NLS], |
---|
408 | dnl NLS is obligatory |
---|
409 | [USE_NLS=yes |
---|
410 | AC_SUBST(USE_NLS) |
---|
411 | |
---|
412 | gt_cv_have_gettext=no |
---|
413 | |
---|
414 | CATOBJEXT=NONE |
---|
415 | XGETTEXT=: |
---|
416 | INTLLIBS= |
---|
417 | |
---|
418 | AC_CHECK_HEADER(libintl.h, |
---|
419 | [gt_cv_func_dgettext_libintl="no" |
---|
420 | libintl_extra_libs="" |
---|
421 | |
---|
422 | # |
---|
423 | # First check in libc |
---|
424 | # |
---|
425 | AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, |
---|
426 | [AC_TRY_LINK([ |
---|
427 | #include <libintl.h> |
---|
428 | ], |
---|
429 | [return (int) dgettext ("","")], |
---|
430 | gt_cv_func_dgettext_libc=yes, |
---|
431 | gt_cv_func_dgettext_libc=no) |
---|
432 | ]) |
---|
433 | |
---|
434 | if test "$gt_cv_func_dgettext_libc" = "yes" ; then |
---|
435 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
436 | fi |
---|
437 | |
---|
438 | # |
---|
439 | # If we don't have everything we want, check in libintl |
---|
440 | # |
---|
441 | if test "$gt_cv_func_dgettext_libc" != "yes" \ |
---|
442 | || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then |
---|
443 | |
---|
444 | AC_CHECK_LIB(intl, bindtextdomain, |
---|
445 | [AC_CHECK_LIB(intl, dgettext, |
---|
446 | gt_cv_func_dgettext_libintl=yes)]) |
---|
447 | |
---|
448 | if test "$gt_cv_func_dgettext_libintl" != "yes" ; then |
---|
449 | AC_MSG_CHECKING([if -liconv is needed to use gettext]) |
---|
450 | AC_MSG_RESULT([]) |
---|
451 | AC_CHECK_LIB(intl, dcgettext, |
---|
452 | [gt_cv_func_dgettext_libintl=yes |
---|
453 | libintl_extra_libs=-liconv], |
---|
454 | :,-liconv) |
---|
455 | fi |
---|
456 | |
---|
457 | # |
---|
458 | # If we found libintl, then check in it for bind_textdomain_codeset(); |
---|
459 | # we'll prefer libc if neither have bind_textdomain_codeset(), |
---|
460 | # and both have dgettext |
---|
461 | # |
---|
462 | if test "$gt_cv_func_dgettext_libintl" = "yes" ; then |
---|
463 | glib_save_LIBS="$LIBS" |
---|
464 | LIBS="$LIBS -lintl $libintl_extra_libs" |
---|
465 | unset ac_cv_func_bind_textdomain_codeset |
---|
466 | AC_CHECK_FUNCS(bind_textdomain_codeset) |
---|
467 | LIBS="$glib_save_LIBS" |
---|
468 | |
---|
469 | if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then |
---|
470 | gt_cv_func_dgettext_libc=no |
---|
471 | else |
---|
472 | if test "$gt_cv_func_dgettext_libc" = "yes"; then |
---|
473 | gt_cv_func_dgettext_libintl=no |
---|
474 | fi |
---|
475 | fi |
---|
476 | fi |
---|
477 | fi |
---|
478 | |
---|
479 | if test "$gt_cv_func_dgettext_libc" = "yes" \ |
---|
480 | || test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
481 | gt_cv_have_gettext=yes |
---|
482 | fi |
---|
483 | |
---|
484 | if test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
485 | INTLLIBS="-lintl $libintl_extra_libs" |
---|
486 | fi |
---|
487 | |
---|
488 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
489 | AC_DEFINE(HAVE_GETTEXT,1, |
---|
490 | [Define if the GNU gettext() function is already present or preinstalled.]) |
---|
491 | GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
---|
492 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
---|
493 | if test "$MSGFMT" != "no"; then |
---|
494 | AC_CHECK_FUNCS(dcgettext) |
---|
495 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
---|
496 | GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
---|
497 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
---|
498 | AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
---|
499 | return _nl_msg_cat_cntr], |
---|
500 | [CATOBJEXT=.gmo |
---|
501 | DATADIRNAME=share], |
---|
502 | [CATOBJEXT=.mo |
---|
503 | DATADIRNAME=lib]) |
---|
504 | INSTOBJEXT=.mo |
---|
505 | fi |
---|
506 | fi |
---|
507 | ]) |
---|
508 | |
---|
509 | if test "$gt_cv_have_gettext" = "yes" ; then |
---|
510 | AC_DEFINE(ENABLE_NLS, 1, |
---|
511 | [always defined to indicate that i18n is enabled]) |
---|
512 | fi |
---|
513 | |
---|
514 | dnl Test whether we really found GNU xgettext. |
---|
515 | if test "$XGETTEXT" != ":"; then |
---|
516 | dnl If it is not GNU xgettext we define it as : so that the |
---|
517 | dnl Makefiles still can work. |
---|
518 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
---|
519 | : ; |
---|
520 | else |
---|
521 | AC_MSG_RESULT( |
---|
522 | [found xgettext program is not GNU xgettext; ignore it]) |
---|
523 | XGETTEXT=":" |
---|
524 | fi |
---|
525 | fi |
---|
526 | |
---|
527 | # We need to process the po/ directory. |
---|
528 | POSUB=po |
---|
529 | |
---|
530 | AC_OUTPUT_COMMANDS( |
---|
531 | [case "$CONFIG_FILES" in *po/Makefile.in*) |
---|
532 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
---|
533 | esac]) |
---|
534 | |
---|
535 | dnl These rules are solely for the distribution goal. While doing this |
---|
536 | dnl we only have to keep exactly one list of the available catalogs |
---|
537 | dnl in configure.in. |
---|
538 | for lang in $ALL_LINGUAS; do |
---|
539 | GMOFILES="$GMOFILES $lang.gmo" |
---|
540 | POFILES="$POFILES $lang.po" |
---|
541 | done |
---|
542 | |
---|
543 | dnl Make all variables we use known to autoconf. |
---|
544 | AC_SUBST(CATALOGS) |
---|
545 | AC_SUBST(CATOBJEXT) |
---|
546 | AC_SUBST(DATADIRNAME) |
---|
547 | AC_SUBST(GMOFILES) |
---|
548 | AC_SUBST(INSTOBJEXT) |
---|
549 | AC_SUBST(INTLLIBS) |
---|
550 | AC_SUBST(PO_IN_DATADIR_TRUE) |
---|
551 | AC_SUBST(PO_IN_DATADIR_FALSE) |
---|
552 | AC_SUBST(POFILES) |
---|
553 | AC_SUBST(POSUB) |
---|
554 | ]) |
---|
555 | |
---|
556 | # AM_GLIB_GNU_GETTEXT |
---|
557 | # ------------------- |
---|
558 | # Do checks necessary for use of gettext. If a suitable implementation |
---|
559 | # of gettext is found in either in libintl or in the C library, |
---|
560 | # it will set INTLLIBS to the libraries needed for use of gettext |
---|
561 | # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable |
---|
562 | # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() |
---|
563 | # on various variables needed by the Makefile.in.in installed by |
---|
564 | # glib-gettextize. |
---|
565 | dnl |
---|
566 | glib_DEFUN(GLIB_GNU_GETTEXT, |
---|
567 | [AC_REQUIRE([AC_PROG_CC])dnl |
---|
568 | AC_REQUIRE([AC_HEADER_STDC])dnl |
---|
569 | |
---|
570 | GLIB_LC_MESSAGES |
---|
571 | GLIB_WITH_NLS |
---|
572 | |
---|
573 | if test "$gt_cv_have_gettext" = "yes"; then |
---|
574 | if test "x$ALL_LINGUAS" = "x"; then |
---|
575 | LINGUAS= |
---|
576 | else |
---|
577 | AC_MSG_CHECKING(for catalogs to be installed) |
---|
578 | NEW_LINGUAS= |
---|
579 | for lang in ${LINGUAS=$ALL_LINGUAS}; do |
---|
580 | case "$ALL_LINGUAS" in |
---|
581 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; |
---|
582 | esac |
---|
583 | done |
---|
584 | LINGUAS=$NEW_LINGUAS |
---|
585 | AC_MSG_RESULT($LINGUAS) |
---|
586 | fi |
---|
587 | |
---|
588 | dnl Construct list of names of catalog files to be constructed. |
---|
589 | if test -n "$LINGUAS"; then |
---|
590 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
---|
591 | fi |
---|
592 | fi |
---|
593 | |
---|
594 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
---|
595 | dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
---|
596 | dnl Try to locate is. |
---|
597 | MKINSTALLDIRS= |
---|
598 | if test -n "$ac_aux_dir"; then |
---|
599 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
---|
600 | fi |
---|
601 | if test -z "$MKINSTALLDIRS"; then |
---|
602 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
---|
603 | fi |
---|
604 | AC_SUBST(MKINSTALLDIRS) |
---|
605 | |
---|
606 | dnl Generate list of files to be processed by xgettext which will |
---|
607 | dnl be included in po/Makefile. |
---|
608 | test -d po || mkdir po |
---|
609 | if test "x$srcdir" != "x."; then |
---|
610 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
---|
611 | posrcprefix="$srcdir/" |
---|
612 | else |
---|
613 | posrcprefix="../$srcdir/" |
---|
614 | fi |
---|
615 | else |
---|
616 | posrcprefix="../" |
---|
617 | fi |
---|
618 | rm -f po/POTFILES |
---|
619 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
---|
620 | < $srcdir/po/POTFILES.in > po/POTFILES |
---|
621 | ]) |
---|
622 | |
---|
623 | # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) |
---|
624 | # ------------------------------- |
---|
625 | # Define VARIABLE to the location where catalog files will |
---|
626 | # be installed by po/Makefile. |
---|
627 | glib_DEFUN(GLIB_DEFINE_LOCALEDIR, |
---|
628 | [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl |
---|
629 | glib_save_prefix="$prefix" |
---|
630 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
---|
631 | if test "x$CATOBJEXT" = "x.mo" ; then |
---|
632 | localedir=`eval echo "${libdir}/locale"` |
---|
633 | else |
---|
634 | localedir=`eval echo "${datadir}/locale"` |
---|
635 | fi |
---|
636 | prefix="$glib_save_prefix" |
---|
637 | AC_DEFINE_UNQUOTED($1, "$localedir", |
---|
638 | [Define the location where the catalogs will be installed]) |
---|
639 | ]) |
---|
640 | |
---|
641 | dnl |
---|
642 | dnl Now the definitions that aclocal will find |
---|
643 | dnl |
---|
644 | ifdef(glib_configure_in,[],[ |
---|
645 | AC_DEFUN(AM_GLIB_GNU_GETTEXT,[GLIB_GNU_GETTEXT($@)]) |
---|
646 | AC_DEFUN(AM_GLIB_DEFINE_LOCALEDIR,[GLIB_DEFINE_LOCALEDIR($@)]) |
---|
647 | ])dnl |
---|
648 | |
---|