3.5.8-use-system-libs.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. diff --git a/Makefile b/Makefile
  2. index d4ce8ac..26271fd 100644
  3. --- a/Makefile
  4. +++ b/Makefile
  5. @@ -54,12 +54,16 @@ ifeq ($(USE_ASM),1)
  6. $(MAKE) -C $(ASMALLOC) jem SRCDIR=src
  7. endif
  8. ifeq ($(USE_JEM),1)
  9. +ifeq ($(USE_SYSTEM_JEM),0)
  10. $(MAKE) -C $(JEMALLOC)
  11. endif
  12. +endif
  13. ifeq ($(USE_LUAJIT),1)
  14. $(MAKE) -C $(LUAJIT) Q= TARGET_SONAME=libluajit.so CCDEBUG=-g
  15. endif
  16. +ifeq ($(USE_SYSTEM_JANSSON),0)
  17. $(MAKE) -C $(JANSSON)
  18. +endif
  19. $(MAKE) -C $(COMMON) CF=$(CF) EXT_CFLAGS="$(EXT_CFLAGS)"
  20. $(MAKE) -C $(CF)
  21. $(MAKE) -C $(MOD_LUA) CF=$(CF) COMMON=$(COMMON) LUA_CORE=$(LUA_CORE) EXT_CFLAGS="$(EXT_CFLAGS)" USE_LUAJIT=$(USE_LUAJIT) LUAJIT=$(LUAJIT)
  22. @@ -174,16 +178,24 @@ mexp2: mexp1
  23. $(MAKE) MEXP_PHASE=2 SRCDIR=$(realpath $(MEXP_DIR))/
  24. $(JANSSON)/configure:
  25. +ifeq ($(USE_SYSTEM_JANSSON),0)
  26. cd $(JANSSON) && autoreconf -i
  27. +endif
  28. $(JANSSON)/Makefile: $(JANSSON)/configure
  29. +ifeq ($(USE_SYSTEM_JANSSON),0)
  30. cd $(JANSSON) && ./configure $(JANSSON_CONFIG_OPT)
  31. +endif
  32. $(JEMALLOC)/configure:
  33. +ifeq ($(USE_SYSTEM_JEM),0)
  34. cd $(JEMALLOC) && autoconf
  35. +endif
  36. $(JEMALLOC)/Makefile: $(JEMALLOC)/configure
  37. +ifeq ($(USE_SYSTEM_JEM),0)
  38. cd $(JEMALLOC) && ./configure $(JEM_CONFIG_OPT)
  39. +endif
  40. $(LUAJIT)/src/luaconf.h: $(LUAJIT)/src/luaconf.h.orig
  41. ln -s $(notdir $<) $@
  42. diff --git a/make_in/Makefile.vars b/make_in/Makefile.vars
  43. index efe3226..0b54701 100644
  44. --- a/make_in/Makefile.vars
  45. +++ b/make_in/Makefile.vars
  46. @@ -31,6 +31,12 @@ ifeq ($(USE_ASM),1)
  47. EXT_CFLAGS += -DUSE_ASM
  48. endif
  49. +# Use the system provided JEMalloc memory allocator? [By default, no.]
  50. +USE_SYSTEM_JEM = 0
  51. +
  52. +# Use the system provided Jansson JSON API Library? [By default, no.]
  53. +USE_SYSTEM_JANSSON = 0
  54. +
  55. # Use the JEMalloc memory allocator? [By default, yes.]
  56. USE_JEM = 1