You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

  1. From fd2a12d6362aad2013ba558537647e46419d7595 Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Fri, 10 Jul 2020 21:20:52 -0700
  4. Subject: [PATCH] [meson] add missing libmaxminddb section
  5. Fixes the following error when building with -Dwith_maxminddb=true:
  6. meson.build:916:1: ERROR: Unknown variable "libmaxminddb".
  7. A full log can be found at meson-logs/meson-log.txt
  8. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  9. ---
  10. src/meson.build | 8 ++++++++
  11. 1 file changed, 8 insertions(+)
  12. diff --git a/src/meson.build b/src/meson.build
  13. index d39cf1c0..2191c9bc 100644
  14. --- a/src/meson.build
  15. +++ b/src/meson.build
  16. @@ -255,6 +255,14 @@ if get_option('with_fam')
  17. conf_data.set('HAVE_FAM_H', true)
  18. endif
  19. +libmaxminddb = []
  20. +if get_option('with_maxminddb')
  21. + libmaxminddb = [ compiler.find_library('maxminddb') ]
  22. + if not(compiler.has_function('MMDB_open', args: defs, dependencies: libmaxminddb, prefix: '#include <maxminddb.h>'))
  23. + error('Couldn\'t find maxminddb.h or MMDB_open in lib maxminddb')
  24. + endif
  25. +endif
  26. +
  27. libgeoip = []
  28. if get_option('with_geoip')
  29. libgeoip = dependency('geoip', required: false)