1 |
frodo |
2 |
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 |
|
|
# Do all the work for Automake. This macro actually does too much -- |
14 |
|
|
# some checks are only needed if your package does certain things. |
15 |
|
|
# But this isn't really a big deal. |
16 |
|
|
|
17 |
|
|
# serial 1 |
18 |
|
|
|
19 |
|
|
dnl Usage: |
20 |
|
|
dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
21 |
|
|
|
22 |
|
|
AC_DEFUN(AM_INIT_AUTOMAKE, |
23 |
|
|
[AC_REQUIRE([AC_PROG_INSTALL]) |
24 |
|
|
PACKAGE=[$1] |
25 |
|
|
AC_SUBST(PACKAGE) |
26 |
|
|
VERSION=[$2] |
27 |
|
|
AC_SUBST(VERSION) |
28 |
|
|
dnl test to see if srcdir already configured |
29 |
|
|
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then |
30 |
|
|
AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
31 |
|
|
fi |
32 |
|
|
ifelse([$3],, |
33 |
|
|
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) |
34 |
|
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) |
35 |
|
|
AC_REQUIRE([AM_SANITY_CHECK]) |
36 |
|
|
AC_REQUIRE([AC_ARG_PROGRAM]) |
37 |
|
|
dnl FIXME This is truly gross. |
38 |
|
|
missing_dir=`cd $ac_aux_dir && pwd` |
39 |
|
|
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) |
40 |
|
|
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) |
41 |
|
|
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) |
42 |
|
|
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) |
43 |
|
|
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) |
44 |
|
|
AC_REQUIRE([AC_PROG_MAKE_SET])]) |
45 |
|
|
|
46 |
|
|
# |
47 |
|
|
# Check to make sure that the build environment is sane. |
48 |
|
|
# |
49 |
|
|
|
50 |
|
|
AC_DEFUN(AM_SANITY_CHECK, |
51 |
|
|
[AC_MSG_CHECKING([whether build environment is sane]) |
52 |
|
|
# Just in case |
53 |
|
|
sleep 1 |
54 |
|
|
echo timestamp > conftestfile |
55 |
|
|
# Do `set' in a subshell so we don't clobber the current shell's |
56 |
|
|
# arguments. Must try -L first in case configure is actually a |
57 |
|
|
# symlink; some systems play weird games with the mod time of symlinks |
58 |
|
|
# (eg FreeBSD returns the mod time of the symlink's containing |
59 |
|
|
# directory). |
60 |
|
|
if ( |
61 |
|
|
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` |
62 |
|
|
if test "[$]*" = "X"; then |
63 |
|
|
# -L didn't work. |
64 |
|
|
set X `ls -t $srcdir/configure conftestfile` |
65 |
|
|
fi |
66 |
|
|
if test "[$]*" != "X $srcdir/configure conftestfile" \ |
67 |
|
|
&& test "[$]*" != "X conftestfile $srcdir/configure"; then |
68 |
|
|
|
69 |
|
|
# If neither matched, then we have a broken ls. This can happen |
70 |
|
|
# if, for instance, CONFIG_SHELL is bash and it inherits a |
71 |
|
|
# broken ls alias from the environment. This has actually |
72 |
|
|
# happened. Such a system could not be considered "sane". |
73 |
|
|
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
74 |
|
|
alias in your environment]) |
75 |
|
|
fi |
76 |
|
|
|
77 |
|
|
test "[$]2" = conftestfile |
78 |
|
|
) |
79 |
|
|
then |
80 |
|
|
# Ok. |
81 |
|
|
: |
82 |
|
|
else |
83 |
|
|
AC_MSG_ERROR([newly created file is older than distributed files! |
84 |
|
|
Check your system clock]) |
85 |
|
|
fi |
86 |
|
|
rm -f conftest* |
87 |
|
|
AC_MSG_RESULT(yes)]) |
88 |
|
|
|
89 |
|
|
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
90 |
|
|
dnl The program must properly implement --version. |
91 |
|
|
AC_DEFUN(AM_MISSING_PROG, |
92 |
|
|
[AC_MSG_CHECKING(for working $2) |
93 |
|
|
# Run test in a subshell; some versions of sh will print an error if |
94 |
|
|
# an executable is not found, even if stderr is redirected. |
95 |
|
|
# Redirect stdin to placate older versions of autoconf. Sigh. |
96 |
|
|
if ($2 --version) < /dev/null > /dev/null 2>&1; then |
97 |
|
|
$1=$2 |
98 |
|
|
AC_MSG_RESULT(found) |
99 |
|
|
else |
100 |
|
|
$1="$3/missing $2" |
101 |
|
|
AC_MSG_RESULT(missing) |
102 |
|
|
fi |
103 |
|
|
AC_SUBST($1)]) |
104 |
|
|
|
105 |
|
|
# Like AC_CONFIG_HEADER, but automatically create stamp file. |
106 |
|
|
|
107 |
|
|
AC_DEFUN(AM_CONFIG_HEADER, |
108 |
|
|
[AC_PREREQ([2.12]) |
109 |
|
|
AC_CONFIG_HEADER([$1]) |
110 |
|
|
dnl When config.status generates a header, we must update the stamp-h file. |
111 |
|
|
dnl This file resides in the same directory as the config header |
112 |
|
|
dnl that is generated. We must strip everything past the first ":", |
113 |
|
|
dnl and everything past the last "/". |
114 |
|
|
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl |
115 |
|
|
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, |
116 |
|
|
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, |
117 |
|
|
<<am_indx=1 |
118 |
|
|
for am_file in <<$1>>; do |
119 |
|
|
case " <<$>>CONFIG_HEADERS " in |
120 |
|
|
*" <<$>>am_file "*<<)>> |
121 |
|
|
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx |
122 |
|
|
;; |
123 |
|
|
esac |
124 |
|
|
am_indx=`expr "<<$>>am_indx" + 1` |
125 |
|
|
done<<>>dnl>>) |
126 |
|
|
changequote([,]))]) |
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 |
frodo |
49 |
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ |
143 |
frodo |
2 |
|| 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 |
frodo |
49 |
case "$target" in |
175 |
|
|
NONE) lt_target="$host" ;; |
176 |
|
|
*) lt_target="$target" ;; |
177 |
|
|
esac |
178 |
|
|
|
179 |
frodo |
2 |
# Check for any special flags to pass to ltconfig. |
180 |
|
|
libtool_flags="--cache-file=$cache_file" |
181 |
|
|
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" |
182 |
|
|
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" |
183 |
|
|
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" |
184 |
|
|
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" |
185 |
|
|
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" |
186 |
|
|
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], |
187 |
|
|
[libtool_flags="$libtool_flags --enable-dlopen"]) |
188 |
|
|
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
189 |
|
|
[libtool_flags="$libtool_flags --enable-win32-dll"]) |
190 |
|
|
AC_ARG_ENABLE(libtool-lock, |
191 |
|
|
[ --disable-libtool-lock avoid locking (might break parallel builds)]) |
192 |
|
|
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" |
193 |
|
|
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" |
194 |
|
|
|
195 |
|
|
# Some flags need to be propagated to the compiler or linker for good |
196 |
|
|
# libtool support. |
197 |
frodo |
49 |
case "$lt_target" in |
198 |
frodo |
2 |
*-*-irix6*) |
199 |
|
|
# Find out which ABI we are using. |
200 |
|
|
echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
201 |
|
|
if AC_TRY_EVAL(ac_compile); then |
202 |
|
|
case "`/usr/bin/file conftest.o`" in |
203 |
|
|
*32-bit*) |
204 |
|
|
LD="${LD-ld} -32" |
205 |
|
|
;; |
206 |
|
|
*N32*) |
207 |
|
|
LD="${LD-ld} -n32" |
208 |
|
|
;; |
209 |
|
|
*64-bit*) |
210 |
|
|
LD="${LD-ld} -64" |
211 |
|
|
;; |
212 |
|
|
esac |
213 |
|
|
fi |
214 |
|
|
rm -rf conftest* |
215 |
|
|
;; |
216 |
|
|
|
217 |
|
|
*-*-sco3.2v5*) |
218 |
|
|
# On SCO OpenServer 5, we need -belf to get full-featured binaries. |
219 |
|
|
SAVE_CFLAGS="$CFLAGS" |
220 |
|
|
CFLAGS="$CFLAGS -belf" |
221 |
|
|
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
222 |
|
|
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) |
223 |
|
|
if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
224 |
|
|
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
225 |
|
|
CFLAGS="$SAVE_CFLAGS" |
226 |
|
|
fi |
227 |
|
|
;; |
228 |
|
|
|
229 |
|
|
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
230 |
|
|
[*-*-cygwin* | *-*-mingw*) |
231 |
|
|
AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
232 |
|
|
AC_CHECK_TOOL(AS, as, false) |
233 |
|
|
AC_CHECK_TOOL(OBJDUMP, objdump, false) |
234 |
|
|
;; |
235 |
|
|
]) |
236 |
|
|
esac |
237 |
|
|
]) |
238 |
|
|
|
239 |
|
|
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
240 |
|
|
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) |
241 |
|
|
|
242 |
|
|
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's |
243 |
|
|
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) |
244 |
|
|
|
245 |
|
|
# AC_ENABLE_SHARED - implement the --enable-shared flag |
246 |
|
|
# Usage: AC_ENABLE_SHARED[(DEFAULT)] |
247 |
|
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
248 |
|
|
# `yes'. |
249 |
|
|
AC_DEFUN(AC_ENABLE_SHARED, [dnl |
250 |
|
|
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl |
251 |
|
|
AC_ARG_ENABLE(shared, |
252 |
|
|
changequote(<<, >>)dnl |
253 |
|
|
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
254 |
|
|
changequote([, ])dnl |
255 |
|
|
[p=${PACKAGE-default} |
256 |
|
|
case "$enableval" in |
257 |
|
|
yes) enable_shared=yes ;; |
258 |
|
|
no) enable_shared=no ;; |
259 |
|
|
*) |
260 |
|
|
enable_shared=no |
261 |
|
|
# Look at the argument we got. We use all the common list separators. |
262 |
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
263 |
|
|
for pkg in $enableval; do |
264 |
|
|
if test "X$pkg" = "X$p"; then |
265 |
|
|
enable_shared=yes |
266 |
|
|
fi |
267 |
|
|
done |
268 |
|
|
IFS="$ac_save_ifs" |
269 |
|
|
;; |
270 |
|
|
esac], |
271 |
|
|
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
272 |
|
|
]) |
273 |
|
|
|
274 |
|
|
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
275 |
|
|
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
276 |
|
|
AC_ENABLE_SHARED(no)]) |
277 |
|
|
|
278 |
|
|
# AC_ENABLE_STATIC - implement the --enable-static flag |
279 |
|
|
# Usage: AC_ENABLE_STATIC[(DEFAULT)] |
280 |
|
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
281 |
|
|
# `yes'. |
282 |
|
|
AC_DEFUN(AC_ENABLE_STATIC, [dnl |
283 |
|
|
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl |
284 |
|
|
AC_ARG_ENABLE(static, |
285 |
|
|
changequote(<<, >>)dnl |
286 |
|
|
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
287 |
|
|
changequote([, ])dnl |
288 |
|
|
[p=${PACKAGE-default} |
289 |
|
|
case "$enableval" in |
290 |
|
|
yes) enable_static=yes ;; |
291 |
|
|
no) enable_static=no ;; |
292 |
|
|
*) |
293 |
|
|
enable_static=no |
294 |
|
|
# Look at the argument we got. We use all the common list separators. |
295 |
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
296 |
|
|
for pkg in $enableval; do |
297 |
|
|
if test "X$pkg" = "X$p"; then |
298 |
|
|
enable_static=yes |
299 |
|
|
fi |
300 |
|
|
done |
301 |
|
|
IFS="$ac_save_ifs" |
302 |
|
|
;; |
303 |
|
|
esac], |
304 |
|
|
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
305 |
|
|
]) |
306 |
|
|
|
307 |
|
|
# AC_DISABLE_STATIC - set the default static flag to --disable-static |
308 |
|
|
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
309 |
|
|
AC_ENABLE_STATIC(no)]) |
310 |
|
|
|
311 |
|
|
|
312 |
|
|
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag |
313 |
|
|
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] |
314 |
|
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
315 |
|
|
# `yes'. |
316 |
|
|
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl |
317 |
|
|
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl |
318 |
|
|
AC_ARG_ENABLE(fast-install, |
319 |
|
|
changequote(<<, >>)dnl |
320 |
|
|
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], |
321 |
|
|
changequote([, ])dnl |
322 |
|
|
[p=${PACKAGE-default} |
323 |
|
|
case "$enableval" in |
324 |
|
|
yes) enable_fast_install=yes ;; |
325 |
|
|
no) enable_fast_install=no ;; |
326 |
|
|
*) |
327 |
|
|
enable_fast_install=no |
328 |
|
|
# Look at the argument we got. We use all the common list separators. |
329 |
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," |
330 |
|
|
for pkg in $enableval; do |
331 |
|
|
if test "X$pkg" = "X$p"; then |
332 |
|
|
enable_fast_install=yes |
333 |
|
|
fi |
334 |
|
|
done |
335 |
|
|
IFS="$ac_save_ifs" |
336 |
|
|
;; |
337 |
|
|
esac], |
338 |
|
|
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl |
339 |
|
|
]) |
340 |
|
|
|
341 |
|
|
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install |
342 |
|
|
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
343 |
|
|
AC_ENABLE_FAST_INSTALL(no)]) |
344 |
|
|
|
345 |
|
|
# AC_PROG_LD - find the path to the GNU or non-GNU linker |
346 |
|
|
AC_DEFUN(AC_PROG_LD, |
347 |
|
|
[AC_ARG_WITH(gnu-ld, |
348 |
|
|
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], |
349 |
|
|
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) |
350 |
|
|
AC_REQUIRE([AC_PROG_CC])dnl |
351 |
|
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl |
352 |
|
|
AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
353 |
|
|
ac_prog=ld |
354 |
|
|
if test "$ac_cv_prog_gcc" = yes; then |
355 |
|
|
# Check if gcc -print-prog-name=ld gives a path. |
356 |
|
|
AC_MSG_CHECKING([for ld used by GCC]) |
357 |
|
|
ac_prog=`($CC -print-prog-name=ld) 2>&5` |
358 |
|
|
case "$ac_prog" in |
359 |
|
|
# Accept absolute paths. |
360 |
|
|
changequote(,)dnl |
361 |
|
|
[\\/]* | [A-Za-z]:[\\/]*) |
362 |
|
|
re_direlt='/[^/][^/]*/\.\./' |
363 |
|
|
changequote([,])dnl |
364 |
|
|
# Canonicalize the path of ld |
365 |
|
|
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
366 |
|
|
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
367 |
|
|
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
368 |
|
|
done |
369 |
|
|
test -z "$LD" && LD="$ac_prog" |
370 |
|
|
;; |
371 |
|
|
"") |
372 |
|
|
# If it fails, then pretend we aren't using GCC. |
373 |
|
|
ac_prog=ld |
374 |
|
|
;; |
375 |
|
|
*) |
376 |
|
|
# If it is relative, then search for the first ld in PATH. |
377 |
|
|
with_gnu_ld=unknown |
378 |
|
|
;; |
379 |
|
|
esac |
380 |
|
|
elif test "$with_gnu_ld" = yes; then |
381 |
|
|
AC_MSG_CHECKING([for GNU ld]) |
382 |
|
|
else |
383 |
|
|
AC_MSG_CHECKING([for non-GNU ld]) |
384 |
|
|
fi |
385 |
|
|
AC_CACHE_VAL(ac_cv_path_LD, |
386 |
|
|
[if test -z "$LD"; then |
387 |
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
388 |
|
|
for ac_dir in $PATH; do |
389 |
|
|
test -z "$ac_dir" && ac_dir=. |
390 |
|
|
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
391 |
|
|
ac_cv_path_LD="$ac_dir/$ac_prog" |
392 |
|
|
# Check to see if the program is GNU ld. I'd rather use --version, |
393 |
|
|
# but apparently some GNU ld's only accept -v. |
394 |
|
|
# Break only if it was the GNU/non-GNU ld that we prefer. |
395 |
|
|
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
396 |
|
|
test "$with_gnu_ld" != no && break |
397 |
|
|
else |
398 |
|
|
test "$with_gnu_ld" != yes && break |
399 |
|
|
fi |
400 |
|
|
fi |
401 |
|
|
done |
402 |
|
|
IFS="$ac_save_ifs" |
403 |
|
|
else |
404 |
|
|
ac_cv_path_LD="$LD" # Let the user override the test with a path. |
405 |
|
|
fi]) |
406 |
|
|
LD="$ac_cv_path_LD" |
407 |
|
|
if test -n "$LD"; then |
408 |
|
|
AC_MSG_RESULT($LD) |
409 |
|
|
else |
410 |
|
|
AC_MSG_RESULT(no) |
411 |
|
|
fi |
412 |
|
|
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
413 |
|
|
AC_PROG_LD_GNU |
414 |
|
|
]) |
415 |
|
|
|
416 |
|
|
AC_DEFUN(AC_PROG_LD_GNU, |
417 |
|
|
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, |
418 |
|
|
[# I'd rather use --version here, but apparently some GNU ld's only accept -v. |
419 |
|
|
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
420 |
|
|
ac_cv_prog_gnu_ld=yes |
421 |
|
|
else |
422 |
|
|
ac_cv_prog_gnu_ld=no |
423 |
|
|
fi]) |
424 |
|
|
]) |
425 |
|
|
|
426 |
|
|
# AC_PROG_NM - find the path to a BSD-compatible name lister |
427 |
|
|
AC_DEFUN(AC_PROG_NM, |
428 |
|
|
[AC_MSG_CHECKING([for BSD-compatible nm]) |
429 |
|
|
AC_CACHE_VAL(ac_cv_path_NM, |
430 |
|
|
[if test -n "$NM"; then |
431 |
|
|
# Let the user override the test. |
432 |
|
|
ac_cv_path_NM="$NM" |
433 |
|
|
else |
434 |
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
435 |
|
|
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
436 |
|
|
test -z "$ac_dir" && ac_dir=. |
437 |
|
|
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then |
438 |
|
|
# Check to see if the nm accepts a BSD-compat flag. |
439 |
|
|
# Adding the `sed 1q' prevents false positives on HP-UX, which says: |
440 |
|
|
# nm: unknown option "B" ignored |
441 |
|
|
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
442 |
|
|
ac_cv_path_NM="$ac_dir/nm -B" |
443 |
|
|
break |
444 |
|
|
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
445 |
|
|
ac_cv_path_NM="$ac_dir/nm -p" |
446 |
|
|
break |
447 |
|
|
else |
448 |
|
|
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but |
449 |
|
|
continue # so that we can try to find one that supports BSD flags |
450 |
|
|
fi |
451 |
|
|
fi |
452 |
|
|
done |
453 |
|
|
IFS="$ac_save_ifs" |
454 |
|
|
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm |
455 |
|
|
fi]) |
456 |
|
|
NM="$ac_cv_path_NM" |
457 |
|
|
AC_MSG_RESULT([$NM]) |
458 |
|
|
]) |
459 |
|
|
|
460 |
|
|
# AC_CHECK_LIBM - check for math library |
461 |
|
|
AC_DEFUN(AC_CHECK_LIBM, |
462 |
|
|
[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
463 |
|
|
LIBM= |
464 |
frodo |
49 |
case "$lt_target" in |
465 |
frodo |
2 |
*-*-beos* | *-*-cygwin*) |
466 |
|
|
# These system don't have libm |
467 |
|
|
;; |
468 |
|
|
*-ncr-sysv4.3*) |
469 |
|
|
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
470 |
|
|
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") |
471 |
|
|
;; |
472 |
|
|
*) |
473 |
|
|
AC_CHECK_LIB(m, main, LIBM="-lm") |
474 |
|
|
;; |
475 |
|
|
esac |
476 |
|
|
]) |
477 |
|
|
|
478 |
|
|
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for |
479 |
frodo |
49 |
# the libltdl convenience library and INCLTDL to the include flags for |
480 |
|
|
# the libltdl header and adds --enable-ltdl-convenience to the |
481 |
|
|
# configure arguments. Note that LIBLTDL and INCLTDL are not |
482 |
|
|
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not |
483 |
|
|
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed |
484 |
|
|
# with '${top_builddir}/' and INCLTDL will be prefixed with |
485 |
|
|
# '${top_srcdir}/' (note the single quotes!). If your package is not |
486 |
|
|
# flat and you're not using automake, define top_builddir and |
487 |
|
|
# top_srcdir appropriately in the Makefiles. |
488 |
frodo |
2 |
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
489 |
|
|
case "$enable_ltdl_convenience" in |
490 |
|
|
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; |
491 |
|
|
"") enable_ltdl_convenience=yes |
492 |
|
|
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; |
493 |
|
|
esac |
494 |
frodo |
49 |
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la |
495 |
|
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
496 |
frodo |
2 |
]) |
497 |
|
|
|
498 |
|
|
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for |
499 |
frodo |
49 |
# the libltdl installable library and INCLTDL to the include flags for |
500 |
|
|
# the libltdl header and adds --enable-ltdl-install to the configure |
501 |
|
|
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is |
502 |
|
|
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed |
503 |
|
|
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will |
504 |
|
|
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed |
505 |
|
|
# with '${top_srcdir}/' (note the single quotes!). If your package is |
506 |
|
|
# not flat and you're not using automake, define top_builddir and |
507 |
|
|
# top_srcdir appropriately in the Makefiles. |
508 |
frodo |
2 |
# In the future, this macro may have to be called after AC_PROG_LIBTOOL. |
509 |
|
|
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl |
510 |
|
|
AC_CHECK_LIB(ltdl, main, |
511 |
|
|
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], |
512 |
|
|
[if test x"$enable_ltdl_install" = xno; then |
513 |
|
|
AC_MSG_WARN([libltdl not installed, but installation disabled]) |
514 |
|
|
else |
515 |
|
|
enable_ltdl_install=yes |
516 |
|
|
fi |
517 |
|
|
]) |
518 |
|
|
if test x"$enable_ltdl_install" = x"yes"; then |
519 |
|
|
ac_configure_args="$ac_configure_args --enable-ltdl-install" |
520 |
frodo |
49 |
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la |
521 |
|
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) |
522 |
frodo |
2 |
else |
523 |
|
|
ac_configure_args="$ac_configure_args --enable-ltdl-install=no" |
524 |
|
|
LIBLTDL="-lltdl" |
525 |
|
|
INCLTDL= |
526 |
|
|
fi |
527 |
|
|
]) |
528 |
|
|
|
529 |
|
|
dnl old names |
530 |
|
|
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl |
531 |
|
|
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl |
532 |
|
|
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl |
533 |
|
|
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl |
534 |
|
|
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl |
535 |
|
|
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl |
536 |
|
|
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl |
537 |
|
|
|
538 |
|
|
dnl This is just to silence aclocal about the macro not being used |
539 |
|
|
ifelse([AC_DISABLE_FAST_INSTALL])dnl |
540 |
|
|
|
541 |
|
|
# Define a conditional. |
542 |
|
|
|
543 |
|
|
AC_DEFUN(AM_CONDITIONAL, |
544 |
|
|
[AC_SUBST($1_TRUE) |
545 |
|
|
AC_SUBST($1_FALSE) |
546 |
|
|
if $2; then |
547 |
|
|
$1_TRUE= |
548 |
|
|
$1_FALSE='#' |
549 |
|
|
else |
550 |
|
|
$1_TRUE='#' |
551 |
|
|
$1_FALSE= |
552 |
|
|
fi]) |
553 |
|
|
|