[CONFIGURATION]
* NEW: Now GB_COMPONENT_PKG_CONFIG() macro accept an optional warning message. * BUG: Add support for libffi through pkg-config when available. git-svn-id: svn://localhost/gambas/trunk@1121 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
52e6d3795c
commit
8526133fd7
3 changed files with 28 additions and 12 deletions
11
acinclude.m4
11
acinclude.m4
|
@ -494,7 +494,7 @@ cd $gb_save
|
|||
## $8 = Compiler flags (optional)
|
||||
## $9 = Warning message (optional)
|
||||
##
|
||||
## => defines HAVE_* (to know if you can compile the component)
|
||||
## => defines HAVE_*_COMPONENT (to know if you can compile the component)
|
||||
## *_INC (for the compiler) and *_LIB (for the linker)
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
|
@ -646,8 +646,9 @@ dnl fi
|
|||
## $4 = Sub-directory name
|
||||
## $5 = pkg-config module name
|
||||
## $6 = pkg-config version test
|
||||
## $7 = Warning message (optional)
|
||||
##
|
||||
## => defines HAVE_* (to know if you can compile the component)
|
||||
## => defines HAVE_*_COMPONENT (to know if you can compile the component)
|
||||
## *_INC (for the compiler) and *_LIB / *_LDFLAGS (for the linker)
|
||||
## ---------------------------------------------------------------------------
|
||||
|
||||
|
@ -772,7 +773,11 @@ dnl fi
|
|||
$2_LIB=""
|
||||
$2_LDFLAGS=""
|
||||
$2_DIR=""
|
||||
AC_MSG_WARN([*** $3 is disabled])
|
||||
if test x"$7" = x; then
|
||||
AC_MSG_WARN([*** $3 is disabled])
|
||||
else
|
||||
AC_MSG_NOTICE([$7])
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
@ -45,25 +45,36 @@ GB_COMPONENT(
|
|||
[],
|
||||
[This library must be located inside the C library])
|
||||
|
||||
dnl ---- Remove DISABLED file that could have been generated before
|
||||
|
||||
rm -f DISABLED
|
||||
|
||||
dnl ---- Check for ffi library
|
||||
|
||||
GB_COMPONENT(
|
||||
GB_COMPONENT_PKG_CONFIG(
|
||||
ffi,
|
||||
FFI,
|
||||
[foreign function interface],
|
||||
[],
|
||||
[GB_FIND(ffi.h, /usr /usr/local /usr/lib /usr/lib/gcc/*/*, include ffi/include)],
|
||||
[GB_FIND(libffi.$SHLIBEXT, /usr/local /usr, lib)],
|
||||
[-lffi])
|
||||
libffi,
|
||||
[],
|
||||
[Cannnot find libffi support with pkg-config])
|
||||
|
||||
if test -z "$FFI_LIB"; then
|
||||
GB_COMPONENT(
|
||||
ffi,
|
||||
FFI,
|
||||
[foreign function interface],
|
||||
[],
|
||||
[GB_FIND(ffi.h, /usr/local /usr /usr/lib /usr/lib/gcc/*/*, include ffi/include)],
|
||||
[GB_FIND(libffi.$SHLIBEXT, /usr/local /usr, lib)],
|
||||
[-lffi])
|
||||
fi
|
||||
|
||||
if test -z "$FFI_LIB"; then
|
||||
AC_MSG_ERROR([libffi library and headers are required])
|
||||
fi
|
||||
|
||||
dnl ---- Remove DISABLED file that could have been generated before
|
||||
|
||||
rm -f DISABLED
|
||||
|
||||
dnl ---- Should I use libtool to load shared libraries in gbi and gbx ?
|
||||
|
||||
if test "$SYSTEM" != "CYGWIN" && test "$SYSTEM" != "OPENBSD"; then
|
||||
|
|
|
@ -7,7 +7,7 @@ gbx3_LDADD = @MATH_LIB@ @INTL_LIB@ @CONV_LIB@ @GETTEXT_LIB@ @DL_LIB@ @GBX_THREAD
|
|||
gbx3_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" $(AM_CFLAGS)
|
||||
|
||||
gb_la_LIBADD = @MATH_LIB@ @INTL_LIB@ @CONV_LIB@ @GETTEXT_LIB@ @DL_LIB@ @GBX_THREAD_LIB@ @FFI_LIB@
|
||||
gb_la_LDFLAGS = -module @LD_FLAGS@
|
||||
gb_la_LDFLAGS = -module @LD_FLAGS@ @FFI_LDFLAGS@
|
||||
gb_la_CFLAGS = -DGBX_INFO $(AM_CFLAGS) -O0
|
||||
|
||||
gbx3_SOURCES = \
|
||||
|
|
Loading…
Reference in a new issue