Commit | Line | Data |
---|---|---|
3a629497 JB |
1 | dnl On the NeXT, #including <utime.h> doesn't give you a definition for |
2 | dnl struct utime, unless you #define _POSIX_SOURCE. | |
3 | ||
4 | AC_DEFUN(GUILE_STRUCT_UTIMBUF, [ | |
5 | AC_CACHE_CHECK([whether we need POSIX to get struct utimbuf], | |
6 | guile_cv_struct_utimbuf_needs_posix, | |
7 | [AC_TRY_CPP([ | |
8 | #ifdef __EMX__ | |
9 | #include <sys/utime.h> | |
10 | #else | |
11 | #include <utime.h> | |
12 | #endif | |
13 | struct utime blah; | |
14 | ], | |
15 | guile_cv_struct_utimbuf_needs_posix=no, | |
16 | guile_cv_struct_utimbuf_needs_posix=yes)]) | |
17 | if test "$guile_cv_struct_utimbuf_needs_posix" = yes; then | |
18 | AC_DEFINE(UTIMBUF_NEEDS_POSIX) | |
19 | fi]) | |
20 | ||
21 | ||
22 | ||
23 | ||
24 | dnl | |
25 | dnl Apparently, at CMU they have a weird version of libc.h that is | |
26 | dnl installed in /usr/local/include and conflicts with unistd.h. | |
27 | dnl In these situations, we should not #include libc.h. | |
28 | dnl This test arranges to #define LIBC_H_WITH_UNISTD_H iff libc.h is | |
29 | dnl present on the system, and is safe to #include. | |
30 | dnl | |
31 | AC_DEFUN([GUILE_HEADER_LIBC_WITH_UNISTD], | |
32 | [ | |
33 | AC_CHECK_HEADERS(libc.h unistd.h) | |
34 | AC_CACHE_CHECK( | |
35 | "whether libc.h and unistd.h can be included together", | |
36 | guile_cv_header_libc_with_unistd, | |
37 | [ | |
38 | if test "$ac_cv_header_libc_h" = "no"; then | |
39 | guile_cv_header_libc_with_unistd="no" | |
42d0ffc9 | 40 | elif test "$ac_cv_header_unistd_h" = "no"; then |
3a629497 JB |
41 | guile_cv_header_libc_with_unistd="yes" |
42 | else | |
43 | AC_TRY_COMPILE( | |
44 | [ | |
45 | # include <libc.h> | |
46 | # include <unistd.h> | |
47 | ], | |
48 | [], | |
49 | [guile_cv_header_libc_with_unistd=yes], | |
50 | [guile_cv_header_libc_with_unistd=no] | |
51 | ) | |
52 | fi | |
53 | ] | |
54 | ) | |
55 | if test "$guile_cv_header_libc_with_unistd" = yes; then | |
56 | AC_DEFINE(LIBC_H_WITH_UNISTD_H) | |
57 | fi | |
58 | ] | |
59 | ) | |
0b89e78e MD |
60 | |
61 | ||
62 | ||
63 | dnl This is needed when we want to check for the same function repeatedly | |
64 | dnl with other parameters, such as libraries, varying. | |
65 | dnl | |
66 | dnl GUILE_NAMED_CHECK_FUNC(FUNCTION, TESTNAME, | |
67 | dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | |
68 | AC_DEFUN(GUILE_NAMED_CHECK_FUNC, | |
69 | [AC_MSG_CHECKING([for $1]) | |
70 | AC_CACHE_VAL(ac_cv_func_$1_$2, | |
71 | [AC_TRY_LINK( | |
72 | dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h> | |
73 | dnl which includes <sys/select.h> which contains a prototype for | |
74 | dnl select. Similarly for bzero. | |
75 | [/* System header to define __stub macros and hopefully few prototypes, | |
76 | which can conflict with char $1(); below. */ | |
77 | #include <assert.h> | |
78 | /* Override any gcc2 internal prototype to avoid an error. */ | |
79 | ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus | |
80 | extern "C" | |
81 | #endif | |
82 | ])dnl | |
83 | [/* We use char because int might match the return type of a gcc2 | |
84 | builtin and then its argument prototype would still apply. */ | |
85 | char $1(); | |
86 | ], [ | |
87 | /* The GNU C library defines this for functions which it implements | |
88 | to always fail with ENOSYS. Some functions are actually named | |
89 | something starting with __ and the normal name is an alias. */ | |
90 | #if defined (__stub_$1) || defined (__stub___$1) | |
91 | choke me | |
92 | #else | |
93 | $1(); | |
94 | #endif | |
95 | ], eval "ac_cv_func_$1_$2=yes", eval "ac_cv_func_$1_$2=no")]) | |
96 | if eval "test \"`echo '$ac_cv_func_'$1'_'$2`\" = yes"; then | |
97 | AC_MSG_RESULT(yes) | |
98 | ifelse([$3], , :, [$3]) | |
99 | else | |
100 | AC_MSG_RESULT(no) | |
101 | ifelse([$4], , , [$4 | |
102 | ])dnl | |
103 | fi | |
104 | ]) | |
2a0d7176 TP |
105 | |
106 | ||
c96730b1 MV |
107 | ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- |
108 | ## Copyright (C) 1996-1999 Free Software Foundation, Inc. | |
109 | ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
110 | ## | |
111 | ## This program is free software; you can redistribute it and/or modify | |
112 | ## it under the terms of the GNU General Public License as published by | |
113 | ## the Free Software Foundation; either version 2 of the License, or | |
114 | ## (at your option) any later version. | |
115 | ## | |
116 | ## This program is distributed in the hope that it will be useful, but | |
117 | ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
118 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
119 | ## General Public License for more details. | |
120 | ## | |
121 | ## You should have received a copy of the GNU General Public License | |
122 | ## along with this program; if not, write to the Free Software | |
123 | ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
124 | ## | |
125 | ## As a special exception to the GNU General Public License, if you | |
126 | ## distribute this file as part of a program that contains a | |
127 | ## configuration script generated by Autoconf, you may include it under | |
128 | ## the same distribution terms that you use for the rest of that program. | |
129 | ||
130 | # serial 40 AC_PROG_LIBTOOL | |
131 | AC_DEFUN(AC_PROG_LIBTOOL, | |
132 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl | |
133 | ||
134 | # Save cache, so that ltconfig can load it | |
135 | AC_CACHE_SAVE | |
136 | ||
137 | # Actually configure libtool. ac_aux_dir is where install-sh is found. | |
138 | CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
139 | LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ | |
140 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ | |
141 | DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ | |
142 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ | |
143 | $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ | |
144 | || AC_MSG_ERROR([libtool configure failed]) | |
145 | ||
146 | # Reload cache, that may have been modified by ltconfig | |
147 | AC_CACHE_LOAD | |
148 | ||
149 | # This can be used to rebuild libtool when needed | |
150 | LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" | |
151 | ||
152 | # Always use our own libtool. | |
153 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
154 | AC_SUBST(LIBTOOL)dnl | |
155 | ||
156 | # Redirect the config.log output again, so that the ltconfig log is not | |
157 | # clobbered by the next message. | |
158 | exec 5>>./config.log | |
159 | ]) | |
160 | ||
161 | AC_DEFUN(AC_LIBTOOL_SETUP, | |
162 | [AC_PREREQ(2.13)dnl | |
163 | AC_REQUIRE([AC_ENABLE_SHARED])dnl | |
164 | AC_REQUIRE([AC_ENABLE_STATIC])dnl | |
165 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl | |
166 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
167 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
168 | AC_REQUIRE([AC_PROG_RANLIB])dnl | |
169 | AC_REQUIRE([AC_PROG_CC])dnl | |
170 | AC_REQUIRE([AC_PROG_LD])dnl | |
171 | AC_REQUIRE([AC_PROG_NM])dnl | |
172 | AC_REQUIRE([AC_PROG_LN_S])dnl | |
173 | dnl | |
174 | ||
175 | case "$target" in | |
176 | NONE) lt_target="$host" ;; | |
177 | *) lt_target="$target" ;; | |
178 | esac | |
179 | ||
180 | # Check for any special flags to pass to ltconfig. | |
181 | libtool_flags="--cache-file=$cache_file" | |
182 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" | |
183 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | |
184 | test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" | |
185 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" | |
186 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
187 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], | |
188 | [libtool_flags="$libtool_flags --enable-dlopen"]) | |
189 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | |
190 | [libtool_flags="$libtool_flags --enable-win32-dll"]) | |
191 | AC_ARG_ENABLE(libtool-lock, | |
192 | [ --disable-libtool-lock avoid locking (might break parallel builds)]) | |
193 | test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" | |
194 | test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" | |
195 | ||
196 | # Some flags need to be propagated to the compiler or linker for good | |
197 | # libtool support. | |
198 | case "$lt_target" in | |
199 | *-*-irix6*) | |
200 | # Find out which ABI we are using. | |
201 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext | |
202 | if AC_TRY_EVAL(ac_compile); then | |
203 | case "`/usr/bin/file conftest.o`" in | |
204 | *32-bit*) | |
205 | LD="${LD-ld} -32" | |
206 | ;; | |
207 | *N32*) | |
208 | LD="${LD-ld} -n32" | |
209 | ;; | |
210 | *64-bit*) | |
211 | LD="${LD-ld} -64" | |
212 | ;; | |
213 | esac | |
214 | fi | |
215 | rm -rf conftest* | |
216 | ;; | |
217 | ||
218 | *-*-sco3.2v5*) | |
219 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
220 | SAVE_CFLAGS="$CFLAGS" | |
221 | CFLAGS="$CFLAGS -belf" | |
222 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | |
223 | [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) | |
224 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
225 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
226 | CFLAGS="$SAVE_CFLAGS" | |
227 | fi | |
228 | ;; | |
229 | ||
230 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | |
231 | [*-*-cygwin* | *-*-mingw*) | |
232 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) | |
233 | AC_CHECK_TOOL(AS, as, false) | |
234 | AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
235 | ;; | |
236 | ]) | |
237 | esac | |
238 | ]) | |
239 | ||
240 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support | |
241 | AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) | |
242 | ||
243 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's | |
244 | AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) | |
245 | ||
246 | # AC_ENABLE_SHARED - implement the --enable-shared flag | |
247 | # Usage: AC_ENABLE_SHARED[(DEFAULT)] | |
248 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
249 | # `yes'. | |
250 | AC_DEFUN(AC_ENABLE_SHARED, [dnl | |
251 | define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl | |
252 | AC_ARG_ENABLE(shared, | |
253 | changequote(<<, >>)dnl | |
254 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], | |
255 | changequote([, ])dnl | |
256 | [p=${PACKAGE-default} | |
257 | case "$enableval" in | |
258 | yes) enable_shared=yes ;; | |
259 | no) enable_shared=no ;; | |
260 | *) | |
261 | enable_shared=no | |
262 | # Look at the argument we got. We use all the common list separators. | |
263 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
264 | for pkg in $enableval; do | |
265 | if test "X$pkg" = "X$p"; then | |
266 | enable_shared=yes | |
267 | fi | |
268 | done | |
269 | IFS="$ac_save_ifs" | |
270 | ;; | |
271 | esac], | |
272 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl | |
273 | ]) | |
274 | ||
275 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared | |
276 | AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
277 | AC_ENABLE_SHARED(no)]) | |
278 | ||
279 | # AC_ENABLE_STATIC - implement the --enable-static flag | |
280 | # Usage: AC_ENABLE_STATIC[(DEFAULT)] | |
281 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
282 | # `yes'. | |
283 | AC_DEFUN(AC_ENABLE_STATIC, [dnl | |
284 | define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl | |
285 | AC_ARG_ENABLE(static, | |
286 | changequote(<<, >>)dnl | |
287 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], | |
288 | changequote([, ])dnl | |
289 | [p=${PACKAGE-default} | |
290 | case "$enableval" in | |
291 | yes) enable_static=yes ;; | |
292 | no) enable_static=no ;; | |
293 | *) | |
294 | enable_static=no | |
295 | # Look at the argument we got. We use all the common list separators. | |
296 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
297 | for pkg in $enableval; do | |
298 | if test "X$pkg" = "X$p"; then | |
299 | enable_static=yes | |
300 | fi | |
301 | done | |
302 | IFS="$ac_save_ifs" | |
303 | ;; | |
304 | esac], | |
305 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl | |
306 | ]) | |
307 | ||
308 | # AC_DISABLE_STATIC - set the default static flag to --disable-static | |
309 | AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
310 | AC_ENABLE_STATIC(no)]) | |
311 | ||
312 | ||
313 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag | |
314 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] | |
315 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
316 | # `yes'. | |
317 | AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl | |
318 | define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl | |
319 | AC_ARG_ENABLE(fast-install, | |
320 | changequote(<<, >>)dnl | |
321 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], | |
322 | changequote([, ])dnl | |
323 | [p=${PACKAGE-default} | |
324 | case "$enableval" in | |
325 | yes) enable_fast_install=yes ;; | |
326 | no) enable_fast_install=no ;; | |
327 | *) | |
328 | enable_fast_install=no | |
329 | # Look at the argument we got. We use all the common list separators. | |
330 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
331 | for pkg in $enableval; do | |
332 | if test "X$pkg" = "X$p"; then | |
333 | enable_fast_install=yes | |
334 | fi | |
335 | done | |
336 | IFS="$ac_save_ifs" | |
337 | ;; | |
338 | esac], | |
339 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl | |
340 | ]) | |
341 | ||
342 | # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install | |
343 | AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
344 | AC_ENABLE_FAST_INSTALL(no)]) | |
345 | ||
346 | # AC_PROG_LD - find the path to the GNU or non-GNU linker | |
347 | AC_DEFUN(AC_PROG_LD, | |
348 | [AC_ARG_WITH(gnu-ld, | |
349 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | |
350 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | |
351 | AC_REQUIRE([AC_PROG_CC])dnl | |
352 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
353 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
354 | ac_prog=ld | |
355 | if test "$ac_cv_prog_gcc" = yes; then | |
356 | # Check if gcc -print-prog-name=ld gives a path. | |
357 | AC_MSG_CHECKING([for ld used by GCC]) | |
358 | ac_prog=`($CC -print-prog-name=ld) 2>&5` | |
359 | case "$ac_prog" in | |
360 | # Accept absolute paths. | |
361 | changequote(,)dnl | |
362 | [\\/]* | [A-Za-z]:[\\/]*) | |
363 | re_direlt='/[^/][^/]*/\.\./' | |
364 | changequote([,])dnl | |
365 | # Canonicalize the path of ld | |
366 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
367 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
368 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
369 | done | |
370 | test -z "$LD" && LD="$ac_prog" | |
371 | ;; | |
372 | "") | |
373 | # If it fails, then pretend we aren't using GCC. | |
374 | ac_prog=ld | |
375 | ;; | |
376 | *) | |
377 | # If it is relative, then search for the first ld in PATH. | |
378 | with_gnu_ld=unknown | |
379 | ;; | |
380 | esac | |
381 | elif test "$with_gnu_ld" = yes; then | |
382 | AC_MSG_CHECKING([for GNU ld]) | |
383 | else | |
384 | AC_MSG_CHECKING([for non-GNU ld]) | |
385 | fi | |
386 | AC_CACHE_VAL(ac_cv_path_LD, | |
387 | [if test -z "$LD"; then | |
388 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
389 | for ac_dir in $PATH; do | |
390 | test -z "$ac_dir" && ac_dir=. | |
391 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
392 | ac_cv_path_LD="$ac_dir/$ac_prog" | |
393 | # Check to see if the program is GNU ld. I'd rather use --version, | |
394 | # but apparently some GNU ld's only accept -v. | |
395 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
396 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
397 | test "$with_gnu_ld" != no && break | |
398 | else | |
399 | test "$with_gnu_ld" != yes && break | |
400 | fi | |
401 | fi | |
402 | done | |
403 | IFS="$ac_save_ifs" | |
404 | else | |
405 | ac_cv_path_LD="$LD" # Let the user override the test with a path. | |
406 | fi]) | |
407 | LD="$ac_cv_path_LD" | |
408 | if test -n "$LD"; then | |
409 | AC_MSG_RESULT($LD) | |
410 | else | |
411 | AC_MSG_RESULT(no) | |
412 | fi | |
413 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
414 | AC_PROG_LD_GNU | |
415 | ]) | |
416 | ||
417 | AC_DEFUN(AC_PROG_LD_GNU, | |
418 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, | |
419 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
420 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
421 | ac_cv_prog_gnu_ld=yes | |
422 | else | |
423 | ac_cv_prog_gnu_ld=no | |
424 | fi]) | |
425 | ]) | |
426 | ||
427 | # AC_PROG_NM - find the path to a BSD-compatible name lister | |
428 | AC_DEFUN(AC_PROG_NM, | |
429 | [AC_MSG_CHECKING([for BSD-compatible nm]) | |
430 | AC_CACHE_VAL(ac_cv_path_NM, | |
431 | [if test -n "$NM"; then | |
432 | # Let the user override the test. | |
433 | ac_cv_path_NM="$NM" | |
434 | else | |
435 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
436 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do | |
437 | test -z "$ac_dir" && ac_dir=. | |
438 | if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then | |
439 | # Check to see if the nm accepts a BSD-compat flag. | |
440 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
441 | # nm: unknown option "B" ignored | |
442 | if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | |
443 | ac_cv_path_NM="$ac_dir/nm -B" | |
444 | break | |
445 | elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | |
446 | ac_cv_path_NM="$ac_dir/nm -p" | |
447 | break | |
448 | else | |
449 | ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but | |
450 | continue # so that we can try to find one that supports BSD flags | |
451 | fi | |
452 | fi | |
453 | done | |
454 | IFS="$ac_save_ifs" | |
455 | test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm | |
456 | fi]) | |
457 | NM="$ac_cv_path_NM" | |
458 | AC_MSG_RESULT([$NM]) | |
459 | ]) | |
460 | ||
461 | # AC_CHECK_LIBM - check for math library | |
462 | AC_DEFUN(AC_CHECK_LIBM, | |
463 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
464 | LIBM= | |
465 | case "$lt_target" in | |
466 | *-*-beos* | *-*-cygwin*) | |
467 | # These system don't have libm | |
468 | ;; | |
469 | *-ncr-sysv4.3*) | |
470 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | |
471 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") | |
472 | ;; | |
473 | *) | |
474 | AC_CHECK_LIB(m, main, LIBM="-lm") | |
475 | ;; | |
476 | esac | |
477 | ]) | |
478 | ||
479 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for | |
480 | # the libltdl convenience library, adds --enable-ltdl-convenience to | |
481 | # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor | |
482 | # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed | |
483 | # to be `${top_builddir}/libltdl'. Make sure you start DIR with | |
484 | # '${top_builddir}/' (note the single quotes!) if your package is not | |
485 | # flat, and, if you're not using automake, define top_builddir as | |
486 | # appropriate in the Makefiles. | |
487 | AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
488 | case "$enable_ltdl_convenience" in | |
489 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; | |
490 | "") enable_ltdl_convenience=yes | |
491 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | |
492 | esac | |
493 | LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la | |
6d2568e5 | 494 | INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl']) |
c96730b1 MV |
495 | ]) |
496 | ||
497 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for | |
498 | # the libltdl installable library, and adds --enable-ltdl-install to | |
499 | # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor | |
500 | # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed | |
501 | # to be `${top_builddir}/libltdl'. Make sure you start DIR with | |
502 | # '${top_builddir}/' (note the single quotes!) if your package is not | |
503 | # flat, and, if you're not using automake, define top_builddir as | |
504 | # appropriate in the Makefiles. | |
505 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. | |
506 | AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
507 | AC_CHECK_LIB(ltdl, main, | |
508 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], | |
509 | [if test x"$enable_ltdl_install" = xno; then | |
510 | AC_MSG_WARN([libltdl not installed, but installation disabled]) | |
511 | else | |
512 | enable_ltdl_install=yes | |
513 | fi | |
514 | ]) | |
515 | if test x"$enable_ltdl_install" = x"yes"; then | |
516 | ac_configure_args="$ac_configure_args --enable-ltdl-install" | |
517 | LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la | |
518 | INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) | |
519 | else | |
520 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" | |
521 | LIBLTDL="-lltdl" | |
522 | INCLTDL= | |
523 | fi | |
524 | ]) | |
525 | ||
526 | dnl old names | |
527 | AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl | |
528 | AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl | |
529 | AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl | |
530 | AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl | |
531 | AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl | |
532 | AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl | |
533 | AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl | |
534 | ||
535 | dnl This is just to silence aclocal about the macro not being used | |
536 | ifelse([AC_DISABLE_FAST_INSTALL])dnl |