configure.ac 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. AC_PREREQ([2.69])
  2. AC_INIT([Guile-zlib], [0.1.0], [guile-user@gnu.org], [guile-zlib],
  3. [https://notabug.org/guile-zlib/guile-zlib])
  4. AC_SUBST(HVERSION, "\"0.1\"")
  5. AC_SUBST(AUTHOR, "\"Mathieu Othacehe\"")
  6. AC_SUBST(COPYRIGHT, "'(2020)")
  7. AC_SUBST(LICENSE, gpl3+)
  8. AC_CONFIG_SRCDIR(zlib.scm)
  9. AC_CONFIG_AUX_DIR([build-aux])
  10. AM_INIT_AUTOMAKE([1.12 gnu silent-rules subdir-objects color-tests parallel-tests -Woverride -Wno-portability])
  11. AM_SILENT_RULES([yes])
  12. AC_CONFIG_FILES([Makefile zlib/config.scm])
  13. AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
  14. dnl Search for 'guile' and 'guild'. This macro defines
  15. dnl 'GUILE_EFFECTIVE_VERSION'.
  16. GUILE_PKG([3.0 2.2 2.0])
  17. GUILE_PROGS
  18. GUILE_SITE_DIR
  19. if test "x$GUILD" = "x"; then
  20. AC_MSG_ERROR(['guild' binary not found; please check your GNU Guile installation.])
  21. fi
  22. if test "$cross_compiling" != no; then
  23. GUILE_TARGET="--target=$host_alias"
  24. AC_SUBST([GUILE_TARGET])
  25. fi
  26. PKG_CHECK_MODULES([LIBZ], [zlib])
  27. AC_MSG_CHECKING([libz library directory])
  28. PKG_CHECK_VAR([LIBZ_LIBDIR], [zlib], [libdir])
  29. AC_MSG_RESULT([$LIBZ_LIBDIR])
  30. AS_IF([test "x$LIBZ_LIBDIR" = "x"], [
  31. AC_MSG_FAILURE([Unable to identify libz lib path.])
  32. ])
  33. AC_SUBST([LIBZ_LIBDIR])
  34. dnl Installation directories for .scm and .go files.
  35. guilemoduledir="${datarootdir}/guile/site/$GUILE_EFFECTIVE_VERSION"
  36. guileobjectdir="${libdir}/guile/$GUILE_EFFECTIVE_VERSION/site-ccache"
  37. AC_SUBST([guilemoduledir])
  38. AC_SUBST([guileobjectdir])
  39. AC_OUTPUT