您最多选择25个标签 标签必须以中文、字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

configure.in 1.8 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. AC_ARG_ENABLE(oldname-compat,
  7. AS_HELP_STRING([--disable-oldname-compat],
  8. [Don't include the old libjson.so library and include/json directory.]),
  9. [],
  10. [enable_oldname_compat=yes]
  11. )
  12. AM_CONDITIONAL(ENABLE_OLDNAME_COMPAT, [test "x${enable_oldname_compat}" != "xno"])
  13. # Checks for programs.
  14. # Checks for libraries.
  15. # Checks for header files.
  16. AM_PROG_CC_C_O
  17. AC_CONFIG_HEADER(config.h)
  18. AC_CONFIG_HEADER(json_config.h)
  19. AC_HEADER_STDC
  20. AC_CHECK_HEADERS(fcntl.h limits.h strings.h syslog.h unistd.h [sys/cdefs.h] [sys/param.h] stdarg.h locale.h)
  21. AC_CHECK_HEADER(inttypes.h,[AC_DEFINE([JSON_C_HAVE_INTTYPES_H],[1],[Public define for json_inttypes.h])])
  22. # Checks for typedefs, structures, and compiler characteristics.
  23. AC_C_CONST
  24. AC_TYPE_SIZE_T
  25. # Checks for library functions.
  26. AC_FUNC_VPRINTF
  27. AC_FUNC_MEMCMP
  28. AC_FUNC_MALLOC
  29. AC_FUNC_REALLOC
  30. AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)
  31. #check if .section.gnu.warning accepts long strings (for __warn_references)
  32. AC_LANG_PUSH([C])
  33. AC_MSG_CHECKING([if .gnu.warning accepts long strings])
  34. AC_LINK_IFELSE([[
  35. extern void json_object_get();
  36. __asm__(".section .gnu.json_object_get,\n\t.ascii \"Please link against libjson-c instead of libjson\"\n\t.text");
  37. int main(int c,char* v) {return 0;}
  38. ]], [
  39. AC_DEFINE(HAS_GNU_WARNING_LONG, 1, [Define if .gnu.warning accepts long strings.])
  40. AC_MSG_RESULT(yes)
  41. ], [
  42. AC_MSG_RESULT(no)
  43. ])
  44. AC_LANG_POP([C])
  45. AM_PROG_LIBTOOL
  46. AC_CONFIG_FILES([
  47. Makefile
  48. json.pc
  49. json-c.pc
  50. tests/Makefile
  51. json-c-uninstalled.pc
  52. ])
  53. AC_OUTPUT