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
|
143
|
13 #serial 4
|
|
14
|
|
15 dnl By default, many hosts won't let programs access large files;
|
|
16 dnl one must use special compiler options to get large-file access to work.
|
|
17 dnl For more details about this brain damage please see:
|
|
18 dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
|
|
19
|
|
20 dnl Written by Paul Eggert <eggert@twinsun.com>.
|
|
21
|
|
22 dnl Internal subroutine of AC_SYS_LARGEFILE.
|
|
23 dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
|
|
24 AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
|
|
25 [AC_CACHE_CHECK([for $1 value to request large file support],
|
|
26 ac_cv_sys_largefile_$1,
|
|
27 [ac_cv_sys_largefile_$1=`($GETCONF LFS_$1) 2>/dev/null` || {
|
|
28 ac_cv_sys_largefile_$1=no
|
|
29 ifelse($1, CFLAGS,
|
|
30 [case "$host_os" in
|
|
31 # IRIX 6.2 and later require cc -n32.
|
|
32 changequote(, )dnl
|
|
33 irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
|
|
34 changequote([, ])dnl
|
|
35 if test "$GCC" != yes; then
|
|
36 ac_cv_sys_largefile_CFLAGS=-n32
|
|
37 fi
|
|
38 ac_save_CC="$CC"
|
|
39 CC="$CC $ac_cv_sys_largefile_CFLAGS"
|
|
40 AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
|
|
41 CC="$ac_save_CC"
|
|
42 esac])
|
|
43 }])])
|
|
44
|
|
45 dnl Internal subroutine of AC_SYS_LARGEFILE.
|
|
46 dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
|
|
47 AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
|
|
48 [case $2 in
|
|
49 no) ;;
|
|
50 ?*)
|
|
51 case "[$]$1" in
|
|
52 '') $1=$2 ;;
|
|
53 *) $1=[$]$1' '$2 ;;
|
|
54 esac ;;
|
|
55 esac])
|
|
56
|
|
57 dnl Internal subroutine of AC_SYS_LARGEFILE.
|
|
58 dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
|
|
59 AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
|
|
60 [AC_CACHE_CHECK([for $1], $2,
|
|
61 [$2=no
|
|
62 changequote(, )dnl
|
|
63 $4
|
|
64 for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
|
65 case "$ac_flag" in
|
|
66 -D$1)
|
|
67 $2=1 ;;
|
|
68 -D$1=*)
|
|
69 $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
|
|
70 esac
|
|
71 done
|
|
72 changequote([, ])dnl
|
|
73 ])
|
|
74 if test "[$]$2" != no; then
|
|
75 AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
|
|
76 fi])
|
|
77
|
|
78 AC_DEFUN(AC_SYS_LARGEFILE,
|
|
79 [AC_REQUIRE([AC_CANONICAL_HOST])
|
|
80 AC_ARG_ENABLE(largefile,
|
|
81 [ --disable-largefile omit support for large files])
|
|
82 if test "$enable_largefile" != no; then
|
|
83 AC_CHECK_TOOL(GETCONF, getconf)
|
|
84 AC_SYS_LARGEFILE_FLAGS(CFLAGS)
|
|
85 AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
|
|
86 AC_SYS_LARGEFILE_FLAGS(LIBS)
|
|
87
|
|
88 for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
|
|
89 case "$ac_flag" in
|
|
90 no) ;;
|
|
91 -D_FILE_OFFSET_BITS=*) ;;
|
|
92 -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
|
|
93 -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
|
|
94 -D?* | -I?*)
|
|
95 AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
|
|
96 *)
|
|
97 AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
|
|
98 esac
|
|
99 done
|
|
100 AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
|
|
101 AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
|
|
102 AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
|
|
103 ac_cv_sys_file_offset_bits,
|
|
104 [Number of bits in a file offset, on hosts where this is settable.]
|
|
105 [case "$host_os" in
|
|
106 # HP-UX 10.20 and later
|
|
107 hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
|
108 ac_cv_sys_file_offset_bits=64 ;;
|
|
109 esac])
|
|
110 AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
|
|
111 ac_cv_sys_largefile_source,
|
|
112 [Define to make fseeko etc. visible, on some hosts.],
|
|
113 [case "$host_os" in
|
|
114 # HP-UX 10.20 and later
|
|
115 hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
|
|
116 ac_cv_sys_largefile_source=1 ;;
|
|
117 esac])
|
|
118 AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
|
|
119 ac_cv_sys_large_files,
|
|
120 [Define for large files, on AIX-style hosts.],
|
|
121 [case "$host_os" in
|
|
122 # AIX 4.2 and later
|
|
123 aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
|
|
124 ac_cv_sys_large_files=1 ;;
|
|
125 esac])
|
|
126 fi
|
|
127 ])
|
|
128
|
33
|
129 # Like AC_CONFIG_HEADER, but automatically create stamp file.
|
26
|
130
|
16
|
131 AC_DEFUN([AM_CONFIG_HEADER],
|
33
|
132 [AC_PREREQ([2.12])
|
|
133 AC_CONFIG_HEADER([$1])
|
|
134 dnl When config.status generates a header, we must update the stamp-h file.
|
|
135 dnl This file resides in the same directory as the config header
|
|
136 dnl that is generated. We must strip everything past the first ":",
|
|
137 dnl and everything past the last "/".
|
|
138 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
|
139 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
|
|
140 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
|
|
141 <<am_indx=1
|
|
142 for am_file in <<$1>>; do
|
|
143 case " <<$>>CONFIG_HEADERS " in
|
|
144 *" <<$>>am_file "*<<)>>
|
|
145 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
|
|
146 ;;
|
|
147 esac
|
|
148 am_indx=`expr "<<$>>am_indx" + 1`
|
|
149 done<<>>dnl>>)
|
|
150 changequote([,]))])
|
26
|
151
|
33
|
152 # Do all the work for Automake. This macro actually does too much --
|
|
153 # some checks are only needed if your package does certain things.
|
|
154 # But this isn't really a big deal.
|
26
|
155
|
33
|
156 # serial 1
|
26
|
157
|
33
|
158 dnl Usage:
|
|
159 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
|
160
|
16
|
161 AC_DEFUN([AM_INIT_AUTOMAKE],
|
|
162 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
33
|
163 AC_REQUIRE([AC_PROG_INSTALL])
|
|
164 PACKAGE=[$1]
|
|
165 AC_SUBST(PACKAGE)
|
|
166 VERSION=[$2]
|
|
167 AC_SUBST(VERSION)
|
|
168 dnl test to see if srcdir already configured
|
|
169 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
1
|
170 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
|
171 fi
|
33
|
172 ifelse([$3],,
|
|
173 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
|
174 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
|
175 AC_REQUIRE([AM_SANITY_CHECK])
|
|
176 AC_REQUIRE([AC_ARG_PROGRAM])
|
|
177 dnl FIXME This is truly gross.
|
|
178 missing_dir=`cd $ac_aux_dir && pwd`
|
|
179 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
|
|
180 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
|
181 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
|
|
182 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
|
183 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
|
184 AC_REQUIRE([AC_PROG_MAKE_SET])])
|
1
|
185
|
16
|
186 # Copyright 2002 Free Software Foundation, Inc.
|
|
187
|
|
188 # This program is free software; you can redistribute it and/or modify
|
|
189 # it under the terms of the GNU General Public License as published by
|
|
190 # the Free Software Foundation; either version 2, or (at your option)
|
|
191 # any later version.
|
|
192
|
|
193 # This program is distributed in the hope that it will be useful,
|
|
194 # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
195 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
196 # GNU General Public License for more details.
|
|
197
|
|
198 # You should have received a copy of the GNU General Public License
|
|
199 # along with this program; if not, write to the Free Software
|
|
200 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
201
|
|
202 # AM_AUTOMAKE_VERSION(VERSION)
|
|
203 # ----------------------------
|
|
204 # Automake X.Y traces this macro to ensure aclocal.m4 has been
|
|
205 # generated from the m4 files accompanying Automake X.Y.
|
33
|
206 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
|
16
|
207
|
|
208 # AM_SET_CURRENT_AUTOMAKE_VERSION
|
|
209 # -------------------------------
|
|
210 # Call AM_AUTOMAKE_VERSION so it can be traced.
|
|
211 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
|
212 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
33
|
213 [AM_AUTOMAKE_VERSION([1.4-p6])])
|
16
|
214
|
1
|
215 #
|
|
216 # Check to make sure that the build environment is sane.
|
|
217 #
|
|
218
|
16
|
219 AC_DEFUN([AM_SANITY_CHECK],
|
1
|
220 [AC_MSG_CHECKING([whether build environment is sane])
|
|
221 # Just in case
|
|
222 sleep 1
|
33
|
223 echo timestamp > conftestfile
|
1
|
224 # Do `set' in a subshell so we don't clobber the current shell's
|
|
225 # arguments. Must try -L first in case configure is actually a
|
|
226 # symlink; some systems play weird games with the mod time of symlinks
|
|
227 # (eg FreeBSD returns the mod time of the symlink's containing
|
|
228 # directory).
|
|
229 if (
|
33
|
230 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
|
231 if test "[$]*" = "X"; then
|
1
|
232 # -L didn't work.
|
33
|
233 set X `ls -t $srcdir/configure conftestfile`
|
1
|
234 fi
|
33
|
235 if test "[$]*" != "X $srcdir/configure conftestfile" \
|
|
236 && test "[$]*" != "X conftestfile $srcdir/configure"; then
|
1
|
237
|
|
238 # If neither matched, then we have a broken ls. This can happen
|
|
239 # if, for instance, CONFIG_SHELL is bash and it inherits a
|
|
240 # broken ls alias from the environment. This has actually
|
|
241 # happened. Such a system could not be considered "sane".
|
|
242 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
|
243 alias in your environment])
|
|
244 fi
|
|
245
|
33
|
246 test "[$]2" = conftestfile
|
1
|
247 )
|
|
248 then
|
|
249 # Ok.
|
|
250 :
|
|
251 else
|
|
252 AC_MSG_ERROR([newly created file is older than distributed files!
|
|
253 Check your system clock])
|
|
254 fi
|
33
|
255 rm -f conftest*
|
1
|
256 AC_MSG_RESULT(yes)])
|
|
257
|
33
|
258 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
|
259 dnl The program must properly implement --version.
|
16
|
260 AC_DEFUN([AM_MISSING_PROG],
|
33
|
261 [AC_MSG_CHECKING(for working $2)
|
|
262 # Run test in a subshell; some versions of sh will print an error if
|
|
263 # an executable is not found, even if stderr is redirected.
|
|
264 # Redirect stdin to placate older versions of autoconf. Sigh.
|
|
265 if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
|
266 $1=$2
|
|
267 AC_MSG_RESULT(found)
|
|
268 else
|
|
269 $1="$3/missing $2"
|
|
270 AC_MSG_RESULT(missing)
|
|
271 fi
|
1
|
272 AC_SUBST($1)])
|
|
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
|
58
|
417
|
|
418 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
|
|
419 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
|
|
420 dnl also defines GSTUFF_PKG_ERRORS on error
|
|
421 AC_DEFUN(PKG_CHECK_MODULES, [
|
|
422 succeeded=no
|
|
423
|
|
424 if test -z "$PKG_CONFIG"; then
|
|
425 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
|
426 fi
|
|
427
|
|
428 if test "$PKG_CONFIG" = "no" ; then
|
|
429 echo "*** The pkg-config script could not be found. Make sure it is"
|
|
430 echo "*** in your path, or set the PKG_CONFIG environment variable"
|
|
431 echo "*** to the full path to pkg-config."
|
|
432 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
|
|
433 else
|
|
434 PKG_CONFIG_MIN_VERSION=0.9.0
|
|
435 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
|
|
436 AC_MSG_CHECKING(for $2)
|
|
437
|
|
438 if $PKG_CONFIG --exists "$2" ; then
|
|
439 AC_MSG_RESULT(yes)
|
|
440 succeeded=yes
|
|
441
|
|
442 AC_MSG_CHECKING($1_CFLAGS)
|
|
443 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
|
|
444 AC_MSG_RESULT($$1_CFLAGS)
|
|
445
|
|
446 AC_MSG_CHECKING($1_LIBS)
|
|
447 $1_LIBS=`$PKG_CONFIG --libs "$2"`
|
|
448 AC_MSG_RESULT($$1_LIBS)
|
|
449 else
|
|
450 $1_CFLAGS=""
|
|
451 $1_LIBS=""
|
|
452 ## If we have a custom action on failure, don't print errors, but
|
|
453 ## do set a variable so people can do so.
|
|
454 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
|
455 ifelse([$4], ,echo $$1_PKG_ERRORS,)
|
|
456 fi
|
|
457
|
|
458 AC_SUBST($1_CFLAGS)
|
|
459 AC_SUBST($1_LIBS)
|
|
460 else
|
|
461 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
|
|
462 echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
|
463 fi
|
|
464 fi
|
|
465
|
|
466 if test $succeeded = yes; then
|
|
467 ifelse([$3], , :, [$3])
|
|
468 else
|
|
469 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])
|
|
470 fi
|
|
471 ])
|
|
472
|
|
473
|
|
474
|
1
|
475 # Configure paths for GLIB
|
|
476 # Owen Taylor 97-11-3
|
|
477
|
|
478 dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
|
|
479 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
|
|
480 dnl gthread is specified in MODULES, pass to glib-config
|
|
481 dnl
|
|
482 AC_DEFUN(AM_PATH_GLIB,
|
|
483 [dnl
|
|
484 dnl Get the cflags and libraries from the glib-config script
|
|
485 dnl
|
|
486 AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
|
|
487 glib_config_prefix="$withval", glib_config_prefix="")
|
|
488 AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
|
|
489 glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
|
|
490 AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
|
|
491 , enable_glibtest=yes)
|
|
492
|
|
493 if test x$glib_config_exec_prefix != x ; then
|
|
494 glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
|
|
495 if test x${GLIB_CONFIG+set} != xset ; then
|
|
496 GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
|
|
497 fi
|
|
498 fi
|
|
499 if test x$glib_config_prefix != x ; then
|
|
500 glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
|
|
501 if test x${GLIB_CONFIG+set} != xset ; then
|
|
502 GLIB_CONFIG=$glib_config_prefix/bin/glib-config
|
|
503 fi
|
|
504 fi
|
|
505
|
|
506 for module in . $4
|
|
507 do
|
|
508 case "$module" in
|
|
509 gmodule)
|
|
510 glib_config_args="$glib_config_args gmodule"
|
|
511 ;;
|
|
512 gthread)
|
|
513 glib_config_args="$glib_config_args gthread"
|
|
514 ;;
|
|
515 esac
|
|
516 done
|
|
517
|
|
518 AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
|
|
519 min_glib_version=ifelse([$1], ,0.99.7,$1)
|
|
520 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
|
|
521 no_glib=""
|
|
522 if test "$GLIB_CONFIG" = "no" ; then
|
|
523 no_glib=yes
|
|
524 else
|
|
525 GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
|
|
526 GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
|
|
527 glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
|
|
528 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
|
529 glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
|
|
530 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
|
531 glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
|
|
532 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
|
533 if test "x$enable_glibtest" = "xyes" ; then
|
|
534 ac_save_CFLAGS="$CFLAGS"
|
|
535 ac_save_LIBS="$LIBS"
|
|
536 CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
|
537 LIBS="$GLIB_LIBS $LIBS"
|
|
538 dnl
|
|
539 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
|
|
540 dnl checks the results of glib-config to some extent
|
|
541 dnl
|
|
542 rm -f conf.glibtest
|
|
543 AC_TRY_RUN([
|
|
544 #include <glib.h>
|
|
545 #include <stdio.h>
|
|
546 #include <stdlib.h>
|
|
547
|
|
548 int
|
|
549 main ()
|
|
550 {
|
|
551 int major, minor, micro;
|
|
552 char *tmp_version;
|
|
553
|
|
554 system ("touch conf.glibtest");
|
|
555
|
|
556 /* HP/UX 9 (%@#!) writes to sscanf strings */
|
|
557 tmp_version = g_strdup("$min_glib_version");
|
|
558 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
|
559 printf("%s, bad version string\n", "$min_glib_version");
|
|
560 exit(1);
|
|
561 }
|
|
562
|
|
563 if ((glib_major_version != $glib_config_major_version) ||
|
|
564 (glib_minor_version != $glib_config_minor_version) ||
|
|
565 (glib_micro_version != $glib_config_micro_version))
|
|
566 {
|
|
567 printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
|
|
568 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
|
|
569 glib_major_version, glib_minor_version, glib_micro_version);
|
|
570 printf ("*** was found! If glib-config was correct, then it is best\n");
|
|
571 printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
|
|
572 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
|
|
573 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
|
|
574 printf("*** required on your system.\n");
|
|
575 printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
|
|
576 printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
|
|
577 printf("*** before re-running configure\n");
|
|
578 }
|
|
579 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
|
|
580 (glib_minor_version != GLIB_MINOR_VERSION) ||
|
|
581 (glib_micro_version != GLIB_MICRO_VERSION))
|
|
582 {
|
|
583 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
|
|
584 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
|
|
585 printf("*** library (version %d.%d.%d)\n",
|
|
586 glib_major_version, glib_minor_version, glib_micro_version);
|
|
587 }
|
|
588 else
|
|
589 {
|
|
590 if ((glib_major_version > major) ||
|
|
591 ((glib_major_version == major) && (glib_minor_version > minor)) ||
|
|
592 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
|
|
593 {
|
|
594 return 0;
|
|
595 }
|
|
596 else
|
|
597 {
|
|
598 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
|
|
599 glib_major_version, glib_minor_version, glib_micro_version);
|
|
600 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
|
|
601 major, minor, micro);
|
|
602 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
|
|
603 printf("***\n");
|
|
604 printf("*** If you have already installed a sufficiently new version, this error\n");
|
|
605 printf("*** probably means that the wrong copy of the glib-config shell script is\n");
|
|
606 printf("*** being found. The easiest way to fix this is to remove the old version\n");
|
|
607 printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
|
|
608 printf("*** correct copy of glib-config. (In this case, you will have to\n");
|
|
609 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
|
|
610 printf("*** so that the correct libraries are found at run-time))\n");
|
|
611 }
|
|
612 }
|
|
613 return 1;
|
|
614 }
|
|
615 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
|
616 CFLAGS="$ac_save_CFLAGS"
|
|
617 LIBS="$ac_save_LIBS"
|
|
618 fi
|
|
619 fi
|
|
620 if test "x$no_glib" = x ; then
|
|
621 AC_MSG_RESULT(yes)
|
|
622 ifelse([$2], , :, [$2])
|
|
623 else
|
|
624 AC_MSG_RESULT(no)
|
|
625 if test "$GLIB_CONFIG" = "no" ; then
|
|
626 echo "*** The glib-config script installed by GLIB could not be found"
|
|
627 echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
|
|
628 echo "*** your path, or set the GLIB_CONFIG environment variable to the"
|
|
629 echo "*** full path to glib-config."
|
|
630 else
|
|
631 if test -f conf.glibtest ; then
|
|
632 :
|
|
633 else
|
|
634 echo "*** Could not run GLIB test program, checking why..."
|
|
635 CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
|
636 LIBS="$LIBS $GLIB_LIBS"
|
|
637 AC_TRY_LINK([
|
|
638 #include <glib.h>
|
|
639 #include <stdio.h>
|
|
640 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
|
|
641 [ echo "*** The test program compiled, but did not run. This usually means"
|
|
642 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
|
|
643 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
|
|
644 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
|
|
645 echo "*** to the installed location Also, make sure you have run ldconfig if that"
|
|
646 echo "*** is required on your system"
|
|
647 echo "***"
|
|
648 echo "*** If you have an old version installed, it is best to remove it, although"
|
|
649 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
|
|
650 echo "***"
|
|
651 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
|
|
652 echo "*** came with the system with the command"
|
|
653 echo "***"
|
|
654 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
|
|
655 [ echo "*** The test program failed to compile or link. See the file config.log for the"
|
|
656 echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
|
|
657 echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
|
|
658 echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
|
|
659 CFLAGS="$ac_save_CFLAGS"
|
|
660 LIBS="$ac_save_LIBS"
|
|
661 fi
|
|
662 fi
|
|
663 GLIB_CFLAGS=""
|
|
664 GLIB_LIBS=""
|
|
665 ifelse([$3], , :, [$3])
|
|
666 fi
|
|
667 AC_SUBST(GLIB_CFLAGS)
|
|
668 AC_SUBST(GLIB_LIBS)
|
|
669 rm -f conf.glibtest
|
|
670 ])
|
|
671
|
26
|
672
|
33
|
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
|
87
|
886 # Macro to add for using GNU gettext.
|
|
887 # Ulrich Drepper <drepper@cygnus.com>, 1995.
|
|
888 #
|
|
889 # This file can be copied and used freely without restrictions. It can
|
|
890 # be used in projects which are not available under the GNU General Public
|
|
891 # License or the GNU Library General Public License but which still want
|
|
892 # to provide support for the GNU gettext functionality.
|
|
893 # Please note that the actual code of the GNU gettext library is covered
|
|
894 # by the GNU Library General Public License, and the rest of the GNU
|
|
895 # gettext package package is covered by the GNU General Public License.
|
|
896 # They are *not* in the public domain.
|
1
|
897
|
87
|
898 # serial 10
|
1
|
899
|
87
|
900 dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
|
|
901 dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
|
1
|
902 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
|
903 dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
87
|
904 dnl AM-DISABLE-SHARED). Otherwise, a static library
|
1
|
905 dnl $(top_builddir)/intl/libintl.a will be created.
|
|
906 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
|
907 dnl implementations (in libc or libintl) without the ngettext() function
|
87
|
908 dnl will be ignored.
|
|
909 dnl LIBDIR is used to find the intl libraries. If empty,
|
1
|
910 dnl the value `$(top_builddir)/intl/' is used.
|
|
911 dnl
|
|
912 dnl The result of the configuration is one of three cases:
|
|
913 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
|
|
914 dnl and used.
|
|
915 dnl Catalog format: GNU --> install in $(datadir)
|
|
916 dnl Catalog extension: .mo after installation, .gmo in source tree
|
|
917 dnl 2) GNU gettext has been found in the system's C library.
|
|
918 dnl Catalog format: GNU --> install in $(datadir)
|
|
919 dnl Catalog extension: .mo after installation, .gmo in source tree
|
|
920 dnl 3) No internationalization, always use English msgid.
|
|
921 dnl Catalog format: none
|
|
922 dnl Catalog extension: none
|
|
923 dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
|
924 dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
|
925 dnl but we keep it in order not to force irrelevant filename changes on the
|
|
926 dnl maintainers.
|
|
927 dnl
|
87
|
928 AC_DEFUN([AM_WITH_NLS],
|
|
929 [AC_MSG_CHECKING([whether NLS is requested])
|
|
930 dnl Default is enabled NLS
|
|
931 AC_ARG_ENABLE(nls,
|
|
932 [ --disable-nls do not use Native Language Support],
|
|
933 USE_NLS=$enableval, USE_NLS=yes)
|
|
934 AC_MSG_RESULT($USE_NLS)
|
|
935 AC_SUBST(USE_NLS)
|
1
|
936
|
|
937 BUILD_INCLUDED_LIBINTL=no
|
|
938 USE_INCLUDED_LIBINTL=no
|
87
|
939 INTLLIBS=
|
1
|
940
|
87
|
941 dnl If we use NLS figure out what method
|
|
942 if test "$USE_NLS" = "yes"; then
|
|
943 AC_DEFINE(ENABLE_NLS, 1,
|
|
944 [Define to 1 if translation of program messages to the user's native language
|
|
945 is requested.])
|
1
|
946 AC_MSG_CHECKING([whether included gettext is requested])
|
|
947 AC_ARG_WITH(included-gettext,
|
|
948 [ --with-included-gettext use the GNU gettext library included here],
|
|
949 nls_cv_force_use_gnu_gettext=$withval,
|
|
950 nls_cv_force_use_gnu_gettext=no)
|
|
951 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
|
|
952
|
|
953 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
|
954 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
|
955 dnl User does not insist on using GNU NLS library. Figure out what
|
|
956 dnl to use. If GNU gettext is available we use this. Else we have
|
|
957 dnl to fall back to GNU NLS library.
|
87
|
958 CATOBJEXT=NONE
|
1
|
959
|
|
960 dnl Add a version number to the cache macros.
|
87
|
961 define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
|
|
962 define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
|
|
963
|
|
964 AC_CHECK_HEADER(libintl.h,
|
|
965 [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
|
966 [AC_TRY_LINK([#include <libintl.h>
|
|
967 extern int _nl_msg_cat_cntr;],
|
|
968 [bindtextdomain ("", "");
|
|
969 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
|
970 gt_cv_func_gnugettext_libc=yes,
|
|
971 gt_cv_func_gnugettext_libc=no)])
|
1
|
972
|
87
|
973 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
|
974 AC_CACHE_CHECK([for GNU gettext in libintl],
|
|
975 gt_cv_func_gnugettext_libintl,
|
|
976 [gt_save_LIBS="$LIBS"
|
|
977 LIBS="$LIBS -lintl $LIBICONV"
|
|
978 AC_TRY_LINK([#include <libintl.h>
|
|
979 extern int _nl_msg_cat_cntr;],
|
|
980 [bindtextdomain ("", "");
|
|
981 return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
|
982 gt_cv_func_gnugettext_libintl=yes,
|
|
983 gt_cv_func_gnugettext_libintl=no)
|
|
984 LIBS="$gt_save_LIBS"])
|
|
985 fi
|
1
|
986
|
87
|
987 dnl If an already present or preinstalled GNU gettext() is found,
|
|
988 dnl use it. But if this macro is used in GNU gettext, and GNU
|
|
989 dnl gettext is already preinstalled in libintl, we update this
|
|
990 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
|
991 if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
|
992 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
|
993 && test "$PACKAGE" != gettext; }; then
|
|
994 AC_DEFINE(HAVE_GETTEXT, 1,
|
|
995 [Define if the GNU gettext() function is already present or preinstalled.])
|
|
996
|
|
997 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
|
998 dnl If iconv() is in a separate libiconv library, then anyone
|
|
999 dnl linking with libintl{.a,.so} also needs to link with
|
|
1000 dnl libiconv.
|
|
1001 INTLLIBS="-lintl $LIBICONV"
|
|
1002 fi
|
1
|
1003
|
87
|
1004 gt_save_LIBS="$LIBS"
|
|
1005 LIBS="$LIBS $INTLLIBS"
|
|
1006 AC_CHECK_FUNCS(dcgettext)
|
|
1007 LIBS="$gt_save_LIBS"
|
|
1008
|
|
1009 dnl Search for GNU msgfmt in the PATH.
|
|
1010 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
|
1011 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
|
1012 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
1
|
1013
|
87
|
1014 dnl Search for GNU xgettext in the PATH.
|
|
1015 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
1016 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
|
1017
|
|
1018 CATOBJEXT=.gmo
|
|
1019 fi
|
|
1020 ])
|
|
1021
|
|
1022 if test "$CATOBJEXT" = "NONE"; then
|
|
1023 dnl GNU gettext is not found in the C library.
|
|
1024 dnl Fall back on GNU gettext library.
|
|
1025 nls_cv_use_gnu_gettext=yes
|
1
|
1026 fi
|
|
1027 fi
|
|
1028
|
|
1029 if test "$nls_cv_use_gnu_gettext" = "yes"; then
|
|
1030 dnl Mark actions used to generate GNU NLS library.
|
|
1031 INTLOBJS="\$(GETTOBJS)"
|
87
|
1032 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
|
1033 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
|
|
1034 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
|
1035 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
1036 [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
|
|
1037 AC_SUBST(MSGFMT)
|
|
1038 BUILD_INCLUDED_LIBINTL=yes
|
|
1039 USE_INCLUDED_LIBINTL=yes
|
|
1040 CATOBJEXT=.gmo
|
|
1041 INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
|
|
1042 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
|
1043 fi
|
|
1044
|
|
1045 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
|
1046 dnl Test whether we really found GNU msgfmt.
|
|
1047 if test "$GMSGFMT" != ":"; then
|
|
1048 dnl If it is no GNU msgfmt we define it as : so that the
|
|
1049 dnl Makefiles still can work.
|
|
1050 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
|
|
1051 : ;
|
|
1052 else
|
|
1053 AC_MSG_RESULT(
|
|
1054 [found msgfmt program is not GNU msgfmt; ignore it])
|
|
1055 GMSGFMT=":"
|
|
1056 fi
|
1
|
1057 fi
|
|
1058
|
87
|
1059 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
|
|
1060 dnl Test whether we really found GNU xgettext.
|
|
1061 if test "$XGETTEXT" != ":"; then
|
|
1062 dnl If it is no GNU xgettext we define it as : so that the
|
|
1063 dnl Makefiles still can work.
|
|
1064 if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
|
|
1065 : ;
|
|
1066 else
|
|
1067 AC_MSG_RESULT(
|
|
1068 [found xgettext program is not GNU xgettext; ignore it])
|
|
1069 XGETTEXT=":"
|
|
1070 fi
|
1
|
1071 fi
|
|
1072
|
87
|
1073 dnl We need to process the po/ directory.
|
|
1074 POSUB=po
|
1
|
1075 fi
|
87
|
1076 AC_OUTPUT_COMMANDS(
|
|
1077 [for ac_file in $CONFIG_FILES; do
|
|
1078 # Support "outfile[:infile[:infile...]]"
|
|
1079 case "$ac_file" in
|
|
1080 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
|
1081 esac
|
|
1082 # PO directories have a Makefile.in generated from Makefile.in.in.
|
|
1083 case "$ac_file" in */Makefile.in)
|
|
1084 # Adjust a relative srcdir.
|
|
1085 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
|
1086 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
|
1087 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
|
1088 # In autoconf-2.13 it is called $ac_given_srcdir.
|
|
1089 # In autoconf-2.50 it is called $srcdir.
|
|
1090 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
|
1091 case "$ac_given_srcdir" in
|
|
1092 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
|
1093 /*) top_srcdir="$ac_given_srcdir" ;;
|
|
1094 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
|
1095 esac
|
|
1096 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
|
1097 rm -f "$ac_dir/POTFILES"
|
|
1098 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
|
1099 sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
|
|
1100 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
|
1101 sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
|
1102 fi
|
|
1103 ;;
|
|
1104 esac
|
|
1105 done])
|
1
|
1106
|
|
1107
|
|
1108 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
|
1109 dnl to 'yes' because some of the testsuite requires it.
|
|
1110 if test "$PACKAGE" = gettext; then
|
|
1111 BUILD_INCLUDED_LIBINTL=yes
|
|
1112 fi
|
|
1113
|
87
|
1114 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
|
1115 dnl because plural.y uses bison specific features. It requires at least
|
|
1116 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
|
1117 dnl compile.
|
|
1118 dnl bison is only needed for the maintainer (who touches plural.y). But in
|
|
1119 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
|
1120 dnl the rule in general Makefile. Now, some people carelessly touch the
|
|
1121 dnl files or have a broken "make" program, hence the plural.c rule will
|
|
1122 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
|
1123 dnl present or too old.
|
|
1124 AC_CHECK_PROGS([INTLBISON], [bison])
|
|
1125 if test -z "$INTLBISON"; then
|
|
1126 ac_verc_fail=yes
|
|
1127 else
|
|
1128 dnl Found it, now check the version.
|
|
1129 AC_MSG_CHECKING([version of bison])
|
|
1130 changequote(<<,>>)dnl
|
|
1131 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
|
1132 case $ac_prog_version in
|
|
1133 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
|
1134 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
|
1135 changequote([,])dnl
|
|
1136 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
|
1137 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
|
1138 esac
|
|
1139 AC_MSG_RESULT([$ac_prog_version])
|
|
1140 fi
|
|
1141 if test $ac_verc_fail = yes; then
|
|
1142 INTLBISON=:
|
|
1143 fi
|
|
1144
|
|
1145 dnl These rules are solely for the distribution goal. While doing this
|
|
1146 dnl we only have to keep exactly one list of the available catalogs
|
|
1147 dnl in configure.in.
|
|
1148 for lang in $ALL_LINGUAS; do
|
|
1149 GMOFILES="$GMOFILES $lang.gmo"
|
|
1150 POFILES="$POFILES $lang.po"
|
|
1151 done
|
|
1152
|
1
|
1153 dnl Make all variables we use known to autoconf.
|
|
1154 AC_SUBST(BUILD_INCLUDED_LIBINTL)
|
|
1155 AC_SUBST(USE_INCLUDED_LIBINTL)
|
87
|
1156 AC_SUBST(CATALOGS)
|
1
|
1157 AC_SUBST(CATOBJEXT)
|
87
|
1158 AC_SUBST(GMOFILES)
|
|
1159 AC_SUBST(INTLLIBS)
|
1
|
1160 AC_SUBST(INTLOBJS)
|
87
|
1161 AC_SUBST(POFILES)
|
|
1162 AC_SUBST(POSUB)
|
1
|
1163
|
|
1164 dnl For backward compatibility. Some configure.ins may be using this.
|
|
1165 nls_cv_header_intl=
|
|
1166 nls_cv_header_libgt=
|
|
1167
|
|
1168 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1169 DATADIRNAME=share
|
|
1170 AC_SUBST(DATADIRNAME)
|
|
1171
|
|
1172 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1173 INSTOBJEXT=.mo
|
|
1174 AC_SUBST(INSTOBJEXT)
|
|
1175
|
|
1176 dnl For backward compatibility. Some Makefiles may be using this.
|
|
1177 GENCAT=gencat
|
|
1178 AC_SUBST(GENCAT)
|
|
1179 ])
|
|
1180
|
87
|
1181 dnl Usage: Just like AM_WITH_NLS, which see.
|
|
1182 AC_DEFUN([AM_GNU_GETTEXT],
|
|
1183 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
|
1184 AC_REQUIRE([AC_PROG_CC])dnl
|
|
1185 AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|
1186 AC_REQUIRE([AC_PROG_RANLIB])dnl
|
|
1187 AC_REQUIRE([AC_ISC_POSIX])dnl
|
|
1188 AC_REQUIRE([AC_HEADER_STDC])dnl
|
|
1189 AC_REQUIRE([AC_C_CONST])dnl
|
|
1190 AC_REQUIRE([AC_C_INLINE])dnl
|
|
1191 AC_REQUIRE([AC_TYPE_OFF_T])dnl
|
|
1192 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
|
1193 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
|
1194 AC_REQUIRE([AC_FUNC_MMAP])dnl
|
|
1195 AC_REQUIRE([jm_GLIBC21])dnl
|
7
|
1196
|
87
|
1197 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
|
1198 stdlib.h string.h unistd.h sys/param.h])
|
|
1199 AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
|
|
1200 getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
|
|
1201 strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
7
|
1202
|
87
|
1203 AM_ICONV
|
|
1204 AM_LANGINFO_CODESET
|
|
1205 AM_LC_MESSAGES
|
|
1206 AM_WITH_NLS([$1],[$2],[$3])
|
1
|
1207
|
87
|
1208 if test "x$CATOBJEXT" != "x"; then
|
|
1209 if test "x$ALL_LINGUAS" = "x"; then
|
|
1210 LINGUAS=
|
|
1211 else
|
|
1212 AC_MSG_CHECKING(for catalogs to be installed)
|
|
1213 NEW_LINGUAS=
|
|
1214 for presentlang in $ALL_LINGUAS; do
|
|
1215 useit=no
|
|
1216 for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
|
|
1217 # Use the presentlang catalog if desiredlang is
|
|
1218 # a. equal to presentlang, or
|
|
1219 # b. a variant of presentlang (because in this case,
|
|
1220 # presentlang can be used as a fallback for messages
|
|
1221 # which are not translated in the desiredlang catalog).
|
|
1222 case "$desiredlang" in
|
|
1223 "$presentlang"*) useit=yes;;
|
|
1224 esac
|
|
1225 done
|
|
1226 if test $useit = yes; then
|
|
1227 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
|
|
1228 fi
|
|
1229 done
|
|
1230 LINGUAS=$NEW_LINGUAS
|
|
1231 AC_MSG_RESULT($LINGUAS)
|
|
1232 fi
|
1
|
1233
|
87
|
1234 dnl Construct list of names of catalog files to be constructed.
|
|
1235 if test -n "$LINGUAS"; then
|
|
1236 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
|
|
1237 fi
|
|
1238 fi
|
7
|
1239
|
87
|
1240 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
|
1241 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
|
1242 dnl Try to locate is.
|
|
1243 MKINSTALLDIRS=
|
|
1244 if test -n "$ac_aux_dir"; then
|
|
1245 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
|
1246 fi
|
|
1247 if test -z "$MKINSTALLDIRS"; then
|
|
1248 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
|
1249 fi
|
|
1250 AC_SUBST(MKINSTALLDIRS)
|
7
|
1251
|
87
|
1252 dnl Enable libtool support if the surrounding package wishes it.
|
|
1253 INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
|
|
1254 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
7
|
1255 ])
|
1
|
1256
|
|
1257 # Search path for a program which passes the given test.
|
87
|
1258 # Ulrich Drepper <drepper@cygnus.com>, 1996.
|
|
1259 #
|
|
1260 # This file can be copied and used freely without restrictions. It can
|
|
1261 # be used in projects which are not available under the GNU General Public
|
|
1262 # License or the GNU Library General Public License but which still want
|
|
1263 # to provide support for the GNU gettext functionality.
|
|
1264 # Please note that the actual code of the GNU gettext library is covered
|
|
1265 # by the GNU Library General Public License, and the rest of the GNU
|
|
1266 # gettext package package is covered by the GNU General Public License.
|
|
1267 # They are *not* in the public domain.
|
|
1268
|
|
1269 # serial 2
|
1
|
1270
|
|
1271 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
|
1272 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
|
1273 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
|
1274 [# Extract the first word of "$2", so it can be a program name with args.
|
|
1275 set dummy $2; ac_word=[$]2
|
|
1276 AC_MSG_CHECKING([for $ac_word])
|
|
1277 AC_CACHE_VAL(ac_cv_path_$1,
|
|
1278 [case "[$]$1" in
|
|
1279 /*)
|
|
1280 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
|
1281 ;;
|
|
1282 *)
|
|
1283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
1284 for ac_dir in ifelse([$5], , $PATH, [$5]); do
|
|
1285 test -z "$ac_dir" && ac_dir=.
|
|
1286 if test -f $ac_dir/$ac_word; then
|
|
1287 if [$3]; then
|
|
1288 ac_cv_path_$1="$ac_dir/$ac_word"
|
|
1289 break
|
|
1290 fi
|
|
1291 fi
|
|
1292 done
|
|
1293 IFS="$ac_save_ifs"
|
|
1294 dnl If no 4th arg is given, leave the cache variable unset,
|
|
1295 dnl so AC_PATH_PROGS will keep looking.
|
|
1296 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
|
|
1297 ])dnl
|
|
1298 ;;
|
|
1299 esac])dnl
|
|
1300 $1="$ac_cv_path_$1"
|
|
1301 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
|
|
1302 AC_MSG_RESULT([$]$1)
|
|
1303 else
|
|
1304 AC_MSG_RESULT(no)
|
|
1305 fi
|
|
1306 AC_SUBST($1)dnl
|
|
1307 ])
|
|
1308
|
87
|
1309 #serial 1
|
16
|
1310 # This test replaces the one in autoconf.
|
|
1311 # Currently this macro should have the same name as the autoconf macro
|
|
1312 # because gettext's gettext.m4 (distributed in the automake package)
|
|
1313 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
|
|
1314 # give these diagnostics:
|
|
1315 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
|
|
1316 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
|
|
1317
|
|
1318 undefine([AC_ISC_POSIX])
|
|
1319
|
|
1320 AC_DEFUN([AC_ISC_POSIX],
|
|
1321 [
|
|
1322 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
|
|
1323 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
|
|
1324 ]
|
|
1325 )
|
|
1326
|
87
|
1327 #serial 2
|
1
|
1328
|
|
1329 # Test for the GNU C Library, version 2.1 or newer.
|
|
1330 # From Bruno Haible.
|
|
1331
|
|
1332 AC_DEFUN([jm_GLIBC21],
|
|
1333 [
|
|
1334 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
|
|
1335 ac_cv_gnu_library_2_1,
|
|
1336 [AC_EGREP_CPP([Lucky GNU user],
|
|
1337 [
|
|
1338 #include <features.h>
|
|
1339 #ifdef __GNU_LIBRARY__
|
|
1340 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
|
|
1341 Lucky GNU user
|
|
1342 #endif
|
|
1343 #endif
|
|
1344 ],
|
|
1345 ac_cv_gnu_library_2_1=yes,
|
|
1346 ac_cv_gnu_library_2_1=no)
|
|
1347 ]
|
|
1348 )
|
|
1349 AC_SUBST(GLIBC21)
|
|
1350 GLIBC21="$ac_cv_gnu_library_2_1"
|
|
1351 ]
|
|
1352 )
|
|
1353
|
87
|
1354 #serial AM2
|
1
|
1355
|
|
1356 dnl From Bruno Haible.
|
|
1357
|
87
|
1358 AC_DEFUN([AM_ICONV],
|
1
|
1359 [
|
87
|
1360 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
|
1361 dnl those with the standalone portable GNU libiconv installed).
|
1
|
1362
|
87
|
1363 AC_ARG_WITH([libiconv-prefix],
|
|
1364 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
|
1365 for dir in `echo "$withval" | tr : ' '`; do
|
|
1366 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
|
1367 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
|
1368 done
|
|
1369 ])
|
1
|
1370
|
87
|
1371 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
|
1372 am_cv_func_iconv="no, consider installing GNU libiconv"
|
|
1373 am_cv_lib_iconv=no
|
|
1374 AC_TRY_LINK([#include <stdlib.h>
|
|
1375 #include <iconv.h>],
|
|
1376 [iconv_t cd = iconv_open("","");
|
|
1377 iconv(cd,NULL,NULL,NULL,NULL);
|
|
1378 iconv_close(cd);],
|
|
1379 am_cv_func_iconv=yes)
|
|
1380 if test "$am_cv_func_iconv" != yes; then
|
|
1381 am_save_LIBS="$LIBS"
|
|
1382 LIBS="$LIBS -liconv"
|
|
1383 AC_TRY_LINK([#include <stdlib.h>
|
|
1384 #include <iconv.h>],
|
|
1385 [iconv_t cd = iconv_open("","");
|
|
1386 iconv(cd,NULL,NULL,NULL,NULL);
|
|
1387 iconv_close(cd);],
|
|
1388 am_cv_lib_iconv=yes
|
|
1389 am_cv_func_iconv=yes)
|
|
1390 LIBS="$am_save_LIBS"
|
|
1391 fi
|
|
1392 ])
|
|
1393 if test "$am_cv_func_iconv" = yes; then
|
|
1394 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
|
1395 AC_MSG_CHECKING([for iconv declaration])
|
|
1396 AC_CACHE_VAL(am_cv_proto_iconv, [
|
|
1397 AC_TRY_COMPILE([
|
|
1398 #include <stdlib.h>
|
|
1399 #include <iconv.h>
|
|
1400 extern
|
|
1401 #ifdef __cplusplus
|
|
1402 "C"
|
|
1403 #endif
|
|
1404 #if defined(__STDC__) || defined(__cplusplus)
|
|
1405 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
|
1406 #else
|
|
1407 size_t iconv();
|
|
1408 #endif
|
|
1409 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
|
1410 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);"])
|
|
1411 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
|
1412 AC_MSG_RESULT([$]{ac_t:-
|
|
1413 }[$]am_cv_proto_iconv)
|
|
1414 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
|
1415 [Define as const if the declaration of iconv() needs const.])
|
1
|
1416 fi
|
87
|
1417 LIBICONV=
|
|
1418 if test "$am_cv_lib_iconv" = yes; then
|
|
1419 LIBICONV="-liconv"
|
1
|
1420 fi
|
87
|
1421 AC_SUBST(LIBICONV)
|
1
|
1422 ])
|
|
1423
|
87
|
1424 #serial AM1
|
1
|
1425
|
|
1426 dnl From Bruno Haible.
|
|
1427
|
|
1428 AC_DEFUN([AM_LANGINFO_CODESET],
|
|
1429 [
|
|
1430 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
|
|
1431 [AC_TRY_LINK([#include <langinfo.h>],
|
|
1432 [char* cs = nl_langinfo(CODESET);],
|
|
1433 am_cv_langinfo_codeset=yes,
|
|
1434 am_cv_langinfo_codeset=no)
|
|
1435 ])
|
|
1436 if test $am_cv_langinfo_codeset = yes; then
|
|
1437 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
|
|
1438 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
|
1439 fi
|
|
1440 ])
|
|
1441
|
87
|
1442 # Check whether LC_MESSAGES is available in <locale.h>.
|
|
1443 # Ulrich Drepper <drepper@cygnus.com>, 1995.
|
|
1444 #
|
|
1445 # This file can be copied and used freely without restrictions. It can
|
|
1446 # be used in projects which are not available under the GNU General Public
|
|
1447 # License or the GNU Library General Public License but which still want
|
|
1448 # to provide support for the GNU gettext functionality.
|
|
1449 # Please note that the actual code of the GNU gettext library is covered
|
|
1450 # by the GNU Library General Public License, and the rest of the GNU
|
|
1451 # gettext package package is covered by the GNU General Public License.
|
|
1452 # They are *not* in the public domain.
|
7
|
1453
|
87
|
1454 # serial 2
|
1
|
1455
|
|
1456 AC_DEFUN([AM_LC_MESSAGES],
|
87
|
1457 [if test $ac_cv_header_locale_h = yes; then
|
|
1458 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
|
1459 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
1
|
1460 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
87
|
1461 if test $am_cv_val_LC_MESSAGES = yes; then
|
|
1462 AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
|
1463 [Define if your <locale.h> file defines LC_MESSAGES.])
|
|
1464 fi
|
|
1465 fi])
|
1
|
1466
|