configure.ac 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. AC_PREREQ(2.62)
  2. AC_INIT(jose, 10)
  3. AC_CANONICAL_SYSTEM
  4. AC_PROG_CC_C99
  5. AM_INIT_AUTOMAKE([subdir-objects foreign no-dist-gzip dist-bzip2 parallel-tests])
  6. AM_SILENT_RULES([yes])
  7. AM_PROG_CC_C_O
  8. LT_INIT([disable-static])
  9. PKG_PROG_PKG_CONFIG([0.25])
  10. PKG_CHECK_MODULES([zlib], [zlib])
  11. PKG_CHECK_MODULES([jansson], [jansson >= 2.10])
  12. PKG_CHECK_MODULES([libcrypto], [libcrypto >= 1.0.2])
  13. AC_OPENMP
  14. AC_SUBST([OPENMP_CFLAGS])
  15. JOSE_CFLAGS="\
  16. -Wall \
  17. -Wextra \
  18. -Werror \
  19. -Wstrict-aliasing \
  20. -Wchar-subscripts \
  21. -Wformat-security \
  22. -Wmissing-declarations \
  23. -Wmissing-prototypes \
  24. -Wnested-externs \
  25. -Wpointer-arith \
  26. -Wshadow \
  27. -Wsign-compare \
  28. -Wstrict-prototypes \
  29. -Wtype-limits \
  30. -Wunused-function \
  31. -Wno-missing-field-initializers \
  32. -Wno-unused-command-line-argument \
  33. -Wno-unused-parameter \
  34. -Wno-unknown-pragmas \
  35. "
  36. AC_SUBST([JOSE_CFLAGS])
  37. AC_MSG_CHECKING([for linker script support])
  38. LDVS=`$LD --help < /dev/null 2>/dev/null | grep version-script`
  39. if test "$LDVS"; then
  40. have_ld_version_script=yes
  41. AC_MSG_RESULT(yes)
  42. else
  43. have_ld_version_script=no
  44. AC_MSG_RESULT(no)
  45. fi
  46. AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
  47. AC_CONFIG_FILES([
  48. jose/Makefile
  49. lib/Makefile
  50. cmd/Makefile
  51. tests/Makefile
  52. doc/Makefile
  53. Makefile
  54. jose/jose.h
  55. jose.pc
  56. ])
  57. AC_OUTPUT