AC_CONFIG_HEADER(config.h:config.in)
AM_MAINTAINER_MODE
-# Provide more thorough testing by -lmcheck.
-# Set it to 'true' for development snapshots, 'false' for releases or
-# pre-releases.
-development=true
+# Set the 'development' global.
+. $srcdir/development.sh
AC_PROG_CC
AC_USE_SYSTEM_EXTENSIONS
AC_SUBST(PYTHON_CPPFLAGS)
AC_SUBST(PYTHON_LIBS)
-# Provide a --enable-libmcheck/--disable-libmcheck set of options
-# allowing a user to enable this option even when building releases,
-# or to disable it when building a snapshot.
-AC_ARG_ENABLE(libmcheck,
- AS_HELP_STRING([--enable-libmcheck],
- [Try building GDB with -lmcheck if available]),
- [case "${enableval}" in
- yes | y) ENABLE_LIBMCHECK="yes" ;;
- no | n) ENABLE_LIBMCHECK="no" ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmcheck) ;;
- esac])
-
# Enable -lmcheck by default (it provides cheap-enough memory mangling),
# but turn it off if Python is enabled with threads, since -lmcheck is
# not thread safe (http://sourceware.org/bugzilla/show_bug.cgi?id=9939),
# and for releases.
-if test -z "${ENABLE_LIBMCHECK}" \
- -a \( "${have_libpython}" = "no" \
- -o "${python_has_threads}" = "no" \) \
- && $development; then
- ENABLE_LIBMCHECK=yes
+if test \( "${have_libpython}" = "no" -o "${python_has_threads}" = "no" \) \
+ && $development; then
+ libmcheck_default=yes
+else
+ libmcheck_default=no
fi
+GDB_AC_LIBMCHECK(${libmcheck_default})
-if test "$ENABLE_LIBMCHECK" = "yes" ; then
- if test "${have_libpython}" != "no" -a "${python_has_threads}" = "yes" ; then
- AC_MSG_WARN(--enable-libmcheck may lead to spurious crashes if threads are used in python)
- fi
- AC_CHECK_LIB(mcheck, main)
+if test "$ENABLE_LIBMCHECK" = "yes" \
+ -a "${have_libpython}" != "no" \
+ -a "${python_has_threads}" = "yes" ; then
+ AC_MSG_WARN(--enable-libmcheck may lead to spurious crashes if threads are used in python)
fi
# ------------------------- #
sigaction sigprocmask sigsetmask socketpair syscall \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
setrlimit getrlimit posix_madvise waitpid lstat \
- fdwalk pipe2])
+ fdwalk pipe2 ptrace64])
AM_LANGINFO_CODESET
# Check the return and argument types of ptrace. No canned test for
for gdb_arg1 in 'int' 'long'; do
for gdb_arg2 in 'pid_t' 'int' 'long'; do
for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
- for gdb_arg4 in 'int' 'long'; do
+ for gdb_arg4 in 'int' 'long' 'void *'; do
AC_TRY_COMPILE($gdb_ptrace_headers, [
extern $gdb_cv_func_ptrace_ret
ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
shift
AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG3, $[3],
[Define to the type of arg 3 for ptrace.])
+AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG4, $[4],
+ [Define to the type of arg 4 for ptrace.])
if test -n "$[5]"; then
AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG5, $[5],
[Define to the type of arg 5 for ptrace.])
if test "${target}" = "${host}"; then
case "${host}" in
- *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
+ *-*-sysv4.2* | *-*-sysv5* )
AC_DEFINE(NEW_PROC_API, 1,
[Define if you want to use new multi-fd /proc interface
(replaces HAVE_MULTIPLE_PROC_FDS as well as other macros).])
-Wno-unused -Wunused-value -Wunused-function \
-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
-Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration"
+-Wold-style-declaration -Wold-style-definition"
# Enable -Wno-format by default when using gcc on mingw since many
# GCC versions complain about %I64.