configure.ac 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.68)
  4. AC_INIT([guile-gcc], 0.0, [guile-user@gnu.org])
  5. AC_CONFIG_AUX_DIR([build-aux])
  6. AM_INIT_AUTOMAKE([1.11 foreign silent-rules subdir-objects \
  7. color-tests parallel-tests])
  8. AC_CONFIG_SRCDIR([src/guile.c])
  9. AC_CONFIG_HEADER([config.h src/ggcc-config.h])
  10. AC_CONFIG_MACRO_DIR([m4])
  11. AC_USE_SYSTEM_EXTENSIONS
  12. AC_PROG_CC
  13. LT_INIT([disable-static])
  14. GGCC_GCC_PLUGIN_SUPPORT
  15. if test "x$ac_cv_have_gcc_plugins" != "xyes"; then
  16. AC_MSG_ERROR([GCC plug-in support is lacking])
  17. fi
  18. GGCC_GCC_VERSION
  19. gccplugindir="\${pkglibdir}/${GGCC_GCC_VERSION_MAJOR}.${GGCC_GCC_VERSION_MINOR}"
  20. AC_SUBST([gccplugindir])
  21. guilemoduledir="${datarootdir}/guile/site/2.0"
  22. AC_SUBST([guilemoduledir])
  23. # Force $prefix to be a valid directory.
  24. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  25. AC_DEFINE_UNQUOTED([GGCC_MODULE_DIRECTORY], ["`eval "echo $guilemoduledir"`"],
  26. [Directory where Guile-GCC's Scheme files are installed.])
  27. PKG_CHECK_MODULES([GUILE], [guile-2.0])
  28. AC_PATH_PROG([GUILE], [guile])
  29. AC_PATH_PROG([GUILE_SNARF], [guile-snarf])
  30. AC_CONFIG_FILES([Makefile
  31. tests/run-test])
  32. AC_CONFIG_COMMANDS([executable-script], [chmod +x tests/run-test])
  33. AC_OUTPUT