]> git.eshelyaron.com Git - emacs.git/commitdiff
check for libgccjit lib to be reachable in configure.ac
authorAndrea Corallo <akrl@sdf.org>
Tue, 31 Dec 2019 02:10:13 +0000 (03:10 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:19 +0000 (11:38 +0100)
configure.ac

index 2afa9572544cacc0c2b2d921a7fc19d10c5ac42b..8c8b57c10796eea640d4bfd161609f7a42576c88 100644 (file)
@@ -3742,14 +3742,11 @@ HAVE_NATIVE_COMP=no
 LIBGCCJIT_LIB=
 COMP_OBJ=
 if test "${with_nativecomp}" != "no"; then
-  AC_CHECK_HEADER([libgccjit.h], [HAVE_NATIVE_COMP=yes])
+  AC_CHECK_HEADER(libgccjit.h,
+    AC_CHECK_LIB(gccjit, gcc_jit_context_acquire, HAVE_NATIVE_COMP=yes, , -lgccjit))
   if test "${HAVE_NATIVE_COMP}" = "yes"; then
     LIBGCCJIT_LIB="-lgccjit -ldl"
-    if test "${HAVE_MODULES}" = yes; then
-      COMP_OBJ="comp.o"
-    else
-      COMP_OBJ="dynlib.o comp.o"
-    fi
+    COMP_OBJ+=comp.o
     AC_DEFINE(HAVE_NATIVE_COMP, 1, [Define to 1 if you have the libgccjit library (-lgccjit).])
     AC_DEFINE_UNQUOTED(NATIVE_ELISP_SUFFIX, ".eln",
      [System extension for native compiled elisp])