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

View File

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