Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

341 lines (297 sloc) 9.096 kb
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono-debugger, 2.4.2.1)
AM_MAINTAINER_MODE
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
fi])dnl
WARN_CFLAGS=""
if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi
AC_SUBST(WARN_CFLAGS)
AC_MSG_CHECKING([host platform characteristics])
case "$host" in
x86_64-*-linux*)
glue_cflags=-D_GNU_SOURCE
server_cflags=-D_GNU_SOURCE
bfd_target=x86_64
platform=x86_64
;;
*-*-linux*)
glue_cflags=-D_GNU_SOURCE
server_cflags=-D_GNU_SOURCE
bfd_target=i386linux
platform=i386linux
;;
powerpc-apple-darwin*)
glue_flags=
server_cflags=
bfd_target=powerpc
platform=powerpc
;;
*)
AC_MSG_ERROR([*** This platform is not yet supported.])
;;
esac
AC_MSG_RESULT(ok)
AC_ARG_WITH(bfd-target,
[ --with-bfd-target Manually override the BFD target],
if test x$with_bfd_target != "x"; then
bfd_target=$with_bfd_target
fi
)
AM_CONDITIONAL(BFD_TARGET_POWERPC, test x$bfd_target = xpowerpc)
AM_CONDITIONAL(BFD_TARGET_X86_64, test x$bfd_target = xx86_64)
AM_CONDITIONAL(PLATFORM_X86_64, test x$platform = xx86_64)
AM_CONDITIONAL(PLATFORM_POWERPC, test x$platform = xpowerpc)
AC_SUBST(glue_cflags)
AC_SUBST(server_cflags)
dnl may require a specific autoconf version
dnl AC_PROG_CC_FOR_BUILD
dnl CC_FOR_BUILD not automatically detected
CC_FOR_BUILD=$CC
BUILD_EXEEXT=
if test "x$cross_compiling" = "xyes"; then
CC_FOR_BUILD=cc
BUILD_EXEEXT=""
fi
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(HOST_CC)
AC_SUBST(BUILD_EXEEXT)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
# Set STDC_HEADERS
AC_HEADER_STDC
AM_PROG_LIBTOOL
# not 64 bit clean in cross-compile
AC_CHECK_SIZEOF(void *, 4)
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -fno-strict-aliasing'
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
AC_MSG_CHECKING([whether we're compiling from SVN])
if test -f "$srcdir/.svn_version" ; then
from_svn=yes
else
from_svn=no
fi
AC_MSG_RESULT($from_svn)
AM_CONDITIONAL(COMPILING_FROM_SVN, test x$from_svn = xyes)
pkg_config_path=
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
if test x$with_crosspkgdir = "x"; then
if test -s $PKG_CONFIG_PATH; then
pkg_config_path=$PKG_CONFIG_PATH
fi
else
pkg_config_path=$with_crosspkgdir
PKG_CONFIG_PATH=$pkg_config_path
export PKG_CONFIG_PATH
fi
)
## Versions of dependencies
GLIB_REQUIRED_VERSION=2.0.0
MONO_REQUIRED_VERSION=2.0
XSP_REQUIRED_VERSION=2.0
PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
AC_SUBST(BASE_DEPENDENCIES_LIBS)
## Versions of dependencies
PKG_CHECK_MODULES(SERVER_DEPENDENCIES, mono >= $MONO_REQUIRED_VERSION glib-2.0 >= $GLIB_REQUIRED_VERSION $martin_deps)
AC_SUBST(SERVER_DEPENDENCIES_CFLAGS)
AC_SUBST(SERVER_DEPENDENCIES_LIBS)
## Check Cecil
if pkg-config --modversion cecil>/dev/null; then
AC_MSG_RESULT("Found cecil.pc")
else
AC_MSG_ERROR([You are missing Cecil (cecil.pc for packageconfig)])
fi
CECIL_ASM=`pkg-config --variable=Libraries cecil`
AC_SUBST(CECIL_ASM)
PKG_CHECK_MODULES(WRAPPER, mono >= $MONO_REQUIRED_VERSION gthread-2.0 >= $GLIB_REQUIRED_VERSION)
AC_SUBST(WRAPPER_CFLAGS)
AC_SUBST(WRAPPER_LIBS)
GACUTIL_FLAGS='/package $(PACKAGE) /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib'
AC_PATH_PROG(GACUTIL, gacutil, no)
if test "x$GACUTIL" = "xno" ; then
AC_MSG_ERROR([No gacutil tool found])
fi
AC_SUBST(GACUTIL)
AC_SUBST(GACUTIL_FLAGS)
AC_SUBST(CFLAGS)
mono_prefix="`$PKG_CONFIG --variable=prefix mono`"
monodoc_prefix="`$PKG_CONFIG --variable=prefix monodoc`"
AC_SUBST(mono_prefix)
AC_SUBST(monodoc_prefix)
AC_PATH_PROG(MONO, mono)
AC_PATH_PROG(MCS, gmcs)
if test "x$MONO" = "x" ; then
AC_MSG_ERROR([Can't find "mono" in your PATH])
fi
if test "x$MCS" = "x" ; then
AC_MSG_ERROR([Can't find "mcs" in your PATH])
fi
AC_PATH_PROG(NUNIT_CONSOLE, nunit-console2)
if test "x$NUNIT_CONSOLE" = "x" ; then
AC_MSG_ERROR([Can't find "nunit-console2" in your PATH])
fi
target_mono_prefix="$prefix"
AC_ARG_WITH(target-mono,
[ --with-target-mono Manually override the Mono used for target applications],
if test "x$with_target_mono" != "x"; then
target_mono_prefix=$with_target_mono
have_target_mono=yes
fi
)
AC_SUBST(target_mono_prefix)
AM_CONDITIONAL(HAVE_TARGET_MONO, test "x$have_target_mono" = "xyes")
if test "x$have_target_mono" = "xyes" ; then
TARGET_MCS="$target_mono_prefix/bin/gmcs"
TARGET_MONO="$target_mono_prefix/bin/mono"
NUNIT_PREFIX="$target_mono_prefix"
NUNIT_VERSION=2.3
else
TARGET_MCS="$MCS"
TARGET_MONO="$MONO"
## Check NUnit
if pkg-config --modversion mono-nunit>/dev/null; then
AC_MSG_RESULT("Found mono-nunit.pc")
else
AC_MSG_ERROR([Cannot find mono-nunit (mono-unit.pc for packageconfig)])
fi
NUNIT_PREFIX=`pkg-config --variable=prefix mono-nunit`
NUNIT_VERSION=`pkg-config --modversion mono-nunit`
fi
NUNIT_PREFIX=`cd $NUNIT_PREFIX && pwd`
AC_SUBST(TARGET_MCS)
AC_SUBST(TARGET_MONO)
AC_SUBST(NUNIT_PREFIX)
real_top_srcdir=`pwd`
AC_SUBST(real_top_srcdir)
AC_SUBST(PATH)
AC_SUBST(LD_LIBRARY_PATH)
dnl
dnl BFD checks
dnl
if test `uname -s` = "Darwin"; then
LIB_PREFIX=
LIB_SUFFIX=.dylib
else
LIB_PREFIX=.so
LIB_SUFFIX=
fi
AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_SUFFIX)
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h termcap.h termcap/termcap.h)
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
AC_CHECK_FUNCS(strlcpy strlcat)
CHECK_READLINE
min_mono_version=72
symfile_major_version=50
min_symfile_minor_version=0
AC_ARG_WITH(xsp,
[ --with-xsp Enable XSP support (experimental)],
with_xsp=yes, with_xsp=no)
if test "x$with_xsp" = "xyes" ; then
PKG_CHECK_MODULES(XSP, xsp-2 >= $XSP_REQUIRED_VERSION)
XSP_EXE="`$PKG_CONFIG --variable=Executable xsp-2`"
else
XSP_EXE=
XSP_CFLAGS=
XSP_LIBS=
fi
AC_SUBST(XSP_EXE)
AC_SUBST(XSP_CFLAGS)
AC_SUBST(XSP_LIBS)
AM_CONDITIONAL(HAVE_XSP, test "x$with_xsp" = "xyes")
AC_MSG_CHECKING([Whether your Mono is working])
old_CFLAGS=$cflags
CFLAGS=$WRAPPER_CFLAGS
AC_TRY_COMPILE([#include <mono/metadata/mono-debug.h>
#include <mono/metadata/debug-mono-symfile.h>
], [
#if MONO_DEBUGGER_MAJOR_VERSION < $min_mono_version
#error "Your mono is too old for this version of the debugger."
#endif
#if MONO_SYMBOL_FILE_MAJOR_VERSION != $symfile_major_version
#error "Your mono is too old for this version of the debugger."
#endif
#if MONO_SYMBOL_FILE_MINOR_VERSION < $min_symfile_minor_version
#error "Your mono is too old for this version of the debugger."
#endif
], mono_working=yes, mono_working=no)
AC_MSG_RESULT($mono_working)
CFLAGS=$old_CFLAGS
if test x$mono_working != xyes; then
AC_MSG_ERROR([*** Your Mono is too old for this version of the debugger.])
fi
martin_private=no
if test "x$from_svn" = "xyes"; then
if test x`hostname --fqdn` = x'gondor.trier.ximian.com'; then
if test x"$prefix" == "x/work/gondor/INSTALL" ; then
echo "Experimental features are disabled in the Gondor tree."
else
echo "Enabling experimental features."
martin_private=yes
fi
fi
fi
AM_CONDITIONAL(MARTIN_PRIVATE, test x$martin_private = xyes)
AM_CONDITIONAL(DISABLED, false)
AC_OUTPUT([
Makefile
mono-debugger.pc
mono-debugger-frontend.pc
interface/Makefile
classes/Makefile
build/Makefile
build/Mono.Debugger.dll.config
backend/Makefile
backend/server/Makefile
backend/arch/Makefile
backend/arch/libiberty/Makefile
backend/arch/opcodes/Makefile
backend/arch/bfd/Makefile
backend/arch/bfd/hosts/Makefile
backend/arch/bfd/include/Makefile
backend/arch/bfd/include/aout/Makefile
backend/arch/bfd/include/coff/Makefile
backend/arch/bfd/include/elf/Makefile
backend/arch/bfd/include/opcode/Makefile
symbolwriter/Makefile
languages/Makefile
languages/mono/Makefile
languages/native/Makefile
frontend/Makefile
frontend/jay/Makefile
frontend/libedit/Makefile
test/Makefile
test/src/Makefile
test/misc/Makefile
test/testsuite/Makefile
doc/Makefile
])
Jump to Line
Something went wrong with that request. Please try again.