diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-11-20 16:10:11 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-12-26 18:36:52 +0100 |
commit | fba9533e260d98e1152bd263ec893458d5f81fd2 (patch) | |
tree | c2fccb7a74f2fa82b542306a83c9af18275e485c /configure.ac | |
parent | 3b6c6420ac5d1e58334bc3055af4a85222c481b8 (diff) | |
download | gnutls-fba9533e260d98e1152bd263ec893458d5f81fd2.tar.gz |
guile: Arrange to make 'gnutls.scm' architecture-independent.
Fixes #838.
Reported by Andreas Metzler.
* configure.ac: Define and substitute 'maybe_guileextensiondir'.
* guile/Makefile.am (.in.scm): Substitute 'maybe_guileextensiondir'.
* guile/modules/gnutls.in <top level>: Use @maybe_guileextensiondir@.
Check if %LIBDIR is true.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 30dd517437..3cab0dd612 100644 --- a/configure.ac +++ b/configure.ac @@ -919,6 +919,7 @@ AC_ARG_WITH([guile-extension-dir], AS_HELP_STRING([--with-guile-extension-dir=DI AC_SUBST([guilesitedir]) AC_SUBST([guilesiteccachedir]) AC_SUBST([guileextensiondir]) +maybe_guileextensiondir="\"$guileextensiondir\"" if test "$opt_guile_bindings" = "yes"; then AC_MSG_RESULT([*** @@ -990,6 +991,14 @@ if test "$opt_guile_bindings" = "yes"; then AC_CHECK_FUNCS([scm_gc_malloc_pointerless]) CFLAGS="$save_CFLAGS" LIBS="$save_LIBS" + + # Do we need to hard-code $guileextensiondir in gnutls.scm? + # This is not necessary when $guileextensiondir is equal to + # Guile's 'extensiondir' as specified in 'guile-MAJOR.MINOR.pc'. + if test "$guileextensiondir" = "`$PKG_CONFIG guile-$GUILE_EFFECTIVE_VERSION --variable extensiondir`" \ + || test "$guileextensiondir" = '$(GUILE_EXTENSION)'; then + maybe_guileextensiondir='#f' + fi else AC_MSG_RESULT([no]) AC_MSG_WARN([A sufficiently recent GNU Guile not found. Guile bindings not built.]) @@ -998,6 +1007,7 @@ if test "$opt_guile_bindings" = "yes"; then fi fi +AC_SUBST([maybe_guileextensiondir]) AM_CONDITIONAL([HAVE_GUILE], [test "$opt_guile_bindings" = "yes"]) AM_CONDITIONAL([HAVE_GUILD], [test "x$GUILD" != "x"]) AM_CONDITIONAL([CROSS_COMPILING], [test "x$cross_compiling" = "xyes"]) |