summaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-17 18:58:11 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-17 18:58:11 +0200
commit9e902190328f5d90305828f10fd0806fc07477e2 (patch)
treee9b72e9595798d163cdcbff0e798f18baa33f15c /src/configure.in
parent706d2de9c1e0567a9865c6c535fb7feebf475fd8 (diff)
downloadvim-git-9e902190328f5d90305828f10fd0806fc07477e2.tar.gz
updated for version 7.4a.029v7.4a.029
Problem: Can't build with MzScheme on Ubuntu 13.04. Solution: Add configure check for the "ffi" library.
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/configure.in b/src/configure.in
index 65013602f..89d8895ad 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -702,12 +702,34 @@ if test "$enable_mzschemeinterp" = "yes"; then
AC_MSG_RESULT(not needed)
fi
+ dnl On Ubuntu this fixes "undefined reference to symbol 'ffi_type_void'".
+ AC_CHECK_LIB(ffi, ffi_type_void, [MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"])
+
MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
-DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
- MZSCHEME_SRC="if_mzsch.c"
- MZSCHEME_OBJ="objects/if_mzsch.o"
- MZSCHEME_PRO="if_mzsch.pro"
- AC_DEFINE(FEAT_MZSCHEME)
+
+ dnl Test that we can compile a simple program with these CFLAGS and LIBS.
+ AC_MSG_CHECKING([if compile and link flags for MzScheme are sane])
+ cflags_save=$CFLAGS
+ libs_save=$LIBS
+ CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
+ LIBS="$LIBS $MZSCHEME_LIBS"
+ AC_TRY_LINK(,[ ],
+ AC_MSG_RESULT(yes); mzs_ok=yes,
+ AC_MSG_RESULT(no: MZSCHEME DISABLED); mzs_ok=no)
+ CFLAGS=$cflags_save
+ LIBS=$libs_save
+ if test $mzs_ok = yes; then
+ MZSCHEME_SRC="if_mzsch.c"
+ MZSCHEME_OBJ="objects/if_mzsch.o"
+ MZSCHEME_PRO="if_mzsch.pro"
+ AC_DEFINE(FEAT_MZSCHEME)
+ else
+ MZSCHEME_CFLAGS=
+ MZSCHEME_LIBS=
+ MZSCHEME_EXTRA=
+ MZSCHEME_MZC=
+ fi
fi
AC_SUBST(MZSCHEME_SRC)
AC_SUBST(MZSCHEME_OBJ)