configure.ac 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. define(GUILE_XOSD_CONFIGURE_COPYRIGHT, [[
  2. Copyright (C) 2016, 2021 Alex Kost <alezost@gmail.com>
  3. This file is part of Guile-XOSD.
  4. Guile-XOSD is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. Guile-XOSD is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with Guile-XOSD. If not, see <http://www.gnu.org/licenses/>.
  14. ]])
  15. AC_INIT([Guile-XOSD], [0.2.2], [alezost@gmail.com], [guile-xosd],
  16. [https://github.com/alezost/guile-xosd])
  17. AC_COPYRIGHT(GUILE_XOSD_CONFIGURE_COPYRIGHT)
  18. AC_CONFIG_AUX_DIR([build-aux])
  19. AM_INIT_AUTOMAKE([foreign subdir-objects])
  20. AC_PROG_CC
  21. AC_PROG_LIBTOOL
  22. LIBRARY_NAME="libguile-xosd"
  23. AC_SUBST([LIBRARY_NAME])
  24. dnl ----------------------------------------------------------------
  25. dnl Checking for Guile
  26. GUILE_PKG([3.0 2.2 2.0])
  27. GUILE_PROGS([2.0.2])
  28. AC_ARG_WITH([guile-site-dir],
  29. [AS_HELP_STRING([--with-guile-site-dir],
  30. [installation directory for Guile (*.scm) files])],
  31. [guilemoduledir="$withval"],
  32. [guilemoduledir="$datarootdir/guile/site/$GUILE_EFFECTIVE_VERSION"])
  33. AC_SUBST([guilemoduledir])
  34. AC_MSG_CHECKING([for the Guile module directory])
  35. AC_MSG_RESULT([$guilemoduledir])
  36. AC_ARG_WITH([guile-site-ccache-dir],
  37. [AS_HELP_STRING([--with-guile-site-ccache-dir],
  38. [installation directory for Guile compiled (*.go) files])],
  39. [guileccachedir="$withval"],
  40. [guileccachedir="$libdir/guile/$GUILE_EFFECTIVE_VERSION/site-ccache"])
  41. AC_SUBST([guileccachedir])
  42. AC_MSG_CHECKING([for the Guile ccache directory])
  43. AC_MSG_RESULT([$guileccachedir])
  44. dnl ----------------------------------------------------------------
  45. dnl Checking for libxosd. Unfortunately, libxosd does not provide
  46. dnl pkgconfig file, but it has 'xosd-config' script that can be used to
  47. dnl define cflags and libs.
  48. dnl PKG_CHECK_MODULES([LIBXOSD], [libxosd >= 2.2])
  49. AC_PATH_PROG([XOSD_CONFIG], [xosd-config])
  50. if test "x$XOSD_CONFIG" = "x"; then
  51. AC_MSG_ERROR(['xosd-config' script not found; please install libxosd.])
  52. else
  53. LIBXOSD_CFLAGS="`$XOSD_CONFIG --cflags`"
  54. LIBXOSD_LIBS="`$XOSD_CONFIG --libs`"
  55. AC_SUBST([LIBXOSD_CFLAGS])
  56. AC_SUBST([LIBXOSD_LIBS])
  57. fi
  58. AC_CONFIG_FILES([Makefile
  59. doc/Makefile
  60. examples/message.scm
  61. examples/clock.scm
  62. examples/sound.scm
  63. modules/Makefile
  64. modules/xosd/config.scm
  65. src/Makefile
  66. pre-inst-env.el])
  67. AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
  68. AC_OUTPUT