Add -DHAVE_GLIB to library cflags if needed

This commit is contained in:
Dan Church 2021-02-10 14:08:00 -06:00
parent c5593d893e
commit 65c9c2763a
No known key found for this signature in database
GPG Key ID: EA2BF379CD2CDBD0
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@