diff options
author | kwaclaw <kwaclaw> | 2007-09-03 17:26:20 +0000 |
---|---|---|
committer | kwaclaw <kwaclaw> | 2007-09-03 17:26:20 +0000 |
commit | c30efcfa4069a1344a544649b37b72118489e2f9 (patch) | |
tree | eb958fe3dfb64f9c180424ed4b24df6eaf976d68 | |
parent | c537192b4b9f9cc8ee63ba3b2221632189461465 (diff) | |
download | libexpat-c30efcfa4069a1344a544649b37b72118489e2f9.tar.gz |
Added pkg-config support - patch #1749198 by Dan Nicholson.
-rwxr-xr-x | .cvsignore | 1 | ||||
-rw-r--r-- | Makefile.in | 16 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | expat.pc.in | 10 |
4 files changed, 23 insertions, 6 deletions
@@ -11,3 +11,4 @@ libtool expat.ncb expat.opt .project +expat.pc diff --git a/Makefile.in b/Makefile.in index 0e2cc95..c15e62d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -31,6 +31,7 @@ bindir = @bindir@ libdir = @libdir@ includedir = @includedir@ man1dir = @mandir@/man1 +pkgconfigdir = $(libdir)/pkgconfig top_builddir = . @@ -48,9 +49,9 @@ DESTDIR = $(INSTALL_ROOT) default: buildlib xmlwf/xmlwf -buildlib: $(LIBRARY) +buildlib: $(LIBRARY) expat.pc -all: $(LIBRARY) xmlwf/xmlwf examples/elements examples/outline +all: $(LIBRARY) expat.pc xmlwf/xmlwf examples/elements examples/outline clean: cd lib && rm -f $(LIBRARY) *.o *.lo && rm -rf .libs _libs @@ -65,7 +66,7 @@ clobber: clean distclean: clean rm -f expat_config.h config.status config.log config.cache libtool - rm -f Makefile + rm -f Makefile expat.pc extraclean: distclean rm -f expat_config.h.in configure @@ -80,10 +81,11 @@ install: xmlwf/xmlwf installlib $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) xmlwf/xmlwf $(DESTDIR)$(bindir)/xmlwf $(INSTALL_DATA) $(MANFILE) $(DESTDIR)$(man1dir) -installlib: $(LIBRARY) $(APIHEADER) - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) +installlib: $(LIBRARY) $(APIHEADER) expat.pc + $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(pkgconfigdir) $(LIBTOOL) --mode=install $(INSTALL) $(LIBRARY) $(DESTDIR)$(libdir)/$(LIBRARY) for FN in $(APIHEADER) ; do $(INSTALL_DATA) $$FN $(DESTDIR)$(includedir) ; done + $(INSTALL_DATA) expat.pc $(DESTDIR)$(pkgconfigdir)/expat.pc uninstall: uninstalllib $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/xmlwf @@ -93,6 +95,7 @@ uninstalllib: $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(LIBRARY) rm -f $(DESTDIR)$(includedir)/expat.h rm -f $(DESTDIR)$(includedir)/expat_external.h + rm -f $(DESTDIR)$(pkgconfigdir)/expat.pc # for VPATH builds (invoked by configure) mkdir-init: @@ -125,6 +128,9 @@ LIB_OBJS = lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo $(LIBRARY): $(LIB_OBJS) $(LINK_LIB) $(LIB_OBJS) +expat.pc: $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $@ + lib/xmlparse.lo: lib/xmlparse.c lib/expat.h lib/xmlrole.h lib/xmltok.h \ $(top_builddir)/expat_config.h lib/expat_external.h lib/internal.h diff --git a/configure.in b/configure.in index 24bcb40..cb226ae 100644 --- a/configure.in +++ b/configure.in @@ -144,7 +144,7 @@ AC_DEFINE([XML_DTD], 1, AC_DEFINE([XML_CONTEXT_BYTES], 1024, [Define to specify how much context to retain around the current parse point.]) -AC_CONFIG_FILES(Makefile) +AC_CONFIG_FILES([Makefile expat.pc]) AC_OUTPUT abs_srcdir="`cd $srcdir && pwd`" diff --git a/expat.pc.in b/expat.pc.in new file mode 100644 index 0000000..f63b994 --- /dev/null +++ b/expat.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: expat +Version: @PACKAGE_VERSION@ +Description: expat XML parser +Libs: -L${libdir} -lexpat +Cflags: -I${includedir} |