[PATCH] Added pkg-config support
Jim Evins
evins@snaught.com
Thu Nov 19 03:45:37 CET 2009
---
Makefile.in | 9 ++++++++-
barcode.pc.in | 11 +++++++++++
configure.in | 4 +++-
3 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 barcode.pc.in
diff --git a/Makefile.in b/Makefile.in
index 415d267..9a57623 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -15,6 +15,7 @@ LDFLAGS = -L. -l$(TARGET) @LIBPAPER@
prefix = @prefix@
BINDIR = $(prefix)/bin
LIBDIR = $(prefix)/lib
+PCDIR = $(prefix)/lib/pkgconfig
INCDIR = $(prefix)/include
MAN1DIR = $(prefix)/man/man1
MAN3DIR = $(prefix)/man/man3
@@ -25,6 +26,7 @@ GETOPT_O = @GETOPT_O@
TARGET = barcode
LIBRARY = lib$(TARGET).a
+PC = $(TARGET).pc
MAN1 = $(TARGET).1
MAN3 = $(TARGET).3
INFO = $(TARGET).info
@@ -70,6 +72,7 @@ install:
$(INSTALL) -c $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
$(INSTALL) -c -m 0644 $(HEADER) $(DESTDIR)$(INCDIR)/$(HEADER)
$(INSTALL) -c -m 0644 $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY)
+ $(INSTALL) -c -m 0644 $(PC) $(DESTDIR)$(PCDIR)/$(PC)
$(INSTALL) -c -m 0644 $(MAN1) $(DESTDIR)$(MAN1DIR)/$(MAN1)
$(INSTALL) -c -m 0644 $(MAN3) $(DESTDIR)$(MAN3DIR)/$(MAN3)
$(INSTALL) -c -m 0644 doc/$(INFO) $(DESTDIR)$(INFODIR)/$(INFO)
@@ -78,6 +81,7 @@ uninstall:
$(RM) -f $(DESTDIR)$(BINDIR)/$(TARGET)
$(RM) -f $(DESTDIR)$(INCDIR)/$(HEADER)
$(RM) -f $(DESTDIR)$(LIBDIR)/$(LIBRARY)
+ $(RM) -f $(DESTDIR)$(PCDIR)/$(PC)
$(RM) -f $(DESTDIR)$(MAN1DIR)/$(MAN1)
$(RM) -f $(DESTDIR)$(MAN3DIR)/$(MAN3)
$(RM) -f $(DESTDIR)$(INFODIR)/$(INFO)
@@ -93,7 +97,7 @@ distclean: clean
if [ -f build ]; then debian/rules clean; fi
# remove the configure stuff as well
$(RM) -f Makefile config.h config.log config.status config.cache \
- doc/Makefile
+ doc/Makefile $(PC)
cleanest: clean
cd doc && $(MAKE) clean
@@ -101,6 +105,9 @@ cleanest: clean
Makefile: Makefile.in configure
./configure
+$(PC): $(PC).in configure
+ ./configure
+
configure: configure.in
autoconf
diff --git a/barcode.pc.in b/barcode.pc.in
new file mode 100644
index 0000000..d4818cc
--- /dev/null
+++ b/barcode.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: barcode
+Description: GNU-barcode Library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lbarcode
+Cflags: -I${includedir}
+
diff --git a/configure.in b/configure.in
index 92bcce2..98b78f9 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(barcode.h)
+AC_INIT(barcode.h, 0.99)
AC_PREREQ(2.12)
AC_CANONICAL_HOST
@@ -70,3 +70,5 @@ AC_SUBST(INFOTOHTML)
AC_OUTPUT(doc/Makefile)
+AC_OUTPUT(barcode.pc)
+
--
1.6.2.5
--------------070909050008010904090709--
More information about the barcode
mailing list