4 dnl CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
6 dnl This file is part of CACAO.
8 dnl This program is free software; you can redistribute it and/or
9 dnl modify it under the terms of the GNU General Public License as
10 dnl published by the Free Software Foundation; either version 2, or (at
11 dnl your option) any later version.
13 dnl This program is distributed in the hope that it will be useful, but
14 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 dnl General Public License for more details.
18 dnl You should have received a copy of the GNU General Public License
19 dnl along with this program; if not, write to the Free Software
20 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 dnl check for disassembler support
26 AC_DEFUN([AC_CHECK_ENABLE_DISASSEMBLER],[
27 AC_MSG_CHECKING(whether disassembler should be enabled)
28 AC_ARG_ENABLE([disassembler],
29 [AS_HELP_STRING(--enable-disassembler,enable disassembler [[default=no]])],
30 [case "${enableval}" in
31 yes) ENABLE_DISASSEMBLER=yes;;
32 *) ENABLE_DISASSEMBLER=no;;
34 [ENABLE_DISASSEMBLER=no])
35 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
36 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
38 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
39 AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
41 dnl check for binutils headers and libraries on some architectures for the
44 arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390 | m68k)
45 AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
46 AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
47 AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
48 AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
51 cygwin | darwin | netbsd | solaris)
52 AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
58 AC_CHECK_LIB(rt, sem_init,, [AC_MSG_ERROR(cannot find librt)])
63 AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
64 AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
65 AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
66 AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
67 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
70 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
74 AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])