git subrepo pull --force deps/lightning
[pcsx_rearmed.git] / deps / lightning / configure.ac
index 5b582d2..63bbadb 100644 (file)
@@ -123,10 +123,8 @@ AM_CONDITIONAL(with_disassembler, [test "x$DISASSEMBLER" != "xno"])
 if test "x$DISASSEMBLER" != "xno"; then
     LIGHTNING_CFLAGS="$LIGHTNING_CFLAGS -DDISASSEMBLER=1"
     save_CFLAGS=$CFLAGS
-    CFLAGS="$CFLAGS -I$PWD/include -D_GNU_SOURCE"
+    CFLAGS="$CFLAGS -D_GNU_SOURCE"
     AC_COMPILE_IFELSE([AC_LANG_SOURCE(
-       #include <lightning.h>
-       #include <lightning/jit_private.h>
        #include <dis-asm.h>
        int main(int argc, char *argv[])
        {
@@ -136,10 +134,22 @@ if test "x$DISASSEMBLER" != "xno"; then
                return 0;
        }
     )], [ac_cv_test_new_disassembler=no],,)
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+       #include <dis-asm.h>
+       int main(int argc, char *argv[])
+       {
+               struct disassemble_info dinfo;
+               INIT_DISASSEMBLE_INFO(dinfo, NULL, NULL, NULL);
+               return 0;
+       }
+    )], [ac_cv_test_new_disassemble_info=yes],[ac_cv_test_new_disassemble_info=no],)
     CFLAGS="$save_CFLAGS"
     if test "x$ac_cv_test_new_disassembler" != "xno"; then
        LIGHTNING_CFLAGS="$LIGHTNING_CFLAGS -DBINUTILS_2_29=1"
     fi
+    if test "x$ac_cv_test_new_disassemble_info" != "xno"; then
+       LIGHTNING_CFLAGS="$LIGHTNING_CFLAGS -DBINUTILS_2_38=1"
+    fi
 fi
 
 AC_ARG_ENABLE(devel-disassembler,
@@ -213,12 +223,11 @@ ac_cv_test_arm_arm=
 ac_cv_test_arm_swf=
 
 save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS -I$PWD/include -D_GNU_SOURCE"
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
 if test x$cpu = x; then
     AC_MSG_ERROR([cpu $target_cpu not supported])
 elif test $cpu = x86; then
     AC_RUN_IFELSE([AC_LANG_SOURCE([[
-    #include <lightning.h>
     int main(void) {
        int                 ac, flags;
        unsigned int        eax, ebx, ecx, edx;