configure.ac 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. AC_PREREQ([2.60])
  2. AC_INIT([jansson], [2.5], [petri@digip.org])
  3. AC_CONFIG_MACRO_DIR([m4])
  4. AM_INIT_AUTOMAKE([1.10 foreign])
  5. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  6. AC_CONFIG_SRCDIR([src/value.c])
  7. AC_CONFIG_HEADERS([config.h])
  8. # Checks for programs.
  9. AC_PROG_CC
  10. AC_PROG_LIBTOOL
  11. AM_CONDITIONAL([GCC], [test x$GCC = xyes])
  12. # Checks for libraries.
  13. # Checks for header files.
  14. AC_CHECK_HEADERS([locale.h])
  15. # Checks for typedefs, structures, and compiler characteristics.
  16. AC_TYPE_INT32_T
  17. AC_TYPE_LONG_LONG_INT
  18. AC_C_INLINE
  19. case $ac_cv_c_inline in
  20. yes) json_inline=inline;;
  21. no) json_inline=;;
  22. *) json_inline=$ac_cv_c_inline;;
  23. esac
  24. AC_SUBST([json_inline])
  25. # Checks for library functions.
  26. AC_CHECK_FUNCS([strtoll localeconv])
  27. case "$ac_cv_type_long_long_int$ac_cv_func_strtoll" in
  28. yesyes) json_have_long_long=1;;
  29. *) json_have_long_long=0;;
  30. esac
  31. AC_SUBST([json_have_long_long])
  32. case "$ac_cv_header_locale_h$ac_cv_func_localeconv" in
  33. yesyes) json_have_localeconv=1;;
  34. *) json_have_localeconv=0;;
  35. esac
  36. AC_SUBST([json_have_localeconv])
  37. AC_CONFIG_FILES([
  38. jansson.pc
  39. Makefile
  40. src/Makefile
  41. src/jansson_config.h
  42. ])
  43. AC_OUTPUT