[librep] fallback check for libffi, if there's no libffi.pc



commit 79595022822fd757879f8f6e02bdffd7c331cf02
Author: chrisb <zanghar freenet de>
Date:   Thu Sep 10 06:44:44 2009 +0200

    fallback check for libffi, if there's no libffi.pc

 ChangeLog     |    5 +++++
 configure.in  |   10 ++++++++--
 man/news.texi |    9 +++++++++
 3 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f6070fa..3ddbaec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-10  Christopher Bratusek <zanghar freenet de>
+	* configure.in: fallback to old ffi check if there's no libffi.pc [Vincent Untz]
+
+	* man/news.texi: updated
+
 2009-09-05  Christopher Bratusek <zanghar freenet de>
 	* librep.spec.in: improved [Kim B. Heino]
 
diff --git a/configure.in b/configure.in
index 69269f7..acafd63 100644
--- a/configure.in
+++ b/configure.in
@@ -227,8 +227,14 @@ AC_ARG_WITH(ffi,
 
 if test "$with_ffi" != "no"; then
   PKG_CHECK_MODULES(LIBFFI, libffi >= $FFI_MIN_VER
-  ,found_ffi=yes
-  ,AC_MSG_ERROR([can't locate libffi]))
+  ,[found_ffi=yes]
+  ,[
+     AC_CHECK_HEADER([ffi.h],[LIBFFI_CFLAGS=],[LIBFFI_FOUND=no])
+     AC_SEARCH_LIBS([ffi_call], [ffi],[LIBFFI_LIBS=-lffi],[LIBFFI_FOUND=no])
+     if test "x${LIBFFI_FOUND}" = xno; then
+       AC_MSG_ERROR([can't locate libffi])
+     fi
+   ])
 fi
 
 dnl Check for dynamic loading
diff --git a/man/news.texi b/man/news.texi
index 6c5b6d9..7962e6f 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -3,6 +3,15 @@
 @appendix News
 @cindex News
 
+ heading 0.90.3
+
+ itemize @bullet
+
+ item Improved spec-file [Kim B. Heino]
+
+ item Fallback check for ffi, if there's no libffi.pc [Vincent Untz]
+ end itemize
+
 @heading 0.90.2
 
 @itemize @bullet



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]