1 dnl aclocal.m4 generated automatically by aclocal 1.4
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.
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.
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.
20 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
22 AC_DEFUN(AM_INIT_AUTOMAKE,
23 [AC_REQUIRE([AC_PROG_INSTALL])
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])
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])])
47 # Check to make sure that the build environment is sane.
50 AC_DEFUN(AM_SANITY_CHECK,
51 [AC_MSG_CHECKING([whether build environment is sane])
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
61 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
62 if test "[$]*" = "X"; then
64 set X `ls -t $srcdir/configure conftestfile`
66 if test "[$]*" != "X $srcdir/configure conftestfile" \
67 && test "[$]*" != "X conftestfile $srcdir/configure"; then
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])
77 test "[$]2" = conftestfile
83 AC_MSG_ERROR([newly created file is older than distributed files!
84 Check your system clock])
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
101 AC_MSG_RESULT(missing)
105 # Like AC_CONFIG_HEADER, but automatically create stamp file.
107 AC_DEFUN(AM_CONFIG_HEADER,
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>>,
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
124 am_indx=`expr "<<$>>am_indx" + 1`
128 # Add --enable-maintainer-mode option to configure.
133 AC_DEFUN(AM_MAINTAINER_MODE,
134 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
135 dnl maintainer-mode is disabled by default
136 AC_ARG_ENABLE(maintainer-mode,
137 [ --enable-maintainer-mode enable make rules and dependencies not useful
138 (and sometimes confusing) to the casual installer],
139 USE_MAINTAINER_MODE=$enableval,
140 USE_MAINTAINER_MODE=no)
141 AC_MSG_RESULT($USE_MAINTAINER_MODE)
142 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
143 MAINT=$MAINTAINER_MODE_TRUE
148 # Define a conditional.
150 AC_DEFUN(AM_CONDITIONAL,
162 # serial 41 AC_PROG_LIBTOOL
163 AC_DEFUN(AC_PROG_LIBTOOL,
164 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
166 # Save cache, so that ltconfig can load it
169 # Actually configure libtool. ac_aux_dir is where install-sh is found.
170 AR="$AR" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
171 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
172 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
173 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
174 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
175 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
176 || AC_MSG_ERROR([libtool configure failed])
178 # Reload cache, that may have been modified by ltconfig
181 # This can be used to rebuild libtool when needed
182 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
184 # Always use our own libtool.
185 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
188 # Redirect the config.log output again, so that the ltconfig log is not
189 # clobbered by the next message.
193 AC_DEFUN(AC_LIBTOOL_SETUP,
195 AC_REQUIRE([AC_ENABLE_SHARED])dnl
196 AC_REQUIRE([AC_ENABLE_STATIC])dnl
197 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
198 AC_REQUIRE([AC_CANONICAL_HOST])dnl
199 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
200 AC_REQUIRE([AC_PROG_CC])dnl
201 AC_REQUIRE([AC_PROG_LD])dnl
202 AC_REQUIRE([AC_PROG_NM])dnl
203 AC_REQUIRE([AC_PROG_LN_S])dnl
206 AC_CHECK_TOOL(AR, ar)
207 AC_CHECK_TOOL(RANLIB, ranlib, :)
209 # Check for any special flags to pass to ltconfig.
210 libtool_flags="--cache-file=$cache_file"
211 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
212 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
213 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
214 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
215 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
216 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
217 [libtool_flags="$libtool_flags --enable-dlopen"])
218 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
219 [libtool_flags="$libtool_flags --enable-win32-dll"])
220 AC_ARG_ENABLE(libtool-lock,
221 [ --disable-libtool-lock avoid locking (might break parallel builds)])
222 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
223 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
226 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
227 pic_mode="$withval", pic_mode=default)
228 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
229 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
231 # Some flags need to be propagated to the compiler or linker for good
235 # Find out which ABI we are using.
236 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
237 if AC_TRY_EVAL(ac_compile); then
238 case "`/usr/bin/file conftest.o`" in
254 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
255 SAVE_CFLAGS="$CFLAGS"
256 CFLAGS="$CFLAGS -belf"
257 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
258 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
259 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
260 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
261 CFLAGS="$SAVE_CFLAGS"
265 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
266 [*-*-cygwin* | *-*-mingw*)
267 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
268 AC_CHECK_TOOL(AS, as, false)
269 AC_CHECK_TOOL(OBJDUMP, objdump, false)
271 # recent cygwin and mingw systems supply a stub DllMain which the user
272 # can override, but on older systems we have to supply one
273 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
274 [AC_TRY_LINK([DllMain (0, 0, 0);],
275 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);],
276 [lt_cv_need_dllmain=yes],[lt_cv_need_dllmain=no])])
280 # cygwin systems need to pass --dll to the linker, and not link
281 # crt.o which will require a WinMain@16 definition.
282 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
284 # old mingw systems require "-dll" to link a DLL, while more recent ones
286 SAVE_CFLAGS="$CFLAGS"
287 CFLAGS="$CFLAGS -mdll"
288 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
289 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
290 CFLAGS="$SAVE_CFLAGS" ;;
297 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
298 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
300 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
301 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
303 # AC_ENABLE_SHARED - implement the --enable-shared flag
304 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
305 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
307 AC_DEFUN(AC_ENABLE_SHARED, [dnl
308 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
309 AC_ARG_ENABLE(shared,
310 changequote(<<, >>)dnl
311 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
313 [p=${PACKAGE-default}
315 yes) enable_shared=yes ;;
316 no) enable_shared=no ;;
319 # Look at the argument we got. We use all the common list separators.
320 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
321 for pkg in $enableval; do
322 if test "X$pkg" = "X$p"; then
329 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
332 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
333 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
334 AC_ENABLE_SHARED(no)])
336 # AC_ENABLE_STATIC - implement the --enable-static flag
337 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
338 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
340 AC_DEFUN(AC_ENABLE_STATIC, [dnl
341 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
342 AC_ARG_ENABLE(static,
343 changequote(<<, >>)dnl
344 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
346 [p=${PACKAGE-default}
348 yes) enable_static=yes ;;
349 no) enable_static=no ;;
352 # Look at the argument we got. We use all the common list separators.
353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
354 for pkg in $enableval; do
355 if test "X$pkg" = "X$p"; then
362 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
365 # AC_DISABLE_STATIC - set the default static flag to --disable-static
366 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
367 AC_ENABLE_STATIC(no)])
370 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
371 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
372 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
374 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
375 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
376 AC_ARG_ENABLE(fast-install,
377 changequote(<<, >>)dnl
378 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
380 [p=${PACKAGE-default}
382 yes) enable_fast_install=yes ;;
383 no) enable_fast_install=no ;;
385 enable_fast_install=no
386 # Look at the argument we got. We use all the common list separators.
387 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
388 for pkg in $enableval; do
389 if test "X$pkg" = "X$p"; then
390 enable_fast_install=yes
396 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
399 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
400 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
401 AC_ENABLE_FAST_INSTALL(no)])
403 # AC_PROG_LD - find the path to the GNU or non-GNU linker
406 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
407 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
408 AC_REQUIRE([AC_PROG_CC])dnl
409 AC_REQUIRE([AC_CANONICAL_HOST])dnl
410 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
412 if test "$ac_cv_prog_gcc" = yes; then
413 # Check if gcc -print-prog-name=ld gives a path.
414 AC_MSG_CHECKING([for ld used by GCC])
417 # gcc leaves a trailing carriage return which upsets mingw
418 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
420 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
423 # Accept absolute paths.
425 [\\/]* | [A-Za-z]:[\\/]*)
426 re_direlt='/[^/][^/]*/\.\./'
428 # Canonicalize the path of ld
429 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
430 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
431 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
433 test -z "$LD" && LD="$ac_prog"
436 # If it fails, then pretend we aren't using GCC.
440 # If it is relative, then search for the first ld in PATH.
444 elif test "$with_gnu_ld" = yes; then
445 AC_MSG_CHECKING([for GNU ld])
447 AC_MSG_CHECKING([for non-GNU ld])
449 AC_CACHE_VAL(ac_cv_path_LD,
450 [if test -z "$LD"; then
451 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
452 for ac_dir in $PATH; do
453 test -z "$ac_dir" && ac_dir=.
454 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
455 ac_cv_path_LD="$ac_dir/$ac_prog"
456 # Check to see if the program is GNU ld. I'd rather use --version,
457 # but apparently some GNU ld's only accept -v.
458 # Break only if it was the GNU/non-GNU ld that we prefer.
459 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
460 test "$with_gnu_ld" != no && break
462 test "$with_gnu_ld" != yes && break
468 ac_cv_path_LD="$LD" # Let the user override the test with a path.
471 if test -n "$LD"; then
476 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
481 AC_DEFUN(AC_PROG_LD_GNU,
482 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
483 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
484 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
485 ac_cv_prog_gnu_ld=yes
491 # AC_PROG_NM - find the path to a BSD-compatible name lister
493 [AC_MSG_CHECKING([for BSD-compatible nm])
494 AC_CACHE_VAL(ac_cv_path_NM,
495 [if test -n "$NM"; then
496 # Let the user override the test.
499 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
500 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
501 test -z "$ac_dir" && ac_dir=.
502 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
503 # Check to see if the nm accepts a BSD-compat flag.
504 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
505 # nm: unknown option "B" ignored
506 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
507 ac_cv_path_NM="$ac_dir/nm -B"
509 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
510 ac_cv_path_NM="$ac_dir/nm -p"
513 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
514 continue # so that we can try to find one that supports BSD flags
519 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
526 # AC_CHECK_LIBM - check for math library
527 AC_DEFUN(AC_CHECK_LIBM,
528 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
531 *-*-beos* | *-*-cygwin*)
532 # These system don't have libm
535 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
536 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
539 AC_CHECK_LIB(m, main, LIBM="-lm")
544 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
545 # the libltdl convenience library, adds --enable-ltdl-convenience to
546 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
547 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
548 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
549 # '${top_builddir}/' (note the single quotes!) if your package is not
550 # flat, and, if you're not using automake, define top_builddir as
551 # appropriate in the Makefiles.
552 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
553 case "$enable_ltdl_convenience" in
554 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
555 "") enable_ltdl_convenience=yes
556 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
558 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
559 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
562 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
563 # the libltdl installable library, and adds --enable-ltdl-install to
564 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
565 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
566 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
567 # '${top_builddir}/' (note the single quotes!) if your package is not
568 # flat, and, if you're not using automake, define top_builddir as
569 # appropriate in the Makefiles.
570 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
571 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
572 AC_CHECK_LIB(ltdl, main,
573 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
574 [if test x"$enable_ltdl_install" = xno; then
575 AC_MSG_WARN([libltdl not installed, but installation disabled])
577 enable_ltdl_install=yes
580 if test x"$enable_ltdl_install" = x"yes"; then
581 ac_configure_args="$ac_configure_args --enable-ltdl-install"
582 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
583 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
585 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
592 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
593 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
594 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
595 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
596 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
597 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
598 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
600 dnl This is just to silence aclocal about the macro not being used
601 ifelse([AC_DISABLE_FAST_INSTALL])dnl
603 dnl sidtargets.m4 -*- m4 -*-
605 dnl Copyright (C) 1999, 2000 Red Hat.
606 dnl This file is part of SID and is licensed under the GPL.
607 dnl See the file COPYING.SID for conditions for redistribution.
609 dnl Use CY_SIDTARGET_CHECK in configure.in to respond to the builder's
610 dnl selection of --target/--enable-targets
612 AC_DEFUN(CY_SIDTARGET_CHECK, [
615 dnl Assume all targets if $host==$target or $target==NONE
616 sid_host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host`
617 sid_target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target`
619 if test "$sid_host" = "$sid_target" -o "$target" = "NONE"
621 AC_MSG_WARN(Assuming --enable-targets=all)
625 all_targets="$target"
630 AC_ARG_ENABLE(targets,
631 [ --enable-targets=LIST support given additional targets, or all],
633 case "${enable_targets}" in
634 all) sidtarget_default=1 ;;
635 no) sidtarget_default=0 ;;
636 *) all_targets="${all_targets} `echo ${enable_targets} | sed -e 's-,- -g'`" ;;
640 dnl Enumerate known chip families
641 sidtarget_arm=$sidtarget_default
642 sidtarget_mips=$sidtarget_default
643 sidtarget_m32r=$sidtarget_default
644 sidtarget_m68k=$sidtarget_default
645 sidtarget_ppc=$sidtarget_default
647 dnl Iterate over all listed targets
648 for targ in $all_targets
651 arm*) sidtarget_arm=1 ;;
652 thumb*) sidtarget_arm=1 ;;
653 mips*) sidtarget_mips=1 ;;
654 m32r*) sidtarget_m32r=1 ;;
655 m68k*) sidtarget_m68k=1 ;;
656 powerpc*) sidtarget_ppc=1 ;;
657 ppc*) sidtarget_ppc=1 ;;
658 *) AC_MSG_WARN("Unknown target $targ") ;;
662 dnl Ensure at least one of these variables is non-zero.
665 ${sidtarget_mips}) ;;
666 ${sidtarget_m32r}) ;;
667 ${sidtarget_m68k}) ;;
669 *) AC_MSG_WARN([No selected sid targets: use --enable-targets or --target])
673 dnl Report results SIDTARGET_family
674 dnl nb: Use "x$sidtarget_family" in the tested expression to prevent
675 dnl syntax errors in configure when sidtarget_family is left unset.
677 AC_MSG_CHECKING(ARM family support)
678 AC_SUBST(sidtarget_arm)
679 AM_CONDITIONAL(SIDTARGET_ARM,[test "x$sidtarget_arm" = x1])
680 AC_MSG_RESULT($sidtarget_arm)
683 AC_MSG_CHECKING(MIPS family support)
684 AC_SUBST(sidtarget_mips)
685 AM_CONDITIONAL(SIDTARGET_MIPS,[test "x$sidtarget_mips" = x1])
686 AC_MSG_RESULT($sidtarget_mips)
688 AC_MSG_CHECKING(M32R family support)
689 AC_SUBST(sidtarget_m32r)
690 AM_CONDITIONAL(SIDTARGET_M32R,[test "x$sidtarget_m32r" = x1])
691 AC_MSG_RESULT($sidtarget_m32r)
693 AC_MSG_CHECKING(M68K family support)
694 AC_SUBST(sidtarget_m68k)
695 AM_CONDITIONAL(SIDTARGET_M68K,[test "x$sidtarget_m68k" = x1])
696 AC_MSG_RESULT($sidtarget_m68k)
698 AC_MSG_CHECKING(PPC family support)
699 AC_SUBST(sidtarget_ppc)
700 AM_CONDITIONAL(SIDTARGET_PPC,[test "x$sidtarget_ppc" = x1])
701 AC_MSG_RESULT($sidtarget_ppc)