diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-05-11 16:20:03 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-05-11 16:20:03 +0300 |
commit | a5774356a1c12d1bcb55b6322710e347e1604fc9 (patch) | |
tree | aaff6e22c36e2b8b2a97789d4382d63ad6900766 | |
parent | 4e48677eee5abf6a7190fc200d3085cc43643322 (diff) | |
download | gint-a5774356a1c12d1bcb55b6322710e347e1604fc9.tar.gz gint-a5774356a1c12d1bcb55b6322710e347e1604fc9.tar.bz2 |
Bugfixes.
* gint.mk (snarfcppopts): Define even if GINT_COND_DOC is false.
This variable is needed for x snarfing as well.
* guile.m4 (GINT_CHECK_GUILE) <gint_cv_guile>: Remove.
<gint_guile_status>: New var.
Invoke $3 if checks were disabled.
* README: Update.
-rw-r--r-- | README | 28 | ||||
-rw-r--r-- | gint.mk | 4 | ||||
-rw-r--r-- | guile.m4 | 43 |
3 files changed, 48 insertions, 27 deletions
@@ -297,8 +297,15 @@ option. | |||
297 | 297 | ||
298 | Only one of these four options may be given to a +GINT_INIT+ invocation. | 298 | Only one of these four options may be given to a +GINT_INIT+ invocation. |
299 | 299 | ||
300 | Here is a more complex example: | 300 | If the check for Guile was disabled at configure time, either by default or |
301 | by the user's request, the action of +GINT_INIT+ depends on whether it had | ||
302 | been given the +ACTION-IF-NOT-FOUND+ argument. If not, +GINT_INIT+ does | ||
303 | nothing. Otherwise, the +ACTION-IF-NOT-FOUND+ argument is executed just as | ||
304 | if Guile has not been found. If you need to discern between various failure | ||
305 | reasons (`check disabled` vs. `Guile not found` or vs. `Guile version too | ||
306 | low`), use the <<gint_guile_status, +gint_guile_status+>> variable. | ||
301 | 307 | ||
308 | Here is a more complex example of +GINT_INIT+ usage: | ||
302 | 309 | ||
303 | .+GINT_INIT+ macro | 310 | .+GINT_INIT+ macro |
304 | ------------------------------------------------------- | 311 | ------------------------------------------------------- |
@@ -379,12 +386,17 @@ By default, set to `yes`. If an <<option-generators, option generating>> | |||
379 | option was used, this variable is set to `no` if the *Guile* checks were | 386 | option was used, this variable is set to `no` if the *Guile* checks were |
380 | disabled (either by default or by the user request) and to `yes` otherwise. | 387 | disabled (either by default or by the user request) and to `yes` otherwise. |
381 | 388 | ||
382 | gint_cv_guile:: | 389 | [[gint_guile_status]] |
383 | Set to `yes` if a sufficiently new version of *Guile* was found, and to | 390 | gint_guile_status:: |
384 | `no` otherwise. | 391 | This variable contains the status of the last check. It is `ok`, if the |
385 | 392 | check has passed, `badversion` if the Guile version is older than the | |
386 | [[gint_cv_guile_debug]] | 393 | requested minimum and `cantlink` if Guile was found but the attempt to |
387 | gint_cv_guile_debug:: | 394 | link a test program had failed. You may use this variable in the |
395 | +ACTION-IF-NOT-FOUND+ argument to +GINT_INIT+ to discern between | ||
396 | various reasons for failure. | ||
397 | |||
398 | [[gint_guile_debug]] | ||
399 | gint_guile_debug:: | ||
388 | Set if guile supports the debugging macros (i.e. +SCM_DEVAL_P+, | 400 | Set if guile supports the debugging macros (i.e. +SCM_DEVAL_P+, |
389 | +SCM_BACKTRACE_P+, +SCM_RECORD_POSITIONS_P+ and SCM_RESET_DEBUG_MODE). | 401 | +SCM_BACKTRACE_P+, +SCM_RECORD_POSITIONS_P+ and SCM_RESET_DEBUG_MODE). |
390 | 402 | ||
@@ -394,7 +406,7 @@ Config.h Defines | |||
394 | GUILE_DEBUG_MACROS:: | 406 | GUILE_DEBUG_MACROS:: |
395 | Defined if guile supports the debugging macros (i.e. +SCM_DEVAL_P+, | 407 | Defined if guile supports the debugging macros (i.e. +SCM_DEVAL_P+, |
396 | +SCM_BACKTRACE_P+, +SCM_RECORD_POSITIONS_P+ and SCM_RESET_DEBUG_MODE). | 408 | +SCM_BACKTRACE_P+, +SCM_RECORD_POSITIONS_P+ and SCM_RESET_DEBUG_MODE). |
397 | See also the <<gint_cv_guile_debug, +gint_cv_guile_debug+>> variable. | 409 | See also the <<gint_guile_debug, +gint_guile_debug+>> variable. |
398 | 410 | ||
399 | GUILE_VERSION:: | 411 | GUILE_VERSION:: |
400 | Same as the <<GUILE_VERSION, +GUILE_VERSION+>> substitution variable. | 412 | Same as the <<GUILE_VERSION, +GUILE_VERSION+>> substitution variable. |
@@ -25,6 +25,8 @@ ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_L | |||
25 | 25 | ||
26 | SUFFIXES += .x | 26 | SUFFIXES += .x |
27 | 27 | ||
28 | snarfcppopts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
29 | |||
28 | if GINT_COND_DOC | 30 | if GINT_COND_DOC |
29 | EXTRA_DIST += guile-procedures.texi guile-procedures.txt | 31 | EXTRA_DIST += guile-procedures.texi guile-procedures.txt |
30 | 32 | ||
@@ -39,8 +41,6 @@ DISTCLEANFILES += \ | |||
39 | 41 | ||
40 | SUFFIXES += .doc | 42 | SUFFIXES += .doc |
41 | 43 | ||
42 | snarfcppopts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
43 | |||
44 | if GINT_COND_SNARF_DOC_FILTER | 44 | if GINT_COND_SNARF_DOC_FILTER |
45 | GUILE_DOC_SNARF=$(top_builddir)/$(GINT_MODULE_DIR)/snarf-doc-filter --snarfer | 45 | GUILE_DOC_SNARF=$(top_builddir)/$(GINT_MODULE_DIR)/snarf-doc-filter --snarfer |
46 | else | 46 | else |
@@ -31,7 +31,8 @@ AC_DEFUN([GINT_CHECK_GUILE], | |||
31 | AC_SUBST(GUILE_LIBS) | 31 | AC_SUBST(GUILE_LIBS) |
32 | AC_SUBST(GUILE_VERSION) | 32 | AC_SUBST(GUILE_VERSION) |
33 | AC_SUBST(GUILE_VERSION_NUMBER) | 33 | AC_SUBST(GUILE_VERSION_NUMBER) |
34 | AS_VAR_SET([gint_cv_guile], [no]) | 34 | |
35 | gint_guile_status=no | ||
35 | 36 | ||
36 | _GINT_OPTION_SWITCH( | 37 | _GINT_OPTION_SWITCH( |
37 | [with-guile], | 38 | [with-guile], |
@@ -74,25 +75,31 @@ AC_DEFUN([GINT_CHECK_GUILE], | |||
74 | VEX=`echo $GUILE_VERSION | sed 's/\./ \\\\* 1000 + /;s/\./ \\\\* 100 + /'` | 75 | VEX=`echo $GUILE_VERSION | sed 's/\./ \\\\* 1000 + /;s/\./ \\\\* 100 + /'` |
75 | GUILE_VERSION_NUMBER=`eval expr "$VEX"` | 76 | GUILE_VERSION_NUMBER=`eval expr "$VEX"` |
76 | 77 | ||
78 | gint_guile_status=ok | ||
79 | |||
77 | m4_if([$1],,,[ | 80 | m4_if([$1],,,[ |
78 | if test $GUILE_VERSION_NUMBER -lt _gint_mangle_version($1); then | 81 | if test $GUILE_VERSION_NUMBER -lt _gint_mangle_version($1); then |
79 | m4_if($3,, | 82 | m4_if([$3],, |
80 | [AC_MSG_ERROR([Guile version too old; required is at least ]$1)], | 83 | [AC_MSG_ERROR([Guile version too old; required at least ]$1)], |
81 | [$3]) | 84 | [gint_guile_status=badversion]) |
82 | fi]) | 85 | fi]) |
83 | 86 | ||
84 | save_LIBS=$LIBS | 87 | if test $gint_guile_status = ok; then |
85 | save_CFLAGS=$CFLAGS | 88 | save_LIBS=$LIBS |
86 | LIBS="$LIBS $GUILE_LIBS" | 89 | save_CFLAGS=$CFLAGS |
87 | CFLAGS="$CFLAGS $GUILE_INCLUDES" | 90 | LIBS="$LIBS $GUILE_LIBS" |
88 | AC_TRY_LINK([#include <libguile.h>], | 91 | CFLAGS="$CFLAGS $GUILE_INCLUDES" |
89 | m4_if([$1], , scm_shell(0, NULL);, [$1]), | 92 | AC_LINK_IFELSE( |
90 | [AS_VAR_SET([gint_cv_guile], $GUILE_VERSION)]) | 93 | [AC_LANG_PROGRAM([#include <libguile.h>], |
91 | LIBS=$save_LIBS | 94 | [scm_shell(0, NULL);])], |
92 | CFLAGS=$save_CFLAGS | 95 | [], |
96 | [gint_guile_status=cantlink]) | ||
97 | LIBS=$save_LIBS | ||
98 | CFLAGS=$save_CFLAGS | ||
99 | fi | ||
93 | fi | 100 | fi |
94 | 101 | ||
95 | if test $gint_cv_guile = no; then | 102 | if test $gint_guile_status != ok; then |
96 | GUILE_INCLUDES= | 103 | GUILE_INCLUDES= |
97 | GUILE_LIBS= | 104 | GUILE_LIBS= |
98 | GUILE_VERSION= | 105 | GUILE_VERSION= |
@@ -108,9 +115,9 @@ AC_DEFUN([GINT_CHECK_GUILE], | |||
108 | SCM_BACKTRACE_P = 1; | 115 | SCM_BACKTRACE_P = 1; |
109 | SCM_RECORD_POSITIONS_P = 1; | 116 | SCM_RECORD_POSITIONS_P = 1; |
110 | SCM_RESET_DEBUG_MODE;])], | 117 | SCM_RESET_DEBUG_MODE;])], |
111 | [gint_cv_guile_debug=yes], | 118 | [gint_guile_debug=yes], |
112 | [gint_cv_guile_debug=no]) | 119 | [gint_guile_debug=no]) |
113 | if test $gint_cv_guile_debug = yes; then | 120 | if test $gint_guile_debug = yes; then |
114 | AC_DEFINE_UNQUOTED(GUILE_DEBUG_MACROS, 1, | 121 | AC_DEFINE_UNQUOTED(GUILE_DEBUG_MACROS, 1, |
115 | [Define to 1 if SCM_DEVAL_P, SCM_BACKTRACE_P, SCM_RECORD_POSITIONS_P and SCM_RESET_DEBUG_MODE are defined]) | 122 | [Define to 1 if SCM_DEVAL_P, SCM_BACKTRACE_P, SCM_RECORD_POSITIONS_P and SCM_RESET_DEBUG_MODE are defined]) |
116 | fi | 123 | fi |
@@ -145,6 +152,8 @@ AC_DEFUN([GINT_CHECK_GUILE], | |||
145 | [Guile version number: MAX*10 + MIN]) | 152 | [Guile version number: MAX*10 + MIN]) |
146 | m4_if([$2],,,[$2]) | 153 | m4_if([$2],,,[$2]) |
147 | fi | 154 | fi |
155 | m4_if([$3],,,[else | ||
156 | $3]) | ||
148 | fi | 157 | fi |
149 | ]) | 158 | ]) |
150 | 159 | ||