Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
232 lines (202 sloc) 5.75 KB
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono-debugger, 0.3)
AM_MAINTAINER_MODE
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_MSG_CHECKING([host platform characteristics])
case "$host" in
*-*-linux*)
server_sources="i386-linux-ptrace.c i386-linux-ptrace.h"
;;
*-*-freebsd*)
server_sources="i386-freebsd-ptrace.c i386-freebsd-ptrace.h"
;;
*)
AC_MSG_ERROR([*** This platform is not yet supported.])
;;
esac
AC_MSG_RESULT(ok)
AC_SUBST(server_sources)
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)
# 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'
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 CVS])
if test -f "$srcdir/.cvs_version" ; then
from_cvs=yes
else
from_cvs=no
fi
AC_MSG_RESULT($from_cvs)
if test "x$from_cvs" = "xyes" ; then
AC_PATH_PROG(GAPI_CODEGEN, gapi_codegen.exe, no)
if test "x$GAPI_CODEGEN" != "xno"; then
gtksharp_path=`dirname $GAPI_CODEGEN`
GTKSHARP_PREFIX=`dirname $gtksharp_path`
have_gtk=yes
else
AC_MSG_WARN([Cannot find gtk-sharp, the GUI won't be build])
have_gtk=no
fi
else
have_gtk=yes
fi
AC_SUBST(GTKSHARP_PREFIX)
AM_CONDITIONAL(HAVE_GTK, test x$have_gtk = xyes)
AM_CONDITIONAL(USE_GAPI_CODEGEN, test x$from_cvs = xyes)
AC_MSG_CHECKING([if building the GUI is requested])
AC_ARG_ENABLE(gui, [ --disable-gui don't build the GUI], build_gui=$enableval, build_gui=yes)
AC_MSG_RESULT($build_gui)
if test "x$have_gtk" = "xno"; then
build_gui=no
AC_MSG_WARN(Building the GUI is disabled!)
fi
if test "x$build_gui" = "xyes"; then
BUILD_GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0 libgnome-2.0`
BUILD_GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0 libgnome-2.0`
GUI_TARGETS=Debugger.exe
else
BUILD_GTK_CFLAGS=
BUILD_GTK_LIBS=
GUI_TARGETS=
fi
AC_SUBST(BUILD_GTK_CFLAGS)
AC_SUBST(BUILD_GTK_LIBS)
AC_SUBST(GUI_TARGETS)
AM_CONDITIONAL(BUILD_GUI, test "x$build_gui" = "xyes")
PKG_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_PATH=$PKG_CONFIG_PATH
fi
else
PKG_PATH=$with_crosspkgdir
PKG_CONFIG_PATH=$PKG_PATH
export PKG_CONFIG_PATH
fi
)
## Versions of dependencies
GLIB_REQUIRED_VERSION=2.0.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, glib-2.0 >= $GLIB_REQUIRED_VERSION)
AC_SUBST(SERVER_DEPENDENCIES_CFLAGS)
AC_SUBST(SERVER_DEPENDENCIES_LIBS)
MONO_REQUIRED_VERSION=0.19.1
PKG_CHECK_MODULES(WRAPPER, mono >= $MONO_REQUIRED_VERSION libgc-mono >= 6.1)
AC_SUBST(WRAPPER_CFLAGS)
AC_SUBST(WRAPPER_LIBS)
AC_SUBST(CFLAGS)
top_srcdir=`pwd`
AC_SUBST(top_srcdir)
AC_CHECK_HEADER(dis-asm.h,, [AC_MSG_ERROR(
[Can't find <dis-asm.h>, make sure you have binutils-dev >= 2.12 installed.])])
old_LIBS=$LIBS
AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(
[Can't find libbfd, make sure you have binutils-dev >= 2.12 installed.])])
AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(
[Can't find libopcodes, make sure you have binutils >= 2.12 installed.])], -lbfd)
LIBS=$old_LIBS
old_LIBS=$LIBS
LIBS="-lbfd"
AC_MSG_CHECKING(whether we have a shared libbfd.so)
AC_TRY_LINK_FUNC(_sch_istable,,[AC_MSG_ERROR([
*** You libbfd is unusable for the debugger.
*** Please read the binutils and libbfd issues section in README.FreeBSD.])])
LIBS=$old_LIBS
AC_MSG_RESULT(ok)
AC_PATH_PROG(MONO, mono)
AC_PATH_PROG(MCS, mcs)
AC_PATH_PROG(JAY, jay)
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
have_jay=yes
if test "x$JAY" = "x" ; then
have_yay=no
AC_MSG_WARN([Can't find "jay" in your PATH])
fi
AM_CONDITIONAL(HAVE_JAY, test "x$have_jay" = "xyes")
AC_SUBST(PATH)
AC_SUBST(LD_LIBRARY_PATH)
dnl
dnl See if readline needs -ltermcap
dnl
AC_MSG_CHECKING([if using the readline library is requested])
AC_ARG_ENABLE(readline, [ --disable-readline don't use GNU readline], use_readline=$enableval, use_readline=yes)
AC_MSG_RESULT($use_readline)
if test "x$use_readline" = "xyes"; then
AC_DEFINE(USE_READLINE,1,[Whether to use GNU readline])
old_LIBS=$LIBS
LIBS="-lreadline"
AC_TRY_LINK(,,[
READLINE_DEPLIBS="-lreadline"
],[
LIBS="$LIBS -ltermcap"
AC_TRY_LINK(,,[
READLINE_DEPLIBS="-lreadline -ltermcap"
],[
AC_MSG_ERROR([Cannot figure out how to link with the readline library; see config.log for more information])
])
])
LIBS=$old_LIBS
else
READLINE_DEPLIBS=
fi
AC_SUBST(READLINE_DEPLIBS)
AC_OUTPUT([
Makefile
interfaces/Makefile
classes/Makefile
glue/Makefile
lib/Makefile
wrapper/Makefile
widgets/Makefile
widgets/gtk/Makefile
widgets/mono.debugger.gui/Makefile
widgets/generator/Makefile
widgets/sources/Makefile
widgets/sources/gtksourceview/Makefile
widgets/sources/debuggerwidgets/Makefile
backends/Makefile
backends/classes/Makefile
backends/server/Makefile
backends/ptrace/Makefile
backends/mono-csharp/Makefile
backends/native/Makefile
frontends/Makefile
frontends/scripting/Makefile
frontends/command-line/Makefile
frontends/gui/Makefile
arch/Makefile
test/Makefile
doc/Makefile
])
Jump to Line
Something went wrong with that request. Please try again.