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 | # Do all the work for Automake. This macro actually does too much -- |
---|
14 | # some checks are only needed if your package does certain things. |
---|
15 | # But this isn't really a big deal. |
---|
16 | |
---|
17 | # serial 1 |
---|
18 | |
---|
19 | dnl Usage: |
---|
20 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
21 | |
---|
22 | AC_DEFUN([AM_INIT_AUTOMAKE], |
---|
23 | [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
---|
24 | AC_REQUIRE([AC_PROG_INSTALL]) |
---|
25 | PACKAGE=[$1] |
---|
26 | AC_SUBST(PACKAGE) |
---|
27 | VERSION=[$2] |
---|
28 | AC_SUBST(VERSION) |
---|
29 | dnl test to see if srcdir already configured |
---|
30 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
31 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
32 | fi |
---|
33 | ifelse([$3],, |
---|
34 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
35 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
36 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
37 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
38 | dnl FIXME This is truly gross. |
---|
39 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
40 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) |
---|
41 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
42 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) |
---|
43 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
44 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
45 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
46 | |
---|
47 | # Copyright 2002 Free Software Foundation, Inc. |
---|
48 | |
---|
49 | # This program is free software; you can redistribute it and/or modify |
---|
50 | # it under the terms of the GNU General Public License as published by |
---|
51 | # the Free Software Foundation; either version 2, or (at your option) |
---|
52 | # any later version. |
---|
53 | |
---|
54 | # This program is distributed in the hope that it will be useful, |
---|
55 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
56 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
57 | # GNU General Public License for more details. |
---|
58 | |
---|
59 | # You should have received a copy of the GNU General Public License |
---|
60 | # along with this program; if not, write to the Free Software |
---|
61 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
---|
62 | |
---|
63 | # AM_AUTOMAKE_VERSION(VERSION) |
---|
64 | # ---------------------------- |
---|
65 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
---|
66 | # generated from the m4 files accompanying Automake X.Y. |
---|
67 | AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) |
---|
68 | |
---|
69 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
---|
70 | # ------------------------------- |
---|
71 | # Call AM_AUTOMAKE_VERSION so it can be traced. |
---|
72 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. |
---|
73 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
---|
74 | [AM_AUTOMAKE_VERSION([1.4-p6])]) |
---|
75 | |
---|
76 | # |
---|
77 | # Check to make sure that the build environment is sane. |
---|
78 | # |
---|
79 | |
---|
80 | AC_DEFUN([AM_SANITY_CHECK], |
---|
81 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
82 | # Just in case |
---|
83 | sleep 1 |
---|
84 | echo timestamp > conftestfile |
---|
85 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
86 | # arguments. Must try -L first in case configure is actually a |
---|
87 | # symlink; some systems play weird games with the mod time of symlinks |
---|
88 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
89 | # directory). |
---|
90 | if ( |
---|
91 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
92 | if test "[$]*" = "X"; then |
---|
93 | # -L didn't work. |
---|
94 | set X `ls -t $srcdir/configure conftestfile` |
---|
95 | fi |
---|
96 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
97 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
98 | |
---|
99 | # If neither matched, then we have a broken ls. This can happen |
---|
100 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
101 | # broken ls alias from the environment. This has actually |
---|
102 | # happened. Such a system could not be considered "sane". |
---|
103 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
104 | alias in your environment]) |
---|
105 | fi |
---|
106 | |
---|
107 | test "[$]2" = conftestfile |
---|
108 | ) |
---|
109 | then |
---|
110 | # Ok. |
---|
111 | : |
---|
112 | else |
---|
113 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
114 | Check your system clock]) |
---|
115 | fi |
---|
116 | rm -f conftest* |
---|
117 | AC_MSG_RESULT(yes)]) |
---|
118 | |
---|
119 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
120 | dnl The program must properly implement --version. |
---|
121 | AC_DEFUN([AM_MISSING_PROG], |
---|
122 | [AC_MSG_CHECKING(for working $2) |
---|
123 | # Run test in a subshell; some versions of sh will print an error if |
---|
124 | # an executable is not found, even if stderr is redirected. |
---|
125 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
126 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
127 | $1=$2 |
---|
128 | AC_MSG_RESULT(found) |
---|
129 | else |
---|
130 | $1="$3/missing $2" |
---|
131 | AC_MSG_RESULT(missing) |
---|
132 | fi |
---|
133 | AC_SUBST($1)]) |
---|
134 | |
---|
135 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
---|
136 | |
---|
137 | AC_DEFUN([AM_CONFIG_HEADER], |
---|
138 | [AC_PREREQ([2.12]) |
---|
139 | AC_CONFIG_HEADER([$1]) |
---|
140 | dnl When config.status generates a header, we must update the stamp-h file. |
---|
141 | dnl This file resides in the same directory as the config header |
---|
142 | dnl that is generated. We must strip everything past the first ":", |
---|
143 | dnl and everything past the last "/". |
---|
144 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
---|
145 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
---|
146 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
---|
147 | <<am_indx=1 |
---|
148 | for am_file in <<$1>>; do |
---|
149 | case " <<$>>CONFIG_HEADERS " in |
---|
150 | *" <<$>>am_file "*<<)>> |
---|
151 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
---|
152 | ;; |
---|
153 | esac |
---|
154 | am_indx=`expr "<<$>>am_indx" + 1` |
---|
155 | done<<>>dnl>>) |
---|
156 | changequote([,]))]) |
---|
157 | |
---|
158 | |
---|
159 | dnl AC_PROG_INTLTOOL([MINIMUM-VERSION]) |
---|
160 | # serial 1 AC_PROG_INTLTOOL |
---|
161 | AC_DEFUN(AC_PROG_INTLTOOL, |
---|
162 | [ |
---|
163 | |
---|
164 | if test -n "$1"; then |
---|
165 | AC_MSG_CHECKING(for intltool >= $1) |
---|
166 | |
---|
167 | INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'` |
---|
168 | INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }' < ${srcdir}/intltool-update.in` |
---|
169 | changequote({{,}}) |
---|
170 | INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${srcdir}/intltool-update.in` |
---|
171 | changequote([,]) |
---|
172 | |
---|
173 | if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then |
---|
174 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) |
---|
175 | else |
---|
176 | AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old. You need intltool $1 or later.]) |
---|
177 | exit 1 |
---|
178 | fi |
---|
179 | fi |
---|
180 | |
---|
181 | 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' |
---|
182 | 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' |
---|
183 | 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' |
---|
184 | 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' |
---|
185 | INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -o -p' |
---|
186 | 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' |
---|
187 | 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' |
---|
188 | 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' |
---|
189 | 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' |
---|
190 | 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' |
---|
191 | 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' |
---|
192 | 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' |
---|
193 | 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' |
---|
194 | 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' |
---|
195 | |
---|
196 | AC_SUBST(INTLTOOL_DESKTOP_RULE) |
---|
197 | AC_SUBST(INTLTOOL_DIRECTORY_RULE) |
---|
198 | AC_SUBST(INTLTOOL_KEYS_RULE) |
---|
199 | AC_SUBST(INTLTOOL_PROP_RULE) |
---|
200 | AC_SUBST(INTLTOOL_OAF_RULE) |
---|
201 | AC_SUBST(INTLTOOL_PONG_RULE) |
---|
202 | AC_SUBST(INTLTOOL_SERVER_RULE) |
---|
203 | AC_SUBST(INTLTOOL_SHEET_RULE) |
---|
204 | AC_SUBST(INTLTOOL_SOUNDLIST_RULE) |
---|
205 | AC_SUBST(INTLTOOL_UI_RULE) |
---|
206 | AC_SUBST(INTLTOOL_XML_RULE) |
---|
207 | AC_SUBST(INTLTOOL_CAVES_RULE) |
---|
208 | AC_SUBST(INTLTOOL_SCHEMAS_RULE) |
---|
209 | AC_SUBST(INTLTOOL_THEME_RULE) |
---|
210 | |
---|
211 | # Use the tools built into the package, not the ones that are installed. |
---|
212 | |
---|
213 | INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' |
---|
214 | INTLTOOL_MERGE='$(top_builddir)/intltool-merge' |
---|
215 | INTLTOOL_UPDATE='$(top_builddir)/intltool-update' |
---|
216 | |
---|
217 | AC_SUBST(INTLTOOL_EXTRACT) |
---|
218 | AC_SUBST(INTLTOOL_MERGE) |
---|
219 | AC_SUBST(INTLTOOL_UPDATE) |
---|
220 | |
---|
221 | AC_PATH_PROG(INTLTOOL_PERL, perl) |
---|
222 | if test -z "$INTLTOOL_PERL"; then |
---|
223 | AC_MSG_ERROR([perl not found; required for intltool]) |
---|
224 | fi |
---|
225 | if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then |
---|
226 | AC_MSG_ERROR([perl 5.x required for intltool]) |
---|
227 | fi |
---|
228 | |
---|
229 | # Remove file type tags (using []) from po/POTFILES. |
---|
230 | |
---|
231 | ifdef([AC_DIVERSION_ICMDS],[ |
---|
232 | AC_DIVERT_PUSH(AC_DIVERSION_ICMDS) |
---|
233 | changequote(,) |
---|
234 | mv -f po/POTFILES po/POTFILES.tmp |
---|
235 | sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
236 | rm -f po/POTFILES.tmp |
---|
237 | changequote([,]) |
---|
238 | AC_DIVERT_POP() |
---|
239 | ],[ |
---|
240 | ifdef([AC_CONFIG_COMMANDS_PRE],[ |
---|
241 | AC_CONFIG_COMMANDS_PRE([ |
---|
242 | changequote(,) |
---|
243 | mv -f po/POTFILES po/POTFILES.tmp |
---|
244 | sed -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES |
---|
245 | rm -f po/POTFILES.tmp |
---|
246 | changequote([,]) |
---|
247 | ]) |
---|
248 | ]) |
---|
249 | ]) |
---|
250 | |
---|
251 | # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT. |
---|
252 | |
---|
253 | AC_OUTPUT_COMMANDS([ |
---|
254 | |
---|
255 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-extract.in > intltool-extract.out |
---|
256 | if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then |
---|
257 | rm -f intltool-extract.out |
---|
258 | else |
---|
259 | mv -f intltool-extract.out intltool-extract |
---|
260 | fi |
---|
261 | chmod ugo+x intltool-extract |
---|
262 | chmod u+w intltool-extract |
---|
263 | |
---|
264 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-merge.in > intltool-merge.out |
---|
265 | if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then |
---|
266 | rm -f intltool-merge.out |
---|
267 | else |
---|
268 | mv -f intltool-merge.out intltool-merge |
---|
269 | fi |
---|
270 | chmod ugo+x intltool-merge |
---|
271 | chmod u+w intltool-merge |
---|
272 | |
---|
273 | sed -e "s:@INTLTOOL_PERL@:${INTLTOOL_PERL}:;" < ${srcdir}/intltool-update.in > intltool-update.out |
---|
274 | if cmp -s intltool-update intltool-update.out 2>/dev/null; then |
---|
275 | rm -f intltool-update.out |
---|
276 | else |
---|
277 | mv -f intltool-update.out intltool-update |
---|
278 | fi |
---|
279 | chmod ugo+x intltool-update |
---|
280 | chmod u+w intltool-update |
---|
281 | |
---|
282 | ], INTLTOOL_PERL=${INTLTOOL_PERL}) |
---|
283 | |
---|
284 | ]) |
---|
285 | |
---|
286 | # isc-posix.m4 serial 2 (gettext-0.11.2) |
---|
287 | dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. |
---|
288 | dnl This file is free software, distributed under the terms of the GNU |
---|
289 | dnl General Public License. As a special exception to the GNU General |
---|
290 | dnl Public License, this file may be distributed as part of a program |
---|
291 | dnl that contains a configuration script generated by Autoconf, under |
---|
292 | dnl the same distribution terms as the rest of that program. |
---|
293 | |
---|
294 | # This file is not needed with autoconf-2.53 and newer. Remove it in 2005. |
---|
295 | |
---|
296 | # This test replaces the one in autoconf. |
---|
297 | # Currently this macro should have the same name as the autoconf macro |
---|
298 | # because gettext's gettext.m4 (distributed in the automake package) |
---|
299 | # still uses it. Otherwise, the use in gettext.m4 makes autoheader |
---|
300 | # give these diagnostics: |
---|
301 | # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX |
---|
302 | # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX |
---|
303 | |
---|
304 | undefine([AC_ISC_POSIX]) |
---|
305 | |
---|
306 | AC_DEFUN([AC_ISC_POSIX], |
---|
307 | [ |
---|
308 | dnl This test replaces the obsolescent AC_ISC_POSIX kludge. |
---|
309 | AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) |
---|
310 | ] |
---|
311 | ) |
---|
312 | |
---|
313 | |
---|
314 | # serial 1 |
---|
315 | |
---|
316 | # @defmac AC_PROG_CC_STDC |
---|
317 | # @maindex PROG_CC_STDC |
---|
318 | # @ovindex CC |
---|
319 | # If the C compiler in not in ANSI C mode by default, try to add an option |
---|
320 | # to output variable @code{CC} to make it so. This macro tries various |
---|
321 | # options that select ANSI C on some system or another. It considers the |
---|
322 | # compiler to be in ANSI C mode if it handles function prototypes correctly. |
---|
323 | # |
---|
324 | # If you use this macro, you should check after calling it whether the C |
---|
325 | # compiler has been set to accept ANSI C; if not, the shell variable |
---|
326 | # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source |
---|
327 | # code in ANSI C, you can make an un-ANSIfied copy of it by using the |
---|
328 | # program @code{ansi2knr}, which comes with Ghostscript. |
---|
329 | # @end defmac |
---|
330 | |
---|
331 | AC_DEFUN([AM_PROG_CC_STDC], |
---|
332 | [AC_REQUIRE([AC_PROG_CC]) |
---|
333 | AC_BEFORE([$0], [AC_C_INLINE]) |
---|
334 | AC_BEFORE([$0], [AC_C_CONST]) |
---|
335 | dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require |
---|
336 | dnl a magic option to avoid problems with ANSI preprocessor commands |
---|
337 | dnl like #elif. |
---|
338 | dnl FIXME: can't do this because then AC_AIX won't work due to a |
---|
339 | dnl circular dependency. |
---|
340 | dnl AC_BEFORE([$0], [AC_PROG_CPP]) |
---|
341 | AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) |
---|
342 | AC_CACHE_VAL(am_cv_prog_cc_stdc, |
---|
343 | [am_cv_prog_cc_stdc=no |
---|
344 | ac_save_CC="$CC" |
---|
345 | # Don't try gcc -ansi; that turns off useful extensions and |
---|
346 | # breaks some systems' header files. |
---|
347 | # AIX -qlanglvl=ansi |
---|
348 | # Ultrix and OSF/1 -std1 |
---|
349 | # HP-UX -Aa -D_HPUX_SOURCE |
---|
350 | # SVR4 -Xc -D__EXTENSIONS__ |
---|
351 | for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
---|
352 | do |
---|
353 | CC="$ac_save_CC $ac_arg" |
---|
354 | AC_TRY_COMPILE( |
---|
355 | [#include <stdarg.h> |
---|
356 | #include <stdio.h> |
---|
357 | #include <sys/types.h> |
---|
358 | #include <sys/stat.h> |
---|
359 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
---|
360 | struct buf { int x; }; |
---|
361 | FILE * (*rcsopen) (struct buf *, struct stat *, int); |
---|
362 | static char *e (p, i) |
---|
363 | char **p; |
---|
364 | int i; |
---|
365 | { |
---|
366 | return p[i]; |
---|
367 | } |
---|
368 | static char *f (char * (*g) (char **, int), char **p, ...) |
---|
369 | { |
---|
370 | char *s; |
---|
371 | va_list v; |
---|
372 | va_start (v,p); |
---|
373 | s = g (p, va_arg (v,int)); |
---|
374 | va_end (v); |
---|
375 | return s; |
---|
376 | } |
---|
377 | int test (int i, double x); |
---|
378 | struct s1 {int (*f) (int a);}; |
---|
379 | struct s2 {int (*f) (double a);}; |
---|
380 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); |
---|
381 | int argc; |
---|
382 | char **argv; |
---|
383 | ], [ |
---|
384 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
---|
385 | ], |
---|
386 | [am_cv_prog_cc_stdc="$ac_arg"; break]) |
---|
387 | done |
---|
388 | CC="$ac_save_CC" |
---|
389 | ]) |
---|
390 | if test -z "$am_cv_prog_cc_stdc"; then |
---|
391 | AC_MSG_RESULT([none needed]) |
---|
392 | else |
---|
393 | AC_MSG_RESULT($am_cv_prog_cc_stdc) |
---|
394 | fi |
---|
395 | case "x$am_cv_prog_cc_stdc" in |
---|
396 | x|xno) ;; |
---|
397 | *) CC="$CC $am_cv_prog_cc_stdc" ;; |
---|
398 | esac |
---|
399 | ]) |
---|
400 | |
---|
401 | dnl GNOME_COMPILE_WARNINGS |
---|
402 | dnl Turn on many useful compiler warnings |
---|
403 | dnl For now, only works on GCC |
---|
404 | AC_DEFUN([GNOME_COMPILE_WARNINGS],[ |
---|
405 | dnl ****************************** |
---|
406 | dnl More compiler warnings |
---|
407 | dnl ****************************** |
---|
408 | |
---|
409 | if test -z "$1" ; then |
---|
410 | default_compile_warnings=no |
---|
411 | else |
---|
412 | default_compile_warnings="$1" |
---|
413 | fi |
---|
414 | |
---|
415 | AC_ARG_ENABLE(compile-warnings, |
---|
416 | [ --enable-compile-warnings=[no/minimum/yes/maximum/error] Turn on compiler warnings.], [enable_compile_warnings="$default_compile_warnings"], enable_compile_warnings=yes) |
---|
417 | |
---|
418 | warnCFLAGS= |
---|
419 | if test "x$GCC" != xyes; then |
---|
420 | enable_compile_warnings=no |
---|
421 | fi |
---|
422 | |
---|
423 | warning_flags= |
---|
424 | realsave_CFLAGS="$CFLAGS" |
---|
425 | |
---|
426 | case "$enable_compile_warnings" in |
---|
427 | no) |
---|
428 | warning_flags= |
---|
429 | ;; |
---|
430 | minimum) |
---|
431 | warning_flags="-Wall -Wunused" |
---|
432 | ;; |
---|
433 | yes) |
---|
434 | warning_flags="-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations" |
---|
435 | ;; |
---|
436 | maximum|error) |
---|
437 | warning_flags="-Wall -Wunused -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith" |
---|
438 | CFLAGS="$warning_flags $CFLAGS" |
---|
439 | for option in -Wsign-promo -Wno-sign-compare; do |
---|
440 | SAVE_CFLAGS="$CFLAGS" |
---|
441 | CFLAGS="$CFLAGS $option" |
---|
442 | AC_MSG_CHECKING([whether gcc understands $option]) |
---|
443 | AC_TRY_COMPILE([], [], |
---|
444 | has_option=yes, |
---|
445 | has_option=no,) |
---|
446 | CFLAGS="$SAVE_CFLAGS" |
---|
447 | AC_MSG_RESULT($has_option) |
---|
448 | if test $has_option = yes; then |
---|
449 | warning_flags="$warning_flags $option" |
---|
450 | fi |
---|
451 | unset has_option |
---|
452 | unset SAVE_CFLAGS |
---|
453 | done |
---|
454 | unset option |
---|
455 | if test "$enable_compile_warnings" = "error" ; then |
---|
456 | warning_flags="$warning_flags -Werror" |
---|
457 | fi |
---|
458 | ;; |
---|
459 | *) |
---|
460 | AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) |
---|
461 | ;; |
---|
462 | esac |
---|
463 | CFLAGS="$realsave_CFLAGS" |
---|
464 | AC_MSG_CHECKING(what warning flags to pass to the C compiler) |
---|
465 | AC_MSG_RESULT($warning_flags) |
---|
466 | |
---|
467 | AC_ARG_ENABLE(iso-c, |
---|
468 | [ --enable-iso-c Try to warn if code is not ISO C ],, |
---|
469 | enable_iso_c=no) |
---|
470 | |
---|
471 | AC_MSG_CHECKING(what language compliance flags to pass to the C compiler) |
---|
472 | complCFLAGS= |
---|
473 | if test "x$enable_iso_c" != "xno"; then |
---|
474 | if test "x$GCC" = "xyes"; then |
---|
475 | case " $CFLAGS " in |
---|
476 | *[\ \ ]-ansi[\ \ ]*) ;; |
---|
477 | *) complCFLAGS="$complCFLAGS -ansi" ;; |
---|
478 | esac |
---|
479 | case " $CFLAGS " in |
---|
480 | *[\ \ ]-pedantic[\ \ ]*) ;; |
---|
481 | *) complCFLAGS="$complCFLAGS -pedantic" ;; |
---|
482 | esac |
---|
483 | fi |
---|
484 | fi |
---|
485 | AC_MSG_RESULT($complCFLAGS) |
---|
486 | |
---|
487 | WARN_CFLAGS="$warning_flags $complCFLAGS" |
---|
488 | AC_SUBST(WARN_CFLAGS) |
---|
489 | ]) |
---|
490 | |
---|
491 | dnl For C++, do basically the same thing. |
---|
492 | |
---|
493 | AC_DEFUN([GNOME_CXX_WARNINGS],[ |
---|
494 | AC_ARG_ENABLE(cxx-warnings, |
---|
495 | [ --enable-cxx-warnings=[no/minimum/yes] Turn on compiler warnings.],,enable_cxx_warnings=minimum) |
---|
496 | |
---|
497 | AC_MSG_CHECKING(what warning flags to pass to the C++ compiler) |
---|
498 | warnCXXFLAGS= |
---|
499 | if test "x$GCC" != xyes; then |
---|
500 | enable_compile_warnings=no |
---|
501 | fi |
---|
502 | if test "x$enable_cxx_warnings" != "xno"; then |
---|
503 | if test "x$GCC" = "xyes"; then |
---|
504 | case " $CXXFLAGS " in |
---|
505 | *[\ \ ]-Wall[\ \ ]*) ;; |
---|
506 | *) warnCXXFLAGS="-Wall -Wno-unused" ;; |
---|
507 | esac |
---|
508 | |
---|
509 | ## -W is not all that useful. And it cannot be controlled |
---|
510 | ## with individual -Wno-xxx flags, unlike -Wall |
---|
511 | if test "x$enable_cxx_warnings" = "xyes"; then |
---|
512 | warnCXXFLAGS="$warnCXXFLAGS -Wmissing-prototypes -Wmissing-declarations -Wshadow -Woverloaded-virtual" |
---|
513 | fi |
---|
514 | fi |
---|
515 | fi |
---|
516 | AC_MSG_RESULT($warnCXXFLAGS) |
---|
517 | |
---|
518 | AC_ARG_ENABLE(iso-cxx, |
---|
519 | [ --enable-iso-cxx Try to warn if code is not ISO C++ ],, |
---|
520 | enable_iso_cxx=no) |
---|
521 | |
---|
522 | AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) |
---|
523 | complCXXFLAGS= |
---|
524 | if test "x$enable_iso_cxx" != "xno"; then |
---|
525 | if test "x$GCC" = "xyes"; then |
---|
526 | case " $CXXFLAGS " in |
---|
527 | *[\ \ ]-ansi[\ \ ]*) ;; |
---|
528 | *) complCXXFLAGS="$complCXXFLAGS -ansi" ;; |
---|
529 | esac |
---|
530 | |
---|
531 | case " $CXXFLAGS " in |
---|
532 | *[\ \ ]-pedantic[\ \ ]*) ;; |
---|
533 | *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;; |
---|
534 | esac |
---|
535 | fi |
---|
536 | fi |
---|
537 | AC_MSG_RESULT($complCXXFLAGS) |
---|
538 | if test "x$cxxflags_set" != "xyes"; then |
---|
539 | CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS" |
---|
540 | cxxflags_set=yes |
---|
541 | AC_SUBST(cxxflags_set) |
---|
542 | fi |
---|
543 | ]) |
---|
544 | |
---|
545 | |
---|
546 | dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) |
---|
547 | dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page |
---|
548 | dnl also defines GSTUFF_PKG_ERRORS on error |
---|
549 | AC_DEFUN(PKG_CHECK_MODULES, [ |
---|
550 | succeeded=no |
---|
551 | |
---|
552 | if test -z "$PKG_CONFIG"; then |
---|
553 | AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
---|
554 | fi |
---|
555 | |
---|
556 | if test "$PKG_CONFIG" = "no" ; then |
---|
557 | echo "*** The pkg-config script could not be found. Make sure it is" |
---|
558 | echo "*** in your path, or set the PKG_CONFIG environment variable" |
---|
559 | echo "*** to the full path to pkg-config." |
---|
560 | echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." |
---|
561 | else |
---|
562 | PKG_CONFIG_MIN_VERSION=0.9.0 |
---|
563 | if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then |
---|
564 | AC_MSG_CHECKING(for $2) |
---|
565 | |
---|
566 | if $PKG_CONFIG --exists "$2" ; then |
---|
567 | AC_MSG_RESULT(yes) |
---|
568 | succeeded=yes |
---|
569 | |
---|
570 | AC_MSG_CHECKING($1_CFLAGS) |
---|
571 | $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` |
---|
572 | AC_MSG_RESULT($$1_CFLAGS) |
---|
573 | |
---|
574 | AC_MSG_CHECKING($1_LIBS) |
---|
575 | $1_LIBS=`$PKG_CONFIG --libs "$2"` |
---|
576 | AC_MSG_RESULT($$1_LIBS) |
---|
577 | else |
---|
578 | $1_CFLAGS="" |
---|
579 | $1_LIBS="" |
---|
580 | ## If we have a custom action on failure, don't print errors, but |
---|
581 | ## do set a variable so people can do so. |
---|
582 | $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` |
---|
583 | ifelse([$4], ,echo $$1_PKG_ERRORS,) |
---|
584 | fi |
---|
585 | |
---|
586 | AC_SUBST($1_CFLAGS) |
---|
587 | AC_SUBST($1_LIBS) |
---|
588 | else |
---|
589 | echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." |
---|
590 | echo "*** See http://www.freedesktop.org/software/pkgconfig" |
---|
591 | fi |
---|
592 | fi |
---|
593 | |
---|
594 | if test $succeeded = yes; then |
---|
595 | ifelse([$3], , :, [$3]) |
---|
596 | else |
---|
597 | ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) |
---|
598 | fi |
---|
599 | ]) |
---|
600 | |
---|
601 | |
---|
602 | |
---|
603 | dnl AM_GCONF_SOURCE_2 |
---|
604 | dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas |
---|
605 | dnl (i.e. pass to gconftool-2 |
---|
606 | dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where |
---|
607 | dnl you should install foo.schemas files |
---|
608 | dnl |
---|
609 | |
---|
610 | AC_DEFUN(AM_GCONF_SOURCE_2, |
---|
611 | [ |
---|
612 | if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then |
---|
613 | GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` |
---|
614 | else |
---|
615 | GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE |
---|
616 | fi |
---|
617 | |
---|
618 | AC_ARG_WITH(gconf-source, |
---|
619 | [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",) |
---|
620 | |
---|
621 | AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE) |
---|
622 | AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation]) |
---|
623 | |
---|
624 | if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then |
---|
625 | GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas/' |
---|
626 | else |
---|
627 | GCONF_SCHEMA_FILE_DIR=$GCONF_SCHEMA_FILE_DIR |
---|
628 | fi |
---|
629 | |
---|
630 | AC_ARG_WITH(gconf-schema-file-dir, |
---|
631 | [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",) |
---|
632 | |
---|
633 | AC_SUBST(GCONF_SCHEMA_FILE_DIR) |
---|
634 | AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files]) |
---|
635 | ]) |
---|
636 | |
---|
637 | # Macro to add for using GNU gettext. |
---|
638 | # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996 |
---|
639 | # |
---|
640 | # Modified to never use included libintl. |
---|
641 | # Owen Taylor <otaylor@redhat.com>, 12/15/1998 |
---|
642 | # |
---|
643 | # |
---|
644 | # This file can be copied and used freely without restrictions. It can |
---|
645 | # be used in projects which are not available under the GNU Public License |
---|
646 | # but which still want to provide support for the GNU gettext functionality. |
---|
647 | # Please note that the actual code is *not* freely available. |
---|
648 | # |
---|
649 | # |
---|
650 | # If you make changes to this file, you MUST update the copy in |
---|
651 | # acinclude.m4. [ aclocal dies on duplicate macros, so if |
---|
652 | # we run 'aclocal -I macros/' then we'll run into problems |
---|
653 | # once we've installed glib-gettext.m4 :-( ] |
---|
654 | # |
---|
655 | |
---|
656 | AC_DEFUN([AM_GLIB_LC_MESSAGES], |
---|
657 | [if test $ac_cv_header_locale_h = yes; then |
---|
658 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, |
---|
659 | [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], |
---|
660 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) |
---|
661 | if test $am_cv_val_LC_MESSAGES = yes; then |
---|
662 | AC_DEFINE(HAVE_LC_MESSAGES, 1, |
---|
663 | [Define if your <locale.h> file defines LC_MESSAGES.]) |
---|
664 | fi |
---|
665 | fi]) |
---|
666 | |
---|
667 | dnl AM_GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, |
---|
668 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) |
---|
669 | AC_DEFUN([AM_GLIB_PATH_PROG_WITH_TEST], |
---|
670 | [# Extract the first word of "$2", so it can be a program name with args. |
---|
671 | set dummy $2; ac_word=[$]2 |
---|
672 | AC_MSG_CHECKING([for $ac_word]) |
---|
673 | AC_CACHE_VAL(ac_cv_path_$1, |
---|
674 | [case "[$]$1" in |
---|
675 | /*) |
---|
676 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. |
---|
677 | ;; |
---|
678 | *) |
---|
679 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
---|
680 | for ac_dir in ifelse([$5], , $PATH, [$5]); do |
---|
681 | test -z "$ac_dir" && ac_dir=. |
---|
682 | if test -f $ac_dir/$ac_word; then |
---|
683 | if [$3]; then |
---|
684 | ac_cv_path_$1="$ac_dir/$ac_word" |
---|
685 | break |
---|
686 | fi |
---|
687 | fi |
---|
688 | done |
---|
689 | IFS="$ac_save_ifs" |
---|
690 | dnl If no 4th arg is given, leave the cache variable unset, |
---|
691 | dnl so AC_PATH_PROGS will keep looking. |
---|
692 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" |
---|
693 | ])dnl |
---|
694 | ;; |
---|
695 | esac])dnl |
---|
696 | $1="$ac_cv_path_$1" |
---|
697 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then |
---|
698 | AC_MSG_RESULT([$]$1) |
---|
699 | else |
---|
700 | AC_MSG_RESULT(no) |
---|
701 | fi |
---|
702 | AC_SUBST($1)dnl |
---|
703 | ]) |
---|
704 | |
---|
705 | # serial 5 |
---|
706 | |
---|
707 | AC_DEFUN(AM_GLIB_WITH_NLS, |
---|
708 | dnl NLS is obligatory |
---|
709 | [USE_NLS=yes |
---|
710 | AC_SUBST(USE_NLS) |
---|
711 | |
---|
712 | dnl Figure out what method |
---|
713 | nls_cv_force_use_gnu_gettext="no" |
---|
714 | |
---|
715 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" |
---|
716 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then |
---|
717 | dnl User does not insist on using GNU NLS library. Figure out what |
---|
718 | dnl to use. If gettext or catgets are available (in this order) we |
---|
719 | dnl use this. Else we have to fall back to GNU NLS library. |
---|
720 | dnl catgets is only used if permitted by option --with-catgets. |
---|
721 | nls_cv_header_intl= |
---|
722 | nls_cv_header_libgt= |
---|
723 | CATOBJEXT=NONE |
---|
724 | XGETTEXT=: |
---|
725 | |
---|
726 | AC_CHECK_HEADER(libintl.h, |
---|
727 | [AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, |
---|
728 | [AC_TRY_LINK([#include <libintl.h>], [return (int) dgettext ("","")], |
---|
729 | gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no)]) |
---|
730 | |
---|
731 | gt_cv_func_dgettext_libintl="no" |
---|
732 | libintl_extra_libs="" |
---|
733 | |
---|
734 | if test "$gt_cv_func_dgettext_libc" != "yes" ; then |
---|
735 | AC_CHECK_LIB(intl, bindtextdomain, |
---|
736 | [AC_CHECK_LIB(intl, dgettext, |
---|
737 | gt_cv_func_dgettext_libintl=yes)]) |
---|
738 | |
---|
739 | if test "$gt_cv_func_dgettext_libc" != "yes" ; then |
---|
740 | AC_MSG_CHECKING([if -liconv is needed to use gettext]) |
---|
741 | AC_MSG_RESULT([]) |
---|
742 | AC_CHECK_LIB(intl, dcgettext, |
---|
743 | [gt_cv_func_dgettext_libintl=yes |
---|
744 | libintl_extra_libs=-liconv], |
---|
745 | :,-liconv) |
---|
746 | fi |
---|
747 | fi |
---|
748 | |
---|
749 | if test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
750 | LIBS="$LIBS -lintl $libintl_extra_libs"; |
---|
751 | fi |
---|
752 | |
---|
753 | if test "$gt_cv_func_dgettext_libc" = "yes" \ |
---|
754 | || test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
755 | AC_DEFINE(HAVE_GETTEXT,1, |
---|
756 | [Define if the GNU gettext() function is already present or preinstalled.]) |
---|
757 | AM_GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, |
---|
758 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl |
---|
759 | if test "$MSGFMT" != "no"; then |
---|
760 | AC_CHECK_FUNCS(dcgettext) |
---|
761 | AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
---|
762 | AM_GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, |
---|
763 | [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) |
---|
764 | AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; |
---|
765 | return _nl_msg_cat_cntr], |
---|
766 | [CATOBJEXT=.gmo |
---|
767 | DATADIRNAME=share], |
---|
768 | [CATOBJEXT=.mo |
---|
769 | DATADIRNAME=lib]) |
---|
770 | INSTOBJEXT=.mo |
---|
771 | fi |
---|
772 | fi |
---|
773 | |
---|
774 | # Added by Martin Baulig 12/15/98 for libc5 systems |
---|
775 | if test "$gt_cv_func_dgettext_libc" != "yes" \ |
---|
776 | && test "$gt_cv_func_dgettext_libintl" = "yes"; then |
---|
777 | INTLLIBS="-lintl $libintl_extra_libs" |
---|
778 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` |
---|
779 | fi |
---|
780 | ]) |
---|
781 | |
---|
782 | if test "$CATOBJEXT" = "NONE"; then |
---|
783 | dnl Neither gettext nor catgets in included in the C library. |
---|
784 | dnl Fall back on GNU gettext library. |
---|
785 | nls_cv_use_gnu_gettext=yes |
---|
786 | fi |
---|
787 | fi |
---|
788 | |
---|
789 | if test "$nls_cv_use_gnu_gettext" != "yes"; then |
---|
790 | AC_DEFINE(ENABLE_NLS, 1, |
---|
791 | [always defined to indicate that i18n is enabled]) |
---|
792 | else |
---|
793 | dnl Unset this variable since we use the non-zero value as a flag. |
---|
794 | CATOBJEXT= |
---|
795 | fi |
---|
796 | |
---|
797 | dnl Test whether we really found GNU xgettext. |
---|
798 | if test "$XGETTEXT" != ":"; then |
---|
799 | dnl If it is no GNU xgettext we define it as : so that the |
---|
800 | dnl Makefiles still can work. |
---|
801 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then |
---|
802 | : ; |
---|
803 | else |
---|
804 | AC_MSG_RESULT( |
---|
805 | [found xgettext program is not GNU xgettext; ignore it]) |
---|
806 | XGETTEXT=":" |
---|
807 | fi |
---|
808 | fi |
---|
809 | |
---|
810 | # We need to process the po/ directory. |
---|
811 | POSUB=po |
---|
812 | |
---|
813 | AC_OUTPUT_COMMANDS( |
---|
814 | [case "$CONFIG_FILES" in *po/Makefile.in*) |
---|
815 | sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile |
---|
816 | esac]) |
---|
817 | |
---|
818 | dnl These rules are solely for the distribution goal. While doing this |
---|
819 | dnl we only have to keep exactly one list of the available catalogs |
---|
820 | dnl in configure.in. |
---|
821 | for lang in $ALL_LINGUAS; do |
---|
822 | GMOFILES="$GMOFILES $lang.gmo" |
---|
823 | POFILES="$POFILES $lang.po" |
---|
824 | done |
---|
825 | |
---|
826 | dnl Make all variables we use known to autoconf. |
---|
827 | AC_SUBST(CATALOGS) |
---|
828 | AC_SUBST(CATOBJEXT) |
---|
829 | AC_SUBST(DATADIRNAME) |
---|
830 | AC_SUBST(GMOFILES) |
---|
831 | AC_SUBST(INSTOBJEXT) |
---|
832 | AC_SUBST(INTLDEPS) |
---|
833 | AC_SUBST(INTLLIBS) |
---|
834 | AC_SUBST(INTLOBJS) |
---|
835 | AC_SUBST(POFILES) |
---|
836 | AC_SUBST(POSUB) |
---|
837 | ]) |
---|
838 | |
---|
839 | AC_DEFUN(AM_GLIB_GNU_GETTEXT, |
---|
840 | [AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
---|
841 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
842 | AC_REQUIRE([AC_PROG_RANLIB])dnl |
---|
843 | AC_REQUIRE([AC_HEADER_STDC])dnl |
---|
844 | AC_REQUIRE([AC_C_CONST])dnl |
---|
845 | AC_REQUIRE([AC_C_INLINE])dnl |
---|
846 | AC_REQUIRE([AC_TYPE_OFF_T])dnl |
---|
847 | AC_REQUIRE([AC_TYPE_SIZE_T])dnl |
---|
848 | AC_REQUIRE([AC_FUNC_ALLOCA])dnl |
---|
849 | AC_REQUIRE([AC_FUNC_MMAP])dnl |
---|
850 | |
---|
851 | AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ |
---|
852 | unistd.h sys/param.h]) |
---|
853 | AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ |
---|
854 | strdup __argz_count __argz_stringify __argz_next]) |
---|
855 | |
---|
856 | AM_GLIB_LC_MESSAGES |
---|
857 | AM_GLIB_WITH_NLS |
---|
858 | |
---|
859 | if test "x$CATOBJEXT" != "x"; then |
---|
860 | if test "x$ALL_LINGUAS" = "x"; then |
---|
861 | LINGUAS= |
---|
862 | else |
---|
863 | AC_MSG_CHECKING(for catalogs to be installed) |
---|
864 | NEW_LINGUAS= |
---|
865 | for lang in ${LINGUAS=$ALL_LINGUAS}; do |
---|
866 | case "$ALL_LINGUAS" in |
---|
867 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; |
---|
868 | esac |
---|
869 | done |
---|
870 | LINGUAS=$NEW_LINGUAS |
---|
871 | AC_MSG_RESULT($LINGUAS) |
---|
872 | fi |
---|
873 | |
---|
874 | dnl Construct list of names of catalog files to be constructed. |
---|
875 | if test -n "$LINGUAS"; then |
---|
876 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done |
---|
877 | fi |
---|
878 | fi |
---|
879 | |
---|
880 | dnl Determine which catalog format we have (if any is needed) |
---|
881 | dnl For now we know about two different formats: |
---|
882 | dnl Linux libc-5 and the normal X/Open format |
---|
883 | test -d po || mkdir po |
---|
884 | if test "$CATOBJEXT" = ".cat"; then |
---|
885 | AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) |
---|
886 | |
---|
887 | dnl Transform the SED scripts while copying because some dumb SEDs |
---|
888 | dnl cannot handle comments. |
---|
889 | sed -e '/^#/d' $srcdir/po/$msgformat-msg.sed > po/po2msg.sed |
---|
890 | fi |
---|
891 | |
---|
892 | dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly |
---|
893 | dnl find the mkinstalldirs script in another subdir but ($top_srcdir). |
---|
894 | dnl Try to locate is. |
---|
895 | MKINSTALLDIRS= |
---|
896 | if test -n "$ac_aux_dir"; then |
---|
897 | MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" |
---|
898 | fi |
---|
899 | if test -z "$MKINSTALLDIRS"; then |
---|
900 | MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" |
---|
901 | fi |
---|
902 | AC_SUBST(MKINSTALLDIRS) |
---|
903 | |
---|
904 | dnl Generate list of files to be processed by xgettext which will |
---|
905 | dnl be included in po/Makefile. |
---|
906 | test -d po || mkdir po |
---|
907 | if test "x$srcdir" != "x."; then |
---|
908 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then |
---|
909 | posrcprefix="$srcdir/" |
---|
910 | else |
---|
911 | posrcprefix="../$srcdir/" |
---|
912 | fi |
---|
913 | else |
---|
914 | posrcprefix="../" |
---|
915 | fi |
---|
916 | rm -f po/POTFILES |
---|
917 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ |
---|
918 | < $srcdir/po/POTFILES.in > po/POTFILES |
---|
919 | ]) |
---|
920 | |
---|
921 | |
---|