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
|
33
|
158 #serial 4
|
26
|
159
|
33
|
160 dnl By default, many hosts won't let programs access large files;
|
|
161 dnl one must use special compiler options to get large-file access to work.
|
|
162 dnl For more details about this brain damage please see:
|
|
163 dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
|
26
|
164
|
33
|
165 dnl Written by Paul Eggert <eggert@twinsun.com>.
|
26
|
166
|
33
|
167 dnl Internal subroutine of AC_SYS_LARGEFILE.
|
|
168 dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
|
|
169 AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
|
|
170 [AC_CACHE_CHECK([for $1 value to request large file support],
|
|
171 ac_cv_sys_largefile_$1,
|
|
172 [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
|
|
173 ac_cv_sys_largefile_$1=no
|
|
174 ifelse($1, CFLAGS,
|
|
175 [case "$host_os" in
|
|
176 # IRIX 6.2 and later require cc -n32.
|
|
177 changequote(, )dnl
|
|
178 irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
|
|
179 changequote([, ])dnl
|
|
180 if test "$GCC" != yes; then
|
|
181 ac_cv_sys_largefile_CFLAGS=-n32
|
|
182 fi
|
|
183 ac_save_CC="$CC"
|
|
184 CC="$CC $ac_cv_sys_largefile_CFLAGS"
|
|
185 AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
|
|
186 CC="$ac_save_CC"
|
|
187 esac])
|
|
188 }])])
|
26
|
189
|
33
|
190 dnl Internal subroutine of AC_SYS_LARGEFILE.
|
|
191 dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
|
|
192 AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
|
|
193 [case $2 in
|
|
194 no) ;;
|
|
195 ?*)
|
|
196 case "[$]$1" in
|
|
197 '') $1=$2 ;;
|
|
198 *) $1=[$]$1' '$2 ;;
|
|
199 esac ;;
|
|
200 esac])
|
26
|
201
|
33
|
202 dnl Internal subroutine of AC_SYS_LARGEFILE.
|
|
203 dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
|
|
204 AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
|
|
205 [AC_CACHE_CHECK([for $1], $2,
|
|
206 [$2=no
|
|
207 changequote(, )dnl
|
|
208 $4
|
|
209 for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
|
210 case "$ac_flag" in
|
|
211 -D$1)
|
|
212 $2=1 ;;
|
|
213 -D$1=*)
|
|
214 $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
|
|
215 esac
|
|
216 done
|
|
217 changequote([, ])dnl
|
|
218 ])
|
|
219 if test "[$]$2" != no; then
|
|
220 AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
|
|
221 fi])
|
26
|
222
|
33
|
223 AC_DEFUN(AC_SYS_LARGEFILE,
|
|
224 [AC_REQUIRE([AC_CANONICAL_HOST])
|
|
225 AC_ARG_ENABLE(largefile,
|
|
226 [ --disable-largefile omit support for large files])
|
|
227 if test "$enable_largefile" != no; then
|
|
228 AC_CHECK_TOOL(GETCONF, getconf)
|
|
229 AC_SYS_LARGEFILE_FLAGS(CFLAGS)
|
|
230 AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
|
|
231 AC_SYS_LARGEFILE_FLAGS(LIBS)
|
|
232
|
|
233 for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
|
234 case "$ac_flag" in
|
|
235 no) ;;
|
|
236 -D_FILE_OFFSET_BITS=*) ;;
|
|
237 -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
|
|
238 -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
|
|
239 -D?* | -I?*)
|
|
240 AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
|
|
241 *)
|
|
242 AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
|
|
243 esac
|
|
244 done
|
|
245 AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
|
|
246 AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
|
|
247 AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
|
|
248 ac_cv_sys_file_offset_bits,
|
|
249 [Number of bits in a file offset, on hosts where this is settable.]
|
|
250 [case "$host_os" in
|
|
251 # HP-UX 10.20 and later
|
|
252 hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
|
253 ac_cv_sys_file_offset_bits=64 ;;
|
|
254 esac])
|
|
255 AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
|
|
256 ac_cv_sys_largefile_source,
|
|
257 [Define to make fseeko etc. visible, on some hosts.],
|
|
258 [case "$host_os" in
|
|
259 # HP-UX 10.20 and later
|
|
260 hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
|
261 ac_cv_sys_largefile_source=1 ;;
|
|
262 esac])
|
|
263 AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
|
|
264 ac_cv_sys_large_files,
|
|
265 [Define for large files, on AIX-style hosts.],
|
|
266 [case "$host_os" in
|
|
267 # AIX 4.2 and later
|
|
268 aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
|
|
269 ac_cv_sys_large_files=1 ;;
|
|
270 esac])
|
|
271 fi
|
|
272 ])
|
26
|
273
|
16
|
274
|
|
275 # serial 1
|
|
276
|
|
277 AC_DEFUN([AM_C_PROTOTYPES],
|
|
278 [AC_REQUIRE([AM_PROG_CC_STDC])
|
|
279 AC_REQUIRE([AC_PROG_CPP])
|
|
280 AC_MSG_CHECKING([for function prototypes])
|
|
281 if test "$am_cv_prog_cc_stdc" != no; then
|
|
282 AC_MSG_RESULT(yes)
|
|
283 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
|
|
284 U= ANSI2KNR=
|
|
285 else
|
|
286 AC_MSG_RESULT(no)
|
|
287 U=_ ANSI2KNR=./ansi2knr
|
33
|
288 # Ensure some checks needed by ansi2knr itself.
|
|
289 AC_HEADER_STDC
|
|
290 AC_CHECK_HEADERS(string.h)
|
16
|
291 fi
|
|
292 AC_SUBST(U)dnl
|
|
293 AC_SUBST(ANSI2KNR)dnl
|
|
294 ])
|
|
295
|
|
296
|
|
297 # serial 1
|
1
|
298
|
16
|
299 # @defmac AC_PROG_CC_STDC
|
|
300 # @maindex PROG_CC_STDC
|
|
301 # @ovindex CC
|
|
302 # If the C compiler in not in ANSI C mode by default, try to add an option
|
|
303 # to output variable @code{CC} to make it so. This macro tries various
|
|
304 # options that select ANSI C on some system or another. It considers the
|
|
305 # compiler to be in ANSI C mode if it handles function prototypes correctly.
|
|
306 #
|
|
307 # If you use this macro, you should check after calling it whether the C
|
|
308 # compiler has been set to accept ANSI C; if not, the shell variable
|
|
309 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
|
|
310 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
|
|
311 # program @code{ansi2knr}, which comes with Ghostscript.
|
|
312 # @end defmac
|
1
|
313
|
16
|
314 AC_DEFUN([AM_PROG_CC_STDC],
|
|
315 [AC_REQUIRE([AC_PROG_CC])
|
|
316 AC_BEFORE([$0], [AC_C_INLINE])
|
|
317 AC_BEFORE([$0], [AC_C_CONST])
|
|
318 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
|
|
319 dnl a magic option to avoid problems with ANSI preprocessor commands
|
|
320 dnl like #elif.
|
|
321 dnl FIXME: can't do this because then AC_AIX won't work due to a
|
|
322 dnl circular dependency.
|
|
323 dnl AC_BEFORE([$0], [AC_PROG_CPP])
|
33
|
324 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
|
16
|
325 AC_CACHE_VAL(am_cv_prog_cc_stdc,
|
|
326 [am_cv_prog_cc_stdc=no
|
|
327 ac_save_CC="$CC"
|
|
328 # Don't try gcc -ansi; that turns off useful extensions and
|
|
329 # breaks some systems' header files.
|
|
330 # AIX -qlanglvl=ansi
|
|
331 # Ultrix and OSF/1 -std1
|
33
|
332 # HP-UX -Aa -D_HPUX_SOURCE
|
16
|
333 # SVR4 -Xc -D__EXTENSIONS__
|
33
|
334 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
16
|
335 do
|
|
336 CC="$ac_save_CC $ac_arg"
|
|
337 AC_TRY_COMPILE(
|
|
338 [#include <stdarg.h>
|
|
339 #include <stdio.h>
|
|
340 #include <sys/types.h>
|
|
341 #include <sys/stat.h>
|
|
342 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
|
343 struct buf { int x; };
|
|
344 FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
|
345 static char *e (p, i)
|
|
346 char **p;
|
|
347 int i;
|
|
348 {
|
|
349 return p[i];
|
|
350 }
|
|
351 static char *f (char * (*g) (char **, int), char **p, ...)
|
|
352 {
|
|
353 char *s;
|
|
354 va_list v;
|
|
355 va_start (v,p);
|
|
356 s = g (p, va_arg (v,int));
|
|
357 va_end (v);
|
|
358 return s;
|
|
359 }
|
|
360 int test (int i, double x);
|
|
361 struct s1 {int (*f) (int a);};
|
|
362 struct s2 {int (*f) (double a);};
|
|
363 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
|
364 int argc;
|
|
365 char **argv;
|
|
366 ], [
|
|
367 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
|
368 ],
|
|
369 [am_cv_prog_cc_stdc="$ac_arg"; break])
|
|
370 done
|
|
371 CC="$ac_save_CC"
|
|
372 ])
|
|
373 if test -z "$am_cv_prog_cc_stdc"; then
|
|
374 AC_MSG_RESULT([none needed])
|
|
375 else
|
33
|
376 AC_MSG_RESULT($am_cv_prog_cc_stdc)
|
16
|
377 fi
|
|
378 case "x$am_cv_prog_cc_stdc" in
|
|
379 x|xno) ;;
|
|
380 *) CC="$CC $am_cv_prog_cc_stdc" ;;
|
|
381 esac
|
|
382 ])
|
1
|
383
|
26
|
384 # Add --enable-maintainer-mode option to configure.
|
|
385 # From Jim Meyering
|
|
386
|
|
387 # serial 1
|
|
388
|
|
389 AC_DEFUN([AM_MAINTAINER_MODE],
|
|
390 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
|
391 dnl maintainer-mode is disabled by default
|
|
392 AC_ARG_ENABLE(maintainer-mode,
|
|
393 [ --enable-maintainer-mode enable make rules and dependencies not useful
|
|
394 (and sometimes confusing) to the casual installer],
|
|
395 USE_MAINTAINER_MODE=$enableval,
|
|
396 USE_MAINTAINER_MODE=no)
|
33
|
397 AC_MSG_RESULT($USE_MAINTAINER_MODE)
|
|
398 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
|
26
|
399 MAINT=$MAINTAINER_MODE_TRUE
|
|
400 AC_SUBST(MAINT)dnl
|
|
401 ]
|
|
402 )
|
1
|
403
|
33
|
404 # Define a conditional.
|
|
405
|
|
406 AC_DEFUN([AM_CONDITIONAL],
|
|
407 [AC_SUBST($1_TRUE)
|
|
408 AC_SUBST($1_FALSE)
|
|
409 if $2; then
|
|
410 $1_TRUE=
|
|
411 $1_FALSE='#'
|
|
412 else
|
|
413 $1_TRUE='#'
|
|
414 $1_FALSE=
|
|
415 fi])
|
|
416
|
1
|
417 # Configure paths for GLIB
|
|
418 # Owen Taylor 97-11-3
|
|
419
|
|
420 dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
|
421 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
|
|
422 dnl gthread is specified in MODULES, pass to glib-config
|
|
423 dnl
|
|
424 AC_DEFUN(AM_PATH_GLIB,
|
|
425 [dnl
|
|
426 dnl Get the cflags and libraries from the glib-config script
|
|
427 dnl
|
|
428 AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
|
|
429 glib_config_prefix="$withval", glib_config_prefix="")
|
|
430 AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
|
|
431 glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
|
|
432 AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
|
|
433 , enable_glibtest=yes)
|
|
434
|
|
435 if test x$glib_config_exec_prefix != x ; then
|
|
436 glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
|
|
437 if test x${GLIB_CONFIG+set} != xset ; then
|
|
438 GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
|
|
439 fi
|
|
440 fi
|
|
441 if test x$glib_config_prefix != x ; then
|
|
442 glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
|
|
443 if test x${GLIB_CONFIG+set} != xset ; then
|
|
444 GLIB_CONFIG=$glib_config_prefix/bin/glib-config
|
|
445 fi
|
|
446 fi
|
|
447
|
|
448 for module in . $4
|
|
449 do
|
|
450 case "$module" in
|
|
451 gmodule)
|
|
452 glib_config_args="$glib_config_args gmodule"
|
|
453 ;;
|
|
454 gthread)
|
|
455 glib_config_args="$glib_config_args gthread"
|
|
456 ;;
|
|
457 esac
|
|
458 done
|
|
459
|
|
460 AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
|
|
461 min_glib_version=ifelse([$1], ,0.99.7,$1)
|
|
462 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
|
|
463 no_glib=""
|
|
464 if test "$GLIB_CONFIG" = "no" ; then
|
|
465 no_glib=yes
|
|
466 else
|
|
467 GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
|
|
468 GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
|
|
469 glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
|
|
470 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
471 glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
|
|
472 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
473 glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
|
|
474 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
|
475 if test "x$enable_glibtest" = "xyes" ; then
|
|
476 ac_save_CFLAGS="$CFLAGS"
|
|
477 ac_save_LIBS="$LIBS"
|
|
478 CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
|
479 LIBS="$GLIB_LIBS $LIBS"
|
|
480 dnl
|
|
481 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
|
|
482 dnl checks the results of glib-config to some extent
|
|
483 dnl
|
|
484 rm -f conf.glibtest
|
|
485 AC_TRY_RUN([
|
|
486 #include <glib.h>
|
|
487 #include <stdio.h>
|
|
488 #include <stdlib.h>
|
|
489
|
|
490 int
|
|
491 main ()
|
|
492 {
|
|
493 int major, minor, micro;
|
|
494 char *tmp_version;
|
|
495
|
|
496 system ("touch conf.glibtest");
|
|
497
|
|
498 /* HP/UX 9 (%@#!) writes to sscanf strings */
|
|
499 tmp_version = g_strdup("$min_glib_version");
|
|
500 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
|
501 printf("%s, bad version string\n", "$min_glib_version");
|
|
502 exit(1);
|
|
503 }
|
|
504
|
|
505 if ((glib_major_version != $glib_config_major_version) ||
|
|
506 (glib_minor_version != $glib_config_minor_version) ||
|
|
507 (glib_micro_version != $glib_config_micro_version))
|
|
508 {
|
|
509 printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
|
|
510 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
|
|
511 glib_major_version, glib_minor_version, glib_micro_version);
|
|
512 printf ("*** was found! If glib-config was correct, then it is best\n");
|
|
513 printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
|
|
514 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
|
515 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
|
516 printf("*** required on your system.\n");
|
|
517 printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
|
|
518 printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
|
|
519 printf("*** before re-running configure\n");
|
|
520 }
|
|
521 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
|
|
522 (glib_minor_version != GLIB_MINOR_VERSION) ||
|
|
523 (glib_micro_version != GLIB_MICRO_VERSION))
|
|
524 {
|
|
525 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
|
|
526 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
|
|
527 printf("*** library (version %d.%d.%d)\n",
|
|
528 glib_major_version, glib_minor_version, glib_micro_version);
|
|
529 }
|
|
530 else
|
|
531 {
|
|
532 if ((glib_major_version > major) ||
|
|
533 ((glib_major_version == major) && (glib_minor_version > minor)) ||
|
|
534 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
|
|
535 {
|
|
536 return 0;
|
|
537 }
|
|
538 else
|
|
539 {
|
|
540 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
|
|
541 glib_major_version, glib_minor_version, glib_micro_version);
|
|
542 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
|
|
543 major, minor, micro);
|
|
544 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
|
|
545 printf("***\n");
|
|
546 printf("*** If you have already installed a sufficiently new version, this error\n");
|
|
547 printf("*** probably means that the wrong copy of the glib-config shell script is\n");
|
|
548 printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
|
549 printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
|
|
550 printf("*** correct copy of glib-config. (In this case, you will have to\n");
|
|
551 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
|
552 printf("*** so that the correct libraries are found at run-time))\n");
|
|
553 }
|
|
554 }
|
|
555 return 1;
|
|
556 }
|
|
557 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
558 CFLAGS="$ac_save_CFLAGS"
|
|
559 LIBS="$ac_save_LIBS"
|
|
560 fi
|
|
561 fi
|
|
562 if test "x$no_glib" = x ; then
|
|
563 AC_MSG_RESULT(yes)
|
|
564 ifelse([$2], , :, [$2])
|
|
565 else
|
|
566 AC_MSG_RESULT(no)
|
|
567 if test "$GLIB_CONFIG" = "no" ; then
|
|
568 echo "*** The glib-config script installed by GLIB could not be found"
|
|
569 echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
|
|
570 echo "*** your path, or set the GLIB_CONFIG environment variable to the"
|
|
571 echo "*** full path to glib-config."
|
|
572 else
|
|
573 if test -f conf.glibtest ; then
|
|
574 :
|
|
575 else
|
|
576 echo "*** Could not run GLIB test program, checking why..."
|
|
577 CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
|
578 LIBS="$LIBS $GLIB_LIBS"
|
|
579 AC_TRY_LINK([
|
|
580 #include <glib.h>
|
|
581 #include <stdio.h>
|
|
582 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
|
|
583 [ echo "*** The test program compiled, but did not run. This usually means"
|
|
584 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
|
|
585 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
|
|
586 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
|
587 echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
|
588 echo "*** is required on your system"
|
|
589 echo "***"
|
|
590 echo "*** If you have an old version installed, it is best to remove it, although"
|
|
591 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
|
592 echo "***"
|
|
593 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
|
594 echo "*** came with the system with the command"
|
|
595 echo "***"
|
|
596 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
|
597 [ echo "*** The test program failed to compile or link. See the file config.log for the"
|
|
598 echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
|
|
599 echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
|
|
600 echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
|
|
601 CFLAGS="$ac_save_CFLAGS"
|
|
602 LIBS="$ac_save_LIBS"
|
|
603 fi
|
|
604 fi
|
|
605 GLIB_CFLAGS=""
|
|
606 GLIB_LIBS=""
|
|
607 ifelse([$3], , :, [$3])
|
|
608 fi
|
|
609 AC_SUBST(GLIB_CFLAGS)
|
|
610 AC_SUBST(GLIB_LIBS)
|
|
611 rm -f conf.glibtest
|
|
612 ])
|
|
613
|
26
|
614
|
|
615 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
|
|
616 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
|
|
617 dnl also defines GSTUFF_PKG_ERRORS on error
|
|
618 AC_DEFUN(PKG_CHECK_MODULES, [
|
|
619 succeeded=no
|
|
620
|
|
621 if test -z "$PKG_CONFIG"; then
|
|
622 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
|
623 fi
|
|
624
|
|
625 if test "$PKG_CONFIG" = "no" ; then
|
|
626 echo "*** The pkg-config script could not be found. Make sure it is"
|
|
627 echo "*** in your path, or set the PKG_CONFIG environment variable"
|
|
628 echo "*** to the full path to pkg-config."
|
|
629 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
|
|
630 else
|
|
631 PKG_CONFIG_MIN_VERSION=0.9.0
|
|
632 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
|
|
633 AC_MSG_CHECKING(for $2)
|
|
634
|
|
635 if $PKG_CONFIG --exists "$2" ; then
|
|
636 AC_MSG_RESULT(yes)
|
|
637 succeeded=yes
|
|
638
|
|
639 AC_MSG_CHECKING($1_CFLAGS)
|
|
640 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
|
|
641 AC_MSG_RESULT($$1_CFLAGS)
|
|
642
|
|
643 AC_MSG_CHECKING($1_LIBS)
|
|
644 $1_LIBS=`$PKG_CONFIG --libs "$2"`
|
|
645 AC_MSG_RESULT($$1_LIBS)
|
|
646 else
|
|
647 $1_CFLAGS=""
|
|
648 $1_LIBS=""
|
|
649 ## If we have a custom action on failure, don't print errors, but
|
|
650 ## do set a variable so people can do so.
|
|
651 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
|
652 ifelse([$4], ,echo $$1_PKG_ERRORS,)
|
|
653 fi
|
|
654
|
|
655 AC_SUBST($1_CFLAGS)
|
|
656 AC_SUBST($1_LIBS)
|
|
657 else
|
|
658 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
|
|
659 echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
|
660 fi
|
|
661 fi
|
|
662
|
|
663 if test $succeeded = yes; then
|
|
664 ifelse([$3], , :, [$3])
|
|
665 else
|
|
666 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])
|
|
667 fi
|
|
668 ])
|
|
669
|
|
670
|
|
671
|
33
|
672
|
|
673 # serial 1
|
|
674
|
|
675 AC_DEFUN([AM_WITH_DMALLOC],
|
|
676 [AC_MSG_CHECKING(if malloc debugging is wanted)
|
|
677 AC_ARG_WITH(dmalloc,
|
|
678 [ --with-dmalloc use dmalloc, as in
|
|
679 ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz],
|
|
680 [if test "$withval" = yes; then
|
|
681 AC_MSG_RESULT(yes)
|
|
682 AC_DEFINE(WITH_DMALLOC,1,
|
|
683 [Define if using the dmalloc debugging malloc package])
|
|
684 LIBS="$LIBS -ldmalloc"
|
|
685 LDFLAGS="$LDFLAGS -g"
|
|
686 else
|
|
687 AC_MSG_RESULT(no)
|
|
688 fi], [AC_MSG_RESULT(no)])
|
|
689 ])
|
|
690
|
1
|
691 # Configure paths for GTK+
|
|
692 # Owen Taylor 97-11-3
|
|
693
|
|
694 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
|
695 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
|
|
696 dnl
|
|
697 AC_DEFUN(AM_PATH_GTK,
|
|
698 [dnl
|
|
699 dnl Get the cflags and libraries from the gtk-config script
|
|
700 dnl
|
|
701 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
|
|
702 gtk_config_prefix="$withval", gtk_config_prefix="")
|
|
703 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
|
|
704 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
|
|
705 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
|
|
706 , enable_gtktest=yes)
|
|
707
|
|
708 for module in . $4
|
|
709 do
|
|
710 case "$module" in
|
|
711 gthread)
|
|
712 gtk_config_args="$gtk_config_args gthread"
|
|
713 ;;
|
|
714 esac
|
|
715 done
|
|
716
|
|
717 if test x$gtk_config_exec_prefix != x ; then
|
|
718 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
|
|
719 if test x${GTK_CONFIG+set} != xset ; then
|
|
720 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
|
|
721 fi
|
|
722 fi
|
|
723 if test x$gtk_config_prefix != x ; then
|
|
724 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
|
|
725 if test x${GTK_CONFIG+set} != xset ; then
|
|
726 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
|
|
727 fi
|
|
728 fi
|
|
729
|
|
730 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
|
731 min_gtk_version=ifelse([$1], ,0.99.7,$1)
|
|
732 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
|
|
733 no_gtk=""
|
|
734 if test "$GTK_CONFIG" = "no" ; then
|
|
735 no_gtk=yes
|
|
736 else
|
|
737 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
|
|
738 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
|
|
739 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
|
|
740 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
741 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
|
|
742 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
743 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
|
|
744 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
|
745 if test "x$enable_gtktest" = "xyes" ; then
|
|
746 ac_save_CFLAGS="$CFLAGS"
|
|
747 ac_save_LIBS="$LIBS"
|
|
748 CFLAGS="$CFLAGS $GTK_CFLAGS"
|
|
749 LIBS="$GTK_LIBS $LIBS"
|
|
750 dnl
|
|
751 dnl Now check if the installed GTK is sufficiently new. (Also sanity
|
|
752 dnl checks the results of gtk-config to some extent
|
|
753 dnl
|
|
754 rm -f conf.gtktest
|
|
755 AC_TRY_RUN([
|
|
756 #include <gtk/gtk.h>
|
|
757 #include <stdio.h>
|
|
758 #include <stdlib.h>
|
|
759
|
|
760 int
|
|
761 main ()
|
|
762 {
|
|
763 int major, minor, micro;
|
|
764 char *tmp_version;
|
|
765
|
|
766 system ("touch conf.gtktest");
|
|
767
|
|
768 /* HP/UX 9 (%@#!) writes to sscanf strings */
|
|
769 tmp_version = g_strdup("$min_gtk_version");
|
|
770 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
|
771 printf("%s, bad version string\n", "$min_gtk_version");
|
|
772 exit(1);
|
|
773 }
|
|
774
|
|
775 if ((gtk_major_version != $gtk_config_major_version) ||
|
|
776 (gtk_minor_version != $gtk_config_minor_version) ||
|
|
777 (gtk_micro_version != $gtk_config_micro_version))
|
|
778 {
|
|
779 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
|
|
780 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
|
|
781 gtk_major_version, gtk_minor_version, gtk_micro_version);
|
|
782 printf ("*** was found! If gtk-config was correct, then it is best\n");
|
|
783 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
|
|
784 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
|
785 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
|
786 printf("*** required on your system.\n");
|
|
787 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
|
|
788 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
|
|
789 printf("*** before re-running configure\n");
|
|
790 }
|
|
791 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
|
|
792 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|
|
793 (gtk_minor_version != GTK_MINOR_VERSION) ||
|
|
794 (gtk_micro_version != GTK_MICRO_VERSION))
|
|
795 {
|
|
796 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|
|
797 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|
|
798 printf("*** library (version %d.%d.%d)\n",
|
|
799 gtk_major_version, gtk_minor_version, gtk_micro_version);
|
|
800 }
|
|
801 #endif /* defined (GTK_MAJOR_VERSION) ... */
|
|
802 else
|
|
803 {
|
|
804 if ((gtk_major_version > major) ||
|
|
805 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|
|
806 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
|
|
807 {
|
|
808 return 0;
|
|
809 }
|
|
810 else
|
|
811 {
|
|
812 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|
|
813 gtk_major_version, gtk_minor_version, gtk_micro_version);
|
|
814 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
|
|
815 major, minor, micro);
|
|
816 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
|
|
817 printf("***\n");
|
|
818 printf("*** If you have already installed a sufficiently new version, this error\n");
|
|
819 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
|
|
820 printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
|
821 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
|
|
822 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
|
|
823 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
|
824 printf("*** so that the correct libraries are found at run-time))\n");
|
|
825 }
|
|
826 }
|
|
827 return 1;
|
|
828 }
|
|
829 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
830 CFLAGS="$ac_save_CFLAGS"
|
|
831 LIBS="$ac_save_LIBS"
|
|
832 fi
|
|
833 fi
|
|
834 if test "x$no_gtk" = x ; then
|
|
835 AC_MSG_RESULT(yes)
|
|
836 ifelse([$2], , :, [$2])
|
|
837 else
|
|
838 AC_MSG_RESULT(no)
|
|
839 if test "$GTK_CONFIG" = "no" ; then
|
|
840 echo "*** The gtk-config script installed by GTK could not be found"
|
|
841 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
|
|
842 echo "*** your path, or set the GTK_CONFIG environment variable to the"
|
|
843 echo "*** full path to gtk-config."
|
|
844 else
|
|
845 if test -f conf.gtktest ; then
|
|
846 :
|
|
847 else
|
|
848 echo "*** Could not run GTK test program, checking why..."
|
|
849 CFLAGS="$CFLAGS $GTK_CFLAGS"
|
|
850 LIBS="$LIBS $GTK_LIBS"
|
|
851 AC_TRY_LINK([
|
|
852 #include <gtk/gtk.h>
|
|
853 #include <stdio.h>
|
|
854 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
|
|
855 [ echo "*** The test program compiled, but did not run. This usually means"
|
|
856 echo "*** that the run-time linker is not finding GTK or finding the wrong"
|
|
857 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
|
|
858 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
|
859 echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
|
860 echo "*** is required on your system"
|
|
861 echo "***"
|
|
862 echo "*** If you have an old version installed, it is best to remove it, although"
|
|
863 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
|
864 echo "***"
|
|
865 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
|
866 echo "*** came with the system with the command"
|
|
867 echo "***"
|
|
868 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
|
869 [ echo "*** The test program failed to compile or link. See the file config.log for the"
|
|
870 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
|
|
871 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
|
|
872 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
|
|
873 CFLAGS="$ac_save_CFLAGS"
|
|
874 LIBS="$ac_save_LIBS"
|
|
875 fi
|
|
876 fi
|
|
877 GTK_CFLAGS=""
|
|
878 GTK_LIBS=""
|
|
879 ifelse([$3], , :, [$3])
|
|
880 fi
|
|
881 AC_SUBST(GTK_CFLAGS)
|
|
882 AC_SUBST(GTK_LIBS)
|
|
883 rm -f conf.gtktest
|
|
884 ])
|
|
885
|
7
|
886 # gettext.m4 serial 17 (gettext-0.11.5)
|
|
887 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
|
888 dnl This file is free software, distributed under the terms of the GNU
|
|
889 dnl General Public License. As a special exception to the GNU General
|
|
890 dnl Public License, this file may be distributed as part of a program
|
|
891 dnl that contains a configuration script generated by Autoconf, under
|
|
892 dnl the same distribution terms as the rest of that program.
|
|
893 dnl
|
|
894 dnl This file can can be used in projects which are not available under
|
|
895 dnl the GNU General Public License or the GNU Library General Public
|
|
896 dnl License but which still want to provide support for the GNU gettext
|
|
897 dnl functionality.
|
|
898 dnl Please note that the actual code of the GNU gettext library is covered
|
|
899 dnl by the GNU Library General Public License, and the rest of the GNU
|
|
900 dnl gettext package package is covered by the GNU General Public License.
|
|
901 dnl They are *not* in the public domain.
|
1
|
902
|
7
|
903 dnl Authors:
|
|
904 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
|
|
905 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
|
|
906
|
|
907 dnl Macro to add for using GNU gettext.
|
1
|
908
|
7
|
909 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
|
|
910 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
|
|
911 dnl default (if it is not specified or empty) is 'no-libtool'.
|
|
912 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
|
|
913 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
|
|
914 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
|
1
|
915 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
|
916 dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
7
|
917 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
|
1
|
918 dnl $(top_builddir)/intl/libintl.a will be created.
|
|
919 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
|
920 dnl implementations (in libc or libintl) without the ngettext() function
|
7
|
921 dnl will be ignored. If NEEDSYMBOL is specified and is
|
|
922 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
|
|
923 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
|
|
924 dnl INTLDIR is used to find the intl libraries. If empty,
|
1
|
925 dnl the value `$(top_builddir)/intl/' is used.
|
|
926 dnl
|
|
927 dnl The result of the configuration is one of three cases:
|
|
928 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
|
|
929 dnl and used.
|
|
930 dnl Catalog format: GNU --> install in $(datadir)
|
|
931 dnl Catalog extension: .mo after installation, .gmo in source tree
|
|
932 dnl 2) GNU gettext has been found in the system's C library.
|
|
933 dnl Catalog format: GNU --> install in $(datadir)
|
|
934 dnl Catalog extension: .mo after installation, .gmo in source tree
|
|
935 dnl 3) No internationalization, always use English msgid.
|
|
936 dnl Catalog format: none
|
|
937 dnl Catalog extension: none
|
7
|
938 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
|
1
|
939 dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
|
940 dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
|
941 dnl but we keep it in order not to force irrelevant filename changes on the
|
|
942 dnl maintainers.
|
|
943 dnl
|
7
|
944 AC_DEFUN([AM_GNU_GETTEXT],
|
|
945 [
|
|
946 dnl Argument checking.
|
|
947 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
|
|
948 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
|
|
949 ])])])])])
|
|
950 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
|
|
951 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
|
|
952 ])])])])
|
|
953 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
|
|
954 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
|
|
955
|
|
956 AC_REQUIRE([AM_PO_SUBDIRS])dnl
|
|
957 ifelse(gt_included_intl, yes, [
|
|
958 AC_REQUIRE([AM_INTL_SUBDIR])dnl
|
|
959 ])
|
|
960
|
|
961 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
|
962 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
963 AC_REQUIRE([AC_LIB_RPATH])
|
1
|
964
|
7
|
965 dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
|
966 dnl Ideally we would do this search only after the
|
|
967 dnl if test "$USE_NLS" = "yes"; then
|
|
968 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
|
969 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
|
|
970 dnl the configure script would need to contain the same shell code
|
|
971 dnl again, outside any 'if'. There are two solutions:
|
|
972 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
|
|
973 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
|
|
974 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
|
|
975 dnl documented, we avoid it.
|
|
976 ifelse(gt_included_intl, yes, , [
|
|
977 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
|
978 ])
|
|
979
|
|
980 AC_MSG_CHECKING([whether NLS is requested])
|
|
981 dnl Default is enabled NLS
|
|
982 AC_ARG_ENABLE(nls,
|
|
983 [ --disable-nls do not use Native Language Support],
|
|
984 USE_NLS=$enableval, USE_NLS=yes)
|
|
985 AC_MSG_RESULT($USE_NLS)
|
|
986 AC_SUBST(USE_NLS)
|
|
987
|
|
988 ifelse(gt_included_intl, yes, [
|
1
|
989 BUILD_INCLUDED_LIBINTL=no
|
|
990 USE_INCLUDED_LIBINTL=no
|
7
|
991 ])
|
|
992 LIBINTL=
|
|
993 LTLIBINTL=
|
|
994 POSUB=
|
1
|
995
|
7
|
996 dnl If we use NLS figure out what method
|
|
997 if test "$USE_NLS" = "yes"; then
|
|
998 gt_use_preinstalled_gnugettext=no
|
|
999 ifelse(gt_included_intl, yes, [
|
1
|
1000 AC_MSG_CHECKING([whether included gettext is requested])
|
|
1001 AC_ARG_WITH(included-gettext,
|
|
1002 [ --with-included-gettext use the GNU gettext library included here],
|
|
1003 nls_cv_force_use_gnu_gettext=$withval,
|
|
1004 nls_cv_force_use_gnu_gettext=no)
|
|
1005 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
|
1006
|
|
1007 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
|
1008 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
7
|
1009 ])
|
1
|
1010 dnl User does not insist on using GNU NLS library. Figure out what
|
|
1011 dnl to use. If GNU gettext is available we use this. Else we have
|
|
1012 dnl to fall back to GNU NLS library.
|
|
1013
|
|
1014 dnl Add a version number to the cache macros.
|
7
|
1015 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
|
|
1016 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
|
|
1017 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
|
1
|
1018
|
7
|
1019 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
|
1020 [AC_TRY_LINK([#include <libintl.h>
|
|
1021 ]ifelse([$2], [need-formatstring-macros],
|
|
1022 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
|
1023 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
|
1024 #endif
|
|
1025 changequote(,)dnl
|
|
1026 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
|
1027 changequote([,])dnl
|
|
1028 ], [])[extern int _nl_msg_cat_cntr;
|
|
1029 extern int *_nl_domain_bindings;],
|
|
1030 [bindtextdomain ("", "");
|
|
1031 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
|
|
1032 gt_cv_func_gnugettext_libc=yes,
|
|
1033 gt_cv_func_gnugettext_libc=no)])
|
1
|
1034
|
7
|
1035 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
|
1036 dnl Sometimes libintl requires libiconv, so first search for libiconv.
|
|
1037 ifelse(gt_included_intl, yes, , [
|
|
1038 AM_ICONV_LINK
|
|
1039 ])
|
|
1040 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
|
|
1041 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
|
|
1042 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
|
|
1043 dnl even if libiconv doesn't exist.
|
|
1044 AC_LIB_LINKFLAGS_BODY([intl])
|
|
1045 AC_CACHE_CHECK([for GNU gettext in libintl],
|
|
1046 gt_cv_func_gnugettext_libintl,
|
|
1047 [gt_save_CPPFLAGS="$CPPFLAGS"
|
|
1048 CPPFLAGS="$CPPFLAGS $INCINTL"
|
|
1049 gt_save_LIBS="$LIBS"
|
|
1050 LIBS="$LIBS $LIBINTL"
|
|
1051 dnl Now see whether libintl exists and does not depend on libiconv.
|
|
1052 AC_TRY_LINK([#include <libintl.h>
|
|
1053 ]ifelse([$2], [need-formatstring-macros],
|
|
1054 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
|
1055 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
|
1056 #endif
|
|
1057 changequote(,)dnl
|
|
1058 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
|
1059 changequote([,])dnl
|
|
1060 ], [])[extern int _nl_msg_cat_cntr;
|
|
1061 extern
|
|
1062 #ifdef __cplusplus
|
|
1063 "C"
|
|
1064 #endif
|
|
1065 const char *_nl_expand_alias ();],
|
|
1066 [bindtextdomain ("", "");
|
|
1067 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
|
1068 gt_cv_func_gnugettext_libintl=yes,
|
|
1069 gt_cv_func_gnugettext_libintl=no)
|
|
1070 dnl Now see whether libintl exists and depends on libiconv.
|
|
1071 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
|
|
1072 LIBS="$LIBS $LIBICONV"
|
|
1073 AC_TRY_LINK([#include <libintl.h>
|
|
1074 ]ifelse([$2], [need-formatstring-macros],
|
|
1075 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
|
|
1076 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
|
|
1077 #endif
|
|
1078 changequote(,)dnl
|
|
1079 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
|
|
1080 changequote([,])dnl
|
|
1081 ], [])[extern int _nl_msg_cat_cntr;
|
|
1082 extern
|
|
1083 #ifdef __cplusplus
|
|
1084 "C"
|
|
1085 #endif
|
|
1086 const char *_nl_expand_alias ();],
|
|
1087 [bindtextdomain ("", "");
|
|
1088 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
|
|
1089 [LIBINTL="$LIBINTL $LIBICONV"
|
|
1090 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
|
|
1091 gt_cv_func_gnugettext_libintl=yes
|
|
1092 ])
|
|
1093 fi
|
|
1094 CPPFLAGS="$gt_save_CPPFLAGS"
|
|
1095 LIBS="$gt_save_LIBS"])
|
|
1096 fi
|
1
|
1097
|
7
|
1098 dnl If an already present or preinstalled GNU gettext() is found,
|
|
1099 dnl use it. But if this macro is used in GNU gettext, and GNU
|
|
1100 dnl gettext is already preinstalled in libintl, we update this
|
|
1101 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
|
1102 if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
|
1103 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
|
1104 && test "$PACKAGE" != gettext; }; then
|
|
1105 gt_use_preinstalled_gnugettext=yes
|
|
1106 else
|
|
1107 dnl Reset the values set by searching for libintl.
|
|
1108 LIBINTL=
|
|
1109 LTLIBINTL=
|
|
1110 INCINTL=
|
|
1111 fi
|
1
|
1112
|
7
|
1113 ifelse(gt_included_intl, yes, [
|
|
1114 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
|
|
1115 dnl GNU gettext is not found in the C library.
|
|
1116 dnl Fall back on included GNU gettext library.
|
|
1117 nls_cv_use_gnu_gettext=yes
|
1
|
1118 fi
|
|
1119 fi
|
|
1120
|
|
1121 if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
|
1122 dnl Mark actions used to generate GNU NLS library.
|
|
1123 INTLOBJS="\$(GETTOBJS)"
|
7
|
1124 BUILD_INCLUDED_LIBINTL=yes
|
|
1125 USE_INCLUDED_LIBINTL=yes
|
|
1126 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
|
|
1127 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
|
|
1128 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
1
|
1129 fi
|
|
1130
|
7
|
1131 if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
|
1132 || test "$nls_cv_use_gnu_gettext" = "yes"; then
|
|
1133 dnl Mark actions to use GNU gettext tools.
|
|
1134 CATOBJEXT=.gmo
|
|
1135 fi
|
|
1136 ])
|
|
1137
|
|
1138 if test "$gt_use_preinstalled_gnugettext" = "yes" \
|
|
1139 || test "$nls_cv_use_gnu_gettext" = "yes"; then
|
|
1140 AC_DEFINE(ENABLE_NLS, 1,
|
|
1141 [Define to 1 if translation of program messages to the user's native language
|
|
1142 is requested.])
|
|
1143 else
|
|
1144 USE_NLS=no
|
|
1145 fi
|
|
1146 fi
|
|
1147
|
|
1148 if test "$USE_NLS" = "yes"; then
|
|
1149
|
|
1150 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
|
|
1151 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
|
1152 AC_MSG_CHECKING([how to link with libintl])
|
|
1153 AC_MSG_RESULT([$LIBINTL])
|
|
1154 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
|
1
|
1155 fi
|
|
1156
|
7
|
1157 dnl For backward compatibility. Some packages may be using this.
|
|
1158 AC_DEFINE(HAVE_GETTEXT, 1,
|
|
1159 [Define if the GNU gettext() function is already present or preinstalled.])
|
|
1160 AC_DEFINE(HAVE_DCGETTEXT, 1,
|
|
1161 [Define if the GNU dcgettext() function is already present or preinstalled.])
|
1
|
1162 fi
|
|
1163
|
7
|
1164 dnl We need to process the po/ directory.
|
|
1165 POSUB=po
|
|
1166 fi
|
1
|
1167
|
7
|
1168 ifelse(gt_included_intl, yes, [
|
1
|
1169 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
|
1170 dnl to 'yes' because some of the testsuite requires it.
|
|
1171 if test "$PACKAGE" = gettext; then
|
|
1172 BUILD_INCLUDED_LIBINTL=yes
|
|
1173 fi
|
|
1174
|
|
1175 dnl Make all variables we use known to autoconf.
|
|
1176 AC_SUBST(BUILD_INCLUDED_LIBINTL)
|
|
1177 AC_SUBST(USE_INCLUDED_LIBINTL)
|
|
1178 AC_SUBST(CATOBJEXT)
|
|
1179 AC_SUBST(INTLOBJS)
|
|
1180
|
|
1181 dnl For backward compatibility. Some configure.ins may be using this.
|
|
1182 nls_cv_header_intl=
|
|
1183 nls_cv_header_libgt=
|
|
1184
|
|
1185 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1186 DATADIRNAME=share
|
|
1187 AC_SUBST(DATADIRNAME)
|
|
1188
|
|
1189 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1190 INSTOBJEXT=.mo
|
|
1191 AC_SUBST(INSTOBJEXT)
|
|
1192
|
|
1193 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1194 GENCAT=gencat
|
|
1195 AC_SUBST(GENCAT)
|
7
|
1196
|
|
1197 dnl Enable libtool support if the surrounding package wishes it.
|
|
1198 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
|
|
1199 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
1
|
1200 ])
|
|
1201
|
7
|
1202 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1203 INTLLIBS="$LIBINTL"
|
|
1204 AC_SUBST(INTLLIBS)
|
|
1205
|
|
1206 dnl Make all documented variables known to autoconf.
|
|
1207 AC_SUBST(LIBINTL)
|
|
1208 AC_SUBST(LTLIBINTL)
|
|
1209 AC_SUBST(POSUB)
|
|
1210 ])
|
|
1211
|
|
1212
|
|
1213 dnl Checks for all prerequisites of the po subdirectory,
|
|
1214 dnl except for USE_NLS.
|
|
1215 AC_DEFUN([AM_PO_SUBDIRS],
|
|
1216 [
|
|
1217 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
|
1218 AC_REQUIRE([AC_PROG_INSTALL])dnl
|
|
1219 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
|
1220
|
|
1221 dnl Perform the following tests also if --disable-nls has been given,
|
|
1222 dnl because they are needed for "make dist" to work.
|
|
1223
|
|
1224 dnl Search for GNU msgfmt in the PATH.
|
|
1225 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
|
|
1226 dnl The second test excludes FreeBSD msgfmt.
|
|
1227 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
|
1228 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
|
|
1229 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
|
1230 :)
|
|
1231 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
|
1232
|
|
1233 dnl Search for GNU xgettext 0.11 or newer in the PATH.
|
|
1234 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
|
|
1235 dnl The second test excludes FreeBSD xgettext.
|
|
1236 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
1237 [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
|
|
1238 (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
|
|
1239 :)
|
|
1240 dnl Remove leftover from FreeBSD xgettext call.
|
|
1241 rm -f messages.po
|
|
1242
|
|
1243 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
|
|
1244 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
|
|
1245 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
|
|
1246
|
|
1247 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
|
1248 dnl Test whether we really found GNU msgfmt.
|
|
1249 if test "$GMSGFMT" != ":"; then
|
|
1250 dnl If it is no GNU msgfmt we define it as : so that the
|
|
1251 dnl Makefiles still can work.
|
|
1252 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
|
|
1253 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
|
1254 : ;
|
|
1255 else
|
|
1256 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
|
|
1257 AC_MSG_RESULT(
|
|
1258 [found $GMSGFMT program is not GNU msgfmt; ignore it])
|
|
1259 GMSGFMT=":"
|
|
1260 fi
|
|
1261 fi
|
|
1262
|
|
1263 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
|
1264 dnl Test whether we really found GNU xgettext.
|
|
1265 if test "$XGETTEXT" != ":"; then
|
|
1266 dnl If it is no GNU xgettext we define it as : so that the
|
|
1267 dnl Makefiles still can work.
|
|
1268 if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
|
|
1269 (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
|
|
1270 : ;
|
|
1271 else
|
|
1272 AC_MSG_RESULT(
|
|
1273 [found xgettext program is not GNU xgettext; ignore it])
|
|
1274 XGETTEXT=":"
|
|
1275 fi
|
|
1276 dnl Remove leftover from FreeBSD xgettext call.
|
|
1277 rm -f messages.po
|
|
1278 fi
|
|
1279
|
|
1280 AC_OUTPUT_COMMANDS([
|
|
1281 for ac_file in $CONFIG_FILES; do
|
|
1282 # Support "outfile[:infile[:infile...]]"
|
|
1283 case "$ac_file" in
|
|
1284 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
|
1285 esac
|
|
1286 # PO directories have a Makefile.in generated from Makefile.in.in.
|
|
1287 case "$ac_file" in */Makefile.in)
|
|
1288 # Adjust a relative srcdir.
|
|
1289 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
|
1290 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
|
1291 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
|
1292 # In autoconf-2.13 it is called $ac_given_srcdir.
|
|
1293 # In autoconf-2.50 it is called $srcdir.
|
|
1294 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
|
1295 case "$ac_given_srcdir" in
|
|
1296 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
|
1297 /*) top_srcdir="$ac_given_srcdir" ;;
|
|
1298 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
|
1299 esac
|
|
1300 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
|
1301 rm -f "$ac_dir/POTFILES"
|
|
1302 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
|
1303 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
|
|
1304 # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
|
|
1305 # on $ac_dir but don't depend on user-specified configuration
|
|
1306 # parameters.
|
|
1307 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
|
|
1308 # The LINGUAS file contains the set of available languages.
|
|
1309 if test -n "$ALL_LINGUAS"; then
|
|
1310 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
|
|
1311 fi
|
|
1312 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
|
|
1313 # Hide the ALL_LINGUAS assigment from automake.
|
|
1314 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
|
|
1315 fi
|
|
1316 case "$ac_given_srcdir" in
|
|
1317 .) srcdirpre= ;;
|
|
1318 *) srcdirpre='$(srcdir)/' ;;
|
|
1319 esac
|
|
1320 POFILES=
|
|
1321 GMOFILES=
|
|
1322 UPDATEPOFILES=
|
|
1323 DUMMYPOFILES=
|
|
1324 for lang in $ALL_LINGUAS; do
|
|
1325 POFILES="$POFILES $srcdirpre$lang.po"
|
|
1326 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
|
|
1327 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
|
|
1328 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
|
|
1329 done
|
|
1330 # CATALOGS depends on both $ac_dir and the user's LINGUAS
|
|
1331 # environment variable.
|
|
1332 INST_LINGUAS=
|
|
1333 if test -n "$ALL_LINGUAS"; then
|
|
1334 for presentlang in $ALL_LINGUAS; do
|
|
1335 useit=no
|
|
1336 if test "%UNSET%" != "$LINGUAS"; then
|
|
1337 desiredlanguages="$LINGUAS"
|
|
1338 else
|
|
1339 desiredlanguages="$ALL_LINGUAS"
|
|
1340 fi
|
|
1341 for desiredlang in $desiredlanguages; do
|
|
1342 # Use the presentlang catalog if desiredlang is
|
|
1343 # a. equal to presentlang, or
|
|
1344 # b. a variant of presentlang (because in this case,
|
|
1345 # presentlang can be used as a fallback for messages
|
|
1346 # which are not translated in the desiredlang catalog).
|
|
1347 case "$desiredlang" in
|
|
1348 "$presentlang"*) useit=yes;;
|
|
1349 esac
|
|
1350 done
|
|
1351 if test $useit = yes; then
|
|
1352 INST_LINGUAS="$INST_LINGUAS $presentlang"
|
|
1353 fi
|
|
1354 done
|
|
1355 fi
|
|
1356 CATALOGS=
|
|
1357 if test -n "$INST_LINGUAS"; then
|
|
1358 for lang in $INST_LINGUAS; do
|
|
1359 CATALOGS="$CATALOGS $lang.gmo"
|
|
1360 done
|
|
1361 fi
|
|
1362 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
|
1363 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
|
1364 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
|
|
1365 if test -f "$f"; then
|
|
1366 case "$f" in
|
|
1367 *.orig | *.bak | *~) ;;
|
|
1368 *) cat "$f" >> "$ac_dir/Makefile" ;;
|
|
1369 esac
|
|
1370 fi
|
|
1371 done
|
|
1372 fi
|
|
1373 ;;
|
|
1374 esac
|
|
1375 done],
|
|
1376 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
|
|
1377 # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
|
|
1378 # from automake.
|
|
1379 eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
|
|
1380 # Capture the value of LINGUAS because we need it to compute CATALOGS.
|
|
1381 LINGUAS="${LINGUAS-%UNSET%}"
|
|
1382 ])
|
|
1383 ])
|
|
1384
|
1
|
1385
|
7
|
1386 dnl Checks for all prerequisites of the intl subdirectory,
|
|
1387 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
|
|
1388 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
|
|
1389 AC_DEFUN([AM_INTL_SUBDIR],
|
|
1390 [
|
|
1391 AC_REQUIRE([AC_PROG_INSTALL])dnl
|
|
1392 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
|
|
1393 AC_REQUIRE([AC_PROG_CC])dnl
|
|
1394 AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|
1395 AC_REQUIRE([AC_PROG_RANLIB])dnl
|
|
1396 AC_REQUIRE([AC_ISC_POSIX])dnl
|
|
1397 AC_REQUIRE([AC_HEADER_STDC])dnl
|
|
1398 AC_REQUIRE([AC_C_CONST])dnl
|
|
1399 AC_REQUIRE([AC_C_INLINE])dnl
|
|
1400 AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
|
1401 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
|
1402 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
|
1403 AC_REQUIRE([AC_FUNC_MMAP])dnl
|
|
1404 AC_REQUIRE([jm_GLIBC21])dnl
|
|
1405 AC_REQUIRE([gt_INTDIV0])dnl
|
|
1406 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
|
|
1407 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
|
|
1408 AC_REQUIRE([gt_INTTYPES_PRI])dnl
|
|
1409
|
|
1410 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
1
|
1411 stdlib.h string.h unistd.h sys/param.h])
|
7
|
1412 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
|
|
1413 geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
|
|
1414 strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
|
1415
|
|
1416 AM_ICONV
|
|
1417 AM_LANGINFO_CODESET
|
|
1418 if test $ac_cv_header_locale_h = yes; then
|
|
1419 AM_LC_MESSAGES
|
|
1420 fi
|
|
1421
|
|
1422 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
|
1423 dnl because plural.y uses bison specific features. It requires at least
|
|
1424 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
|
1425 dnl compile.
|
|
1426 dnl bison is only needed for the maintainer (who touches plural.y). But in
|
|
1427 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
|
1428 dnl the rule in general Makefile. Now, some people carelessly touch the
|
|
1429 dnl files or have a broken "make" program, hence the plural.c rule will
|
|
1430 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
|
1431 dnl present or too old.
|
|
1432 AC_CHECK_PROGS([INTLBISON], [bison])
|
|
1433 if test -z "$INTLBISON"; then
|
|
1434 ac_verc_fail=yes
|
|
1435 else
|
|
1436 dnl Found it, now check the version.
|
|
1437 AC_MSG_CHECKING([version of bison])
|
|
1438 changequote(<<,>>)dnl
|
|
1439 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
|
1440 case $ac_prog_version in
|
|
1441 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
|
1442 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
|
1443 changequote([,])dnl
|
|
1444 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
|
1445 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
|
1446 esac
|
|
1447 AC_MSG_RESULT([$ac_prog_version])
|
|
1448 fi
|
|
1449 if test $ac_verc_fail = yes; then
|
|
1450 INTLBISON=:
|
|
1451 fi
|
|
1452 ])
|
|
1453
|
|
1454
|
|
1455 AC_DEFUN([AM_MKINSTALLDIRS],
|
|
1456 [
|
|
1457 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
|
1458 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
|
1459 dnl Try to locate is.
|
|
1460 MKINSTALLDIRS=
|
|
1461 if test -n "$ac_aux_dir"; then
|
|
1462 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
|
1463 fi
|
|
1464 if test -z "$MKINSTALLDIRS"; then
|
|
1465 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
|
1466 fi
|
|
1467 AC_SUBST(MKINSTALLDIRS)
|
|
1468 ])
|
|
1469
|
|
1470
|
|
1471 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
|
|
1472 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
|
|
1473
|
|
1474 # lib-link.m4 serial 3 (gettext-0.11.3)
|
|
1475 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
|
|
1476 dnl This file is free software, distributed under the terms of the GNU
|
|
1477 dnl General Public License. As a special exception to the GNU General
|
|
1478 dnl Public License, this file may be distributed as part of a program
|
|
1479 dnl that contains a configuration script generated by Autoconf, under
|
|
1480 dnl the same distribution terms as the rest of that program.
|
|
1481
|
|
1482 dnl From Bruno Haible.
|
1
|
1483
|
7
|
1484 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
|
1485 dnl the libraries corresponding to explicit and implicit dependencies.
|
|
1486 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
|
1487 dnl augments the CPPFLAGS variable.
|
|
1488 AC_DEFUN([AC_LIB_LINKFLAGS],
|
|
1489 [
|
|
1490 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
1491 AC_REQUIRE([AC_LIB_RPATH])
|
|
1492 define([Name],[translit([$1],[./-], [___])])
|
|
1493 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
|
1494 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
|
1495 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
|
1496 AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
|
1497 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
|
1498 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
|
1499 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
|
1500 ])
|
|
1501 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
|
1502 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
|
1503 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
|
1504 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
|
1505 AC_SUBST([LIB]NAME)
|
|
1506 AC_SUBST([LTLIB]NAME)
|
|
1507 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
|
1508 dnl results of this search when this library appears as a dependency.
|
|
1509 HAVE_LIB[]NAME=yes
|
|
1510 undefine([Name])
|
|
1511 undefine([NAME])
|
|
1512 ])
|
|
1513
|
|
1514 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
|
|
1515 dnl searches for libname and the libraries corresponding to explicit and
|
|
1516 dnl implicit dependencies, together with the specified include files and
|
|
1517 dnl the ability to compile and link the specified testcode. If found, it
|
|
1518 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
|
|
1519 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
|
1520 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
|
1521 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
|
1522 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
|
1523 [
|
|
1524 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
1525 AC_REQUIRE([AC_LIB_RPATH])
|
|
1526 define([Name],[translit([$1],[./-], [___])])
|
|
1527 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
|
1528 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
|
1529
|
|
1530 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
|
1531 dnl accordingly.
|
|
1532 AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
|
1533
|
|
1534 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
|
1535 dnl because if the user has installed lib[]Name and not disabled its use
|
|
1536 dnl via --without-lib[]Name-prefix, he wants to use it.
|
|
1537 ac_save_CPPFLAGS="$CPPFLAGS"
|
|
1538 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
|
1539
|
|
1540 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
|
1541 ac_save_LIBS="$LIBS"
|
|
1542 LIBS="$LIBS $LIB[]NAME"
|
|
1543 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
|
|
1544 LIBS="$ac_save_LIBS"
|
|
1545 ])
|
|
1546 if test "$ac_cv_lib[]Name" = yes; then
|
|
1547 HAVE_LIB[]NAME=yes
|
|
1548 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
|
|
1549 AC_MSG_CHECKING([how to link with lib[]$1])
|
|
1550 AC_MSG_RESULT([$LIB[]NAME])
|
|
1551 else
|
|
1552 HAVE_LIB[]NAME=no
|
|
1553 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
|
1554 dnl $INC[]NAME either.
|
|
1555 CPPFLAGS="$ac_save_CPPFLAGS"
|
|
1556 LIB[]NAME=
|
|
1557 LTLIB[]NAME=
|
|
1558 fi
|
|
1559 AC_SUBST([HAVE_LIB]NAME)
|
|
1560 AC_SUBST([LIB]NAME)
|
|
1561 AC_SUBST([LTLIB]NAME)
|
|
1562 undefine([Name])
|
|
1563 undefine([NAME])
|
|
1564 ])
|
|
1565
|
|
1566 dnl Determine the platform dependent parameters needed to use rpath:
|
|
1567 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
|
|
1568 dnl hardcode_direct, hardcode_minus_L,
|
|
1569 dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
|
|
1570 AC_DEFUN([AC_LIB_RPATH],
|
|
1571 [
|
|
1572 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
|
1573 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
|
1574 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
|
1575 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
|
1576 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
|
1577 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
|
1578 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
|
1579 . ./conftest.sh
|
|
1580 rm -f ./conftest.sh
|
|
1581 acl_cv_rpath=done
|
|
1582 ])
|
|
1583 wl="$acl_cv_wl"
|
|
1584 libext="$acl_cv_libext"
|
|
1585 shlibext="$acl_cv_shlibext"
|
|
1586 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
|
1587 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
|
1588 hardcode_direct="$acl_cv_hardcode_direct"
|
|
1589 hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
|
1590 sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
|
|
1591 sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
|
|
1592 dnl Determine whether the user wants rpath handling at all.
|
|
1593 AC_ARG_ENABLE(rpath,
|
|
1594 [ --disable-rpath do not hardcode runtime library paths],
|
|
1595 :, enable_rpath=yes)
|
|
1596 ])
|
1
|
1597
|
7
|
1598 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
|
1599 dnl the libraries corresponding to explicit and implicit dependencies.
|
|
1600 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
|
1601 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
|
1602 [
|
|
1603 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
|
1604 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
|
1605 dnl By default, look in $includedir and $libdir.
|
|
1606 use_additional=yes
|
|
1607 AC_LIB_WITH_FINAL_PREFIX([
|
|
1608 eval additional_includedir=\"$includedir\"
|
|
1609 eval additional_libdir=\"$libdir\"
|
|
1610 ])
|
|
1611 AC_ARG_WITH([lib$1-prefix],
|
|
1612 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
|
|
1613 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
|
|
1614 [
|
|
1615 if test "X$withval" = "Xno"; then
|
|
1616 use_additional=no
|
|
1617 else
|
|
1618 if test "X$withval" = "X"; then
|
|
1619 AC_LIB_WITH_FINAL_PREFIX([
|
|
1620 eval additional_includedir=\"$includedir\"
|
|
1621 eval additional_libdir=\"$libdir\"
|
|
1622 ])
|
|
1623 else
|
|
1624 additional_includedir="$withval/include"
|
|
1625 additional_libdir="$withval/lib"
|
|
1626 fi
|
|
1627 fi
|
|
1628 ])
|
|
1629 dnl Search the library and its dependencies in $additional_libdir and
|
|
1630 dnl $LDFLAGS. Using breadth-first-seach.
|
|
1631 LIB[]NAME=
|
|
1632 LTLIB[]NAME=
|
|
1633 INC[]NAME=
|
|
1634 rpathdirs=
|
|
1635 ltrpathdirs=
|
|
1636 names_already_handled=
|
|
1637 names_next_round='$1 $2'
|
|
1638 while test -n "$names_next_round"; do
|
|
1639 names_this_round="$names_next_round"
|
|
1640 names_next_round=
|
|
1641 for name in $names_this_round; do
|
|
1642 already_handled=
|
|
1643 for n in $names_already_handled; do
|
|
1644 if test "$n" = "$name"; then
|
|
1645 already_handled=yes
|
|
1646 break
|
|
1647 fi
|
|
1648 done
|
|
1649 if test -z "$already_handled"; then
|
|
1650 names_already_handled="$names_already_handled $name"
|
|
1651 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
|
1652 dnl or AC_LIB_HAVE_LINKFLAGS call.
|
|
1653 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
|
1654 eval value=\"\$HAVE_LIB$uppername\"
|
|
1655 if test -n "$value"; then
|
|
1656 if test "$value" = yes; then
|
|
1657 eval value=\"\$LIB$uppername\"
|
|
1658 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
|
1659 eval value=\"\$LTLIB$uppername\"
|
|
1660 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
|
1661 else
|
|
1662 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
|
1663 dnl that this library doesn't exist. So just drop it.
|
|
1664 :
|
|
1665 fi
|
|
1666 else
|
|
1667 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
|
1668 dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
|
1669 found_dir=
|
|
1670 found_la=
|
|
1671 found_so=
|
|
1672 found_a=
|
|
1673 if test $use_additional = yes; then
|
|
1674 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
|
|
1675 found_dir="$additional_libdir"
|
|
1676 found_so="$additional_libdir/lib$name.$shlibext"
|
|
1677 if test -f "$additional_libdir/lib$name.la"; then
|
|
1678 found_la="$additional_libdir/lib$name.la"
|
|
1679 fi
|
|
1680 else
|
|
1681 if test -f "$additional_libdir/lib$name.$libext"; then
|
|
1682 found_dir="$additional_libdir"
|
|
1683 found_a="$additional_libdir/lib$name.$libext"
|
|
1684 if test -f "$additional_libdir/lib$name.la"; then
|
|
1685 found_la="$additional_libdir/lib$name.la"
|
|
1686 fi
|
|
1687 fi
|
|
1688 fi
|
|
1689 fi
|
|
1690 if test "X$found_dir" = "X"; then
|
|
1691 for x in $LDFLAGS $LTLIB[]NAME; do
|
|
1692 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
1693 case "$x" in
|
|
1694 -L*)
|
|
1695 dir=`echo "X$x" | sed -e 's/^X-L//'`
|
|
1696 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
|
|
1697 found_dir="$dir"
|
|
1698 found_so="$dir/lib$name.$shlibext"
|
|
1699 if test -f "$dir/lib$name.la"; then
|
|
1700 found_la="$dir/lib$name.la"
|
|
1701 fi
|
|
1702 else
|
|
1703 if test -f "$dir/lib$name.$libext"; then
|
|
1704 found_dir="$dir"
|
|
1705 found_a="$dir/lib$name.$libext"
|
|
1706 if test -f "$dir/lib$name.la"; then
|
|
1707 found_la="$dir/lib$name.la"
|
|
1708 fi
|
|
1709 fi
|
|
1710 fi
|
|
1711 ;;
|
|
1712 esac
|
|
1713 if test "X$found_dir" != "X"; then
|
|
1714 break
|
|
1715 fi
|
|
1716 done
|
|
1717 fi
|
|
1718 if test "X$found_dir" != "X"; then
|
|
1719 dnl Found the library.
|
|
1720 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
|
1721 if test "X$found_so" != "X"; then
|
|
1722 dnl Linking with a shared library. We attempt to hardcode its
|
|
1723 dnl directory into the executable's runpath, unless it's the
|
|
1724 dnl standard /usr/lib.
|
|
1725 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
|
|
1726 dnl No hardcoding is needed.
|
|
1727 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|
1728 else
|
|
1729 dnl Use an explicit option to hardcode DIR into the resulting
|
|
1730 dnl binary.
|
|
1731 dnl Potentially add DIR to ltrpathdirs.
|
|
1732 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
|
1733 haveit=
|
|
1734 for x in $ltrpathdirs; do
|
|
1735 if test "X$x" = "X$found_dir"; then
|
|
1736 haveit=yes
|
|
1737 break
|
|
1738 fi
|
|
1739 done
|
|
1740 if test -z "$haveit"; then
|
|
1741 ltrpathdirs="$ltrpathdirs $found_dir"
|
|
1742 fi
|
|
1743 dnl The hardcoding into $LIBNAME is system dependent.
|
|
1744 if test "$hardcode_direct" = yes; then
|
|
1745 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
|
1746 dnl resulting binary.
|
|
1747 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|
1748 else
|
|
1749 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
|
|
1750 dnl Use an explicit option to hardcode DIR into the resulting
|
|
1751 dnl binary.
|
|
1752 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|
1753 dnl Potentially add DIR to rpathdirs.
|
|
1754 dnl The rpathdirs will be appended to $LIBNAME at the end.
|
|
1755 haveit=
|
|
1756 for x in $rpathdirs; do
|
|
1757 if test "X$x" = "X$found_dir"; then
|
|
1758 haveit=yes
|
|
1759 break
|
|
1760 fi
|
|
1761 done
|
|
1762 if test -z "$haveit"; then
|
|
1763 rpathdirs="$rpathdirs $found_dir"
|
|
1764 fi
|
|
1765 else
|
|
1766 dnl Rely on "-L$found_dir".
|
|
1767 dnl But don't add it if it's already contained in the LDFLAGS
|
|
1768 dnl or the already constructed $LIBNAME
|
|
1769 haveit=
|
|
1770 for x in $LDFLAGS $LIB[]NAME; do
|
|
1771 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
1772 if test "X$x" = "X-L$found_dir"; then
|
|
1773 haveit=yes
|
|
1774 break
|
|
1775 fi
|
|
1776 done
|
|
1777 if test -z "$haveit"; then
|
|
1778 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
|
1779 fi
|
|
1780 if test "$hardcode_minus_L" != no; then
|
|
1781 dnl FIXME: Not sure whether we should use
|
|
1782 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
|
1783 dnl here.
|
|
1784 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|
1785 else
|
|
1786 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
|
|
1787 dnl here, because this doesn't fit in flags passed to the
|
|
1788 dnl compiler. So give up. No hardcoding. This affects only
|
|
1789 dnl very old systems.
|
|
1790 dnl FIXME: Not sure whether we should use
|
|
1791 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
|
1792 dnl here.
|
|
1793 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
|
1794 fi
|
|
1795 fi
|
|
1796 fi
|
|
1797 fi
|
|
1798 else
|
|
1799 if test "X$found_a" != "X"; then
|
|
1800 dnl Linking with a static library.
|
|
1801 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
|
1802 else
|
|
1803 dnl We shouldn't come here, but anyway it's good to have a
|
|
1804 dnl fallback.
|
|
1805 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
|
1806 fi
|
|
1807 fi
|
|
1808 dnl Assume the include files are nearby.
|
|
1809 additional_includedir=
|
|
1810 case "$found_dir" in
|
|
1811 */lib | */lib/)
|
|
1812 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
|
|
1813 additional_includedir="$basedir/include"
|
|
1814 ;;
|
|
1815 esac
|
|
1816 if test "X$additional_includedir" != "X"; then
|
|
1817 dnl Potentially add $additional_includedir to $INCNAME.
|
|
1818 dnl But don't add it
|
|
1819 dnl 1. if it's the standard /usr/include,
|
|
1820 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
|
1821 dnl 3. if it's already present in $CPPFLAGS or the already
|
|
1822 dnl constructed $INCNAME,
|
|
1823 dnl 4. if it doesn't exist as a directory.
|
|
1824 if test "X$additional_includedir" != "X/usr/include"; then
|
|
1825 haveit=
|
|
1826 if test "X$additional_includedir" = "X/usr/local/include"; then
|
|
1827 if test -n "$GCC"; then
|
|
1828 case $host_os in
|
|
1829 linux*) haveit=yes;;
|
|
1830 esac
|
|
1831 fi
|
|
1832 fi
|
|
1833 if test -z "$haveit"; then
|
|
1834 for x in $CPPFLAGS $INC[]NAME; do
|
|
1835 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
1836 if test "X$x" = "X-I$additional_includedir"; then
|
|
1837 haveit=yes
|
|
1838 break
|
|
1839 fi
|
|
1840 done
|
|
1841 if test -z "$haveit"; then
|
|
1842 if test -d "$additional_includedir"; then
|
|
1843 dnl Really add $additional_includedir to $INCNAME.
|
|
1844 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
|
1845 fi
|
|
1846 fi
|
|
1847 fi
|
|
1848 fi
|
|
1849 fi
|
|
1850 dnl Look for dependencies.
|
|
1851 if test -n "$found_la"; then
|
|
1852 dnl Read the .la file. It defines the variables
|
|
1853 dnl dlname, library_names, old_library, dependency_libs, current,
|
|
1854 dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
|
1855 save_libdir="$libdir"
|
|
1856 case "$found_la" in
|
|
1857 */* | *\\*) . "$found_la" ;;
|
|
1858 *) . "./$found_la" ;;
|
|
1859 esac
|
|
1860 libdir="$save_libdir"
|
|
1861 dnl We use only dependency_libs.
|
|
1862 for dep in $dependency_libs; do
|
|
1863 case "$dep" in
|
|
1864 -L*)
|
|
1865 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
|
1866 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
|
1867 dnl But don't add it
|
|
1868 dnl 1. if it's the standard /usr/lib,
|
|
1869 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
|
1870 dnl 3. if it's already present in $LDFLAGS or the already
|
|
1871 dnl constructed $LIBNAME,
|
|
1872 dnl 4. if it doesn't exist as a directory.
|
|
1873 if test "X$additional_libdir" != "X/usr/lib"; then
|
|
1874 haveit=
|
|
1875 if test "X$additional_libdir" = "X/usr/local/lib"; then
|
|
1876 if test -n "$GCC"; then
|
|
1877 case $host_os in
|
|
1878 linux*) haveit=yes;;
|
|
1879 esac
|
|
1880 fi
|
|
1881 fi
|
|
1882 if test -z "$haveit"; then
|
|
1883 haveit=
|
|
1884 for x in $LDFLAGS $LIB[]NAME; do
|
|
1885 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
1886 if test "X$x" = "X-L$additional_libdir"; then
|
|
1887 haveit=yes
|
|
1888 break
|
|
1889 fi
|
|
1890 done
|
|
1891 if test -z "$haveit"; then
|
|
1892 if test -d "$additional_libdir"; then
|
|
1893 dnl Really add $additional_libdir to $LIBNAME.
|
|
1894 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
|
1895 fi
|
|
1896 fi
|
|
1897 haveit=
|
|
1898 for x in $LDFLAGS $LTLIB[]NAME; do
|
|
1899 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
1900 if test "X$x" = "X-L$additional_libdir"; then
|
|
1901 haveit=yes
|
|
1902 break
|
|
1903 fi
|
|
1904 done
|
|
1905 if test -z "$haveit"; then
|
|
1906 if test -d "$additional_libdir"; then
|
|
1907 dnl Really add $additional_libdir to $LTLIBNAME.
|
|
1908 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
|
1909 fi
|
|
1910 fi
|
|
1911 fi
|
|
1912 fi
|
|
1913 ;;
|
|
1914 -R*)
|
|
1915 dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
|
1916 if test "$enable_rpath" != no; then
|
|
1917 dnl Potentially add DIR to rpathdirs.
|
|
1918 dnl The rpathdirs will be appended to $LIBNAME at the end.
|
|
1919 haveit=
|
|
1920 for x in $rpathdirs; do
|
|
1921 if test "X$x" = "X$dir"; then
|
|
1922 haveit=yes
|
|
1923 break
|
|
1924 fi
|
|
1925 done
|
|
1926 if test -z "$haveit"; then
|
|
1927 rpathdirs="$rpathdirs $dir"
|
|
1928 fi
|
|
1929 dnl Potentially add DIR to ltrpathdirs.
|
|
1930 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
|
1931 haveit=
|
|
1932 for x in $ltrpathdirs; do
|
|
1933 if test "X$x" = "X$dir"; then
|
|
1934 haveit=yes
|
|
1935 break
|
|
1936 fi
|
|
1937 done
|
|
1938 if test -z "$haveit"; then
|
|
1939 ltrpathdirs="$ltrpathdirs $dir"
|
|
1940 fi
|
|
1941 fi
|
|
1942 ;;
|
|
1943 -l*)
|
|
1944 dnl Handle this in the next round.
|
|
1945 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
|
1946 ;;
|
|
1947 *.la)
|
|
1948 dnl Handle this in the next round. Throw away the .la's
|
|
1949 dnl directory; it is already contained in a preceding -L
|
|
1950 dnl option.
|
|
1951 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
|
1952 ;;
|
|
1953 *)
|
|
1954 dnl Most likely an immediate library name.
|
|
1955 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
|
1956 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
|
1957 ;;
|
|
1958 esac
|
|
1959 done
|
|
1960 fi
|
|
1961 else
|
|
1962 dnl Didn't find the library; assume it is in the system directories
|
|
1963 dnl known to the linker and runtime loader. (All the system
|
|
1964 dnl directories known to the linker should also be known to the
|
|
1965 dnl runtime loader, otherwise the system is severely misconfigured.)
|
|
1966 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
|
1967 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
|
1968 fi
|
|
1969 fi
|
|
1970 fi
|
|
1971 done
|
|
1972 done
|
|
1973 if test "X$rpathdirs" != "X"; then
|
|
1974 if test -n "$hardcode_libdir_separator"; then
|
|
1975 dnl Weird platform: only the last -rpath option counts, the user must
|
|
1976 dnl pass all path elements in one option. We can arrange that for a
|
|
1977 dnl single library, but not when more than one $LIBNAMEs are used.
|
|
1978 alldirs=
|
|
1979 for found_dir in $rpathdirs; do
|
|
1980 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
|
|
1981 done
|
|
1982 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
|
|
1983 acl_save_libdir="$libdir"
|
|
1984 libdir="$alldirs"
|
|
1985 eval flag=\"$hardcode_libdir_flag_spec\"
|
|
1986 libdir="$acl_save_libdir"
|
|
1987 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
|
1988 else
|
|
1989 dnl The -rpath options are cumulative.
|
|
1990 for found_dir in $rpathdirs; do
|
|
1991 acl_save_libdir="$libdir"
|
|
1992 libdir="$found_dir"
|
|
1993 eval flag=\"$hardcode_libdir_flag_spec\"
|
|
1994 libdir="$acl_save_libdir"
|
|
1995 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
|
1996 done
|
|
1997 fi
|
|
1998 fi
|
|
1999 if test "X$ltrpathdirs" != "X"; then
|
|
2000 dnl When using libtool, the option that works for both libraries and
|
|
2001 dnl executables is -R. The -R options are cumulative.
|
|
2002 for found_dir in $ltrpathdirs; do
|
|
2003 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
|
2004 done
|
|
2005 fi
|
|
2006 ])
|
1
|
2007
|
7
|
2008 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
|
2009 dnl unless already present in VAR.
|
|
2010 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
|
2011 dnl contains two or three consecutive elements that belong together.
|
|
2012 AC_DEFUN([AC_LIB_APPENDTOVAR],
|
|
2013 [
|
|
2014 for element in [$2]; do
|
|
2015 haveit=
|
|
2016 for x in $[$1]; do
|
|
2017 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
2018 if test "X$x" = "X$element"; then
|
|
2019 haveit=yes
|
|
2020 break
|
|
2021 fi
|
|
2022 done
|
|
2023 if test -z "$haveit"; then
|
|
2024 [$1]="${[$1]}${[$1]:+ }$element"
|
|
2025 fi
|
|
2026 done
|
|
2027 ])
|
|
2028
|
33
|
2029 # lib-prefix.m4 serial 1 (gettext-0.11)
|
|
2030 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
|
|
2031 dnl This file is free software, distributed under the terms of the GNU
|
|
2032 dnl General Public License. As a special exception to the GNU General
|
|
2033 dnl Public License, this file may be distributed as part of a program
|
|
2034 dnl that contains a configuration script generated by Autoconf, under
|
|
2035 dnl the same distribution terms as the rest of that program.
|
|
2036
|
|
2037 dnl From Bruno Haible.
|
|
2038
|
|
2039 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
|
2040 dnl to access previously installed libraries. The basic assumption is that
|
|
2041 dnl a user will want packages to use other packages he previously installed
|
|
2042 dnl with the same --prefix option.
|
|
2043 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
|
2044 dnl libraries, but is otherwise very convenient.
|
|
2045 AC_DEFUN([AC_LIB_PREFIX],
|
|
2046 [
|
|
2047 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
|
2048 AC_REQUIRE([AC_PROG_CC])
|
|
2049 AC_REQUIRE([AC_CANONICAL_HOST])
|
|
2050 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
2051 dnl By default, look in $includedir and $libdir.
|
|
2052 use_additional=yes
|
|
2053 AC_LIB_WITH_FINAL_PREFIX([
|
|
2054 eval additional_includedir=\"$includedir\"
|
|
2055 eval additional_libdir=\"$libdir\"
|
|
2056 ])
|
|
2057 AC_ARG_WITH([lib-prefix],
|
|
2058 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
|
2059 --without-lib-prefix don't search for libraries in includedir and libdir],
|
|
2060 [
|
|
2061 if test "X$withval" = "Xno"; then
|
|
2062 use_additional=no
|
|
2063 else
|
|
2064 if test "X$withval" = "X"; then
|
|
2065 AC_LIB_WITH_FINAL_PREFIX([
|
|
2066 eval additional_includedir=\"$includedir\"
|
|
2067 eval additional_libdir=\"$libdir\"
|
|
2068 ])
|
|
2069 else
|
|
2070 additional_includedir="$withval/include"
|
|
2071 additional_libdir="$withval/lib"
|
|
2072 fi
|
|
2073 fi
|
|
2074 ])
|
|
2075 if test $use_additional = yes; then
|
|
2076 dnl Potentially add $additional_includedir to $CPPFLAGS.
|
|
2077 dnl But don't add it
|
|
2078 dnl 1. if it's the standard /usr/include,
|
|
2079 dnl 2. if it's already present in $CPPFLAGS,
|
|
2080 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
|
2081 dnl 4. if it doesn't exist as a directory.
|
|
2082 if test "X$additional_includedir" != "X/usr/include"; then
|
|
2083 haveit=
|
|
2084 for x in $CPPFLAGS; do
|
|
2085 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
2086 if test "X$x" = "X-I$additional_includedir"; then
|
|
2087 haveit=yes
|
|
2088 break
|
|
2089 fi
|
|
2090 done
|
|
2091 if test -z "$haveit"; then
|
|
2092 if test "X$additional_includedir" = "X/usr/local/include"; then
|
|
2093 if test -n "$GCC"; then
|
|
2094 case $host_os in
|
|
2095 linux*) haveit=yes;;
|
|
2096 esac
|
|
2097 fi
|
|
2098 fi
|
|
2099 if test -z "$haveit"; then
|
|
2100 if test -d "$additional_includedir"; then
|
|
2101 dnl Really add $additional_includedir to $CPPFLAGS.
|
|
2102 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
|
2103 fi
|
|
2104 fi
|
|
2105 fi
|
|
2106 fi
|
|
2107 dnl Potentially add $additional_libdir to $LDFLAGS.
|
|
2108 dnl But don't add it
|
|
2109 dnl 1. if it's the standard /usr/lib,
|
|
2110 dnl 2. if it's already present in $LDFLAGS,
|
|
2111 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
|
2112 dnl 4. if it doesn't exist as a directory.
|
|
2113 if test "X$additional_libdir" != "X/usr/lib"; then
|
|
2114 haveit=
|
|
2115 for x in $LDFLAGS; do
|
|
2116 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
2117 if test "X$x" = "X-L$additional_libdir"; then
|
|
2118 haveit=yes
|
|
2119 break
|
|
2120 fi
|
|
2121 done
|
|
2122 if test -z "$haveit"; then
|
|
2123 if test "X$additional_libdir" = "X/usr/local/lib"; then
|
|
2124 if test -n "$GCC"; then
|
|
2125 case $host_os in
|
|
2126 linux*) haveit=yes;;
|
|
2127 esac
|
|
2128 fi
|
|
2129 fi
|
|
2130 if test -z "$haveit"; then
|
|
2131 if test -d "$additional_libdir"; then
|
|
2132 dnl Really add $additional_libdir to $LDFLAGS.
|
|
2133 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
|
2134 fi
|
|
2135 fi
|
|
2136 fi
|
|
2137 fi
|
|
2138 fi
|
|
2139 ])
|
|
2140
|
|
2141 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
|
2142 dnl acl_final_exec_prefix, containing the values to which $prefix and
|
|
2143 dnl $exec_prefix will expand at the end of the configure script.
|
|
2144 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
|
2145 [
|
|
2146 dnl Unfortunately, prefix and exec_prefix get only finally determined
|
|
2147 dnl at the end of configure.
|
|
2148 if test "X$prefix" = "XNONE"; then
|
|
2149 acl_final_prefix="$ac_default_prefix"
|
|
2150 else
|
|
2151 acl_final_prefix="$prefix"
|
|
2152 fi
|
|
2153 if test "X$exec_prefix" = "XNONE"; then
|
|
2154 acl_final_exec_prefix='${prefix}'
|
|
2155 else
|
|
2156 acl_final_exec_prefix="$exec_prefix"
|
|
2157 fi
|
|
2158 acl_save_prefix="$prefix"
|
|
2159 prefix="$acl_final_prefix"
|
|
2160 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
|
2161 prefix="$acl_save_prefix"
|
|
2162 ])
|
|
2163
|
|
2164 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
|
2165 dnl variables prefix and exec_prefix bound to the values they will have
|
|
2166 dnl at the end of the configure script.
|
|
2167 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
|
2168 [
|
|
2169 acl_save_prefix="$prefix"
|
|
2170 prefix="$acl_final_prefix"
|
|
2171 acl_save_exec_prefix="$exec_prefix"
|
|
2172 exec_prefix="$acl_final_exec_prefix"
|
|
2173 $1
|
|
2174 exec_prefix="$acl_save_exec_prefix"
|
|
2175 prefix="$acl_save_prefix"
|
|
2176 ])
|
|
2177
|
7
|
2178 # lib-ld.m4 serial 1 (gettext-0.11)
|
|
2179 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
|
|
2180 dnl This file is free software, distributed under the terms of the GNU
|
|
2181 dnl General Public License. As a special exception to the GNU General
|
|
2182 dnl Public License, this file may be distributed as part of a program
|
|
2183 dnl that contains a configuration script generated by Autoconf, under
|
|
2184 dnl the same distribution terms as the rest of that program.
|
|
2185
|
|
2186 dnl Subroutines of libtool.m4,
|
|
2187 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
|
2188 dnl with libtool.m4.
|
|
2189
|
|
2190 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
|
2191 AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
|
2192 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
|
|
2193 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
|
2194 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
|
2195 acl_cv_prog_gnu_ld=yes
|
|
2196 else
|
|
2197 acl_cv_prog_gnu_ld=no
|
|
2198 fi])
|
|
2199 with_gnu_ld=$acl_cv_prog_gnu_ld
|
|
2200 ])
|
1
|
2201
|
7
|
2202 dnl From libtool-1.4. Sets the variable LD.
|
|
2203 AC_DEFUN([AC_LIB_PROG_LD],
|
|
2204 [AC_ARG_WITH(gnu-ld,
|
|
2205 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
|
2206 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
|
2207 AC_REQUIRE([AC_PROG_CC])dnl
|
|
2208 AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|
2209 ac_prog=ld
|
|
2210 if test "$GCC" = yes; then
|
|
2211 # Check if gcc -print-prog-name=ld gives a path.
|
|
2212 AC_MSG_CHECKING([for ld used by GCC])
|
|
2213 case $host in
|
|
2214 *-*-mingw*)
|
|
2215 # gcc leaves a trailing carriage return which upsets mingw
|
|
2216 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
|
2217 *)
|
|
2218 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
|
2219 esac
|
|
2220 case $ac_prog in
|
|
2221 # Accept absolute paths.
|
|
2222 [[\\/]* | [A-Za-z]:[\\/]*)]
|
|
2223 [re_direlt='/[^/][^/]*/\.\./']
|
|
2224 # Canonicalize the path of ld
|
|
2225 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
|
2226 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
|
2227 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
|
2228 done
|
|
2229 test -z "$LD" && LD="$ac_prog"
|
|
2230 ;;
|
|
2231 "")
|
|
2232 # If it fails, then pretend we aren't using GCC.
|
|
2233 ac_prog=ld
|
|
2234 ;;
|
|
2235 *)
|
|
2236 # If it is relative, then search for the first ld in PATH.
|
|
2237 with_gnu_ld=unknown
|
|
2238 ;;
|
|
2239 esac
|
|
2240 elif test "$with_gnu_ld" = yes; then
|
|
2241 AC_MSG_CHECKING([for GNU ld])
|
|
2242 else
|
|
2243 AC_MSG_CHECKING([for non-GNU ld])
|
|
2244 fi
|
|
2245 AC_CACHE_VAL(acl_cv_path_LD,
|
|
2246 [if test -z "$LD"; then
|
|
2247 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
|
2248 for ac_dir in $PATH; do
|
|
2249 test -z "$ac_dir" && ac_dir=.
|
|
2250 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
|
2251 acl_cv_path_LD="$ac_dir/$ac_prog"
|
|
2252 # Check to see if the program is GNU ld. I'd rather use --version,
|
|
2253 # but apparently some GNU ld's only accept -v.
|
|
2254 # Break only if it was the GNU/non-GNU ld that we prefer.
|
|
2255 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
|
2256 test "$with_gnu_ld" != no && break
|
|
2257 else
|
|
2258 test "$with_gnu_ld" != yes && break
|
|
2259 fi
|
|
2260 fi
|
|
2261 done
|
|
2262 IFS="$ac_save_ifs"
|
|
2263 else
|
|
2264 acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
|
2265 fi])
|
|
2266 LD="$acl_cv_path_LD"
|
|
2267 if test -n "$LD"; then
|
|
2268 AC_MSG_RESULT($LD)
|
|
2269 else
|
|
2270 AC_MSG_RESULT(no)
|
|
2271 fi
|
|
2272 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
|
2273 AC_LIB_PROG_LD_GNU
|
|
2274 ])
|
|
2275
|
|
2276 # iconv.m4 serial AM4 (gettext-0.11.3)
|
|
2277 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
|
2278 dnl This file is free software, distributed under the terms of the GNU
|
|
2279 dnl General Public License. As a special exception to the GNU General
|
|
2280 dnl Public License, this file may be distributed as part of a program
|
|
2281 dnl that contains a configuration script generated by Autoconf, under
|
|
2282 dnl the same distribution terms as the rest of that program.
|
|
2283
|
|
2284 dnl From Bruno Haible.
|
|
2285
|
|
2286 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
|
|
2287 [
|
|
2288 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
|
2289 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
2290 AC_REQUIRE([AC_LIB_RPATH])
|
|
2291
|
|
2292 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
|
2293 dnl accordingly.
|
|
2294 AC_LIB_LINKFLAGS_BODY([iconv])
|
|
2295 ])
|
1
|
2296
|
7
|
2297 AC_DEFUN([AM_ICONV_LINK],
|
|
2298 [
|
|
2299 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
|
2300 dnl those with the standalone portable GNU libiconv installed).
|
|
2301
|
|
2302 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
|
2303 dnl accordingly.
|
|
2304 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
|
2305
|
|
2306 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
|
2307 dnl because if the user has installed libiconv and not disabled its use
|
|
2308 dnl via --without-libiconv-prefix, he wants to use it. The first
|
|
2309 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
|
|
2310 am_save_CPPFLAGS="$CPPFLAGS"
|
|
2311 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
|
2312
|
|
2313 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
|
2314 am_cv_func_iconv="no, consider installing GNU libiconv"
|
|
2315 am_cv_lib_iconv=no
|
|
2316 AC_TRY_LINK([#include <stdlib.h>
|
|
2317 #include <iconv.h>],
|
|
2318 [iconv_t cd = iconv_open("","");
|
|
2319 iconv(cd,NULL,NULL,NULL,NULL);
|
|
2320 iconv_close(cd);],
|
|
2321 am_cv_func_iconv=yes)
|
|
2322 if test "$am_cv_func_iconv" != yes; then
|
|
2323 am_save_LIBS="$LIBS"
|
|
2324 LIBS="$LIBS $LIBICONV"
|
|
2325 AC_TRY_LINK([#include <stdlib.h>
|
|
2326 #include <iconv.h>],
|
|
2327 [iconv_t cd = iconv_open("","");
|
|
2328 iconv(cd,NULL,NULL,NULL,NULL);
|
|
2329 iconv_close(cd);],
|
|
2330 am_cv_lib_iconv=yes
|
|
2331 am_cv_func_iconv=yes)
|
|
2332 LIBS="$am_save_LIBS"
|
|
2333 fi
|
1
|
2334 ])
|
7
|
2335 if test "$am_cv_func_iconv" = yes; then
|
|
2336 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
|
2337 fi
|
|
2338 if test "$am_cv_lib_iconv" = yes; then
|
|
2339 AC_MSG_CHECKING([how to link with libiconv])
|
|
2340 AC_MSG_RESULT([$LIBICONV])
|
|
2341 else
|
|
2342 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
|
2343 dnl either.
|
|
2344 CPPFLAGS="$am_save_CPPFLAGS"
|
|
2345 LIBICONV=
|
|
2346 LTLIBICONV=
|
|
2347 fi
|
|
2348 AC_SUBST(LIBICONV)
|
|
2349 AC_SUBST(LTLIBICONV)
|
|
2350 ])
|
|
2351
|
|
2352 AC_DEFUN([AM_ICONV],
|
|
2353 [
|
|
2354 AM_ICONV_LINK
|
|
2355 if test "$am_cv_func_iconv" = yes; then
|
|
2356 AC_MSG_CHECKING([for iconv declaration])
|
|
2357 AC_CACHE_VAL(am_cv_proto_iconv, [
|
|
2358 AC_TRY_COMPILE([
|
|
2359 #include <stdlib.h>
|
|
2360 #include <iconv.h>
|
|
2361 extern
|
|
2362 #ifdef __cplusplus
|
|
2363 "C"
|
|
2364 #endif
|
|
2365 #if defined(__STDC__) || defined(__cplusplus)
|
|
2366 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
|
2367 #else
|
|
2368 size_t iconv();
|
|
2369 #endif
|
|
2370 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
|
2371 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);"])
|
|
2372 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
|
2373 AC_MSG_RESULT([$]{ac_t:-
|
|
2374 }[$]am_cv_proto_iconv)
|
|
2375 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
|
2376 [Define as const if the declaration of iconv() needs const.])
|
|
2377 fi
|
|
2378 ])
|
|
2379
|
|
2380 # progtest.m4 serial 2 (gettext-0.10.40)
|
|
2381 dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
|
|
2382 dnl This file is free software, distributed under the terms of the GNU
|
|
2383 dnl General Public License. As a special exception to the GNU General
|
|
2384 dnl Public License, this file may be distributed as part of a program
|
|
2385 dnl that contains a configuration script generated by Autoconf, under
|
|
2386 dnl the same distribution terms as the rest of that program.
|
|
2387 dnl
|
|
2388 dnl This file can can be used in projects which are not available under
|
|
2389 dnl the GNU General Public License or the GNU Library General Public
|
|
2390 dnl License but which still want to provide support for the GNU gettext
|
|
2391 dnl functionality.
|
|
2392 dnl Please note that the actual code of the GNU gettext library is covered
|
|
2393 dnl by the GNU Library General Public License, and the rest of the GNU
|
|
2394 dnl gettext package package is covered by the GNU General Public License.
|
|
2395 dnl They are *not* in the public domain.
|
|
2396
|
|
2397 dnl Authors:
|
|
2398 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
|
1
|
2399
|
|
2400 # Search path for a program which passes the given test.
|
|
2401
|
|
2402 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
|
2403 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
|
2404 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
|
2405 [# Extract the first word of "$2", so it can be a program name with args.
|
|
2406 set dummy $2; ac_word=[$]2
|
|
2407 AC_MSG_CHECKING([for $ac_word])
|
|
2408 AC_CACHE_VAL(ac_cv_path_$1,
|
|
2409 [case "[$]$1" in
|
|
2410 /*)
|
|
2411 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
|
2412 ;;
|
|
2413 *)
|
|
2414 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
2415 for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
|
2416 test -z "$ac_dir" && ac_dir=.
|
|
2417 if test -f $ac_dir/$ac_word; then
|
|
2418 if [$3]; then
|
|
2419 ac_cv_path_$1="$ac_dir/$ac_word"
|
|
2420 break
|
|
2421 fi
|
|
2422 fi
|
|
2423 done
|
|
2424 IFS="$ac_save_ifs"
|
|
2425 dnl If no 4th arg is given, leave the cache variable unset,
|
|
2426 dnl so AC_PATH_PROGS will keep looking.
|
|
2427 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
|
2428 ])dnl
|
|
2429 ;;
|
|
2430 esac])dnl
|
|
2431 $1="$ac_cv_path_$1"
|
|
2432 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
|
|
2433 AC_MSG_RESULT([$]$1)
|
|
2434 else
|
|
2435 AC_MSG_RESULT(no)
|
|
2436 fi
|
|
2437 AC_SUBST($1)dnl
|
|
2438 ])
|
|
2439
|
16
|
2440 # isc-posix.m4 serial 2 (gettext-0.11.2)
|
|
2441 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
|
2442 dnl This file is free software, distributed under the terms of the GNU
|
|
2443 dnl General Public License. As a special exception to the GNU General
|
|
2444 dnl Public License, this file may be distributed as part of a program
|
|
2445 dnl that contains a configuration script generated by Autoconf, under
|
|
2446 dnl the same distribution terms as the rest of that program.
|
|
2447
|
|
2448 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
|
|
2449
|
|
2450 # This test replaces the one in autoconf.
|
|
2451 # Currently this macro should have the same name as the autoconf macro
|
|
2452 # because gettext's gettext.m4 (distributed in the automake package)
|
|
2453 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
|
|
2454 # give these diagnostics:
|
|
2455 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
|
|
2456 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
|
|
2457
|
|
2458 undefine([AC_ISC_POSIX])
|
|
2459
|
|
2460 AC_DEFUN([AC_ISC_POSIX],
|
|
2461 [
|
|
2462 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
|
|
2463 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
|
|
2464 ]
|
|
2465 )
|
|
2466
|
7
|
2467 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
|
|
2468 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
|
2469 dnl This file is free software, distributed under the terms of the GNU
|
|
2470 dnl General Public License. As a special exception to the GNU General
|
|
2471 dnl Public License, this file may be distributed as part of a program
|
|
2472 dnl that contains a configuration script generated by Autoconf, under
|
|
2473 dnl the same distribution terms as the rest of that program.
|
1
|
2474
|
|
2475 # Test for the GNU C Library, version 2.1 or newer.
|
|
2476 # From Bruno Haible.
|
|
2477
|
|
2478 AC_DEFUN([jm_GLIBC21],
|
|
2479 [
|
|
2480 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
|
|
2481 ac_cv_gnu_library_2_1,
|
|
2482 [AC_EGREP_CPP([Lucky GNU user],
|
|
2483 [
|
|
2484 #include <features.h>
|
|
2485 #ifdef __GNU_LIBRARY__
|
|
2486 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
|
|
2487 Lucky GNU user
|
|
2488 #endif
|
|
2489 #endif
|
|
2490 ],
|
|
2491 ac_cv_gnu_library_2_1=yes,
|
|
2492 ac_cv_gnu_library_2_1=no)
|
|
2493 ]
|
|
2494 )
|
|
2495 AC_SUBST(GLIBC21)
|
|
2496 GLIBC21="$ac_cv_gnu_library_2_1"
|
|
2497 ]
|
|
2498 )
|
|
2499
|
7
|
2500 # intdiv0.m4 serial 1 (gettext-0.11.3)
|
|
2501 dnl Copyright (C) 2002 Free Software Foundation, Inc.
|
|
2502 dnl This file is free software, distributed under the terms of the GNU
|
|
2503 dnl General Public License. As a special exception to the GNU General
|
|
2504 dnl Public License, this file may be distributed as part of a program
|
|
2505 dnl that contains a configuration script generated by Autoconf, under
|
|
2506 dnl the same distribution terms as the rest of that program.
|
1
|
2507
|
|
2508 dnl From Bruno Haible.
|
|
2509
|
7
|
2510 AC_DEFUN([gt_INTDIV0],
|
1
|
2511 [
|
7
|
2512 AC_REQUIRE([AC_PROG_CC])dnl
|
|
2513 AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|
2514
|
|
2515 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
|
|
2516 gt_cv_int_divbyzero_sigfpe,
|
|
2517 [
|
|
2518 AC_TRY_RUN([
|
|
2519 #include <stdlib.h>
|
|
2520 #include <signal.h>
|
1
|
2521
|
7
|
2522 static void
|
|
2523 #ifdef __cplusplus
|
|
2524 sigfpe_handler (int sig)
|
|
2525 #else
|
|
2526 sigfpe_handler (sig) int sig;
|
|
2527 #endif
|
|
2528 {
|
|
2529 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
|
|
2530 exit (sig != SIGFPE);
|
|
2531 }
|
|
2532
|
|
2533 int x = 1;
|
|
2534 int y = 0;
|
|
2535 int z;
|
|
2536 int nan;
|
|
2537
|
|
2538 int main ()
|
|
2539 {
|
|
2540 signal (SIGFPE, sigfpe_handler);
|
|
2541 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
|
|
2542 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
|
|
2543 signal (SIGTRAP, sigfpe_handler);
|
|
2544 #endif
|
|
2545 /* Linux/SPARC yields signal SIGILL. */
|
|
2546 #if defined (__sparc__) && defined (__linux__)
|
|
2547 signal (SIGILL, sigfpe_handler);
|
|
2548 #endif
|
1
|
2549
|
7
|
2550 z = x / y;
|
|
2551 nan = y / y;
|
|
2552 exit (1);
|
|
2553 }
|
|
2554 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
|
|
2555 [
|
|
2556 # Guess based on the CPU.
|
|
2557 case "$host_cpu" in
|
|
2558 alpha* | i[34567]86 | m68k | s390*)
|
|
2559 gt_cv_int_divbyzero_sigfpe="guessing yes";;
|
|
2560 *)
|
|
2561 gt_cv_int_divbyzero_sigfpe="guessing no";;
|
|
2562 esac
|
|
2563 ])
|
|
2564 ])
|
|
2565 case "$gt_cv_int_divbyzero_sigfpe" in
|
|
2566 *yes) value=1;;
|
|
2567 *) value=0;;
|
|
2568 esac
|
|
2569 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
|
|
2570 [Define if integer division by zero raises signal SIGFPE.])
|
|
2571 ])
|
|
2572
|
|
2573 # uintmax_t.m4 serial 6 (gettext-0.11)
|
|
2574 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
|
2575 dnl This file is free software, distributed under the terms of the GNU
|
|
2576 dnl General Public License. As a special exception to the GNU General
|
|
2577 dnl Public License, this file may be distributed as part of a program
|
|
2578 dnl that contains a configuration script generated by Autoconf, under
|
|
2579 dnl the same distribution terms as the rest of that program.
|
|
2580
|
|
2581 dnl From Paul Eggert.
|
|
2582
|
|
2583 AC_PREREQ(2.13)
|
|
2584
|
|
2585 # Define uintmax_t to `unsigned long' or `unsigned long long'
|
|
2586 # if <inttypes.h> does not exist.
|
|
2587
|
|
2588 AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
|
|
2589 [
|
|
2590 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
|
|
2591 AC_REQUIRE([jm_AC_HEADER_STDINT_H])
|
|
2592 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
|
|
2593 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
|
|
2594 test $ac_cv_type_unsigned_long_long = yes \
|
|
2595 && ac_type='unsigned long long' \
|
|
2596 || ac_type='unsigned long'
|
|
2597 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
|
|
2598 [Define to unsigned long or unsigned long long
|
|
2599 if <inttypes.h> and <stdint.h> don't define.])
|
1
|
2600 fi
|
7
|
2601 ])
|
|
2602
|
|
2603 # inttypes_h.m4 serial 4 (gettext-0.11.4)
|
|
2604 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
|
2605 dnl This file is free software, distributed under the terms of the GNU
|
|
2606 dnl General Public License. As a special exception to the GNU General
|
|
2607 dnl Public License, this file may be distributed as part of a program
|
|
2608 dnl that contains a configuration script generated by Autoconf, under
|
|
2609 dnl the same distribution terms as the rest of that program.
|
|
2610
|
|
2611 dnl From Paul Eggert.
|
|
2612
|
|
2613 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
|
|
2614 # doesn't clash with <sys/types.h>, and declares uintmax_t.
|
|
2615
|
|
2616 AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
|
|
2617 [
|
|
2618 AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
|
|
2619 [AC_TRY_COMPILE(
|
|
2620 [#include <sys/types.h>
|
|
2621 #include <inttypes.h>],
|
|
2622 [uintmax_t i = (uintmax_t) -1;],
|
|
2623 jm_ac_cv_header_inttypes_h=yes,
|
|
2624 jm_ac_cv_header_inttypes_h=no)])
|
|
2625 if test $jm_ac_cv_header_inttypes_h = yes; then
|
|
2626 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
|
|
2627 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
|
|
2628 and declares uintmax_t. ])
|
1
|
2629 fi
|
|
2630 ])
|
|
2631
|
7
|
2632 # stdint_h.m4 serial 2 (gettext-0.11.4)
|
|
2633 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
|
2634 dnl This file is free software, distributed under the terms of the GNU
|
|
2635 dnl General Public License. As a special exception to the GNU General
|
|
2636 dnl Public License, this file may be distributed as part of a program
|
|
2637 dnl that contains a configuration script generated by Autoconf, under
|
|
2638 dnl the same distribution terms as the rest of that program.
|
|
2639
|
|
2640 dnl From Paul Eggert.
|
|
2641
|
|
2642 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
|
|
2643 # doesn't clash with <sys/types.h>, and declares uintmax_t.
|
|
2644
|
|
2645 AC_DEFUN([jm_AC_HEADER_STDINT_H],
|
|
2646 [
|
|
2647 AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
|
|
2648 [AC_TRY_COMPILE(
|
|
2649 [#include <sys/types.h>
|
|
2650 #include <stdint.h>],
|
|
2651 [uintmax_t i = (uintmax_t) -1;],
|
|
2652 jm_ac_cv_header_stdint_h=yes,
|
|
2653 jm_ac_cv_header_stdint_h=no)])
|
|
2654 if test $jm_ac_cv_header_stdint_h = yes; then
|
|
2655 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
|
|
2656 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
|
|
2657 and declares uintmax_t. ])
|
|
2658 fi
|
|
2659 ])
|
|
2660
|
|
2661 # ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
|
|
2662 dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
|
2663 dnl This file is free software, distributed under the terms of the GNU
|
|
2664 dnl General Public License. As a special exception to the GNU General
|
|
2665 dnl Public License, this file may be distributed as part of a program
|
|
2666 dnl that contains a configuration script generated by Autoconf, under
|
|
2667 dnl the same distribution terms as the rest of that program.
|
|
2668
|
|
2669 dnl From Paul Eggert.
|
|
2670
|
|
2671 AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
|
|
2672 [
|
|
2673 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
|
|
2674 [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
|
|
2675 [unsigned long long ullmax = (unsigned long long) -1;
|
|
2676 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
|
|
2677 ac_cv_type_unsigned_long_long=yes,
|
|
2678 ac_cv_type_unsigned_long_long=no)])
|
|
2679 if test $ac_cv_type_unsigned_long_long = yes; then
|
|
2680 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
|
|
2681 [Define if you have the unsigned long long type.])
|
|
2682 fi
|
|
2683 ])
|
|
2684
|
|
2685 # inttypes.m4 serial 1 (gettext-0.11.4)
|
|
2686 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
|
2687 dnl This file is free software, distributed under the terms of the GNU
|
|
2688 dnl General Public License. As a special exception to the GNU General
|
|
2689 dnl Public License, this file may be distributed as part of a program
|
|
2690 dnl that contains a configuration script generated by Autoconf, under
|
|
2691 dnl the same distribution terms as the rest of that program.
|
|
2692
|
|
2693 dnl From Paul Eggert.
|
|
2694
|
|
2695 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
|
|
2696 # <sys/types.h>.
|
|
2697
|
|
2698 AC_DEFUN([gt_HEADER_INTTYPES_H],
|
|
2699 [
|
|
2700 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
|
|
2701 [
|
|
2702 AC_TRY_COMPILE(
|
|
2703 [#include <sys/types.h>
|
|
2704 #include <inttypes.h>],
|
|
2705 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
|
|
2706 ])
|
|
2707 if test $gt_cv_header_inttypes_h = yes; then
|
|
2708 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
|
|
2709 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
|
|
2710 fi
|
|
2711 ])
|
|
2712
|
|
2713 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
|
|
2714 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
|
|
2715 dnl This file is free software, distributed under the terms of the GNU
|
|
2716 dnl General Public License. As a special exception to the GNU General
|
|
2717 dnl Public License, this file may be distributed as part of a program
|
|
2718 dnl that contains a configuration script generated by Autoconf, under
|
|
2719 dnl the same distribution terms as the rest of that program.
|
|
2720
|
|
2721 dnl From Bruno Haible.
|
|
2722
|
|
2723 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
|
|
2724 # macros to non-string values. This is the case on AIX 4.3.3.
|
|
2725
|
|
2726 AC_DEFUN([gt_INTTYPES_PRI],
|
|
2727 [
|
|
2728 AC_REQUIRE([gt_HEADER_INTTYPES_H])
|
|
2729 if test $gt_cv_header_inttypes_h = yes; then
|
|
2730 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
|
|
2731 gt_cv_inttypes_pri_broken,
|
|
2732 [
|
|
2733 AC_TRY_COMPILE([#include <inttypes.h>
|
|
2734 #ifdef PRId32
|
|
2735 char *p = PRId32;
|
|
2736 #endif
|
|
2737 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
|
|
2738 ])
|
|
2739 fi
|
|
2740 if test "$gt_cv_inttypes_pri_broken" = yes; then
|
|
2741 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
|
|
2742 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
|
|
2743 fi
|
|
2744 ])
|
|
2745
|
|
2746 # codeset.m4 serial AM1 (gettext-0.10.40)
|
|
2747 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
|
|
2748 dnl This file is free software, distributed under the terms of the GNU
|
|
2749 dnl General Public License. As a special exception to the GNU General
|
|
2750 dnl Public License, this file may be distributed as part of a program
|
|
2751 dnl that contains a configuration script generated by Autoconf, under
|
|
2752 dnl the same distribution terms as the rest of that program.
|
1
|
2753
|
|
2754 dnl From Bruno Haible.
|
|
2755
|
|
2756 AC_DEFUN([AM_LANGINFO_CODESET],
|
|
2757 [
|
|
2758 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
|
|
2759 [AC_TRY_LINK([#include <langinfo.h>],
|
|
2760 [char* cs = nl_langinfo(CODESET);],
|
|
2761 am_cv_langinfo_codeset=yes,
|
|
2762 am_cv_langinfo_codeset=no)
|
|
2763 ])
|
|
2764 if test $am_cv_langinfo_codeset = yes; then
|
|
2765 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
|
|
2766 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
|
2767 fi
|
|
2768 ])
|
|
2769
|
7
|
2770 # lcmessage.m4 serial 3 (gettext-0.11.3)
|
|
2771 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
|
|
2772 dnl This file is free software, distributed under the terms of the GNU
|
|
2773 dnl General Public License. As a special exception to the GNU General
|
|
2774 dnl Public License, this file may be distributed as part of a program
|
|
2775 dnl that contains a configuration script generated by Autoconf, under
|
|
2776 dnl the same distribution terms as the rest of that program.
|
|
2777 dnl
|
|
2778 dnl This file can can be used in projects which are not available under
|
|
2779 dnl the GNU General Public License or the GNU Library General Public
|
|
2780 dnl License but which still want to provide support for the GNU gettext
|
|
2781 dnl functionality.
|
|
2782 dnl Please note that the actual code of the GNU gettext library is covered
|
|
2783 dnl by the GNU Library General Public License, and the rest of the GNU
|
|
2784 dnl gettext package package is covered by the GNU General Public License.
|
|
2785 dnl They are *not* in the public domain.
|
|
2786
|
|
2787 dnl Authors:
|
|
2788 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
|
|
2789
|
1
|
2790 # Check whether LC_MESSAGES is available in <locale.h>.
|
|
2791
|
|
2792 AC_DEFUN([AM_LC_MESSAGES],
|
7
|
2793 [
|
|
2794 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
|
2795 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
1
|
2796 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
7
|
2797 if test $am_cv_val_LC_MESSAGES = yes; then
|
|
2798 AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
|
2799 [Define if your <locale.h> file defines LC_MESSAGES.])
|
|
2800 fi
|
|
2801 ])
|
1
|
2802
|