Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

211 lines (182 sloc) 5.246 kb
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono-debugger, 0.5)
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
*-*-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)
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'
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)
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.25
PKG_CHECK_MODULES(WRAPPER, mono >= $MONO_REQUIRED_VERSION gthread-2.0 >= $GLIB_REQUIRED_VERSION)
AC_SUBST(WRAPPER_CFLAGS)
AC_SUBST(WRAPPER_LIBS)
AC_SUBST(CFLAGS)
top_srcdir=`pwd`
AC_SUBST(top_srcdir)
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)
dnl
dnl BFD checks
dnl
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)
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
AC_OUTPUT([
Makefile
interfaces/Makefile
classes/Makefile
glue/Makefile
lib/Makefile
wrapper/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
arch/Makefile
arch/libiberty/Makefile
arch/opcodes/Makefile
arch/bfd/Makefile
arch/bfd/hosts/Makefile
arch/bfd/include/Makefile
arch/bfd/include/aout/Makefile
arch/bfd/include/coff/Makefile
arch/bfd/include/elf/Makefile
test/Makefile
doc/Makefile
])
Jump to Line
Something went wrong with that request. Please try again.