AC_MSG_RESULT(${PYTHON_CFLAGS})
fi
- # On IRIX, type siginfo is not defined. Instead, sys/siginfo.h provides:
- # #if _SGIAPI
- # #define siginfo __siginfo
- # #endif
- # The problem is that including Python causes some XOPEN macros to be
- # unilaterally defined, and that in turn causes _SGIAPI to evaluate
- # to false. So, we work around this issue by defining siginfo ourself
- # though the command-line.
- #
# On x64 Windows, Python's include headers, and pyconfig.h in
# particular, rely on MS_WIN64 macro to detect that it's a 64bit
# version of Windows. Unfortunately, MS_WIN64 is only defined if
# solved as of 2012-10-02 (http://bugs.python.org/issue4709).
case "$gdb_host" in
- irix*) if test "${GCC}" = yes; then
- CPPFLAGS="$CPPFLAGS -Dsiginfo=__siginfo"
- fi
- ;;
mingw64)
if test "${GCC}" = yes; then
CPPFLAGS="$CPPFLAGS -DMS_WIN64"
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_CPPFLAGS)
AC_SUBST(PYTHON_LIBS)
+AM_CONDITIONAL(HAVE_PYTHON, test "${have_libpython}" != no)
# -------------------- #
# Check for libguile. #
dnl pkg-config --exists $version
dnl pkg-config --cflags $version
dnl pkg-config --libs $version
-dnl $version will be the default guile version (currently guile-2.0),
-dnl but the program is free to ignore this.
+dnl pkg-config --variable guild $version
+dnl The script will be called with $version having each value in
+dnl $try_guile_versions until --exists indicates success.
AC_ARG_WITH(guile,
AS_HELP_STRING([--with-guile@<:@=GUILE@:>@], [include guile support (auto/yes/no/<guile-version>/<pkg-config-program>)]),
esac
if test "${have_libguile}" != no; then
+ dnl Get the name of the 'guild' program.
+ case "${with_guile}" in
+ [[\\/]]* | ?:[[\\/]]*)
+ GDB_GUILE_PROGRAM_NAMES(["${with_guile}"], ["${guile_version}"])
+ ;;
+ *)
+ GDB_GUILE_PROGRAM_NAMES(["${pkg_config_prog_path}"], ["${guile_version}"])
+ ;;
+ esac
+
+ dnl Make sure guild can handle this host.
+ GDB_TRY_GUILD([$srcdir/guile/lib/gdb/support.scm])
+ dnl If not, disable guile support.
+ if test "$ac_cv_guild_ok" = no; then
+ have_libguile=no
+ AC_MSG_WARN(disabling guile support, $GUILD fails compiling for $host)
+ fi
+fi
+
+if test "${have_libguile}" != no; then
AC_DEFINE(HAVE_GUILE, 1, [Define if Guile interpreter is being linked in.])
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
fi
AC_SUBST(GUILE_CPPFLAGS)
AC_SUBST(GUILE_LIBS)
-
-# PR 17185, see if we can get the libgc version to see if we need
-# to apply the workaround.
-AC_CHECK_HEADERS(gc/gc.h)
-AC_CHECK_FUNCS([setenv])
+AM_CONDITIONAL(HAVE_GUILE, test "${have_libguile}" != no)
# --------------------- #
# Check for libmcheck. #
fi
fi
-# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
-# since sigsetjmp might only be defined as a macro.
-AC_CACHE_CHECK([for sigsetjmp], gdb_cv_func_sigsetjmp,
-[AC_TRY_COMPILE([
-#include <setjmp.h>
-], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
-gdb_cv_func_sigsetjmp=yes, gdb_cv_func_sigsetjmp=no)])
-if test $gdb_cv_func_sigsetjmp = yes; then
- AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
-fi
-
# Assume we'll default to using the included libiberty regex.
gdb_use_included_regex=yes
struct bt_ctf_event *event = NULL;
const struct bt_definition *scope;
+ bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
scope = bt_ctf_get_top_level_scope (event,
BT_STREAM_EVENT_HEADER);
bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));