geoip redirection for superforex.com.au
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.

41 lines
1.6KB

  1. PHP_ARG_WITH(maxminddb,
  2. [Whether to enable the MaxMind DB Reader extension],
  3. [ --with-maxminddb Enable MaxMind DB Reader extension support])
  4. PHP_ARG_ENABLE(maxminddb-debug, for MaxMind DB debug support,
  5. [ --enable-maxminddb-debug Enable enable MaxMind DB deubg support], no, no)
  6. if test $PHP_MAXMINDDB != "no"; then
  7. AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  8. AC_MSG_CHECKING(for libmaxminddb)
  9. if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libmaxminddb; then
  10. dnl retrieve build options from pkg-config
  11. if $PKG_CONFIG libmaxminddb --atleast-version 1.0.0; then
  12. LIBMAXMINDDB_INC=`$PKG_CONFIG libmaxminddb --cflags`
  13. LIBMAXMINDDB_LIB=`$PKG_CONFIG libmaxminddb --libs`
  14. LIBMAXMINDDB_VER=`$PKG_CONFIG libmaxminddb --modversion`
  15. AC_MSG_RESULT(found version $LIBMAXMINDDB_VER)
  16. else
  17. AC_MSG_ERROR(system libmaxminddb must be upgraded to version >= 1.0.0)
  18. fi
  19. PHP_EVAL_LIBLINE($LIBMAXMINDDB_LIB, MAXMINDDB_SHARED_LIBADD)
  20. PHP_EVAL_INCLINE($LIBMAXMINDDB_INC)
  21. else
  22. AC_MSG_RESULT(pkg-config information missing)
  23. AC_MSG_WARN(will use libmaxmxinddb from compiler default path)
  24. PHP_CHECK_LIBRARY(maxminddb, MMDB_open)
  25. PHP_ADD_LIBRARY(maxminddb, 1, MAXMINDDB_SHARED_LIBADD)
  26. fi
  27. if test $PHP_MAXMINDDB_DEBUG != "no"; then
  28. CFLAGS="$CFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror"
  29. fi
  30. PHP_SUBST(MAXMINDDB_SHARED_LIBADD)
  31. PHP_NEW_EXTENSION(maxminddb, maxminddb.c, $ext_shared)
  32. fi