diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-07-17 18:58:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-07-17 18:58:11 +0200 |
commit | 9e902190328f5d90305828f10fd0806fc07477e2 (patch) | |
tree | e9b72e9595798d163cdcbff0e798f18baa33f15c /src/configure.in | |
parent | 706d2de9c1e0567a9865c6c535fb7feebf475fd8 (diff) | |
download | vim-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.in | 30 |
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) |