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

configure.ac 1.5 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. AC_PREREQ(2.52)
  2. # Process this file with autoconf to produce a configure script.
  3. AC_INIT([json-c], 0.11.99, [json-c@googlegroups.com])
  4. AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
  5. AC_PROG_MAKE_SET
  6. # Checks for programs.
  7. # Checks for libraries.
  8. # Checks for header files.
  9. AC_CONFIG_HEADER(config.h)
  10. AC_CONFIG_HEADER(json_config.h)
  11. AC_HEADER_STDC
  12. AC_CHECK_HEADERS(fcntl.h limits.h strings.h syslog.h unistd.h [sys/cdefs.h] [sys/param.h] stdarg.h locale.h)
  13. AC_CHECK_HEADER(inttypes.h,[AC_DEFINE([JSON_C_HAVE_INTTYPES_H],[1],[Public define for json_inttypes.h])])
  14. # Checks for typedefs, structures, and compiler characteristics.
  15. AC_C_CONST
  16. AC_TYPE_SIZE_T
  17. # Checks for library functions.
  18. AC_FUNC_VPRINTF
  19. AC_FUNC_MEMCMP
  20. AC_FUNC_MALLOC
  21. AC_FUNC_REALLOC
  22. AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)
  23. #check if .section.gnu.warning accepts long strings (for __warn_references)
  24. AC_LANG_PUSH([C])
  25. AC_MSG_CHECKING([if .gnu.warning accepts long strings])
  26. AC_LINK_IFELSE([[
  27. extern void json_object_get();
  28. __asm__(".section .gnu.json_object_get,\n\t.ascii \"Please link against libjson-c instead of libjson\"\n\t.text");
  29. int main(int c,char* v) {return 0;}
  30. ]], [
  31. AC_DEFINE(HAS_GNU_WARNING_LONG, 1, [Define if .gnu.warning accepts long strings.])
  32. AC_MSG_RESULT(yes)
  33. ], [
  34. AC_MSG_RESULT(no)
  35. ])
  36. AC_LANG_POP([C])
  37. AM_PROG_LIBTOOL
  38. AC_CONFIG_FILES([
  39. Makefile
  40. json-c.pc
  41. tests/Makefile
  42. json-c-uninstalled.pc
  43. ])
  44. AC_OUTPUT