33
|
1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
|
26
|
2
|
33
|
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.
|
26
|
7
|
33
|
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.
|
26
|
12
|
33
|
13 # Like AC_CONFIG_HEADER, but automatically create stamp file.
|
26
|
14
|
16
|
15 AC_DEFUN([AM_CONFIG_HEADER],
|
33
|
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([,]))])
|
26
|
35
|
33
|
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.
|
26
|
39
|
33
|
40 # serial 1
|
26
|
41
|
33
|
42 dnl Usage:
|
|
43 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
|
44
|
16
|
45 AC_DEFUN([AM_INIT_AUTOMAKE],
|
|
46 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
33
|
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
|
1
|
54 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
|
55 fi
|
33
|
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])])
|
1
|
69
|
16
|
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.
|
33
|
90 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
|
16
|
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],
|
33
|
97 [AM_AUTOMAKE_VERSION([1.4-p6])])
|
16
|
98
|
1
|
99 #
|
|
100 # Check to make sure that the build environment is sane.
|
|
101 #
|
|
102
|
16
|
103 AC_DEFUN([AM_SANITY_CHECK],
|
1
|
104 [AC_MSG_CHECKING([whether build environment is sane])
|
|
105 # Just in case
|
|
106 sleep 1
|
33
|
107 echo timestamp > conftestfile
|
1
|
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 (
|
33
|
114 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
|
115 if test "[$]*" = "X"; then
|
1
|
116 # -L didn't work.
|
33
|
117 set X `ls -t $srcdir/configure conftestfile`
|
1
|
118 fi
|
33
|
119 if test "[$]*" != "X $srcdir/configure conftestfile" \
|
|
120 && test "[$]*" != "X conftestfile $srcdir/configure"; then
|
1
|
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
|
33
|
130 test "[$]2" = conftestfile
|
1
|
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
|
33
|
139 rm -f conftest*
|
1
|
140 AC_MSG_RESULT(yes)])
|
|
141
|
33
|
142 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
|
143 dnl The program must properly implement --version.
|
16
|
144 AC_DEFUN([AM_MISSING_PROG],
|
33
|
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
|
1
|
156 AC_SUBST($1)])
|
|
157
|
16
|
158
|
|
159 # serial 1
|
|
160
|
|
161 AC_DEFUN([AM_C_PROTOTYPES],
|
|
162 [AC_REQUIRE([AM_PROG_CC_STDC])
|
|
163 AC_REQUIRE([AC_PROG_CPP])
|
|
164 AC_MSG_CHECKING([for function prototypes])
|
|
165 if test "$am_cv_prog_cc_stdc" != no; then
|
|
166 AC_MSG_RESULT(yes)
|
|
167 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
|
|
168 U= ANSI2KNR=
|
|
169 else
|
|
170 AC_MSG_RESULT(no)
|
|
171 U=_ ANSI2KNR=./ansi2knr
|
33
|
172 # Ensure some checks needed by ansi2knr itself.
|
|
173 AC_HEADER_STDC
|
|
174 AC_CHECK_HEADERS(string.h)
|
16
|
175 fi
|
|
176 AC_SUBST(U)dnl
|
|
177 AC_SUBST(ANSI2KNR)dnl
|
|
178 ])
|
|
179
|
|
180
|
|
181 # serial 1
|
1
|
182
|
16
|
183 # @defmac AC_PROG_CC_STDC
|
|
184 # @maindex PROG_CC_STDC
|
|
185 # @ovindex CC
|
|
186 # If the C compiler in not in ANSI C mode by default, try to add an option
|
|
187 # to output variable @code{CC} to make it so. This macro tries various
|
|
188 # options that select ANSI C on some system or another. It considers the
|
|
189 # compiler to be in ANSI C mode if it handles function prototypes correctly.
|
|
190 #
|
|
191 # If you use this macro, you should check after calling it whether the C
|
|
192 # compiler has been set to accept ANSI C; if not, the shell variable
|
|
193 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
|
|
194 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
|
|
195 # program @code{ansi2knr}, which comes with Ghostscript.
|
|
196 # @end defmac
|
1
|
197
|
16
|
198 AC_DEFUN([AM_PROG_CC_STDC],
|
|
199 [AC_REQUIRE([AC_PROG_CC])
|
|
200 AC_BEFORE([$0], [AC_C_INLINE])
|
|
201 AC_BEFORE([$0], [AC_C_CONST])
|
|
202 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
|
|
203 dnl a magic option to avoid problems with ANSI preprocessor commands
|
|
204 dnl like #elif.
|
|
205 dnl FIXME: can't do this because then AC_AIX won't work due to a
|
|
206 dnl circular dependency.
|
|
207 dnl AC_BEFORE([$0], [AC_PROG_CPP])
|
33
|
208 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
|
16
|
209 AC_CACHE_VAL(am_cv_prog_cc_stdc,
|
|
210 [am_cv_prog_cc_stdc=no
|
|
211 ac_save_CC="$CC"
|
|
212 # Don't try gcc -ansi; that turns off useful extensions and
|
|
213 # breaks some systems' header files.
|
|
214 # AIX -qlanglvl=ansi
|
|
215 # Ultrix and OSF/1 -std1
|
33
|
216 # HP-UX -Aa -D_HPUX_SOURCE
|
16
|
217 # SVR4 -Xc -D__EXTENSIONS__
|
33
|
218 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
16
|
219 do
|
|
220 CC="$ac_save_CC $ac_arg"
|
|
221 AC_TRY_COMPILE(
|
|
222 [#include <stdarg.h>
|
|
223 #include <stdio.h>
|
|
224 #include <sys/types.h>
|
|
225 #include <sys/stat.h>
|
|
226 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
|
227 struct buf { int x; };
|
|
228 FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
|
229 static char *e (p, i)
|
|
230 char **p;
|
|
231 int i;
|
|
232 {
|
|
233 return p[i];
|
|
234 }
|
|
235 static char *f (char * (*g) (char **, int), char **p, ...)
|
|
236 {
|
|
237 char *s;
|
|
238 va_list v;
|
|
239 va_start (v,p);
|
|
240 s = g (p, va_arg (v,int));
|
|
241 va_end (v);
|
|
242 return s;
|
|
243 }
|
|
244 int test (int i, double x);
|
|
245 struct s1 {int (*f) (int a);};
|
|
246 struct s2 {int (*f) (double a);};
|
|
247 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
|
248 int argc;
|
|
249 char **argv;
|
|
250 ], [
|
|
251 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
|
252 ],
|
|
253 [am_cv_prog_cc_stdc="$ac_arg"; break])
|
|
254 done
|
|
255 CC="$ac_save_CC"
|
|
256 ])
|
|
257 if test -z "$am_cv_prog_cc_stdc"; then
|
|
258 AC_MSG_RESULT([none needed])
|
|
259 else
|
33
|
260 AC_MSG_RESULT($am_cv_prog_cc_stdc)
|
16
|
261 fi
|
|
262 case "x$am_cv_prog_cc_stdc" in
|
|
263 x|xno) ;;
|
|
264 *) CC="$CC $am_cv_prog_cc_stdc" ;;
|
|
265 esac
|
|
266 ])
|
1
|
267
|
26
|
268 # Add --enable-maintainer-mode option to configure.
|
|
269 # From Jim Meyering
|
|
270
|
|
271 # serial 1
|
|
272
|
|
273 AC_DEFUN([AM_MAINTAINER_MODE],
|
|
274 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
|
275 dnl maintainer-mode is disabled by default
|
|
276 AC_ARG_ENABLE(maintainer-mode,
|
|
277 [ --enable-maintainer-mode enable make rules and dependencies not useful
|
|
278 (and sometimes confusing) to the casual installer],
|
|
279 USE_MAINTAINER_MODE=$enableval,
|
|
280 USE_MAINTAINER_MODE=no)
|
33
|
281 AC_MSG_RESULT($USE_MAINTAINER_MODE)
|
|
282 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
|
26
|
283 MAINT=$MAINTAINER_MODE_TRUE
|
|
284 AC_SUBST(MAINT)dnl
|
|
285 ]
|
|
286 )
|
1
|
287
|
33
|
288 # Define a conditional.
|
|
289
|
|
290 AC_DEFUN([AM_CONDITIONAL],
|
|
291 [AC_SUBST($1_TRUE)
|
|
292 AC_SUBST($1_FALSE)
|
|
293 if $2; then
|
|
294 $1_TRUE=
|
|
295 $1_FALSE='#'
|
|
296 else
|
|
297 $1_TRUE='#'
|
|
298 $1_FALSE=
|
|
299 fi])
|
|
300
|
58
|
301
|
|
302 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
|
|
303 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
|
|
304 dnl also defines GSTUFF_PKG_ERRORS on error
|
|
305 AC_DEFUN(PKG_CHECK_MODULES, [
|
|
306 succeeded=no
|
|
307
|
|
308 if test -z "$PKG_CONFIG"; then
|
|
309 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
|
310 fi
|
|
311
|
|
312 if test "$PKG_CONFIG" = "no" ; then
|
|
313 echo "*** The pkg-config script could not be found. Make sure it is"
|
|
314 echo "*** in your path, or set the PKG_CONFIG environment variable"
|
|
315 echo "*** to the full path to pkg-config."
|
|
316 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
|
|
317 else
|
|
318 PKG_CONFIG_MIN_VERSION=0.9.0
|
|
319 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
|
|
320 AC_MSG_CHECKING(for $2)
|
|
321
|
|
322 if $PKG_CONFIG --exists "$2" ; then
|
|
323 AC_MSG_RESULT(yes)
|
|
324 succeeded=yes
|
|
325
|
|
326 AC_MSG_CHECKING($1_CFLAGS)
|
|
327 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
|
|
328 AC_MSG_RESULT($$1_CFLAGS)
|
|
329
|
|
330 AC_MSG_CHECKING($1_LIBS)
|
|
331 $1_LIBS=`$PKG_CONFIG --libs "$2"`
|
|
332 AC_MSG_RESULT($$1_LIBS)
|
|
333 else
|
|
334 $1_CFLAGS=""
|
|
335 $1_LIBS=""
|
|
336 ## If we have a custom action on failure, don't print errors, but
|
|
337 ## do set a variable so people can do so.
|
|
338 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
|
339 ifelse([$4], ,echo $$1_PKG_ERRORS,)
|
|
340 fi
|
|
341
|
|
342 AC_SUBST($1_CFLAGS)
|
|
343 AC_SUBST($1_LIBS)
|
|
344 else
|
|
345 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
|
|
346 echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
|
347 fi
|
|
348 fi
|
|
349
|
|
350 if test $succeeded = yes; then
|
|
351 ifelse([$3], , :, [$3])
|
|
352 else
|
|
353 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])
|
|
354 fi
|
|
355 ])
|
|
356
|
|
357
|
|
358
|
1
|
359 # Configure paths for GLIB
|
|
360 # Owen Taylor 97-11-3
|
|
361
|
|
362 dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
|
363 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
|
|
364 dnl gthread is specified in MODULES, pass to glib-config
|
|
365 dnl
|
|
366 AC_DEFUN(AM_PATH_GLIB,
|
|
367 [dnl
|
|
368 dnl Get the cflags and libraries from the glib-config script
|
|
369 dnl
|
|
370 AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
|
|
371 glib_config_prefix="$withval", glib_config_prefix="")
|
|
372 AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
|
|
373 glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
|
|
374 AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
|
|
375 , enable_glibtest=yes)
|
|
376
|
|
377 if test x$glib_config_exec_prefix != x ; then
|
|
378 glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
|
|
379 if test x${GLIB_CONFIG+set} != xset ; then
|
|
380 GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
|
|
381 fi
|
|
382 fi
|
|
383 if test x$glib_config_prefix != x ; then
|
|
384 glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
|
|
385 if test x${GLIB_CONFIG+set} != xset ; then
|
|
386 GLIB_CONFIG=$glib_config_prefix/bin/glib-config
|
|
387 fi
|
|
388 fi
|
|
389
|
|
390 for module in . $4
|
|
391 do
|
|
392 case "$module" in
|
|
393 gmodule)
|
|
394 glib_config_args="$glib_config_args gmodule"
|
|
395 ;;
|
|
396 gthread)
|
|
397 glib_config_args="$glib_config_args gthread"
|
|
398 ;;
|
|
399 esac
|
|
400 done
|
|
401
|
|
402 AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
|
|
403 min_glib_version=ifelse([$1], ,0.99.7,$1)
|
|
404 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
|
|
405 no_glib=""
|
|
406 if test "$GLIB_CONFIG" = "no" ; then
|
|
407 no_glib=yes
|
|
408 else
|
|
409 GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
|
|
410 GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
|
|
411 glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
|
|
412 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
413 glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
|
|
414 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
415 glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
|
|
416 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
|
417 if test "x$enable_glibtest" = "xyes" ; then
|
|
418 ac_save_CFLAGS="$CFLAGS"
|
|
419 ac_save_LIBS="$LIBS"
|
|
420 CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
|
421 LIBS="$GLIB_LIBS $LIBS"
|
|
422 dnl
|
|
423 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
|
|
424 dnl checks the results of glib-config to some extent
|
|
425 dnl
|
|
426 rm -f conf.glibtest
|
|
427 AC_TRY_RUN([
|
|
428 #include <glib.h>
|
|
429 #include <stdio.h>
|
|
430 #include <stdlib.h>
|
|
431
|
|
432 int
|
|
433 main ()
|
|
434 {
|
|
435 int major, minor, micro;
|
|
436 char *tmp_version;
|
|
437
|
|
438 system ("touch conf.glibtest");
|
|
439
|
|
440 /* HP/UX 9 (%@#!) writes to sscanf strings */
|
|
441 tmp_version = g_strdup("$min_glib_version");
|
|
442 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
|
443 printf("%s, bad version string\n", "$min_glib_version");
|
|
444 exit(1);
|
|
445 }
|
|
446
|
|
447 if ((glib_major_version != $glib_config_major_version) ||
|
|
448 (glib_minor_version != $glib_config_minor_version) ||
|
|
449 (glib_micro_version != $glib_config_micro_version))
|
|
450 {
|
|
451 printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
|
|
452 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
|
|
453 glib_major_version, glib_minor_version, glib_micro_version);
|
|
454 printf ("*** was found! If glib-config was correct, then it is best\n");
|
|
455 printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
|
|
456 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
|
457 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
|
458 printf("*** required on your system.\n");
|
|
459 printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
|
|
460 printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
|
|
461 printf("*** before re-running configure\n");
|
|
462 }
|
|
463 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
|
|
464 (glib_minor_version != GLIB_MINOR_VERSION) ||
|
|
465 (glib_micro_version != GLIB_MICRO_VERSION))
|
|
466 {
|
|
467 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
|
|
468 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
|
|
469 printf("*** library (version %d.%d.%d)\n",
|
|
470 glib_major_version, glib_minor_version, glib_micro_version);
|
|
471 }
|
|
472 else
|
|
473 {
|
|
474 if ((glib_major_version > major) ||
|
|
475 ((glib_major_version == major) && (glib_minor_version > minor)) ||
|
|
476 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
|
|
477 {
|
|
478 return 0;
|
|
479 }
|
|
480 else
|
|
481 {
|
|
482 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
|
|
483 glib_major_version, glib_minor_version, glib_micro_version);
|
|
484 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
|
|
485 major, minor, micro);
|
|
486 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
|
|
487 printf("***\n");
|
|
488 printf("*** If you have already installed a sufficiently new version, this error\n");
|
|
489 printf("*** probably means that the wrong copy of the glib-config shell script is\n");
|
|
490 printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
|
491 printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
|
|
492 printf("*** correct copy of glib-config. (In this case, you will have to\n");
|
|
493 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
|
494 printf("*** so that the correct libraries are found at run-time))\n");
|
|
495 }
|
|
496 }
|
|
497 return 1;
|
|
498 }
|
|
499 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
500 CFLAGS="$ac_save_CFLAGS"
|
|
501 LIBS="$ac_save_LIBS"
|
|
502 fi
|
|
503 fi
|
|
504 if test "x$no_glib" = x ; then
|
|
505 AC_MSG_RESULT(yes)
|
|
506 ifelse([$2], , :, [$2])
|
|
507 else
|
|
508 AC_MSG_RESULT(no)
|
|
509 if test "$GLIB_CONFIG" = "no" ; then
|
|
510 echo "*** The glib-config script installed by GLIB could not be found"
|
|
511 echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
|
|
512 echo "*** your path, or set the GLIB_CONFIG environment variable to the"
|
|
513 echo "*** full path to glib-config."
|
|
514 else
|
|
515 if test -f conf.glibtest ; then
|
|
516 :
|
|
517 else
|
|
518 echo "*** Could not run GLIB test program, checking why..."
|
|
519 CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
|
520 LIBS="$LIBS $GLIB_LIBS"
|
|
521 AC_TRY_LINK([
|
|
522 #include <glib.h>
|
|
523 #include <stdio.h>
|
|
524 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
|
|
525 [ echo "*** The test program compiled, but did not run. This usually means"
|
|
526 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
|
|
527 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
|
|
528 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
|
529 echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
|
530 echo "*** is required on your system"
|
|
531 echo "***"
|
|
532 echo "*** If you have an old version installed, it is best to remove it, although"
|
|
533 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
|
534 echo "***"
|
|
535 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
|
536 echo "*** came with the system with the command"
|
|
537 echo "***"
|
|
538 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
|
539 [ echo "*** The test program failed to compile or link. See the file config.log for the"
|
|
540 echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
|
|
541 echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
|
|
542 echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
|
|
543 CFLAGS="$ac_save_CFLAGS"
|
|
544 LIBS="$ac_save_LIBS"
|
|
545 fi
|
|
546 fi
|
|
547 GLIB_CFLAGS=""
|
|
548 GLIB_LIBS=""
|
|
549 ifelse([$3], , :, [$3])
|
|
550 fi
|
|
551 AC_SUBST(GLIB_CFLAGS)
|
|
552 AC_SUBST(GLIB_LIBS)
|
|
553 rm -f conf.glibtest
|
|
554 ])
|
|
555
|
26
|
556
|
33
|
557 # serial 1
|
|
558
|
|
559 AC_DEFUN([AM_WITH_DMALLOC],
|
|
560 [AC_MSG_CHECKING(if malloc debugging is wanted)
|
|
561 AC_ARG_WITH(dmalloc,
|
|
562 [ --with-dmalloc use dmalloc, as in
|
|
563 ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz],
|
|
564 [if test "$withval" = yes; then
|
|
565 AC_MSG_RESULT(yes)
|
|
566 AC_DEFINE(WITH_DMALLOC,1,
|
|
567 [Define if using the dmalloc debugging malloc package])
|
|
568 LIBS="$LIBS -ldmalloc"
|
|
569 LDFLAGS="$LDFLAGS -g"
|
|
570 else
|
|
571 AC_MSG_RESULT(no)
|
|
572 fi], [AC_MSG_RESULT(no)])
|
|
573 ])
|
|
574
|
1
|
575 # Configure paths for GTK+
|
|
576 # Owen Taylor 97-11-3
|
|
577
|
|
578 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
|
579 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
|
580 dnl
|
|
581 AC_DEFUN(AM_PATH_GTK,
|
|
582 [dnl
|
|
583 dnl Get the cflags and libraries from the gtk-config script
|
|
584 dnl
|
|
585 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
|
586 gtk_config_prefix="$withval", gtk_config_prefix="")
|
|
587 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
|
588 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
|
589 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
|
590 , enable_gtktest=yes)
|
|
591
|
|
592 for module in . $4
|
|
593 do
|
|
594 case "$module" in
|
|
595 gthread)
|
|
596 gtk_config_args="$gtk_config_args gthread"
|
|
597 ;;
|
|
598 esac
|
|
599 done
|
|
600
|
|
601 if test x$gtk_config_exec_prefix != x ; then
|
|
602 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
|
603 if test x${GTK_CONFIG+set} != xset ; then
|
|
604 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
|
605 fi
|
|
606 fi
|
|
607 if test x$gtk_config_prefix != x ; then
|
|
608 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
|
609 if test x${GTK_CONFIG+set} != xset ; then
|
|
610 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
|
611 fi
|
|
612 fi
|
|
613
|
|
614 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
|
615 min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
|
616 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
|
617 no_gtk=""
|
|
618 if test "$GTK_CONFIG" = "no" ; then
|
|
619 no_gtk=yes
|
|
620 else
|
|
621 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
|
|
622 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
|
|
623 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
|
|
624 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
625 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
|
|
626 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
627 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
|
|
628 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
|
629 if test "x$enable_gtktest" = "xyes" ; then
|
|
630 ac_save_CFLAGS="$CFLAGS"
|
|
631 ac_save_LIBS="$LIBS"
|
|
632 CFLAGS="$CFLAGS $GTK_CFLAGS"
|
|
633 LIBS="$GTK_LIBS $LIBS"
|
|
634 dnl
|
|
635 dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
|
636 dnl checks the results of gtk-config to some extent
|
|
637 dnl
|
|
638 rm -f conf.gtktest
|
|
639 AC_TRY_RUN([
|
|
640 #include <gtk/gtk.h>
|
|
641 #include <stdio.h>
|
|
642 #include <stdlib.h>
|
|
643
|
|
644 int
|
|
645 main ()
|
|
646 {
|
|
647 int major, minor, micro;
|
|
648 char *tmp_version;
|
|
649
|
|
650 system ("touch conf.gtktest");
|
|
651
|
|
652 /* HP/UX 9 (%@#!) writes to sscanf strings */
|
|
653 tmp_version = g_strdup("$min_gtk_version");
|
|
654 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
|
655 printf("%s, bad version string\n", "$min_gtk_version");
|
|
656 exit(1);
|
|
657 }
|
|
658
|
|
659 if ((gtk_major_version != $gtk_config_major_version) ||
|
|
660 (gtk_minor_version != $gtk_config_minor_version) ||
|
|
661 (gtk_micro_version != $gtk_config_micro_version))
|
|
662 {
|
|
663 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
|
664 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
|
665 gtk_major_version, gtk_minor_version, gtk_micro_version);
|
|
666 printf ("*** was found! If gtk-config was correct, then it is best\n");
|
|
667 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
|
668 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
|
669 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
|
670 printf("*** required on your system.\n");
|
|
671 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
|
|
672 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
|
|
673 printf("*** before re-running configure\n");
|
|
674 }
|
|
675 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
|
676 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
|
677 (gtk_minor_version != GTK_MINOR_VERSION) ||
|
|
678 (gtk_micro_version != GTK_MICRO_VERSION))
|
|
679 {
|
|
680 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
|
681 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
|
682 printf("*** library (version %d.%d.%d)\n",
|
|
683 gtk_major_version, gtk_minor_version, gtk_micro_version);
|
|
684 }
|
|
685 #endif /* defined (GTK_MAJOR_VERSION) ... */
|
|
686 else
|
|
687 {
|
|
688 if ((gtk_major_version > major) ||
|
|
689 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
|
690 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
|
691 {
|
|
692 return 0;
|
|
693 }
|
|
694 else
|
|
695 {
|
|
696 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
|
697 gtk_major_version, gtk_minor_version, gtk_micro_version);
|
|
698 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
|
699 major, minor, micro);
|
|
700 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
|
701 printf("***\n");
|
|
702 printf("*** If you have already installed a sufficiently new version, this error\n");
|
|
703 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
|
|
704 printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
|
705 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
|
|
706 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
|
|
707 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
|
708 printf("*** so that the correct libraries are found at run-time))\n");
|
|
709 }
|
|
710 }
|
|
711 return 1;
|
|
712 }
|
|
713 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
714 CFLAGS="$ac_save_CFLAGS"
|
|
715 LIBS="$ac_save_LIBS"
|
|
716 fi
|
|
717 fi
|
|
718 if test "x$no_gtk" = x ; then
|
|
719 AC_MSG_RESULT(yes)
|
|
720 ifelse([$2], , :, [$2])
|
|
721 else
|
|
722 AC_MSG_RESULT(no)
|
|
723 if test "$GTK_CONFIG" = "no" ; then
|
|
724 echo "*** The gtk-config script installed by GTK could not be found"
|
|
725 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
|
|
726 echo "*** your path, or set the GTK_CONFIG environment variable to the"
|
|
727 echo "*** full path to gtk-config."
|
|
728 else
|
|
729 if test -f conf.gtktest ; then
|
|
730 :
|
|
731 else
|
|
732 echo "*** Could not run GTK test program, checking why..."
|
|
733 CFLAGS="$CFLAGS $GTK_CFLAGS"
|
|
734 LIBS="$LIBS $GTK_LIBS"
|
|
735 AC_TRY_LINK([
|
|
736 #include <gtk/gtk.h>
|
|
737 #include <stdio.h>
|
|
738 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
|
739 [ echo "*** The test program compiled, but did not run. This usually means"
|
|
740 echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
|
741 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
|
|
742 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
|
743 echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
|
744 echo "*** is required on your system"
|
|
745 echo "***"
|
|
746 echo "*** If you have an old version installed, it is best to remove it, although"
|
|
747 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
|
748 echo "***"
|
|
749 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
|
750 echo "*** came with the system with the command"
|
|
751 echo "***"
|
|
752 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
|
753 [ echo "*** The test program failed to compile or link. See the file config.log for the"
|
|
754 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
|
|
755 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
|
|
756 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
|
|
757 CFLAGS="$ac_save_CFLAGS"
|
|
758 LIBS="$ac_save_LIBS"
|
|
759 fi
|
|
760 fi
|
|
761 GTK_CFLAGS=""
|
|
762 GTK_LIBS=""
|
|
763 ifelse([$3], , :, [$3])
|
|
764 fi
|
|
765 AC_SUBST(GTK_CFLAGS)
|
|
766 AC_SUBST(GTK_LIBS)
|
|
767 rm -f conf.gtktest
|
|
768 ])
|
|
769
|
87
|
770 # Macro to add for using GNU gettext.
|
|
771 # Ulrich Drepper <drepper@cygnus.com>, 1995.
|
|
772 #
|
|
773 # This file can be copied and used freely without restrictions. It can
|
|
774 # be used in projects which are not available under the GNU General Public
|
|
775 # License or the GNU Library General Public License but which still want
|
|
776 # to provide support for the GNU gettext functionality.
|
|
777 # Please note that the actual code of the GNU gettext library is covered
|
|
778 # by the GNU Library General Public License, and the rest of the GNU
|
|
779 # gettext package package is covered by the GNU General Public License.
|
|
780 # They are *not* in the public domain.
|
1
|
781
|
87
|
782 # serial 10
|
1
|
783
|
87
|
784 dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
|
|
785 dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
|
1
|
786 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
|
787 dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
87
|
788 dnl AM-DISABLE-SHARED). Otherwise, a static library
|
1
|
789 dnl $(top_builddir)/intl/libintl.a will be created.
|
|
790 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
|
791 dnl implementations (in libc or libintl) without the ngettext() function
|
87
|
792 dnl will be ignored.
|
|
793 dnl LIBDIR is used to find the intl libraries. If empty,
|
1
|
794 dnl the value `$(top_builddir)/intl/' is used.
|
|
795 dnl
|
|
796 dnl The result of the configuration is one of three cases:
|
|
797 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
|
|
798 dnl and used.
|
|
799 dnl Catalog format: GNU --> install in $(datadir)
|
|
800 dnl Catalog extension: .mo after installation, .gmo in source tree
|
|
801 dnl 2) GNU gettext has been found in the system's C library.
|
|
802 dnl Catalog format: GNU --> install in $(datadir)
|
|
803 dnl Catalog extension: .mo after installation, .gmo in source tree
|
|
804 dnl 3) No internationalization, always use English msgid.
|
|
805 dnl Catalog format: none
|
|
806 dnl Catalog extension: none
|
|
807 dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
|
808 dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
|
809 dnl but we keep it in order not to force irrelevant filename changes on the
|
|
810 dnl maintainers.
|
|
811 dnl
|
87
|
812 AC_DEFUN([AM_WITH_NLS],
|
|
813 [AC_MSG_CHECKING([whether NLS is requested])
|
|
814 dnl Default is enabled NLS
|
|
815 AC_ARG_ENABLE(nls,
|
|
816 [ --disable-nls do not use Native Language Support],
|
|
817 USE_NLS=$enableval, USE_NLS=yes)
|
|
818 AC_MSG_RESULT($USE_NLS)
|
|
819 AC_SUBST(USE_NLS)
|
1
|
820
|
|
821 BUILD_INCLUDED_LIBINTL=no
|
|
822 USE_INCLUDED_LIBINTL=no
|
87
|
823 INTLLIBS=
|
1
|
824
|
87
|
825 dnl If we use NLS figure out what method
|
|
826 if test "$USE_NLS" = "yes"; then
|
|
827 AC_DEFINE(ENABLE_NLS, 1,
|
|
828 [Define to 1 if translation of program messages to the user's native language
|
|
829 is requested.])
|
1
|
830 AC_MSG_CHECKING([whether included gettext is requested])
|
|
831 AC_ARG_WITH(included-gettext,
|
|
832 [ --with-included-gettext use the GNU gettext library included here],
|
|
833 nls_cv_force_use_gnu_gettext=$withval,
|
|
834 nls_cv_force_use_gnu_gettext=no)
|
|
835 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
|
836
|
|
837 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
|
838 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
|
839 dnl User does not insist on using GNU NLS library. Figure out what
|
|
840 dnl to use. If GNU gettext is available we use this. Else we have
|
|
841 dnl to fall back to GNU NLS library.
|
87
|
842 CATOBJEXT=NONE
|
1
|
843
|
|
844 dnl Add a version number to the cache macros.
|
87
|
845 define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
|
|
846 define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
|
|
847
|
|
848 AC_CHECK_HEADER(libintl.h,
|
|
849 [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
|
850 [AC_TRY_LINK([#include <libintl.h>
|
|
851 extern int _nl_msg_cat_cntr;],
|
|
852 [bindtextdomain ("", "");
|
|
853 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
|
854 gt_cv_func_gnugettext_libc=yes,
|
|
855 gt_cv_func_gnugettext_libc=no)])
|
1
|
856
|
87
|
857 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
|
858 AC_CACHE_CHECK([for GNU gettext in libintl],
|
|
859 gt_cv_func_gnugettext_libintl,
|
|
860 [gt_save_LIBS="$LIBS"
|
|
861 LIBS="$LIBS -lintl $LIBICONV"
|
|
862 AC_TRY_LINK([#include <libintl.h>
|
|
863 extern int _nl_msg_cat_cntr;],
|
|
864 [bindtextdomain ("", "");
|
|
865 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
|
866 gt_cv_func_gnugettext_libintl=yes,
|
|
867 gt_cv_func_gnugettext_libintl=no)
|
|
868 LIBS="$gt_save_LIBS"])
|
|
869 fi
|
1
|
870
|
87
|
871 dnl If an already present or preinstalled GNU gettext() is found,
|
|
872 dnl use it. But if this macro is used in GNU gettext, and GNU
|
|
873 dnl gettext is already preinstalled in libintl, we update this
|
|
874 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
|
875 if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
|
876 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
|
877 && test "$PACKAGE" != gettext; }; then
|
|
878 AC_DEFINE(HAVE_GETTEXT, 1,
|
|
879 [Define if the GNU gettext() function is already present or preinstalled.])
|
|
880
|
|
881 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
|
882 dnl If iconv() is in a separate libiconv library, then anyone
|
|
883 dnl linking with libintl{.a,.so} also needs to link with
|
|
884 dnl libiconv.
|
|
885 INTLLIBS="-lintl $LIBICONV"
|
|
886 fi
|
1
|
887
|
87
|
888 gt_save_LIBS="$LIBS"
|
|
889 LIBS="$LIBS $INTLLIBS"
|
|
890 AC_CHECK_FUNCS(dcgettext)
|
|
891 LIBS="$gt_save_LIBS"
|
|
892
|
|
893 dnl Search for GNU msgfmt in the PATH.
|
|
894 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
|
895 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
|
896 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
1
|
897
|
87
|
898 dnl Search for GNU xgettext in the PATH.
|
|
899 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
900 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
|
901
|
|
902 CATOBJEXT=.gmo
|
|
903 fi
|
|
904 ])
|
|
905
|
|
906 if test "$CATOBJEXT" = "NONE"; then
|
|
907 dnl GNU gettext is not found in the C library.
|
|
908 dnl Fall back on GNU gettext library.
|
|
909 nls_cv_use_gnu_gettext=yes
|
1
|
910 fi
|
|
911 fi
|
|
912
|
|
913 if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
|
914 dnl Mark actions used to generate GNU NLS library.
|
|
915 INTLOBJS="\$(GETTOBJS)"
|
87
|
916 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
|
917 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
|
918 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
|
919 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
920 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
|
921 AC_SUBST(MSGFMT)
|
|
922 BUILD_INCLUDED_LIBINTL=yes
|
|
923 USE_INCLUDED_LIBINTL=yes
|
|
924 CATOBJEXT=.gmo
|
|
925 INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
|
|
926 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
|
927 fi
|
|
928
|
|
929 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
|
930 dnl Test whether we really found GNU msgfmt.
|
|
931 if test "$GMSGFMT" != ":"; then
|
|
932 dnl If it is no GNU msgfmt we define it as : so that the
|
|
933 dnl Makefiles still can work.
|
|
934 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
|
|
935 : ;
|
|
936 else
|
|
937 AC_MSG_RESULT(
|
|
938 [found msgfmt program is not GNU msgfmt; ignore it])
|
|
939 GMSGFMT=":"
|
|
940 fi
|
1
|
941 fi
|
|
942
|
87
|
943 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
|
944 dnl Test whether we really found GNU xgettext.
|
|
945 if test "$XGETTEXT" != ":"; then
|
|
946 dnl If it is no GNU xgettext we define it as : so that the
|
|
947 dnl Makefiles still can work.
|
|
948 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
|
|
949 : ;
|
|
950 else
|
|
951 AC_MSG_RESULT(
|
|
952 [found xgettext program is not GNU xgettext; ignore it])
|
|
953 XGETTEXT=":"
|
|
954 fi
|
1
|
955 fi
|
|
956
|
87
|
957 dnl We need to process the po/ directory.
|
|
958 POSUB=po
|
1
|
959 fi
|
87
|
960 AC_OUTPUT_COMMANDS(
|
|
961 [for ac_file in $CONFIG_FILES; do
|
|
962 # Support "outfile[:infile[:infile...]]"
|
|
963 case "$ac_file" in
|
|
964 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
|
965 esac
|
|
966 # PO directories have a Makefile.in generated from Makefile.in.in.
|
|
967 case "$ac_file" in */Makefile.in)
|
|
968 # Adjust a relative srcdir.
|
|
969 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
|
970 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
|
971 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
|
972 # In autoconf-2.13 it is called $ac_given_srcdir.
|
|
973 # In autoconf-2.50 it is called $srcdir.
|
|
974 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
|
975 case "$ac_given_srcdir" in
|
|
976 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
|
977 /*) top_srcdir="$ac_given_srcdir" ;;
|
|
978 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
|
979 esac
|
|
980 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
|
981 rm -f "$ac_dir/POTFILES"
|
|
982 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
|
983 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
|
|
984 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
|
985 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
|
986 fi
|
|
987 ;;
|
|
988 esac
|
|
989 done])
|
1
|
990
|
|
991
|
|
992 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
|
993 dnl to 'yes' because some of the testsuite requires it.
|
|
994 if test "$PACKAGE" = gettext; then
|
|
995 BUILD_INCLUDED_LIBINTL=yes
|
|
996 fi
|
|
997
|
87
|
998 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
|
999 dnl because plural.y uses bison specific features. It requires at least
|
|
1000 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
|
1001 dnl compile.
|
|
1002 dnl bison is only needed for the maintainer (who touches plural.y). But in
|
|
1003 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
|
1004 dnl the rule in general Makefile. Now, some people carelessly touch the
|
|
1005 dnl files or have a broken "make" program, hence the plural.c rule will
|
|
1006 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
|
1007 dnl present or too old.
|
|
1008 AC_CHECK_PROGS([INTLBISON], [bison])
|
|
1009 if test -z "$INTLBISON"; then
|
|
1010 ac_verc_fail=yes
|
|
1011 else
|
|
1012 dnl Found it, now check the version.
|
|
1013 AC_MSG_CHECKING([version of bison])
|
|
1014 changequote(<<,>>)dnl
|
|
1015 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
|
1016 case $ac_prog_version in
|
|
1017 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
|
1018 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
|
1019 changequote([,])dnl
|
|
1020 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
|
1021 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
|
1022 esac
|
|
1023 AC_MSG_RESULT([$ac_prog_version])
|
|
1024 fi
|
|
1025 if test $ac_verc_fail = yes; then
|
|
1026 INTLBISON=:
|
|
1027 fi
|
|
1028
|
|
1029 dnl These rules are solely for the distribution goal. While doing this
|
|
1030 dnl we only have to keep exactly one list of the available catalogs
|
|
1031 dnl in configure.in.
|
|
1032 for lang in $ALL_LINGUAS; do
|
|
1033 GMOFILES="$GMOFILES $lang.gmo"
|
|
1034 POFILES="$POFILES $lang.po"
|
|
1035 done
|
|
1036
|
1
|
1037 dnl Make all variables we use known to autoconf.
|
|
1038 AC_SUBST(BUILD_INCLUDED_LIBINTL)
|
|
1039 AC_SUBST(USE_INCLUDED_LIBINTL)
|
87
|
1040 AC_SUBST(CATALOGS)
|
1
|
1041 AC_SUBST(CATOBJEXT)
|
87
|
1042 AC_SUBST(GMOFILES)
|
|
1043 AC_SUBST(INTLLIBS)
|
1
|
1044 AC_SUBST(INTLOBJS)
|
87
|
1045 AC_SUBST(POFILES)
|
|
1046 AC_SUBST(POSUB)
|
1
|
1047
|
|
1048 dnl For backward compatibility. Some configure.ins may be using this.
|
|
1049 nls_cv_header_intl=
|
|
1050 nls_cv_header_libgt=
|
|
1051
|
|
1052 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1053 DATADIRNAME=share
|
|
1054 AC_SUBST(DATADIRNAME)
|
|
1055
|
|
1056 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1057 INSTOBJEXT=.mo
|
|
1058 AC_SUBST(INSTOBJEXT)
|
|
1059
|
|
1060 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1061 GENCAT=gencat
|
|
1062 AC_SUBST(GENCAT)
|
|
1063 ])
|
|
1064
|
87
|
1065 dnl Usage: Just like AM_WITH_NLS, which see.
|
|
1066 AC_DEFUN([AM_GNU_GETTEXT],
|
|
1067 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
|
1068 AC_REQUIRE([AC_PROG_CC])dnl
|
|
1069 AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|
1070 AC_REQUIRE([AC_PROG_RANLIB])dnl
|
|
1071 AC_REQUIRE([AC_ISC_POSIX])dnl
|
|
1072 AC_REQUIRE([AC_HEADER_STDC])dnl
|
|
1073 AC_REQUIRE([AC_C_CONST])dnl
|
|
1074 AC_REQUIRE([AC_C_INLINE])dnl
|
|
1075 AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
|
1076 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
|
1077 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
|
1078 AC_REQUIRE([AC_FUNC_MMAP])dnl
|
|
1079 AC_REQUIRE([jm_GLIBC21])dnl
|
7
|
1080
|
87
|
1081 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
|
1082 stdlib.h string.h unistd.h sys/param.h])
|
|
1083 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
|
|
1084 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
|
|
1085 strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
7
|
1086
|
87
|
1087 AM_ICONV
|
|
1088 AM_LANGINFO_CODESET
|
|
1089 AM_LC_MESSAGES
|
|
1090 AM_WITH_NLS([$1],[$2],[$3])
|
1
|
1091
|
87
|
1092 if test "x$CATOBJEXT" != "x"; then
|
|
1093 if test "x$ALL_LINGUAS" = "x"; then
|
|
1094 LINGUAS=
|
|
1095 else
|
|
1096 AC_MSG_CHECKING(for catalogs to be installed)
|
|
1097 NEW_LINGUAS=
|
|
1098 for presentlang in $ALL_LINGUAS; do
|
|
1099 useit=no
|
|
1100 for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
|
|
1101 # Use the presentlang catalog if desiredlang is
|
|
1102 # a. equal to presentlang, or
|
|
1103 # b. a variant of presentlang (because in this case,
|
|
1104 # presentlang can be used as a fallback for messages
|
|
1105 # which are not translated in the desiredlang catalog).
|
|
1106 case "$desiredlang" in
|
|
1107 "$presentlang"*) useit=yes;;
|
|
1108 esac
|
|
1109 done
|
|
1110 if test $useit = yes; then
|
|
1111 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
|
|
1112 fi
|
|
1113 done
|
|
1114 LINGUAS=$NEW_LINGUAS
|
|
1115 AC_MSG_RESULT($LINGUAS)
|
|
1116 fi
|
1
|
1117
|
87
|
1118 dnl Construct list of names of catalog files to be constructed.
|
|
1119 if test -n "$LINGUAS"; then
|
|
1120 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
|
1121 fi
|
|
1122 fi
|
7
|
1123
|
87
|
1124 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
|
1125 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
|
1126 dnl Try to locate is.
|
|
1127 MKINSTALLDIRS=
|
|
1128 if test -n "$ac_aux_dir"; then
|
|
1129 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
|
1130 fi
|
|
1131 if test -z "$MKINSTALLDIRS"; then
|
|
1132 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
|
1133 fi
|
|
1134 AC_SUBST(MKINSTALLDIRS)
|
7
|
1135
|
87
|
1136 dnl Enable libtool support if the surrounding package wishes it.
|
|
1137 INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
|
|
1138 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
7
|
1139 ])
|
1
|
1140
|
|
1141 # Search path for a program which passes the given test.
|
87
|
1142 # Ulrich Drepper <drepper@cygnus.com>, 1996.
|
|
1143 #
|
|
1144 # This file can be copied and used freely without restrictions. It can
|
|
1145 # be used in projects which are not available under the GNU General Public
|
|
1146 # License or the GNU Library General Public License but which still want
|
|
1147 # to provide support for the GNU gettext functionality.
|
|
1148 # Please note that the actual code of the GNU gettext library is covered
|
|
1149 # by the GNU Library General Public License, and the rest of the GNU
|
|
1150 # gettext package package is covered by the GNU General Public License.
|
|
1151 # They are *not* in the public domain.
|
|
1152
|
|
1153 # serial 2
|
1
|
1154
|
|
1155 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
|
1156 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
|
1157 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
|
1158 [# Extract the first word of "$2", so it can be a program name with args.
|
|
1159 set dummy $2; ac_word=[$]2
|
|
1160 AC_MSG_CHECKING([for $ac_word])
|
|
1161 AC_CACHE_VAL(ac_cv_path_$1,
|
|
1162 [case "[$]$1" in
|
|
1163 /*)
|
|
1164 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
|
1165 ;;
|
|
1166 *)
|
|
1167 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
1168 for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
|
1169 test -z "$ac_dir" && ac_dir=.
|
|
1170 if test -f $ac_dir/$ac_word; then
|
|
1171 if [$3]; then
|
|
1172 ac_cv_path_$1="$ac_dir/$ac_word"
|
|
1173 break
|
|
1174 fi
|
|
1175 fi
|
|
1176 done
|
|
1177 IFS="$ac_save_ifs"
|
|
1178 dnl If no 4th arg is given, leave the cache variable unset,
|
|
1179 dnl so AC_PATH_PROGS will keep looking.
|
|
1180 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
|
1181 ])dnl
|
|
1182 ;;
|
|
1183 esac])dnl
|
|
1184 $1="$ac_cv_path_$1"
|
|
1185 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
|
|
1186 AC_MSG_RESULT([$]$1)
|
|
1187 else
|
|
1188 AC_MSG_RESULT(no)
|
|
1189 fi
|
|
1190 AC_SUBST($1)dnl
|
|
1191 ])
|
|
1192
|
87
|
1193 #serial 1
|
16
|
1194 # This test replaces the one in autoconf.
|
|
1195 # Currently this macro should have the same name as the autoconf macro
|
|
1196 # because gettext's gettext.m4 (distributed in the automake package)
|
|
1197 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
|
|
1198 # give these diagnostics:
|
|
1199 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
|
|
1200 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
|
|
1201
|
|
1202 undefine([AC_ISC_POSIX])
|
|
1203
|
|
1204 AC_DEFUN([AC_ISC_POSIX],
|
|
1205 [
|
|
1206 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
|
|
1207 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
|
|
1208 ]
|
|
1209 )
|
|
1210
|
87
|
1211 #serial 2
|
1
|
1212
|
|
1213 # Test for the GNU C Library, version 2.1 or newer.
|
|
1214 # From Bruno Haible.
|
|
1215
|
|
1216 AC_DEFUN([jm_GLIBC21],
|
|
1217 [
|
|
1218 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
|
|
1219 ac_cv_gnu_library_2_1,
|
|
1220 [AC_EGREP_CPP([Lucky GNU user],
|
|
1221 [
|
|
1222 #include <features.h>
|
|
1223 #ifdef __GNU_LIBRARY__
|
|
1224 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
|
|
1225 Lucky GNU user
|
|
1226 #endif
|
|
1227 #endif
|
|
1228 ],
|
|
1229 ac_cv_gnu_library_2_1=yes,
|
|
1230 ac_cv_gnu_library_2_1=no)
|
|
1231 ]
|
|
1232 )
|
|
1233 AC_SUBST(GLIBC21)
|
|
1234 GLIBC21="$ac_cv_gnu_library_2_1"
|
|
1235 ]
|
|
1236 )
|
|
1237
|
87
|
1238 #serial AM2
|
1
|
1239
|
|
1240 dnl From Bruno Haible.
|
|
1241
|
87
|
1242 AC_DEFUN([AM_ICONV],
|
1
|
1243 [
|
87
|
1244 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
|
1245 dnl those with the standalone portable GNU libiconv installed).
|
1
|
1246
|
87
|
1247 AC_ARG_WITH([libiconv-prefix],
|
|
1248 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
|
1249 for dir in `echo "$withval" | tr : ' '`; do
|
|
1250 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
|
1251 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
|
1252 done
|
|
1253 ])
|
1
|
1254
|
87
|
1255 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
|
1256 am_cv_func_iconv="no, consider installing GNU libiconv"
|
|
1257 am_cv_lib_iconv=no
|
|
1258 AC_TRY_LINK([#include <stdlib.h>
|
|
1259 #include <iconv.h>],
|
|
1260 [iconv_t cd = iconv_open("","");
|
|
1261 iconv(cd,NULL,NULL,NULL,NULL);
|
|
1262 iconv_close(cd);],
|
|
1263 am_cv_func_iconv=yes)
|
|
1264 if test "$am_cv_func_iconv" != yes; then
|
|
1265 am_save_LIBS="$LIBS"
|
|
1266 LIBS="$LIBS -liconv"
|
|
1267 AC_TRY_LINK([#include <stdlib.h>
|
|
1268 #include <iconv.h>],
|
|
1269 [iconv_t cd = iconv_open("","");
|
|
1270 iconv(cd,NULL,NULL,NULL,NULL);
|
|
1271 iconv_close(cd);],
|
|
1272 am_cv_lib_iconv=yes
|
|
1273 am_cv_func_iconv=yes)
|
|
1274 LIBS="$am_save_LIBS"
|
|
1275 fi
|
|
1276 ])
|
|
1277 if test "$am_cv_func_iconv" = yes; then
|
|
1278 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
|
1279 AC_MSG_CHECKING([for iconv declaration])
|
|
1280 AC_CACHE_VAL(am_cv_proto_iconv, [
|
|
1281 AC_TRY_COMPILE([
|
|
1282 #include <stdlib.h>
|
|
1283 #include <iconv.h>
|
|
1284 extern
|
|
1285 #ifdef __cplusplus
|
|
1286 "C"
|
|
1287 #endif
|
|
1288 #if defined(__STDC__) || defined(__cplusplus)
|
|
1289 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
|
1290 #else
|
|
1291 size_t iconv();
|
|
1292 #endif
|
|
1293 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
|
1294 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
|
1295 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
|
1296 AC_MSG_RESULT([$]{ac_t:-
|
|
1297 }[$]am_cv_proto_iconv)
|
|
1298 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
|
1299 [Define as const if the declaration of iconv() needs const.])
|
1
|
1300 fi
|
87
|
1301 LIBICONV=
|
|
1302 if test "$am_cv_lib_iconv" = yes; then
|
|
1303 LIBICONV="-liconv"
|
1
|
1304 fi
|
87
|
1305 AC_SUBST(LIBICONV)
|
1
|
1306 ])
|
|
1307
|
87
|
1308 #serial AM1
|
1
|
1309
|
|
1310 dnl From Bruno Haible.
|
|
1311
|
|
1312 AC_DEFUN([AM_LANGINFO_CODESET],
|
|
1313 [
|
|
1314 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
|
|
1315 [AC_TRY_LINK([#include <langinfo.h>],
|
|
1316 [char* cs = nl_langinfo(CODESET);],
|
|
1317 am_cv_langinfo_codeset=yes,
|
|
1318 am_cv_langinfo_codeset=no)
|
|
1319 ])
|
|
1320 if test $am_cv_langinfo_codeset = yes; then
|
|
1321 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
|
|
1322 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
|
1323 fi
|
|
1324 ])
|
|
1325
|
87
|
1326 # Check whether LC_MESSAGES is available in <locale.h>.
|
|
1327 # Ulrich Drepper <drepper@cygnus.com>, 1995.
|
|
1328 #
|
|
1329 # This file can be copied and used freely without restrictions. It can
|
|
1330 # be used in projects which are not available under the GNU General Public
|
|
1331 # License or the GNU Library General Public License but which still want
|
|
1332 # to provide support for the GNU gettext functionality.
|
|
1333 # Please note that the actual code of the GNU gettext library is covered
|
|
1334 # by the GNU Library General Public License, and the rest of the GNU
|
|
1335 # gettext package package is covered by the GNU General Public License.
|
|
1336 # They are *not* in the public domain.
|
7
|
1337
|
87
|
1338 # serial 2
|
1
|
1339
|
|
1340 AC_DEFUN([AM_LC_MESSAGES],
|
87
|
1341 [if test $ac_cv_header_locale_h = yes; then
|
|
1342 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
|
1343 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
1
|
1344 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
87
|
1345 if test $am_cv_val_LC_MESSAGES = yes; then
|
|
1346 AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
|
1347 [Define if your <locale.h> file defines LC_MESSAGES.])
|
|
1348 fi
|
|
1349 fi])
|
1
|
1350
|