From: Andrea Corallo Date: Thu, 24 Oct 2019 12:36:28 +0000 (+0200) Subject: fix compilation when modules are enabled X-Git-Tag: emacs-28.0.90~2727^2~1062 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1d3c0d1716eb2025c1dd2e07195b55bb5781fdd3;p=emacs.git fix compilation when modules are enabled --- diff --git a/configure.ac b/configure.ac index 0cfd80bb2e8..c86dac6a65b 100644 --- a/configure.ac +++ b/configure.ac @@ -3671,23 +3671,6 @@ if test "${HAVE_ZLIB}" = "yes"; then fi AC_SUBST(LIBZ) -### Emacs Lisp native compiler support -HAVE_NATIVE_COMP=no -LIBGCCJIT_LIB= -COMP_OBJ= -if test "${with_nativecomp}" != "no"; then - AC_CHECK_LIB(gccjit, gcc_jit_context_acquire, HAVE_NATIVE_COMP=yes, , -lgccjit) - if test "${HAVE_NATIVE_COMP}" = "yes"; then - LIBGCCJIT_LIB="-lgccjit -ldl" - COMP_OBJ="dynlib.o 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]) - fi -fi -AC_SUBST(LIBGCCJIT_LIB) -AC_SUBST(COMP_OBJ) - ### Dynamic modules support LIBMODULES= HAVE_MODULES=no @@ -3754,6 +3737,28 @@ module_env_snippet_28="$srcdir/src/module-env-28.h" emacs_major_version="${PACKAGE_VERSION%%.*}" AC_SUBST(emacs_major_version) +### Emacs Lisp native compiler support +HAVE_NATIVE_COMP=no +LIBGCCJIT_LIB= +COMP_OBJ= +if test "${with_nativecomp}" != "no"; then + 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 + 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]) + fi +fi +AC_SUBST(LIBGCCJIT_LIB) +AC_SUBST(COMP_OBJ) + + ### Use -lpng if available, unless '--with-png=no'. HAVE_PNG=no LIBPNG=