configure.ac 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. dnl Process this file with autoconf to produce a configure script.
  2. # Copyright (C) 2000-2012, 2016, 2019 Free Software Foundation, Inc.
  3. # Copyright (C) 2020, 2021 Maxime Devos
  4. #
  5. # Author (GnuTLS): Nikos Mavrogiannopoulos, Simon Josefsson
  6. # Author (scheme-GNUnet): Maxime Devos
  7. #
  8. # This file is part of scheme-gnunet
  9. #
  10. # scheme-GNUnet is free software; you can redistribute it and/or modify it
  11. # under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; either version 3 of the License, or (at
  13. # your option) any later version.
  14. #
  15. # scheme-GNUnet is distributed in the hope that it will be useful, but
  16. # WITHOUT ANY WARRANTY; without even the implied warranty of
  17. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. # GNU General Public License for more details.
  19. #
  20. # You should have received a copy of the GNU General Public License
  21. # along with scheme-GNUnet. If not, see <http://www.gnu.org/licenses/>.
  22. # This file is partially based upon the Autoconf script of GnuTLS.
  23. # Not all scheme-GNUnet code is licensed as GPL, some is licensed as AGPL.
  24. AC_PREREQ([2.61])
  25. AC_INIT([scheme-gnunet], [0], [])
  26. AC_CONFIG_AUX_DIR([build-aux])
  27. AC_CONFIG_MACRO_DIRS([m4])
  28. AM_INIT_AUTOMAKE([foreign subdir-objects])
  29. AC_MSG_RESULT([***
  30. *** Checking for compilation programs...
  31. ])
  32. dnl Checks for programs.
  33. #PKG_PROG_PKG_CONFIG
  34. dnl GNU Guile support
  35. AC_MSG_CHECKING([whether building the Scheme implementation])
  36. AC_ARG_ENABLE(guile,
  37. AS_HELP_STRING([--enable-guile], [build GNU Guile implementation]),
  38. [opt_guile_impl=$enableval], [opt_guile_impl=yes])
  39. AC_MSG_RESULT($opt_guile_bindings)
  40. AC_ARG_WITH([guile-site-dir], AS_HELP_STRING([--with-guile-site-dir=DIR],
  41. [guile site directory for scheme-gnunet, default is guile system settings]),
  42. [guilesitedir="${withval}"], [guilesitedir='$(GUILE_SITE)'])
  43. AC_ARG_WITH([guile-site-ccache-dir], AS_HELP_STRING([--with-guile-site-ccache-dir=DIR],
  44. [guile ccache directory for scheme-gnunet, default is guile system settings]),
  45. [guilesiteccachedir="${withval}"], [guilesiteccachedir='$(GUILE_SITE_CCACHE)'])
  46. AC_SUBST([guilesitedir])
  47. AC_SUBST([guilesiteccachedir])
  48. if test "$opt_guile_impl" = "yes"; then
  49. AC_MSG_RESULT([***
  50. *** Detecting GNU Guile...
  51. ])
  52. dnl Check for 'guild', which can be used to compile Scheme code
  53. dnl on Guile 2.x and 3.x.
  54. AC_PATH_PROG([GUILD], [guild])
  55. AC_SUBST([GUILD])
  56. dnl TODO check if 2.x works
  57. GUILE_PKG([3.0 2.2 2.0])
  58. GUILE_PROGS
  59. GUILE_SITE_DIR
  60. GUILE_FLAGS
  61. fi
  62. AM_CONDITIONAL([HAVE_GUILE], [test "$opt_guile_bindings" = "yes"])
  63. AM_CONDITIONAL([HAVE_GUILD], [test "x$GUILD" != "x"])
  64. AC_OUTPUT([Makefile])