mirror of
https://github.com/JakeHillion/drgn.git
synced 2024-12-23 09:43:06 +00:00
d60c6a1d68
In order to retrieve registers from stack traces, we need to know what registers are defined for a platform. This adds a small DSL for defining registers for an architecture. The DSL is parsed by an awk script that generates the necessary tables, lookup functions, and enum definitions.
76 lines
2.6 KiB
Plaintext
76 lines
2.6 KiB
Plaintext
AC_INIT([drgn], m4_esyscmd_s([build-aux/version.sh]),
|
|
[https://github.com/osandov/drgn/issues],,
|
|
[https://github.com/osandov/drgn])
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
AC_PROG_CC
|
|
|
|
AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
|
|
AM_PROG_AR
|
|
|
|
LT_INIT
|
|
|
|
AC_ARG_WITH([python],
|
|
[AS_HELP_STRING([--with-python@<:@=ARG@:>@],
|
|
[build Python bindings. ARG may be yes, no, or the
|
|
path to the Python interpreter to use. This is
|
|
normally only used by setup.py
|
|
@<:@default=no@:>@])],
|
|
[], [with_python=no])
|
|
|
|
AS_IF([test "x$with_python" != xyes && test "x$with_python" != xno],
|
|
[PYTHON=$with_python])
|
|
AM_CONDITIONAL([WITH_PYTHON], [test "x$with_python" != xno])
|
|
AM_COND_IF([WITH_PYTHON],
|
|
[AM_PATH_PYTHON([3.6])
|
|
AS_IF([test -z "$PYTHON_CPPFLAGS"],
|
|
[prog="import sysconfig
|
|
include = sysconfig.get_path('include')
|
|
platinclude = sysconfig.get_path('platinclude')
|
|
include_paths = [[include]]
|
|
if platinclude != include:
|
|
include_paths.append(plat_include)
|
|
print(' '.join('-I' + path for path in include_paths))"
|
|
PYTHON_CPPFLAGS=`"$PYTHON" -c "$prog"`])
|
|
AC_SUBST(PYTHON_CPPFLAGS)
|
|
AC_MSG_CHECKING([for $PYTHON development headers])
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
|
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <Python.h>]])],
|
|
[AC_MSG_RESULT([yes])],
|
|
[AC_MSG_RESULT([no])
|
|
AC_MSG_ERROR(
|
|
[Could not compile test program with Python headers.
|
|
|
|
You may need to install your distribution's Python development package (e.g.,
|
|
python3-devel or python3-dev) or specify the location of the Python development
|
|
headers by setting the PYTHON_CPPFLAGS environment variable.])])
|
|
CPPFLAGS="$save_CPPFLAGS"])
|
|
|
|
PKG_PROG_PKG_CONFIG
|
|
AC_ARG_WITH([libkdumpfile],
|
|
[AS_HELP_STRING([--with-libkdumpfile],
|
|
[build with support for the makedumpfile kernel
|
|
core dump format using libkdumpfile
|
|
@<:@default=auto@:>@])],
|
|
[], [with_libkdumpfile=auto])
|
|
AS_CASE(["x$with_libkdumpfile"],
|
|
[xyes], [PKG_CHECK_MODULES(libkdumpfile, [libkdumpfile])],
|
|
[xauto], [PKG_CHECK_MODULES(libkdumpfile, [libkdumpfile],
|
|
[with_libkdumpfile=yes],
|
|
[with_libkdumpfile=no])])
|
|
AM_CONDITIONAL([WITH_LIBKDUMPFILE], [test "x$with_libkdumpfile" = xyes])
|
|
AM_COND_IF([WITH_LIBKDUMPFILE], [AC_DEFINE(WITH_LIBKDUMPFILE)])
|
|
|
|
AX_SUBDIRS_CONFIGURE([elfutils],
|
|
[[--enable-maintainer-mode],
|
|
[--disable-nls],
|
|
[--disable-programs],
|
|
[--disable-shared]],
|
|
[CFLAGS=-fPIC -Wno-error], [],
|
|
[--disable-static])
|
|
|
|
AC_CONFIG_FILES([Makefile include/Makefile])
|
|
AC_OUTPUT
|