Skip to content

Commit

Permalink
Fixed include
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Oct 19, 2023
1 parent 36226f8 commit 9312ad0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion make/autoconf/lib-hsdis.m4
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS],
binutils_system_error=""
HSDIS_LDFLAGS=""
HSDIS_LIBS=""
disasm_header="<dis-asm.h>"
if test "x$BINUTILS_INSTALL_DIR" = xsystem; then
AC_CHECK_LIB(bfd, bfd_openr, [ HSDIS_LIBS="-lbfd" ], [ binutils_system_error="libbfd not found" ])
AC_CHECK_LIB(opcodes, disassembler, [ HSDIS_LIBS="$HSDIS_LIBS -lopcodes" ], [ binutils_system_error="libopcodes not found" ])
Expand All @@ -250,6 +252,7 @@ AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS],
AC_CHECK_LIB(sframe, frame, [ HSDIS_LIBS="$HSDIS_LIBS -lsframe" ], )
HSDIS_CFLAGS="-DLIBARCH_$OPENJDK_TARGET_CPU_LEGACY_LIB"
elif test "x$BINUTILS_INSTALL_DIR" != x; then
disasm_header="\"$BINUTILS_INSTALL_DIR/include/dis-asm.h\""
if test -e $BINUTILS_INSTALL_DIR/lib/libbfd.a && \
test -e $BINUTILS_INSTALL_DIR/lib/libopcodes.a && \
test -e $BINUTILS_INSTALL_DIR/lib/libiberty.a; then
Expand All @@ -266,7 +269,7 @@ AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS],
fi
AC_MSG_CHECKING([Checking binutils API])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include "$BINUTILS_INSTALL_DIR/include/dis-asm.h"],[[void foo() {init_disassemble_info(0, 0, 0, 0);}]])],
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include $disasm_header],[[void foo() {init_disassemble_info(0, 0, 0, 0);}]])],
[
AC_MSG_RESULT([New API])
HSDIS_CFLAGS="$HSDIS_CFLAGS -DBINUTILS_NEW_API"
Expand Down

0 comments on commit 9312ad0

Please sign in to comment.