mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +02:00
Update copyright.
Add index in header comments. (AC_GUILE_MODULE_CHECK, AC_GUILE_MODULE_AVAILABLE, AC_GUILE_MODULE_REQUIRED): New macros.
This commit is contained in:
parent
4d8503962e
commit
b9b72e01aa
1 changed files with 68 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
||||||
dnl Automake macros for working with Guile.
|
dnl Autoconf macros for working with Guile.
|
||||||
dnl
|
dnl
|
||||||
dnl Copyright (C) 1998 Free Software Foundation, Inc.
|
dnl Copyright (C) 1998,2001 Free Software Foundation, Inc.
|
||||||
dnl
|
dnl
|
||||||
dnl This program is free software; you can redistribute it and/or modify
|
dnl This program is free software; you can redistribute it and/or modify
|
||||||
dnl it under the terms of the GNU General Public License as published by
|
dnl it under the terms of the GNU General Public License as published by
|
||||||
|
@ -42,6 +42,18 @@ dnl whether to permit this exception to apply to your modifications.
|
||||||
dnl If you do not wish that, delete this exception notice.
|
dnl If you do not wish that, delete this exception notice.
|
||||||
|
|
||||||
|
|
||||||
|
dnl INDEX
|
||||||
|
dnl -----
|
||||||
|
|
||||||
|
dnl GUILE_FLAGS --- set flags for compiling and linking with Guile
|
||||||
|
dnl AC_GUILE_MODULE_CHECK --- check feature of a Guile Scheme module
|
||||||
|
dnl AC_GUILE_MODULE_AVAILABLE --- check availability of a Guile Scheme module
|
||||||
|
dnl AC_GUILE_MODULE_REQUIRED --- fail if a Guile Scheme module is unavailable
|
||||||
|
|
||||||
|
|
||||||
|
dnl Code
|
||||||
|
dnl ----
|
||||||
|
|
||||||
dnl GUILE_FLAGS --- set flags for compiling and linking with Guile
|
dnl GUILE_FLAGS --- set flags for compiling and linking with Guile
|
||||||
dnl
|
dnl
|
||||||
dnl This macro runs the `guile-config' script, installed with Guile,
|
dnl This macro runs the `guile-config' script, installed with Guile,
|
||||||
|
@ -74,3 +86,47 @@ AC_DEFUN([GUILE_FLAGS],[
|
||||||
AC_SUBST(GUILE_LDFLAGS)
|
AC_SUBST(GUILE_LDFLAGS)
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl AC_GUILE_MODULE_CHECK --- check feature of a Guile Scheme module
|
||||||
|
dnl
|
||||||
|
dnl AC_GUILE_MODULE_CHECK(var,module,featuretest,description)
|
||||||
|
dnl $1 is a shell variable name to be set to "yes" or "no"
|
||||||
|
dnl $2 is a list of symbols, like: (ice-9 common-list)
|
||||||
|
dnl $3 is a thunk, like: (lambda () BODY ...)
|
||||||
|
dnl which returns either 0 or #t to indicate the check passed.
|
||||||
|
dnl avoid using the character "#" since that confuses autoconf.
|
||||||
|
dnl $4 is a noun phrase passed to AC_MSG_CHECKING
|
||||||
|
|
||||||
|
AC_DEFUN([AC_GUILE_MODULE_CHECK],
|
||||||
|
[AC_MSG_CHECKING([$2 $4])
|
||||||
|
$1=no
|
||||||
|
echo '(use-modules $2) (exit ($3))' > conftest
|
||||||
|
guile -s conftest > /dev/null 2>&1 && $1=yes
|
||||||
|
rm -f conftest
|
||||||
|
AC_MSG_RESULT($[$1])
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl AC_GUILE_MODULE_AVAILABLE --- check availability of a Guile Scheme module
|
||||||
|
dnl
|
||||||
|
dnl AC_GUILE_MODULE_AVAILABLE(var,module)
|
||||||
|
dnl $1 is a shell variable name to be set to "yes" or "no"
|
||||||
|
dnl $2 is a list of symbols, like: (ice-9 common-list)
|
||||||
|
|
||||||
|
AC_DEFUN([AC_GUILE_MODULE_AVAILABLE],
|
||||||
|
[AC_GUILE_MODULE_CHECK($1,$2,(lambda () 0),availability)
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl AC_GUILE_MODULE_REQUIRED --- fail if a Guile Scheme module is unavailable
|
||||||
|
dnl
|
||||||
|
dnl $1 is a list of symbols, WITHOUT the surrounding parens
|
||||||
|
|
||||||
|
AC_DEFUN([AC_GUILE_MODULE_REQUIRED],
|
||||||
|
[AC_GUILE_MODULE_AVAILABLE(ac_guile_module_required, ($1))
|
||||||
|
if test "$ac_guile_module_required" = "no" ; then
|
||||||
|
AC_MSG_ERROR([required guile module not found: ($1)])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl guile.m4 ends here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue