git » nmdb » commit c6f9dcd

Use pkg-config to know which qdbm build flags to use.

author Alberto Bertogli
2007-10-10 02:34:59 UTC
committer Alberto Bertogli
2007-10-10 02:36:38 UTC
parent cda075afafe1d615bb416988d3f2d9e3fe24cb51

Use pkg-config to know which qdbm build flags to use.

This makes it easier to have qdbm headers and libs in different places.
As an example, Gentoo places the headers in /usr/include, but Ubuntu puts
them in /usr/include/qdbm.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

nmdb/Makefile +2 -2

diff --git a/nmdb/Makefile b/nmdb/Makefile
index c3e103a..30ab92b 100644
--- a/nmdb/Makefile
+++ b/nmdb/Makefile
@@ -61,8 +61,8 @@ endif
 # gmake 3.81, which is too new.
 ifeq ($(BACKEND), qdbm)
 	OBJS += be-qdbm.o
-	ALL_CFLAGS += -DBACKEND_QDBM
-	LIBS += -lqdbm
+	ALL_CFLAGS += `pkg-config qdbm --cflags` -DBACKEND_QDBM
+	LIBS += `pkg-config qdbm --libs-only-L` -lqdbm
 endif
 ifeq ($(BACKEND), bdb)
 	OBJS += be-bdb.o