Commit | Line | Data |
---|---|---|
c374ab69 MV |
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 | # 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 | ||
caeb9493 | 106 | # serial 40 AC_PROG_LIBTOOL |
b8afc197 MV |
107 | AC_DEFUN(AC_PROG_LIBTOOL, |
108 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl | |
109 | ||
110 | # Save cache, so that ltconfig can load it | |
111 | AC_CACHE_SAVE | |
112 | ||
113 | # Actually configure libtool. ac_aux_dir is where install-sh is found. | |
114 | CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
115 | LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ | |
116 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ | |
117 | DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ | |
118 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ | |
119 | $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ | |
120 | || AC_MSG_ERROR([libtool configure failed]) | |
121 | ||
122 | # Reload cache, that may have been modified by ltconfig | |
123 | AC_CACHE_LOAD | |
124 | ||
125 | # This can be used to rebuild libtool when needed | |
126 | LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" | |
127 | ||
128 | # Always use our own libtool. | |
129 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
130 | AC_SUBST(LIBTOOL)dnl | |
131 | ||
132 | # Redirect the config.log output again, so that the ltconfig log is not | |
133 | # clobbered by the next message. | |
134 | exec 5>>./config.log | |
135 | ]) | |
136 | ||
137 | AC_DEFUN(AC_LIBTOOL_SETUP, | |
138 | [AC_PREREQ(2.13)dnl | |
139 | AC_REQUIRE([AC_ENABLE_SHARED])dnl | |
140 | AC_REQUIRE([AC_ENABLE_STATIC])dnl | |
141 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl | |
c374ab69 | 142 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
b8afc197 | 143 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
c374ab69 MV |
144 | AC_REQUIRE([AC_PROG_RANLIB])dnl |
145 | AC_REQUIRE([AC_PROG_CC])dnl | |
b8afc197 MV |
146 | AC_REQUIRE([AC_PROG_LD])dnl |
147 | AC_REQUIRE([AC_PROG_NM])dnl | |
c374ab69 MV |
148 | AC_REQUIRE([AC_PROG_LN_S])dnl |
149 | dnl | |
150 | ||
151 | # Check for any special flags to pass to ltconfig. | |
b8afc197 | 152 | libtool_flags="--cache-file=$cache_file" |
c374ab69 MV |
153 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" |
154 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | |
b8afc197 | 155 | test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" |
c374ab69 MV |
156 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" |
157 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
b8afc197 MV |
158 | ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], |
159 | [libtool_flags="$libtool_flags --enable-dlopen"]) | |
160 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | |
161 | [libtool_flags="$libtool_flags --enable-win32-dll"]) | |
162 | AC_ARG_ENABLE(libtool-lock, | |
163 | [ --disable-libtool-lock avoid locking (might break parallel builds)]) | |
164 | test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" | |
165 | test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" | |
c374ab69 MV |
166 | |
167 | # Some flags need to be propagated to the compiler or linker for good | |
168 | # libtool support. | |
169 | case "$host" in | |
170 | *-*-irix6*) | |
171 | # Find out which ABI we are using. | |
172 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext | |
173 | if AC_TRY_EVAL(ac_compile); then | |
174 | case "`/usr/bin/file conftest.o`" in | |
175 | *32-bit*) | |
176 | LD="${LD-ld} -32" | |
177 | ;; | |
178 | *N32*) | |
179 | LD="${LD-ld} -n32" | |
180 | ;; | |
181 | *64-bit*) | |
182 | LD="${LD-ld} -64" | |
183 | ;; | |
184 | esac | |
185 | fi | |
186 | rm -rf conftest* | |
187 | ;; | |
188 | ||
189 | *-*-sco3.2v5*) | |
190 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
b8afc197 | 191 | SAVE_CFLAGS="$CFLAGS" |
c374ab69 | 192 | CFLAGS="$CFLAGS -belf" |
b8afc197 MV |
193 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
194 | [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) | |
195 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
196 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
197 | CFLAGS="$SAVE_CFLAGS" | |
198 | fi | |
c374ab69 | 199 | ;; |
c374ab69 | 200 | |
b8afc197 MV |
201 | ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], |
202 | [*-*-cygwin* | *-*-mingw*) | |
203 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) | |
204 | AC_CHECK_TOOL(AS, as, false) | |
205 | AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
206 | ;; | |
207 | ]) | |
208 | esac | |
ab8c045c | 209 | ]) |
c374ab69 | 210 | |
b8afc197 MV |
211 | # AC_LIBTOOL_DLOPEN - enable checks for dlopen support |
212 | AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) | |
213 | ||
214 | # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's | |
215 | AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) | |
216 | ||
217 | # AC_ENABLE_SHARED - implement the --enable-shared flag | |
218 | # Usage: AC_ENABLE_SHARED[(DEFAULT)] | |
c374ab69 MV |
219 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
220 | # `yes'. | |
b8afc197 MV |
221 | AC_DEFUN(AC_ENABLE_SHARED, [dnl |
222 | define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl | |
c374ab69 MV |
223 | AC_ARG_ENABLE(shared, |
224 | changequote(<<, >>)dnl | |
b8afc197 | 225 | << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], |
c374ab69 MV |
226 | changequote([, ])dnl |
227 | [p=${PACKAGE-default} | |
228 | case "$enableval" in | |
229 | yes) enable_shared=yes ;; | |
230 | no) enable_shared=no ;; | |
231 | *) | |
232 | enable_shared=no | |
233 | # Look at the argument we got. We use all the common list separators. | |
234 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
235 | for pkg in $enableval; do | |
236 | if test "X$pkg" = "X$p"; then | |
237 | enable_shared=yes | |
238 | fi | |
239 | done | |
240 | IFS="$ac_save_ifs" | |
241 | ;; | |
242 | esac], | |
b8afc197 | 243 | enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl |
c374ab69 MV |
244 | ]) |
245 | ||
b8afc197 MV |
246 | # AC_DISABLE_SHARED - set the default shared flag to --disable-shared |
247 | AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
248 | AC_ENABLE_SHARED(no)]) | |
c374ab69 | 249 | |
b8afc197 MV |
250 | # AC_ENABLE_STATIC - implement the --enable-static flag |
251 | # Usage: AC_ENABLE_STATIC[(DEFAULT)] | |
c374ab69 MV |
252 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to |
253 | # `yes'. | |
b8afc197 MV |
254 | AC_DEFUN(AC_ENABLE_STATIC, [dnl |
255 | define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl | |
c374ab69 MV |
256 | AC_ARG_ENABLE(static, |
257 | changequote(<<, >>)dnl | |
b8afc197 | 258 | << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], |
c374ab69 MV |
259 | changequote([, ])dnl |
260 | [p=${PACKAGE-default} | |
261 | case "$enableval" in | |
262 | yes) enable_static=yes ;; | |
263 | no) enable_static=no ;; | |
264 | *) | |
265 | enable_static=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_static=yes | |
271 | fi | |
272 | done | |
273 | IFS="$ac_save_ifs" | |
274 | ;; | |
275 | esac], | |
b8afc197 MV |
276 | enable_static=AC_ENABLE_STATIC_DEFAULT)dnl |
277 | ]) | |
278 | ||
279 | # AC_DISABLE_STATIC - set the default static flag to --disable-static | |
280 | AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
281 | AC_ENABLE_STATIC(no)]) | |
282 | ||
283 | ||
284 | # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag | |
285 | # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] | |
286 | # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
287 | # `yes'. | |
288 | AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl | |
289 | define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl | |
290 | AC_ARG_ENABLE(fast-install, | |
291 | changequote(<<, >>)dnl | |
292 | << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], | |
293 | changequote([, ])dnl | |
294 | [p=${PACKAGE-default} | |
295 | case "$enableval" in | |
296 | yes) enable_fast_install=yes ;; | |
297 | no) enable_fast_install=no ;; | |
298 | *) | |
299 | enable_fast_install=no | |
300 | # Look at the argument we got. We use all the common list separators. | |
301 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
302 | for pkg in $enableval; do | |
303 | if test "X$pkg" = "X$p"; then | |
304 | enable_fast_install=yes | |
305 | fi | |
306 | done | |
307 | IFS="$ac_save_ifs" | |
308 | ;; | |
309 | esac], | |
310 | enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl | |
c374ab69 MV |
311 | ]) |
312 | ||
b8afc197 MV |
313 | # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install |
314 | AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
315 | AC_ENABLE_FAST_INSTALL(no)]) | |
c374ab69 | 316 | |
b8afc197 MV |
317 | # AC_PROG_LD - find the path to the GNU or non-GNU linker |
318 | AC_DEFUN(AC_PROG_LD, | |
c374ab69 MV |
319 | [AC_ARG_WITH(gnu-ld, |
320 | [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | |
321 | test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | |
b8afc197 MV |
322 | AC_REQUIRE([AC_PROG_CC])dnl |
323 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
324 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
c374ab69 MV |
325 | ac_prog=ld |
326 | if test "$ac_cv_prog_gcc" = yes; then | |
327 | # Check if gcc -print-prog-name=ld gives a path. | |
328 | AC_MSG_CHECKING([for ld used by GCC]) | |
329 | ac_prog=`($CC -print-prog-name=ld) 2>&5` | |
330 | case "$ac_prog" in | |
b8afc197 MV |
331 | # Accept absolute paths. |
332 | changequote(,)dnl | |
333 | [\\/]* | [A-Za-z]:[\\/]*) | |
334 | re_direlt='/[^/][^/]*/\.\./' | |
335 | changequote([,])dnl | |
336 | # Canonicalize the path of ld | |
337 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
338 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
339 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
340 | done | |
341 | test -z "$LD" && LD="$ac_prog" | |
342 | ;; | |
c374ab69 MV |
343 | "") |
344 | # If it fails, then pretend we aren't using GCC. | |
345 | ac_prog=ld | |
346 | ;; | |
347 | *) | |
348 | # If it is relative, then search for the first ld in PATH. | |
349 | with_gnu_ld=unknown | |
350 | ;; | |
351 | esac | |
352 | elif test "$with_gnu_ld" = yes; then | |
353 | AC_MSG_CHECKING([for GNU ld]) | |
354 | else | |
355 | AC_MSG_CHECKING([for non-GNU ld]) | |
356 | fi | |
357 | AC_CACHE_VAL(ac_cv_path_LD, | |
358 | [if test -z "$LD"; then | |
b8afc197 | 359 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
c374ab69 MV |
360 | for ac_dir in $PATH; do |
361 | test -z "$ac_dir" && ac_dir=. | |
b8afc197 | 362 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
c374ab69 MV |
363 | ac_cv_path_LD="$ac_dir/$ac_prog" |
364 | # Check to see if the program is GNU ld. I'd rather use --version, | |
365 | # but apparently some GNU ld's only accept -v. | |
366 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
367 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
368 | test "$with_gnu_ld" != no && break | |
369 | else | |
b8afc197 | 370 | test "$with_gnu_ld" != yes && break |
c374ab69 MV |
371 | fi |
372 | fi | |
373 | done | |
374 | IFS="$ac_save_ifs" | |
375 | else | |
376 | ac_cv_path_LD="$LD" # Let the user override the test with a path. | |
377 | fi]) | |
378 | LD="$ac_cv_path_LD" | |
379 | if test -n "$LD"; then | |
380 | AC_MSG_RESULT($LD) | |
381 | else | |
382 | AC_MSG_RESULT(no) | |
383 | fi | |
384 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
385 | AC_SUBST(LD) | |
b8afc197 | 386 | AC_PROG_LD_GNU |
c374ab69 MV |
387 | ]) |
388 | ||
b8afc197 | 389 | AC_DEFUN(AC_PROG_LD_GNU, |
c374ab69 MV |
390 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, |
391 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
392 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
393 | ac_cv_prog_gnu_ld=yes | |
394 | else | |
395 | ac_cv_prog_gnu_ld=no | |
396 | fi]) | |
397 | ]) | |
398 | ||
b8afc197 MV |
399 | # AC_PROG_NM - find the path to a BSD-compatible name lister |
400 | AC_DEFUN(AC_PROG_NM, | |
c374ab69 MV |
401 | [AC_MSG_CHECKING([for BSD-compatible nm]) |
402 | AC_CACHE_VAL(ac_cv_path_NM, | |
b8afc197 MV |
403 | [if test -n "$NM"; then |
404 | # Let the user override the test. | |
405 | ac_cv_path_NM="$NM" | |
406 | else | |
407 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | |
408 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do | |
c374ab69 | 409 | test -z "$ac_dir" && ac_dir=. |
b8afc197 | 410 | if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then |
c374ab69 MV |
411 | # Check to see if the nm accepts a BSD-compat flag. |
412 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
413 | # nm: unknown option "B" ignored | |
414 | if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | |
b8afc197 MV |
415 | ac_cv_path_NM="$ac_dir/nm -B" |
416 | break | |
c374ab69 | 417 | elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
b8afc197 MV |
418 | ac_cv_path_NM="$ac_dir/nm -p" |
419 | break | |
c374ab69 | 420 | else |
b8afc197 MV |
421 | ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but |
422 | continue # so that we can try to find one that supports BSD flags | |
c374ab69 MV |
423 | fi |
424 | fi | |
425 | done | |
426 | IFS="$ac_save_ifs" | |
427 | test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm | |
b8afc197 | 428 | fi]) |
c374ab69 MV |
429 | NM="$ac_cv_path_NM" |
430 | AC_MSG_RESULT([$NM]) | |
431 | AC_SUBST(NM) | |
432 | ]) | |
433 | ||
b8afc197 MV |
434 | # AC_CHECK_LIBM - check for math library |
435 | AC_DEFUN(AC_CHECK_LIBM, | |
436 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
437 | LIBM= | |
438 | case "$host" in | |
439 | *-*-beos* | *-*-cygwin*) | |
440 | # These system don't have libm | |
441 | ;; | |
442 | *-ncr-sysv4.3*) | |
443 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | |
444 | AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") | |
445 | ;; | |
446 | *) | |
447 | AC_CHECK_LIB(m, main, LIBM="-lm") | |
448 | ;; | |
449 | esac | |
450 | ]) | |
451 | ||
452 | # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for | |
453 | # the libltdl convenience library, adds --enable-ltdl-convenience to | |
454 | # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor | |
455 | # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed | |
456 | # to be `${top_builddir}/libltdl'. Make sure you start DIR with | |
457 | # '${top_builddir}/' (note the single quotes!) if your package is not | |
458 | # flat, and, if you're not using automake, define top_builddir as | |
459 | # appropriate in the Makefiles. | |
460 | AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
461 | case "$enable_ltdl_convenience" in | |
462 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; | |
463 | "") enable_ltdl_convenience=yes | |
464 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | |
465 | esac | |
466 | LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la | |
caeb9493 | 467 | INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) |
b8afc197 MV |
468 | ]) |
469 | ||
470 | # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for | |
471 | # the libltdl installable library, and adds --enable-ltdl-install to | |
472 | # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor | |
473 | # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed | |
474 | # to be `${top_builddir}/libltdl'. Make sure you start DIR with | |
475 | # '${top_builddir}/' (note the single quotes!) if your package is not | |
476 | # flat, and, if you're not using automake, define top_builddir as | |
477 | # appropriate in the Makefiles. | |
478 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. | |
479 | AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
480 | AC_CHECK_LIB(ltdl, main, | |
481 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], | |
482 | [if test x"$enable_ltdl_install" = xno; then | |
483 | AC_MSG_WARN([libltdl not installed, but installation disabled]) | |
484 | else | |
485 | enable_ltdl_install=yes | |
486 | fi | |
487 | ]) | |
488 | if test x"$enable_ltdl_install" = x"yes"; then | |
489 | ac_configure_args="$ac_configure_args --enable-ltdl-install" | |
490 | LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la | |
caeb9493 | 491 | INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) |
b8afc197 MV |
492 | else |
493 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" | |
494 | LIBLTDL="-lltdl" | |
caeb9493 | 495 | INCLTDL= |
b8afc197 MV |
496 | fi |
497 | ]) | |
498 | ||
499 | dnl old names | |
500 | AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl | |
501 | AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl | |
502 | AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl | |
503 | AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl | |
504 | AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl | |
505 | AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl | |
506 | AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl | |
507 | ||
caeb9493 JB |
508 | dnl This is just to silence aclocal about the macro not being used |
509 | ifelse([AC_DISABLE_FAST_INSTALL])dnl | |
b8afc197 | 510 |