summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-05-06 13:11:32 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-05-06 13:16:56 +0300
commita07f43bfb83875d60f16af25177798e847657813 (patch)
tree3479db3cd493dadcdab2bac423dde8d44174c90d
parent4d9399f965968ee89c225ab1f4e8fa4a4288c6c2 (diff)
downloadxdelta1-a07f43bfb83875d60f16af25177798e847657813.tar.gz
xdelta1-a07f43bfb83875d60f16af25177798e847657813.tar.bz2
xdelta1-a07f43bfb83875d60f16af25177798e847657813.zip
pkgconfig
-rwxr-xr-xMakefile.am3
-rwxr-xr-xconfigure.in4
-rw-r--r--xdelta-config60
-rw-r--r--xdelta.pc.in13
4 files changed, 79 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 2af66b9..4e6ae20 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,9 @@ SUBDIRS = libedsio . test doc djgpp
m4datadir = $(datadir)/aclocal
m4data_DATA = xdelta.m4
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xdelta.pc
+
## $Format: "libxdelta_la_LDFLAGS = -version-info $LibCurrent$:$LibRevision$:$LibAge$" $
libxdelta_la_LDFLAGS = -version-info 2:0:0
diff --git a/configure.in b/configure.in
index 80522a1..cd3ceed 100755
--- a/configure.in
+++ b/configure.in
@@ -63,6 +63,8 @@ AM_PROG_LIBTOOL
AC_HEADER_STDC
AC_PROG_MAKE_SET
+PKG_PROG_PKG_CONFIG
+
AC_CHECK_FUNCS(gettimeofday)
AC_HEADER_TIME
@@ -83,7 +85,7 @@ AC_OUTPUT(Makefile
doc/Makefile
test/Makefile
djgpp/Makefile
- xdelta-config
+ xdelta.pc
libedsio/Makefile
libedsio/edsio-comp,
diff --git a/xdelta-config b/xdelta-config
new file mode 100644
index 0000000..272e11d
--- /dev/null
+++ b/xdelta-config
@@ -0,0 +1,60 @@
+#!/bin/bash
+#
+# Simple wrapper around pkg-config to replace /usr/bin/<foo>-config scripts
+#
+# Copyright 2006 Red Hat, Inc.
+# Jeremy Katz <katzj@redhat.com>
+
+CFGPATH=$(basename $0)
+MODULE=${CFGPATH%-config}
+
+usage() {
+ pkg-config --help
+ exit 1
+}
+
+if [ $# -lt 1 ]; then
+ usage 1>&2
+fi
+
+ARGS=""
+
+while test $# -gt 0; do
+ case $1 in
+ --version)
+ ARGS="$ARGS --modversion"
+ ;;
+ --cflags)
+ ARGS="$ARGS --cflags"
+ ;;
+ --libs)
+ ARGS="$ARGS --libs"
+ ;;
+ --libdir*)
+ ARGS="$ARGS --libs-only-L"
+ ;;
+ --includedir*)
+ ARGS="$ARGS --cflags-only-I"
+ ;;
+ --prefix*)
+ ARGS="$ARGS --variable=prefix"
+ ;;
+ --exec-prefix*)
+ ARGS="$ARGS --variable=exec_prefix"
+ ;;
+ --module*)
+ if echo $1 | grep -q '=' ; then
+ MODULE=`echo $1 | sed 's/^--module=//'`
+ else
+ MODULE=$2
+ shift
+ fi
+ ;;
+ *)
+ usage 1>&2
+ ;;
+ esac
+ shift
+done
+
+pkg-config $ARGS $MODULE
diff --git a/xdelta.pc.in b/xdelta.pc.in
new file mode 100644
index 0000000..b178537
--- /dev/null
+++ b/xdelta.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+pkgdatadir=@pkgdatadir@
+
+Name: xdelta
+Description: A binary file delta generator and an RCS replacement library.
+Version: @VERSION@
+Requires:
+Libs: -L${libdir} -lxdelta -ledsio
+Cflags: -I${includedir}
+