summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2004-10-09 16:45:09 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2004-10-09 16:45:09 (GMT)
commitf8b9944ee85a64cecf994639a6f67c768b41f699 (patch) (side-by-side diff)
tree63881738acc2e2df71c2f391efd63ff869815079
parenta52fc711069efc3367553ba3768cd745cb175b3e (diff)
downloadgamma-f8b9944ee85a64cecf994639a6f67c768b41f699.tar.gz
gamma-f8b9944ee85a64cecf994639a6f67c768b41f699.tar.bz2
(MU_CHECK_GUILE): Removed useless checks.
Add --with-guiledir option and autodetection of guile install path (pkgdir). AC_SUBST GUILE_SITE, GUILE_INCLUDES, and GUILE_LIBS
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--m4/guile.m446
1 files changed, 26 insertions, 20 deletions
diff --git a/m4/guile.m4 b/m4/guile.m4
index dbcd2ec..4f9125f 100644
--- a/m4/guile.m4
+++ b/m4/guile.m4
@@ -32,7 +32,7 @@ else
]ifelse([$4], , [:], [$4])[
fi]])dnl
-AC_DEFUN(MU_CHECK_GUILE,
+AC_DEFUN([MU_CHECK_GUILE],
[
if test "x$mu_cv_lib_guile" = x; then
cached=""
@@ -73,31 +73,37 @@ AC_DEFUN(MU_CHECK_GUILE,
fi
else
cached=" (cached) "
- GUILE_INCLUDES=`guile-config compile`
- GUILE_LIBS=`guile-config link`
+ GUILE_INCLUDES=`$GUILE_CONFIG compile`
+ GUILE_LIBS=`$GUILE_CONFIG link`
fi
AC_MSG_CHECKING(whether to build guile support)
MU_RESULT_ACTIONS([mu_cv_lib_guile],[LIBGUILE],[$2],[$3])
AC_MSG_RESULT(${cached}$mu_cv_lib_guile)
+
if test $mu_cv_lib_guile = yes; then
- if test $GUILE_VERSION -gt 14; then
- LIBS="$LIBS $GUILE_LIBS"
- CFLAGS="$CFLAGS $GUILE_INCLUDES"
- AC_CHECK_FUNCS(scm_long2num scm_cell scm_list_1 scm_list_n scm_c_define\
- scm_c_lookup)
- if test $ac_cv_func_scm_cell = no; then
- AC_MSG_CHECKING(for inline scm_cell)
- AC_TRY_LINK([#include <libguile.h>],
- [scm_cell(SCM_EOL, SCM_EOL)],
- [ac_cv_func_scm_cell=yes
- AC_DEFINE(HAVE_SCM_CELL,1,
- Define if you have scm_cell function)])
- AC_MSG_RESULT($ac_cv_func_scm_cell)
- fi
- CFLAGS=$save_CFLAGS
- LIBS=$save_LIBS
- fi
+ AC_ARG_WITH([guiledir],
+ AC_HELP_STRING([--with-guiledir=DIR],
+ [Specify the directory to install guile modules to]),
+ [case $withval in
+ /*) GUILE_SITE=$withval;;
+ yes) GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`;;
+ *) AC_MSG_ERROR([Argument to --with-guiledir must be an absolute directory name]);;
+ esac],
+ [GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`
+ pfx=$prefix
+ test "x$pfx" = xNONE && pfx=$ac_default_prefix
+ case $GUILE_SITE in
+ $pfx/*) ;; # OK
+ *) AC_MSG_WARN([guile site directory "$GUILE_SITE" lies outside your current prefix ($pfx).])
+ GUILE_SITE='$(datadir)/guile/site'
+ AC_MSG_WARN([Falling back to ${GUILE_SITE} instead. Use --with-guiledir to force using site directory.])
+ ;;
+ esac])
fi
+
+ AC_SUBST(GUILE_SITE)
+ AC_SUBST(GUILE_INCLUDES)
+ AC_SUBST(GUILE_LIBS)
])

Return to:

Send suggestions and report system problems to the System administrator.