1 | dnl aclocal.m4 generated automatically by aclocal 1.4 |
---|
2 | |
---|
3 | dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. |
---|
4 | dnl This file is free software; the Free Software Foundation |
---|
5 | dnl gives unlimited permission to copy and/or distribute it, |
---|
6 | dnl with or without modifications, as long as this notice is preserved. |
---|
7 | |
---|
8 | dnl This program is distributed in the hope that it will be useful, |
---|
9 | dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
---|
10 | dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
---|
11 | dnl PARTICULAR PURPOSE. |
---|
12 | |
---|
13 | # Like AC_CONFIG_HEADER, but automatically create stamp file. |
---|
14 | |
---|
15 | AC_DEFUN(AM_CONFIG_HEADER, |
---|
16 | [AC_PREREQ([2.12]) |
---|
17 | AC_CONFIG_HEADER([$1]) |
---|
18 | dnl When config.status generates a header, we must update the stamp-h file. |
---|
19 | dnl This file resides in the same directory as the config header |
---|
20 | dnl that is generated. We must strip everything past the first ":", |
---|
21 | dnl and everything past the last "/". |
---|
22 | AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
---|
23 | ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
---|
24 | <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
---|
25 | <<am_indx=1 |
---|
26 | for am_file in <<$1>>; do |
---|
27 | case " <<$>>CONFIG_HEADERS " in |
---|
28 | *" <<$>>am_file "*<<)>> |
---|
29 | echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
---|
30 | ;; |
---|
31 | esac |
---|
32 | am_indx=`expr "<<$>>am_indx" + 1` |
---|
33 | done<<>>dnl>>) |
---|
34 | changequote([,]))]) |
---|
35 | |
---|
36 | # Do all the work for Automake. This macro actually does too much -- |
---|
37 | # some checks are only needed if your package does certain things. |
---|
38 | # But this isn't really a big deal. |
---|
39 | |
---|
40 | # serial 1 |
---|
41 | |
---|
42 | dnl Usage: |
---|
43 | dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
---|
44 | |
---|
45 | AC_DEFUN(AM_INIT_AUTOMAKE, |
---|
46 | [AC_REQUIRE([AC_PROG_INSTALL]) |
---|
47 | PACKAGE=[$1] |
---|
48 | AC_SUBST(PACKAGE) |
---|
49 | VERSION=[$2] |
---|
50 | AC_SUBST(VERSION) |
---|
51 | dnl test to see if srcdir already configured |
---|
52 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
---|
53 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
---|
54 | fi |
---|
55 | ifelse([$3],, |
---|
56 | AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
---|
57 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
---|
58 | AC_REQUIRE([AM_SANITY_CHECK]) |
---|
59 | AC_REQUIRE([AC_ARG_PROGRAM]) |
---|
60 | dnl FIXME This is truly gross. |
---|
61 | missing_dir=`cd $ac_aux_dir && pwd` |
---|
62 | AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
---|
63 | AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
---|
64 | AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
---|
65 | AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
---|
66 | AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
---|
67 | AC_REQUIRE([AC_PROG_MAKE_SET])]) |
---|
68 | |
---|
69 | # |
---|
70 | # Check to make sure that the build environment is sane. |
---|
71 | # |
---|
72 | |
---|
73 | AC_DEFUN(AM_SANITY_CHECK, |
---|
74 | [AC_MSG_CHECKING([whether build environment is sane]) |
---|
75 | # Just in case |
---|
76 | sleep 1 |
---|
77 | echo timestamp > conftestfile |
---|
78 | # Do `set' in a subshell so we don't clobber the current shell's |
---|
79 | # arguments. Must try -L first in case configure is actually a |
---|
80 | # symlink; some systems play weird games with the mod time of symlinks |
---|
81 | # (eg FreeBSD returns the mod time of the symlink's containing |
---|
82 | # directory). |
---|
83 | if ( |
---|
84 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
---|
85 | if test "[$]*" = "X"; then |
---|
86 | # -L didn't work. |
---|
87 | set X `ls -t $srcdir/configure conftestfile` |
---|
88 | fi |
---|
89 | if test "[$]*" != "X $srcdir/configure conftestfile" \ |
---|
90 | && test "[$]*" != "X conftestfile $srcdir/configure"; then |
---|
91 | |
---|
92 | # If neither matched, then we have a broken ls. This can happen |
---|
93 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
---|
94 | # broken ls alias from the environment. This has actually |
---|
95 | # happened. Such a system could not be considered "sane". |
---|
96 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
---|
97 | alias in your environment]) |
---|
98 | fi |
---|
99 | |
---|
100 | test "[$]2" = conftestfile |
---|
101 | ) |
---|
102 | then |
---|
103 | # Ok. |
---|
104 | : |
---|
105 | else |
---|
106 | AC_MSG_ERROR([newly created file is older than distributed files! |
---|
107 | Check your system clock]) |
---|
108 | fi |
---|
109 | rm -f conftest* |
---|
110 | AC_MSG_RESULT(yes)]) |
---|
111 | |
---|
112 | dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
---|
113 | dnl The program must properly implement --version. |
---|
114 | AC_DEFUN(AM_MISSING_PROG, |
---|
115 | [AC_MSG_CHECKING(for working $2) |
---|
116 | # Run test in a subshell; some versions of sh will print an error if |
---|
117 | # an executable is not found, even if stderr is redirected. |
---|
118 | # Redirect stdin to placate older versions of autoconf. Sigh. |
---|
119 | if ($2 --version) < /dev/null > /dev/null 2>&1; then |
---|
120 | $1=$2 |
---|
121 | AC_MSG_RESULT(found) |
---|
122 | else |
---|
123 | $1="$3/missing $2" |
---|
124 | AC_MSG_RESULT(missing) |
---|
125 | fi |
---|
126 | AC_SUBST($1)]) |
---|
127 | |
---|
128 | |
---|
129 | # serial 40 AC_PROG_LIBTOOL |
---|
130 | AC_DEFUN(AC_PROG_LIBTOOL, |
---|
131 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl |
---|
132 | |
---|
133 | # Save cache, so that ltconfig can load it |
---|
134 | AC_CACHE_SAVE |
---|
135 | |
---|
136 | # Actually configure libtool. ac_aux_dir is where install-sh is found. |
---|
137 | CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ |
---|
138 | LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ |
---|
139 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ |
---|
140 | DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ |
---|
141 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ |
---|
142 | $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ |
---|
143 | || AC_MSG_ERROR([libtool configure failed]) |
---|
144 | |
---|
145 | # Reload cache, that may have been modified by ltconfig |
---|
146 | AC_CACHE_LOAD |
---|
147 | |
---|
148 | # This can be used to rebuild libtool when needed |
---|
149 | LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" |
---|
150 | |
---|
151 | # Always use our own libtool. |
---|
152 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
---|
153 | AC_SUBST(LIBTOOL)dnl |
---|
154 | |
---|
155 | # Redirect the config.log output again, so that the ltconfig log is not |
---|
156 | # clobbered by the next message. |
---|
157 | exec 5>>./config.log |
---|
158 | ]) |
---|
159 | |
---|
160 | AC_DEFUN(AC_LIBTOOL_SETUP, |
---|
161 | [AC_PREREQ(2.13)dnl |
---|
162 | AC_REQUIRE([AC_ENABLE_SHARED])dnl |
---|
163 | AC_REQUIRE([AC_ENABLE_STATIC])dnl |
---|
164 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl |
---|
165 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
166 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
167 | AC_REQUIRE([AC_PROG_RANLIB])dnl |
---|
168 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
169 | AC_REQUIRE([AC_PROG_LD])dnl |
---|
170 | AC_REQUIRE([AC_PROG_NM])dnl |
---|
171 | AC_REQUIRE([AC_PROG_LN_S])dnl |
---|
172 | dnl |
---|
173 | |
---|
174 | case "$target" in |
---|
175 | NONE) lt_target="$host" ;; |
---|
176 | *) lt_target="$target" ;; |
---|
177 | esac |
---|
178 | |
---|
179 | # Check for any special flags to pass to ltconfig. |
---|
180 | # |
---|
181 | # the following will cause an existing older ltconfig to fail, so |
---|
182 | # we ignore this at the expense of the cache file... Checking this |
---|
183 | # will just take longer ... bummer! |
---|
184 | #libtool_flags="--cache-file=$cache_file" |
---|
185 | # |
---|
186 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" |
---|
187 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" |
---|
188 | test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" |
---|
189 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" |
---|
190 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" |
---|
191 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], |
---|
192 | [libtool_flags="$libtool_flags --enable-dlopen"]) |
---|
193 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
---|
194 | [libtool_flags="$libtool_flags --enable-win32-dll"]) |
---|
195 | AC_ARG_ENABLE(libtool-lock, |
---|
196 | [ --disable-libtool-lock avoid locking (might break parallel builds)]) |
---|
197 | test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" |
---|
198 | test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" |
---|
199 | |
---|
200 | # Some flags need to be propagated to the compiler or linker for good |
---|
201 | # libtool support. |
---|
202 | case "$lt_target" in |
---|
203 | *-*-irix6*) |
---|
204 | # Find out which ABI we are using. |
---|
205 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
---|
206 | if AC_TRY_EVAL(ac_compile); then |
---|
207 | case "`/usr/bin/file conftest.o`" in |
---|
208 | *32-bit*) |
---|
209 | LD="${LD-ld} -32" |
---|
210 | ;; |
---|
211 | *N32*) |
---|
212 | LD="${LD-ld} -n32" |
---|
213 | ;; |
---|
214 | *64-bit*) |
---|
215 | LD="${LD-ld} -64" |
---|
216 | ;; |
---|
217 | esac |
---|
218 | fi |
---|
219 | rm -rf conftest* |
---|
220 | ;; |
---|
221 | |
---|
222 | *-*-sco3.2v5*) |
---|
223 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
---|
224 | SAVE_CFLAGS="$CFLAGS" |
---|
225 | CFLAGS="$CFLAGS -belf" |
---|
226 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
---|
227 | [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) |
---|
228 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
---|
229 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
---|
230 | CFLAGS="$SAVE_CFLAGS" |
---|
231 | fi |
---|
232 | ;; |
---|
233 | |
---|
234 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
---|
235 | [*-*-cygwin* | *-*-mingw*) |
---|
236 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
---|
237 | AC_CHECK_TOOL(AS, as, false) |
---|
238 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
---|
239 | ;; |
---|
240 | ]) |
---|
241 | esac |
---|
242 | ]) |
---|
243 | |
---|
244 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
---|
245 | AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) |
---|
246 | |
---|
247 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's |
---|
248 | AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) |
---|
249 | |
---|
250 | # AC_ENABLE_SHARED - implement the --enable-shared flag |
---|
251 | # Usage: AC_ENABLE_SHARED[(DEFAULT)] |
---|
252 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
253 | # `yes'. |
---|
254 | AC_DEFUN(AC_ENABLE_SHARED, [dnl |
---|
255 | define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
256 | AC_ARG_ENABLE(shared, |
---|
257 | changequote(<<, >>)dnl |
---|
258 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
---|
259 | changequote([, ])dnl |
---|
260 | [p=${PACKAGE-default} |
---|
261 | case "$enableval" in |
---|
262 | yes) enable_shared=yes ;; |
---|
263 | no) enable_shared=no ;; |
---|
264 | *) |
---|
265 | enable_shared=no |
---|
266 | # Look at the argument we got. We use all the common list separators. |
---|
267 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
268 | for pkg in $enableval; do |
---|
269 | if test "X$pkg" = "X$p"; then |
---|
270 | enable_shared=yes |
---|
271 | fi |
---|
272 | done |
---|
273 | IFS="$ac_save_ifs" |
---|
274 | ;; |
---|
275 | esac], |
---|
276 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
---|
277 | ]) |
---|
278 | |
---|
279 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
---|
280 | AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
281 | AC_ENABLE_SHARED(no)]) |
---|
282 | |
---|
283 | # AC_ENABLE_STATIC - implement the --enable-static flag |
---|
284 | # Usage: AC_ENABLE_STATIC[(DEFAULT)] |
---|
285 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
286 | # `yes'. |
---|
287 | AC_DEFUN(AC_ENABLE_STATIC, [dnl |
---|
288 | define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
289 | AC_ARG_ENABLE(static, |
---|
290 | changequote(<<, >>)dnl |
---|
291 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
---|
292 | changequote([, ])dnl |
---|
293 | [p=${PACKAGE-default} |
---|
294 | case "$enableval" in |
---|
295 | yes) enable_static=yes ;; |
---|
296 | no) enable_static=no ;; |
---|
297 | *) |
---|
298 | enable_static=no |
---|
299 | # Look at the argument we got. We use all the common list separators. |
---|
300 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
301 | for pkg in $enableval; do |
---|
302 | if test "X$pkg" = "X$p"; then |
---|
303 | enable_static=yes |
---|
304 | fi |
---|
305 | done |
---|
306 | IFS="$ac_save_ifs" |
---|
307 | ;; |
---|
308 | esac], |
---|
309 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
---|
310 | ]) |
---|
311 | |
---|
312 | # AC_DISABLE_STATIC - set the default static flag to --disable-static |
---|
313 | AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
314 | AC_ENABLE_STATIC(no)]) |
---|
315 | |
---|
316 | |
---|
317 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag |
---|
318 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] |
---|
319 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
---|
320 | # `yes'. |
---|
321 | AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl |
---|
322 | define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
---|
323 | AC_ARG_ENABLE(fast-install, |
---|
324 | changequote(<<, >>)dnl |
---|
325 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], |
---|
326 | changequote([, ])dnl |
---|
327 | [p=${PACKAGE-default} |
---|
328 | case "$enableval" in |
---|
329 | yes) enable_fast_install=yes ;; |
---|
330 | no) enable_fast_install=no ;; |
---|
331 | *) |
---|
332 | enable_fast_install=no |
---|
333 | # Look at the argument we got. We use all the common list separators. |
---|
334 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
---|
335 | for pkg in $enableval; do |
---|
336 | if test "X$pkg" = "X$p"; then |
---|
337 | enable_fast_install=yes |
---|
338 | fi |
---|
339 | done |
---|
340 | IFS="$ac_save_ifs" |
---|
341 | ;; |
---|
342 | esac], |
---|
343 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
---|
344 | ]) |
---|
345 | |
---|
346 | # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install |
---|
347 | AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
348 | AC_ENABLE_FAST_INSTALL(no)]) |
---|
349 | |
---|
350 | # AC_PROG_LD - find the path to the GNU or non-GNU linker |
---|
351 | AC_DEFUN(AC_PROG_LD, |
---|
352 | [AC_ARG_WITH(gnu-ld, |
---|
353 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
---|
354 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
---|
355 | AC_REQUIRE([AC_PROG_CC])dnl |
---|
356 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
357 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
358 | ac_prog=ld |
---|
359 | if test "$ac_cv_prog_gcc" = yes; then |
---|
360 | # Check if gcc -print-prog-name=ld gives a path. |
---|
361 | AC_MSG_CHECKING([for ld used by GCC]) |
---|
362 | ac_prog=`($CC -print-prog-name=ld) 2>&5` |
---|
363 | case "$ac_prog" in |
---|
364 | # Accept absolute paths. |
---|
365 | changequote(,)dnl |
---|
366 | [\\/]* | [A-Za-z]:[\\/]*) |
---|
367 | re_direlt='/[^/][^/]*/\.\./' |
---|
368 | changequote([,])dnl |
---|
369 | # Canonicalize the path of ld |
---|
370 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
---|
371 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
---|
372 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
---|
373 | done |
---|
374 | test -z "$LD" && LD="$ac_prog" |
---|
375 | ;; |
---|
376 | "") |
---|
377 | # If it fails, then pretend we aren't using GCC. |
---|
378 | ac_prog=ld |
---|
379 | ;; |
---|
380 | *) |
---|
381 | # If it is relative, then search for the first ld in PATH. |
---|
382 | with_gnu_ld=unknown |
---|
383 | ;; |
---|
384 | esac |
---|
385 | elif test "$with_gnu_ld" = yes; then |
---|
386 | AC_MSG_CHECKING([for GNU ld]) |
---|
387 | else |
---|
388 | AC_MSG_CHECKING([for non-GNU ld]) |
---|
389 | fi |
---|
390 | AC_CACHE_VAL(ac_cv_path_LD, |
---|
391 | [if test -z "$LD"; then |
---|
392 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
---|
393 | for ac_dir in $PATH; do |
---|
394 | test -z "$ac_dir" && ac_dir=. |
---|
395 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
---|
396 | ac_cv_path_LD="$ac_dir/$ac_prog" |
---|
397 | # Check to see if the program is GNU ld. I'd rather use --version, |
---|
398 | # but apparently some GNU ld's only accept -v. |
---|
399 | # Break only if it was the GNU/non-GNU ld that we prefer. |
---|
400 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
---|
401 | test "$with_gnu_ld" != no && break |
---|
402 | else |
---|
403 | test "$with_gnu_ld" != yes && break |
---|
404 | fi |
---|
405 | fi |
---|
406 | done |
---|
407 | IFS="$ac_save_ifs" |
---|
408 | else |
---|
409 | ac_cv_path_LD="$LD" # Let the user override the test with a path. |
---|
410 | fi]) |
---|
411 | LD="$ac_cv_path_LD" |
---|
412 | if test -n "$LD"; then |
---|
413 | AC_MSG_RESULT($LD) |
---|
414 | else |
---|
415 | AC_MSG_RESULT(no) |
---|
416 | fi |
---|
417 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
---|
418 | AC_PROG_LD_GNU |
---|
419 | ]) |
---|
420 | |
---|
421 | AC_DEFUN(AC_PROG_LD_GNU, |
---|
422 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, |
---|
423 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
---|
424 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
---|
425 | ac_cv_prog_gnu_ld=yes |
---|
426 | else |
---|
427 | ac_cv_prog_gnu_ld=no |
---|
428 | fi]) |
---|
429 | ]) |
---|
430 | |
---|
431 | # AC_PROG_NM - find the path to a BSD-compatible name lister |
---|
432 | AC_DEFUN(AC_PROG_NM, |
---|
433 | [AC_MSG_CHECKING([for BSD-compatible nm]) |
---|
434 | AC_CACHE_VAL(ac_cv_path_NM, |
---|
435 | [if test -n "$NM"; then |
---|
436 | # Let the user override the test. |
---|
437 | ac_cv_path_NM="$NM" |
---|
438 | else |
---|
439 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
---|
440 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
---|
441 | test -z "$ac_dir" && ac_dir=. |
---|
442 | if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then |
---|
443 | # Check to see if the nm accepts a BSD-compat flag. |
---|
444 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
---|
445 | # nm: unknown option "B" ignored |
---|
446 | if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
---|
447 | ac_cv_path_NM="$ac_dir/nm -B" |
---|
448 | break |
---|
449 | elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
---|
450 | ac_cv_path_NM="$ac_dir/nm -p" |
---|
451 | break |
---|
452 | else |
---|
453 | ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but |
---|
454 | continue # so that we can try to find one that supports BSD flags |
---|
455 | fi |
---|
456 | fi |
---|
457 | done |
---|
458 | IFS="$ac_save_ifs" |
---|
459 | test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm |
---|
460 | fi]) |
---|
461 | NM="$ac_cv_path_NM" |
---|
462 | AC_MSG_RESULT([$NM]) |
---|
463 | ]) |
---|
464 | |
---|
465 | # AC_CHECK_LIBM - check for math library |
---|
466 | AC_DEFUN(AC_CHECK_LIBM, |
---|
467 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
---|
468 | LIBM= |
---|
469 | case "$lt_target" in |
---|
470 | *-*-beos* | *-*-cygwin*) |
---|
471 | # These system don't have libm |
---|
472 | ;; |
---|
473 | *-ncr-sysv4.3*) |
---|
474 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
---|
475 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
---|
476 | ;; |
---|
477 | *) |
---|
478 | AC_CHECK_LIB(m, main, LIBM="-lm") |
---|
479 | ;; |
---|
480 | esac |
---|
481 | ]) |
---|
482 | |
---|
483 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for |
---|
484 | # the libltdl convenience library and INCLTDL to the include flags for |
---|
485 | # the libltdl header and adds --enable-ltdl-convenience to the |
---|
486 | # configure arguments. Note that LIBLTDL and INCLTDL are not |
---|
487 | # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not |
---|
488 | # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed |
---|
489 | # with '${top_builddir}/' and INCLTDL will be prefixed with |
---|
490 | # '${top_srcdir}/' (note the single quotes!). If your package is not |
---|
491 | # flat and you're not using automake, define top_builddir and |
---|
492 | # top_srcdir appropriately in the Makefiles. |
---|
493 | AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
494 | case "$enable_ltdl_convenience" in |
---|
495 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
---|
496 | "") enable_ltdl_convenience=yes |
---|
497 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
---|
498 | esac |
---|
499 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
---|
500 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
501 | ]) |
---|
502 | |
---|
503 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for |
---|
504 | # the libltdl installable library and INCLTDL to the include flags for |
---|
505 | # the libltdl header and adds --enable-ltdl-install to the configure |
---|
506 | # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is |
---|
507 | # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed |
---|
508 | # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will |
---|
509 | # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed |
---|
510 | # with '${top_srcdir}/' (note the single quotes!). If your package is |
---|
511 | # not flat and you're not using automake, define top_builddir and |
---|
512 | # top_srcdir appropriately in the Makefiles. |
---|
513 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
---|
514 | AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
---|
515 | AC_CHECK_LIB(ltdl, main, |
---|
516 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
---|
517 | [if test x"$enable_ltdl_install" = xno; then |
---|
518 | AC_MSG_WARN([libltdl not installed, but installation disabled]) |
---|
519 | else |
---|
520 | enable_ltdl_install=yes |
---|
521 | fi |
---|
522 | ]) |
---|
523 | if test x"$enable_ltdl_install" = x"yes"; then |
---|
524 | ac_configure_args="$ac_configure_args --enable-ltdl-install" |
---|
525 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
---|
526 | INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
---|
527 | else |
---|
528 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
---|
529 | LIBLTDL="-lltdl" |
---|
530 | INCLTDL= |
---|
531 | fi |
---|
532 | ]) |
---|
533 | |
---|
534 | dnl old names |
---|
535 | AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl |
---|
536 | AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl |
---|
537 | AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl |
---|
538 | AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl |
---|
539 | AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl |
---|
540 | AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl |
---|
541 | AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl |
---|
542 | |
---|
543 | dnl This is just to silence aclocal about the macro not being used |
---|
544 | ifelse([AC_DISABLE_FAST_INSTALL])dnl |
---|
545 | |
---|
546 | # Add --enable-maintainer-mode option to configure. |
---|
547 | # From Jim Meyering |
---|
548 | |
---|
549 | # serial 1 |
---|
550 | |
---|
551 | AC_DEFUN(AM_MAINTAINER_MODE, |
---|
552 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
553 | dnl maintainer-mode is disabled by default |
---|
554 | AC_ARG_ENABLE(maintainer-mode, |
---|
555 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
556 | (and sometimes confusing) to the casual installer], |
---|
557 | USE_MAINTAINER_MODE=$enableval, |
---|
558 | USE_MAINTAINER_MODE=no) |
---|
559 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
560 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
561 | MAINT=$MAINTAINER_MODE_TRUE |
---|
562 | AC_SUBST(MAINT)dnl |
---|
563 | ] |
---|
564 | ) |
---|
565 | |
---|
566 | # Define a conditional. |
---|
567 | |
---|
568 | AC_DEFUN(AM_CONDITIONAL, |
---|
569 | [AC_SUBST($1_TRUE) |
---|
570 | AC_SUBST($1_FALSE) |
---|
571 | if $2; then |
---|
572 | $1_TRUE= |
---|
573 | $1_FALSE='#' |
---|
574 | else |
---|
575 | $1_TRUE='#' |
---|
576 | $1_FALSE= |
---|
577 | fi]) |
---|
578 | |
---|
579 | # Configure paths for GLIB |
---|
580 | # Owen Taylor 97-11-3 |
---|
581 | |
---|
582 | dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) |
---|
583 | dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or |
---|
584 | dnl gthread is specified in MODULES, pass to glib-config |
---|
585 | dnl |
---|
586 | AC_DEFUN(AM_PATH_GLIB, |
---|
587 | [dnl |
---|
588 | dnl Get the cflags and libraries from the glib-config script |
---|
589 | dnl |
---|
590 | AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], |
---|
591 | glib_config_prefix="$withval", glib_config_prefix="") |
---|
592 | AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], |
---|
593 | glib_config_exec_prefix="$withval", glib_config_exec_prefix="") |
---|
594 | AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], |
---|
595 | , enable_glibtest=yes) |
---|
596 | |
---|
597 | if test x$glib_config_exec_prefix != x ; then |
---|
598 | glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" |
---|
599 | if test x${GLIB_CONFIG+set} != xset ; then |
---|
600 | GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config |
---|
601 | fi |
---|
602 | fi |
---|
603 | if test x$glib_config_prefix != x ; then |
---|
604 | glib_config_args="$glib_config_args --prefix=$glib_config_prefix" |
---|
605 | if test x${GLIB_CONFIG+set} != xset ; then |
---|
606 | GLIB_CONFIG=$glib_config_prefix/bin/glib-config |
---|
607 | fi |
---|
608 | fi |
---|
609 | |
---|
610 | for module in . $4 |
---|
611 | do |
---|
612 | case "$module" in |
---|
613 | gmodule) |
---|
614 | glib_config_args="$glib_config_args gmodule" |
---|
615 | ;; |
---|
616 | gthread) |
---|
617 | glib_config_args="$glib_config_args gthread" |
---|
618 | ;; |
---|
619 | esac |
---|
620 | done |
---|
621 | |
---|
622 | AC_PATH_PROG(GLIB_CONFIG, glib-config, no) |
---|
623 | min_glib_version=ifelse([$1], ,0.99.7,$1) |
---|
624 | AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) |
---|
625 | no_glib="" |
---|
626 | if test "$GLIB_CONFIG" = "no" ; then |
---|
627 | no_glib=yes |
---|
628 | else |
---|
629 | GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` |
---|
630 | GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` |
---|
631 | glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ |
---|
632 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
---|
633 | glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ |
---|
634 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
---|
635 | glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ |
---|
636 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
---|
637 | if test "x$enable_glibtest" = "xyes" ; then |
---|
638 | ac_save_CFLAGS="$CFLAGS" |
---|
639 | ac_save_LIBS="$LIBS" |
---|
640 | CFLAGS="$CFLAGS $GLIB_CFLAGS" |
---|
641 | LIBS="$GLIB_LIBS $LIBS" |
---|
642 | dnl |
---|
643 | dnl Now check if the installed GLIB is sufficiently new. (Also sanity |
---|
644 | dnl checks the results of glib-config to some extent |
---|
645 | dnl |
---|
646 | rm -f conf.glibtest |
---|
647 | AC_TRY_RUN([ |
---|
648 | #include <glib.h> |
---|
649 | #include <stdio.h> |
---|
650 | #include <stdlib.h> |
---|
651 | |
---|
652 | int |
---|
653 | main () |
---|
654 | { |
---|
655 | int major, minor, micro; |
---|
656 | char *tmp_version; |
---|
657 | |
---|
658 | system ("touch conf.glibtest"); |
---|
659 | |
---|
660 | /* HP/UX 9 (%@#!) writes to sscanf strings */ |
---|
661 | tmp_version = g_strdup("$min_glib_version"); |
---|
662 | if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { |
---|
663 | printf("%s, bad version string\n", "$min_glib_version"); |
---|
664 | exit(1); |
---|
665 | } |
---|
666 | |
---|
667 | if ((glib_major_version != $glib_config_major_version) || |
---|
668 | (glib_minor_version != $glib_config_minor_version) || |
---|
669 | (glib_micro_version != $glib_config_micro_version)) |
---|
670 | { |
---|
671 | printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", |
---|
672 | $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, |
---|
673 | glib_major_version, glib_minor_version, glib_micro_version); |
---|
674 | printf ("*** was found! If glib-config was correct, then it is best\n"); |
---|
675 | printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); |
---|
676 | printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); |
---|
677 | printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); |
---|
678 | printf("*** required on your system.\n"); |
---|
679 | printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); |
---|
680 | printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); |
---|
681 | printf("*** before re-running configure\n"); |
---|
682 | } |
---|
683 | else if ((glib_major_version != GLIB_MAJOR_VERSION) || |
---|
684 | (glib_minor_version != GLIB_MINOR_VERSION) || |
---|
685 | (glib_micro_version != GLIB_MICRO_VERSION)) |
---|
686 | { |
---|
687 | printf("*** GLIB header files (version %d.%d.%d) do not match\n", |
---|
688 | GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); |
---|
689 | printf("*** library (version %d.%d.%d)\n", |
---|
690 | glib_major_version, glib_minor_version, glib_micro_version); |
---|
691 | } |
---|
692 | else |
---|
693 | { |
---|
694 | if ((glib_major_version > major) || |
---|
695 | ((glib_major_version == major) && (glib_minor_version > minor)) || |
---|
696 | ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) |
---|
697 | { |
---|
698 | return 0; |
---|
699 | } |
---|
700 | else |
---|
701 | { |
---|
702 | printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", |
---|
703 | glib_major_version, glib_minor_version, glib_micro_version); |
---|
704 | printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", |
---|
705 | major, minor, micro); |
---|
706 | printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); |
---|
707 | printf("***\n"); |
---|
708 | printf("*** If you have already installed a sufficiently new version, this error\n"); |
---|
709 | printf("*** probably means that the wrong copy of the glib-config shell script is\n"); |
---|
710 | printf("*** being found. The easiest way to fix this is to remove the old version\n"); |
---|
711 | printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); |
---|
712 | printf("*** correct copy of glib-config. (In this case, you will have to\n"); |
---|
713 | printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); |
---|
714 | printf("*** so that the correct libraries are found at run-time))\n"); |
---|
715 | } |
---|
716 | } |
---|
717 | return 1; |
---|
718 | } |
---|
719 | ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) |
---|
720 | CFLAGS="$ac_save_CFLAGS" |
---|
721 | LIBS="$ac_save_LIBS" |
---|
722 | fi |
---|
723 | fi |
---|
724 | if test "x$no_glib" = x ; then |
---|
725 | AC_MSG_RESULT(yes) |
---|
726 | ifelse([$2], , :, [$2]) |
---|
727 | else |
---|
728 | AC_MSG_RESULT(no) |
---|
729 | if test "$GLIB_CONFIG" = "no" ; then |
---|
730 | echo "*** The glib-config script installed by GLIB could not be found" |
---|
731 | echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" |
---|
732 | echo "*** your path, or set the GLIB_CONFIG environment variable to the" |
---|
733 | echo "*** full path to glib-config." |
---|
734 | else |
---|
735 | if test -f conf.glibtest ; then |
---|
736 | : |
---|
737 | else |
---|
738 | echo "*** Could not run GLIB test program, checking why..." |
---|
739 | CFLAGS="$CFLAGS $GLIB_CFLAGS" |
---|
740 | LIBS="$LIBS $GLIB_LIBS" |
---|
741 | AC_TRY_LINK([ |
---|
742 | #include <glib.h> |
---|
743 | #include <stdio.h> |
---|
744 | ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], |
---|
745 | [ echo "*** The test program compiled, but did not run. This usually means" |
---|
746 | echo "*** that the run-time linker is not finding GLIB or finding the wrong" |
---|
747 | echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" |
---|
748 | echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" |
---|
749 | echo "*** to the installed location Also, make sure you have run ldconfig if that" |
---|
750 | echo "*** is required on your system" |
---|
751 | echo "***" |
---|
752 | echo "*** If you have an old version installed, it is best to remove it, although" |
---|
753 | echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" |
---|
754 | echo "***" |
---|
755 | echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" |
---|
756 | echo "*** came with the system with the command" |
---|
757 | echo "***" |
---|
758 | echo "*** rpm --erase --nodeps gtk gtk-devel" ], |
---|
759 | [ echo "*** The test program failed to compile or link. See the file config.log for the" |
---|
760 | echo "*** exact error that occured. This usually means GLIB was incorrectly installed" |
---|
761 | echo "*** or that you have moved GLIB since it was installed. In the latter case, you" |
---|
762 | echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) |
---|
763 | CFLAGS="$ac_save_CFLAGS" |
---|
764 | LIBS="$ac_save_LIBS" |
---|
765 | fi |
---|
766 | fi |
---|
767 | GLIB_CFLAGS="" |
---|
768 | GLIB_LIBS="" |
---|
769 | ifelse([$3], , :, [$3]) |
---|
770 | fi |
---|
771 | AC_SUBST(GLIB_CFLAGS) |
---|
772 | AC_SUBST(GLIB_LIBS) |
---|
773 | rm -f conf.glibtest |
---|
774 | ]) |
---|
775 | |
---|
776 | |
---|
777 | dnl AM_PROG_LEX |
---|
778 | dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT |
---|
779 | AC_DEFUN(AM_PROG_LEX, |
---|
780 | [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) |
---|
781 | AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") |
---|
782 | AC_PROG_LEX |
---|
783 | AC_DECL_YYTEXT]) |
---|
784 | |
---|