0001-Add-disable-tests-to-configure.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 8287848f747bd37298a2d32b8fd06cc59eb28028 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Thu, 9 Feb 2017 21:40:43 +0100
  4. Subject: [PATCH] Add --disable-tests to configure
  5. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  6. ---
  7. Makefile.am | 6 +++++-
  8. configure.ac | 6 ++++++
  9. 2 files changed, 11 insertions(+), 1 deletion(-)
  10. diff --git a/Makefile.am b/Makefile.am
  11. index 1804945..cebcd31 100644
  12. --- a/Makefile.am
  13. +++ b/Makefile.am
  14. @@ -5,8 +5,12 @@ nodist_include_HEADERS = include/maxminddb_config.h
  15. SUBDIRS = \
  16. src \
  17. - bin \
  18. + bin
  19. +
  20. +if TESTS
  21. +SUBDIRS += \
  22. t
  23. +endif
  24. EXTRA_DIST = doc t Changes.md LICENSE NOTICE README.md projects/VS12 projects/VS12-tests
  25. dist-hook:
  26. diff --git a/configure.ac b/configure.ac
  27. index 7916212..2a22fab 100644
  28. --- a/configure.ac
  29. +++ b/configure.ac
  30. @@ -119,6 +119,12 @@ AC_ARG_ENABLE(
  31. esac],[debug=false])
  32. AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
  33. +AC_ARG_ENABLE([tests],
  34. + AS_HELP_STRING([--enable-tests], [Compilation of tests code]),
  35. + [enable_tests=${enableval}],
  36. + [enable_tests=yes])
  37. +AM_CONDITIONAL([TESTS], [test "${enable_tests}" = "yes"])
  38. +
  39. AC_CONFIG_FILES([Makefile
  40. src/Makefile
  41. bin/Makefile
  42. --
  43. 2.5.0