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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From b12ca226c111730e2ef5d8a3d929dbd943fbe763 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 | 10 ++++++++++
  9. 2 files changed, 15 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..fc53ffd 100644
  28. --- a/configure.ac
  29. +++ b/configure.ac
  30. @@ -119,6 +119,16 @@ AC_ARG_ENABLE(
  31. esac],[debug=false])
  32. AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
  33. +AC_ARG_ENABLE(
  34. + [tests],
  35. + [ --enable-tests Compilation of tests code],
  36. + [case "${enableval}" in
  37. + yes) tests=true ;;
  38. + no) tests=false ;;
  39. + *) AC_MSG_ERROR([bad value ${enableval} for --enable-tests]) ;;
  40. + esac],[tests=false])
  41. +AM_CONDITIONAL([TESTS], [test x$tests = xtrue])
  42. +
  43. AC_CONFIG_FILES([Makefile
  44. src/Makefile
  45. bin/Makefile
  46. --
  47. 2.5.0