1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
Index: pygobject-2.14.2/configure.ac
===================================================================
--- pygobject-2.14.2.orig/configure.ac 2008-05-23 18:51:11.000000000 +0200
+++ pygobject-2.14.2/configure.ac 2008-06-07 13:49:51.690646019 +0200
@@ -65,6 +65,8 @@ m4_define([_LT_AC_TAGCONFIG],[])
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
+PKG_PROG_PKG_CONFIG
+
AM_PATH_PYTHON(2.3.5)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
@@ -144,38 +146,10 @@ AC_SUBST([pygobject_CODEGEN_DEFINES])
AS_AC_EXPAND(DATADIR, $datadir)
dnl libffi
-AC_MSG_CHECKING(for ffi.h)
-AC_ARG_WITH(libffi,
- AC_HELP_STRING([--without-ffi], [Disable libffi support]),
- with_ffi=$withval,
- with_ffi=auto)
-if test x"$with_ffi" = xno ; then
- pygobject_ffi_h=disabled
-else
- AC_TRY_CPP([#include <ffi.h>], pygobject_ffi_h=yes, pygobject_ffi_h=no)
- if test $pygobject_ffi_h = yes; then
- AC_DEFINE(HAVE_FFI_H,1,[Have ffi.h include file])
- save_LIBS=$LIBS
- if test x"$with_ffi" = xyes || test x"$with_ffi" = xauto; then
- other_LIBS=
- else
- other_LIBS=$with_ffi
- fi
- AC_SEARCH_LIBS(ffi_call,ffi,,AC_MSG_ERROR([libffi not found]),$other_LIBS)
- if test x$"ac_cv_search_ffi_call" = x"none required" ; then
- FFI_LIBS=$other_LIBS
- else
- FFI_LIBS="$ac_cv_search_ffi_call $other_LIBS"
- fi
- LIBS=$save_LIBS
- fi
-fi
-if test x"$with_ffi" != xauto && test x"$pygobject_ffi_h" != xyes ; then
- AC_MSG_ERROR([libffi requested, but ffi.h not found])
-fi
-AC_MSG_RESULT([$pygobject_ffi_h])
-AM_CONDITIONAL(HAVE_LIBFFI, test "$pygobject_ffi_h" = "yes")
+PKG_CHECK_MODULES(FFI, libffi, [enable_ffi=yes], [enable_ffi=no])
+AM_CONDITIONAL(HAVE_LIBFFI, test "$enable_ffi" = "yes")
AC_SUBST(FFI_LIBS)
+AC_SUBST(FFI_CFLAGS)
dnl add required cflags ...
if test "x$GCC" = "xyes"; then
@@ -206,5 +180,5 @@ AC_CONFIG_FILES(
AC_OUTPUT
echo
-echo "libffi support: $pygobject_ffi_h"
+echo "libffi support: $enable_ffi"
echo
Index: pygobject-2.14.2/gobject/Makefile.am
===================================================================
--- pygobject-2.14.2.orig/gobject/Makefile.am 2008-05-23 18:42:18.000000000 +0200
+++ pygobject-2.14.2/gobject/Makefile.am 2008-06-07 13:47:12.690505428 +0200
@@ -33,7 +33,7 @@ noinst_PROGRAMS = generate-constants
CLEANFILES = constants.py
EXTRA_DIST = constants.py.in
-_gobject_la_CFLAGS = $(GLIB_CFLAGS)
+_gobject_la_CFLAGS = $(GLIB_CFLAGS) $(FFI_CFLAGS)
_gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gobject
_gobject_la_LIBADD = $(GLIB_LIBS) $(FFI_LIBS)
_gobject_la_SOURCES = \
|