X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flightning%2Fconfigure.ac;h=39d22091367dc563427f779caebd2392dd41c75c;hb=24d91c0d04f99eed9a89e8d180a067e13ce8a0b2;hp=1f2c6b4a73d102b1cb8b70b66007ababb8a49ca5;hpb=519a9ea123f92f3b02c059a32e4e9fd1170c8cbb;p=pcsx_rearmed.git diff --git a/deps/lightning/configure.ac b/deps/lightning/configure.ac index 1f2c6b4a..39d22091 100644 --- a/deps/lightning/configure.ac +++ b/deps/lightning/configure.ac @@ -14,8 +14,8 @@ dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public dnl License for more details. dnl -AC_PREREQ(2.64) -AC_INIT([GNU lightning], 2.1.3, pcpa@gnu.org, lightning) +AC_PREREQ([2.71]) +AC_INIT([GNU lightning],[2.1.3],[pcpa@gnu.org],[lightning]) AC_CONFIG_AUX_DIR([build-aux]) AC_CANONICAL_TARGET AC_CONFIG_SRCDIR([Makefile.am]) @@ -63,7 +63,7 @@ case "$target_cpu" in *) ;; esac -AC_CHECK_FUNCS(mremap ffsl getopt_long_only isnan isinf,,) +AC_CHECK_FUNCS(mmap mremap ffsl getopt_long_only isnan isinf,,) AC_CHECK_HEADERS([getopt.h stdint.h],,,) @@ -72,7 +72,7 @@ AC_ARG_ENABLE(disassembler, [Enable jit disassembler using binutils]), [DISASSEMBLER=$enableval], [DISASSEMBLER=auto]) if test "x$DISASSEMBLER" != "xno"; then - # FIXME need to check for libiberty first or will fail to link + AC_CHECK_LIB(iberty, htab_try_create, , [HAVE_IBERTY="no"]) AC_CHECK_LIB(bfd, bfd_init, , @@ -81,26 +81,50 @@ if test "x$DISASSEMBLER" != "xno"; then [HAVE_Z="no"]) AC_CHECK_LIB(opcodes, init_disassemble_info, , [HAVE_OPCODES="no"]) - if test "x$HAVE_IBERTY" = "xno" -o \ - "x$HAVE_BFD" = "xno" -o \ - "x$HAVE_Z" = "xno" -o \ - "x$HAVE_OPCODES" = "xno"; then - if test "x$DISASSEMBLER" != "xauto"; then - AC_MSG_ERROR([binutils not found, see http://www.gnu.org/software/binutils/]) - else - AC_MSG_WARN([binutils not found, see http://www.gnu.org/software/binutils/]) - DISASSEMBLER="no" - fi + + if test "x$HAVE_IBERTY" = "xno"; then + if test "x$DISASSEMBLER" = "xyes"; then + AC_MSG_ERROR([libiberty not found]) + else + AC_MSG_WARN([libiberty not found]) + DISASSEMBLER="no" + fi + fi + + if test "x$HAVE_BFD" = "xno"; then + if test "x$DISASSEMBLER" = "xyes"; then + AC_MSG_ERROR([binutils BFD not found, see http://www.gnu.org/software/binutils/]) + else + AC_MSG_WARN([binutils BFD not found, see http://www.gnu.org/software/binutils/]) + DISASSEMBLER="no" + fi + fi + + if test "x$HAVE_Z" = "xno"; then + if test "x$DISASSEMBLER" = "xyes"; then + AC_MSG_ERROR([zlib not found, see https://zlib.net/]) + else + AC_MSG_WARN([zlib not found, see https://zlib.net/]) + DISASSEMBLER="no" + fi + fi + + if test "x$HAVE_OPCODES" = "xno"; then + if test "x$DISASSEMBLER" = "xyes"; then + AC_MSG_ERROR([binutils opcodes not found, see https://www.gnu.org/software/binutils/]) + else + AC_MSG_WARN([binutils opcodes not found, see https://www.gnu.org/software/binutils/]) + DISASSEMBLER="no" + fi fi + fi 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 - #include #include int main(int argc, char *argv[]) { @@ -110,10 +134,22 @@ if test "x$DISASSEMBLER" != "xno"; then return 0; } )], [ac_cv_test_new_disassembler=no],,) + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + #include + 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, @@ -165,19 +201,21 @@ case "$target_cpu" in s390*) cpu=s390 ;; alpha*) cpu=alpha ;; riscv*) cpu=riscv ;; + loongarch*) cpu=loongarch ;; *) ;; esac -AM_CONDITIONAL(cpu_arm, [test cpu-$cpu = cpu-arm]) -AM_CONDITIONAL(cpu_mips, [test cpu-$cpu = cpu-mips]) -AM_CONDITIONAL(cpu_ppc, [test cpu-$cpu = cpu-ppc]) -AM_CONDITIONAL(cpu_sparc, [test cpu-$cpu = cpu-sparc]) -AM_CONDITIONAL(cpu_x86, [test cpu-$cpu = cpu-x86]) -AM_CONDITIONAL(cpu_ia64, [test cpu-$cpu = cpu-ia64]) -AM_CONDITIONAL(cpu_hppa, [test cpu-$cpu = cpu-hppa]) -AM_CONDITIONAL(cpu_aarch64, [test cpu-$cpu = cpu-aarch64]) -AM_CONDITIONAL(cpu_s390, [test cpu-$cpu = cpu-s390]) -AM_CONDITIONAL(cpu_alpha, [test cpu-$cpu = cpu-alpha]) -AM_CONDITIONAL(cpu_riscv, [test cpu-$cpu = cpu-riscv]) +AM_CONDITIONAL(cpu_arm, [test cpu-$cpu = cpu-arm]) +AM_CONDITIONAL(cpu_mips, [test cpu-$cpu = cpu-mips]) +AM_CONDITIONAL(cpu_ppc, [test cpu-$cpu = cpu-ppc]) +AM_CONDITIONAL(cpu_sparc, [test cpu-$cpu = cpu-sparc]) +AM_CONDITIONAL(cpu_x86, [test cpu-$cpu = cpu-x86]) +AM_CONDITIONAL(cpu_ia64, [test cpu-$cpu = cpu-ia64]) +AM_CONDITIONAL(cpu_hppa, [test cpu-$cpu = cpu-hppa]) +AM_CONDITIONAL(cpu_aarch64, [test cpu-$cpu = cpu-aarch64]) +AM_CONDITIONAL(cpu_s390, [test cpu-$cpu = cpu-s390]) +AM_CONDITIONAL(cpu_alpha, [test cpu-$cpu = cpu-alpha]) +AM_CONDITIONAL(cpu_riscv, [test cpu-$cpu = cpu-riscv]) +AM_CONDITIONAL(cpu_loongarch, [test cpu-$cpu = cpu-loongarch]) # Test x87 if both, x87 and sse2 available ac_cv_test_x86_x87= @@ -187,12 +225,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 int main(void) { int ac, flags; unsigned int eax, ebx, ecx, edx; @@ -292,7 +329,7 @@ if test $ac_cv_header_stdint_h = yes; then AC_SUBST(MAYBE_INCLUDE_STDINT_H, ["#include "]) fi -AC_OUTPUT([Makefile +AC_CONFIG_FILES([Makefile lightning.pc gnulib-lib/Makefile doc/Makefile @@ -301,3 +338,4 @@ AC_OUTPUT([Makefile include/lightning.h lib/Makefile check/Makefile]) +AC_OUTPUT