0001-Add-disable-binaries.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 501f85fa729d08b90f0e1ff6f9378a0864f722a7 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Fri, 2 Feb 2018 13:19:18 +0100
  4. Subject: [PATCH] Add --disable-binaries
  5. mmdblookup now depends on pthread.h which can be disabled on some
  6. toolchains so add an option to be able to compile libmaxminddb without
  7. this binary
  8. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  9. ---
  10. Makefile.am | 6 +++++-
  11. configure.ac | 6 ++++++
  12. 2 files changed, 11 insertions(+), 1 deletion(-)
  13. diff --git a/Makefile.am b/Makefile.am
  14. index cebcd31..cfbfd77 100644
  15. --- a/Makefile.am
  16. +++ b/Makefile.am
  17. @@ -4,8 +4,12 @@ include_HEADERS = include/maxminddb.h
  18. nodist_include_HEADERS = include/maxminddb_config.h
  19. SUBDIRS = \
  20. - src \
  21. + src
  22. +
  23. +if BINARIES
  24. +SUBDIRS += \
  25. bin
  26. +endif
  27. if TESTS
  28. SUBDIRS += \
  29. diff --git a/configure.ac b/configure.ac
  30. index c494746..4d1beb4 100644
  31. --- a/configure.ac
  32. +++ b/configure.ac
  33. @@ -119,6 +119,12 @@ AC_ARG_ENABLE(
  34. esac],[debug=false])
  35. AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
  36. +AC_ARG_ENABLE([binaries],
  37. + AS_HELP_STRING([--enable-binaries], [Compilation of binaries code]),
  38. + [enable_binaries=${enableval}],
  39. + [enable_binaries=yes])
  40. +AM_CONDITIONAL([BINARIES], [test "${enable_binaries}" = "yes"])
  41. +
  42. AC_ARG_ENABLE([tests],
  43. AS_HELP_STRING([--enable-tests], [Compilation of tests code]),
  44. [enable_tests=${enableval}],
  45. --
  46. 2.7.4