aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-10-12 10:28:23 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-10-12 10:28:23 +0000
commitf41cbc9b200bc8b805f0c6bb8ebe9f4114c5d46a (patch)
tree2d098e8766190b6ba90e35459c39bfa91a02f90f /m4
parente7b1ff53a66a7ce9f18708a6185f770baa710b97 (diff)
downloadellinika-f41cbc9b200bc8b805f0c6bb8ebe9f4114c5d46a.tar.gz
ellinika-f41cbc9b200bc8b805f0c6bb8ebe9f4114c5d46a.tar.bz2
Updated from xmltrans.
git-svn-id: file:///home/puszcza/svnroot/ellinika/trunk@213 941c8c0f-9102-463b-b60b-cd22ce0e6858
Diffstat (limited to 'm4')
-rw-r--r--m4/guile.m496
1 files changed, 58 insertions, 38 deletions
diff --git a/m4/guile.m4 b/m4/guile.m4
index 0934cc2..c0b237c 100644
--- a/m4/guile.m4
+++ b/m4/guile.m4
@@ -1,43 +1,57 @@
1dnl This file is part of GNU Radius. 1dnl This file is part of GNU mailutils.
2dnl Copyright (C) 2001,2003 Free Software Foundation, Inc. 2dnl Copyright (C) 2001,2004 Free Software Foundation, Inc.
3dnl 3dnl
4dnl Written by Sergey Poznyakoff 4dnl This program is free software; you can redistribute it and/or modify
5dnl
6dnl GNU Radius is free software; you can redistribute it and/or modify
7dnl it under the terms of the GNU General Public License as published by 5dnl it under the terms of the GNU General Public License as published by
8dnl the Free Software Foundation; either version 2 of the License, or 6dnl the Free Software Foundation; either version 2 of the License, or
9dnl (at your option) any later version. 7dnl (at your option) any later version.
10dnl 8dnl
11dnl GNU Radius is distributed in the hope that it will be useful, 9dnl This program is distributed in the hope that it will be useful,
12dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14dnl GNU General Public License for more details. 12dnl GNU General Public License for more details.
15dnl 13dnl
16dnl You should have received a copy of the GNU General Public License 14dnl You should have received a copy of the GNU General Public License
17dnl along with GNU Radius; if not, write to the Free Software 15dnl along with this program; if not, write to the Free Software
18dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19dnl 17dnl
20 18
21AC_DEFUN([RA_CHECK_GUILE], 19dnl MU_RESULT_ACTIONS -- generate shell code for the result of a test
20dnl $1 -- CVAR -- cache variable to check
21dnl $2 -- NAME -- if not empty, used to generate a default value TRUE:
22dnl `AC_DEFINE(HAVE_NAME)'
23dnl $2 -- TRUE -- what to do if the CVAR is not `no'
24dnl $3 -- FALSE -- what to do otherwise; defaults to `:'
25dnl
26AC_DEFUN([MU_RESULT_ACTIONS], [
27[if test "$$1" != "" -a "$$1" != no; then
28 ]ifelse([$3], ,
29 [AC_DEFINE(HAVE_]translit($2, [a-z ./<>], [A-Z___])[,1,[FIXME])],
30 [$3])[
31else
32 ]ifelse([$4], , [:], [$4])[
33fi]])dnl
34
35AC_DEFUN([MU_CHECK_GUILE],
22[ 36[
23 if test "x$ra_cv_lib_guile" = x; then 37 if test "x$mu_cv_lib_guile" = x; then
24 cached="" 38 cached=""
25 AC_PATH_PROG(GUILE_CONFIG, guile-config, no, $PATH) 39 AC_PATH_PROG(GUILE_CONFIG, guile-config, no, $PATH)
26 if test $GUILE_CONFIG = no; then 40 if test $GUILE_CONFIG = no; then
27 ra_cv_lib_guile=no 41 mu_cv_lib_guile=no
28 else 42 else
29 GUILE_INCLUDES=`guile-config compile` 43 GUILE_INCLUDES=`guile-config compile`
30 GUILE_LIBS=`guile-config link` 44 GUILE_LIBS=`guile-config link`
31 fi 45 fi
32 46
33 if test $GUILE_CONFIG != no; then 47 if test $GUILE_CONFIG != no; then
34 AC_MSG_CHECKING(for guile version 1.4 or higher) 48 AC_MSG_CHECKING(for guile version 1.6 or higher)
35 GUILE_VERSION=`($GUILE_CONFIG --version 2>&1; echo '')|sed -n 's/guile-config - Guile version \([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\).*/\1\2/p'` 49 GUILE_VERSION=`($GUILE_CONFIG --version 2>&1; echo '')|sed -n 's/guile-config - Guile version \([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\).*/\1\2/p'`
36 case "x$GUILE_VERSION" in 50 case "x$GUILE_VERSION" in
37 x[[0-9]]*) 51 x[[0-9]]*)
38 if test $GUILE_VERSION -lt 14; then 52 if test $GUILE_VERSION -lt 16; then
39 AC_MSG_RESULT(Nope. Version number too low.) 53 AC_MSG_RESULT(Nope. Version number too low.)
40 ra_cv_lib_guile=no 54 mu_cv_lib_guile=no
41 else 55 else
42 AC_DEFINE_UNQUOTED(GUILE_VERSION, $GUILE_VERSION, 56 AC_DEFINE_UNQUOTED(GUILE_VERSION, $GUILE_VERSION,
43 [Guile version number: MAX*10 + MIN]) 57 [Guile version number: MAX*10 + MIN])
@@ -48,42 +62,48 @@ AC_DEFUN([RA_CHECK_GUILE],
48 CFLAGS="$CFLAGS $GUILE_INCLUDES" 62 CFLAGS="$CFLAGS $GUILE_INCLUDES"
49 AC_TRY_LINK([#include <libguile.h>], 63 AC_TRY_LINK([#include <libguile.h>],
50 ifelse([$1], , scm_shell(0, NULL);, [$1]), 64 ifelse([$1], , scm_shell(0, NULL);, [$1]),
51 [ra_cv_lib_guile=yes], 65 [mu_cv_lib_guile=yes],
52 [ra_cv_lib_guile=no]) 66 [mu_cv_lib_guile=no])
53 LIBS=$save_LIBS 67 LIBS=$save_LIBS
54 CFLAGS=$save_CFLAGS 68 CFLAGS=$save_CFLAGS
55 fi ;; 69 fi ;;
56 *) AC_MSG_RESULT(Nope. Unknown version number) 70 *) AC_MSG_RESULT(Nope. Unknown version number)
57 ra_cv_lib_guile=no;; 71 mu_cv_lib_guile=no;;
58 esac 72 esac
59 fi 73 fi
60 else 74 else
61 cached=" (cached) " 75 cached=" (cached) "
62 GUILE_INCLUDES=`guile-config compile` 76 GUILE_INCLUDES=`$GUILE_CONFIG compile`
63 GUILE_LIBS=`guile-config link` 77 GUILE_LIBS=`$GUILE_CONFIG link`
64 fi 78 fi
65 AC_MSG_CHECKING(whether to build guile support) 79 AC_MSG_CHECKING(whether to build guile support)
66 RA_RESULT_ACTIONS([ra_cv_lib_guile],[LIBGUILE],[$2],[$3]) 80 MU_RESULT_ACTIONS([mu_cv_lib_guile],[LIBGUILE],[$2],[$3])
67 AC_MSG_RESULT(${cached}$ra_cv_lib_guile) 81 AC_MSG_RESULT(${cached}$mu_cv_lib_guile)
68 if test $ra_cv_lib_guile = yes; then 82
69 if test $GUILE_VERSION -gt 14; then 83 if test $mu_cv_lib_guile = yes; then
70 LIBS="$LIBS $GUILE_LIBS" 84 AC_ARG_WITH([guiledir],
71 CFLAGS="$CFLAGS $GUILE_INCLUDES" 85 AC_HELP_STRING([--with-guiledir=DIR],
72 AC_CHECK_FUNCS(scm_long2num scm_cell scm_list_1 scm_list_n scm_c_define\ 86 [Specify the directory to install guile modules to]),
73 scm_c_lookup) 87 [case $withval in
74 if test $ac_cv_func_scm_cell = no; then 88 /*) GUILE_SITE=$withval;;
75 AC_MSG_CHECKING(for inline scm_cell) 89 yes) GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`;;
76 AC_TRY_LINK([#include <libguile.h>], 90 *) AC_MSG_ERROR([Argument to --with-guiledir must be an absolute directory name]);;
77 [scm_cell(SCM_EOL, SCM_EOL)], 91 esac],
78 [ac_cv_func_scm_cell=yes 92 [GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`
79 AC_DEFINE(HAVE_SCM_CELL,1, 93 pfx=$prefix
80 Define if you have scm_cell function)]) 94 test "x$pfx" = xNONE && pfx=$ac_default_prefix
81 AC_MSG_RESULT($ac_cv_func_scm_cell) 95 case $GUILE_SITE in
82 fi 96 $pfx/*) ;; # OK
83 CFLAGS=$save_CFLAGS 97 *) AC_MSG_WARN([guile site directory "$GUILE_SITE" lies outside your current prefix ($pfx).])
84 LIBS=$save_LIBS 98 GUILE_SITE='$(datadir)/guile/site'
85 fi 99 AC_MSG_WARN([Falling back to ${GUILE_SITE} instead. Use --with-guiledir to force using site directory.])
100 ;;
101 esac])
86 fi 102 fi
103
104 AC_SUBST(GUILE_SITE)
105 AC_SUBST(GUILE_INCLUDES)
106 AC_SUBST(GUILE_LIBS)
87]) 107])
88 108
89 109

Return to:

Send suggestions and report system problems to the System administrator.