--- 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
