Merge pull request #254 from h3xx/fix-library-cflags

Add -DHAVE_GLIB to library cflags if needed
This commit is contained in:
Evan Miller 2021-02-10 16:11:24 -05:00 committed by GitHub
commit b9c065885c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@ MDBTOOLS_VERSION_MICRO=2
# See https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
VERSION_INFO=3:2:0
AC_SUBST(VERSION_INFO)
AC_SUBST(MDBTOOLS_CFLAGS)
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
@ -215,6 +216,7 @@ if test "$enable_glib" = "yes"; then
GLIB_PACKAGE=glib-2.0
PKG_CHECK_MODULES([GLIB], [$GLIB_PACKAGE], HAVE_GLIB=true, HAVE_GLIB=false)
if test "x$HAVE_GLIB" = "xtrue"; then
MDBTOOLS_CFLAGS="$MDBTOOLS_CFLAGS -DHAVE_GLIB=1"
GLIB_CFLAGS="$GLIB_CFLAGS -DHAVE_GLIB=1"
AC_SUBST(GLIB_PACKAGE)
else

View File

@ -12,4 +12,4 @@ Description: core MDB file support library
Requires: @GLIB_PACKAGE@
Version: @VERSION@
Libs: -L${libdir} -lmdb
Cflags:
Cflags: @MDBTOOLS_CFLAGS@