summaryrefslogtreecommitdiff
blob: 1d6e176b079e9ed390c1294266615e8a817fafa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- src/guile-binding.c
+++ src/guile-binding.c
@@ -61,10 +61,10 @@
   char* filter_string = NULL;
   char* fname = "-";
 
-  if (SCM_NFALSEP(filter_string_scm))
+  if (scm_is_true(filter_string_scm))
     filter_string = scm_to_locale_string(filter_string_scm);
 
-  if (SCM_NFALSEP(fname_scm))
+  if (scm_is_true(fname_scm))
     fname = scm_to_locale_string(fname_scm);
   
   ship_item_cb = ship_item_scm;
--- src/Makefile.am
+++ src/Makefile.am
@@ -6,13 +6,10 @@
 libstarparse_la_SOURCES =\
 	parser.y lexer.l starparse.h
 
-libstarparse_la_CFLAGS =
-libstarparse_la_LDFLAGS = 
-
 if ENABLE_GUILE
 libstarparse_la_SOURCES += guile-binding.c guile-compat.h
-libstarparse_la_CFLAGS += @GUILE_CFLAGS@
-libstarparse_la_LDFLAGS += @GUILE_LDFLAGS@ -lpthread
+libstarparse_la_CFLAGS = @GUILE_CFLAGS@
+libstarparse_la_LIBADD = @GUILE_LIBS@ -lpthread
 endif
 
 
--- configure.ac
+++ configure.ac
@@ -10,18 +10,13 @@
 
 AM_INIT_AUTOMAKE
 
-AC_ARG_ENABLE(guile,
+AC_ARG_ENABLE([guile],
 	      AS_HELP_STRING([--enable-guile],
-                             [build bindings for guile scheme interpreter]),
-              USE_GUILE=$enable_guile,
-              USE_GUILE=yes)  # default value
-
-if test "x$USE_GUILE" = "xyes";
-then
-  GUILE_FLAGS
-fi
-
-AM_CONDITIONAL(ENABLE_GUILE, test "x$USE_GUILE" = "xyes")
+                             [build bindings for guile scheme interpreter]))
+AS_IF([test "x$enable_guile" = "xyes"], [
+  PKG_CHECK_MODULES([GUILE], [guile-1.8])
+])
+AM_CONDITIONAL(ENABLE_GUILE, test "x$enable_guile" = "xyes")
 
 AC_CONFIG_FILES([Makefile
                  starparse-env