summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Woelders <kim@woelders.dk>2008-10-22 18:48:55 +0000
committerKim Woelders <kim@woelders.dk>2008-10-22 18:48:55 +0000
commite3ec99354e66eeec73a5764660337d4959c7ffae (patch)
tree3e05b41668236628e0521623cdbf396cd8cdbda1
parent386ee4810a7a43f12e36e9d120b8c4aa9b1a1fab (diff)
downloadimlib2-e3ec99354e66eeec73a5764660337d4959c7ffae.tar.gz
Revert imlib2-config removal. There still may be systems without pkgconfig out there.
SVN revision: 37002
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac3
-rw-r--r--imlib2-config.in59
-rw-r--r--imlib2.spec.in1
4 files changed, 65 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 73d560b..082ea5a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,6 +6,8 @@ MAINTAINERCLEANFILES = aclocal.m4 config.guess config.h.in \
config.sub configure depcomp install-sh \
ltmain.sh Makefile.in missing imlib2_docs.tar.gz
+bin_SCRIPTS = imlib2-config
+
EXTRA_DIST = AUTHORS COPYING COPYING-PLAIN gendoc \
Doxyfile \
README.in README \
diff --git a/configure.ac b/configure.ac
index 045a7f6..e7b7a29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -527,9 +527,12 @@ data/Makefile
data/fonts/Makefile
data/images/Makefile
doc/Makefile
+imlib2-config
README
imlib2.spec
debian/changelog
+],[
+chmod +x imlib2-config
])
#####################################################################
diff --git a/imlib2-config.in b/imlib2-config.in
new file mode 100644
index 0000000..cf814c6
--- /dev/null
+++ b/imlib2-config.in
@@ -0,0 +1,59 @@
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+
+usage="\
+Usage: imlib2-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
+
+if test $# -eq 0; then
+ echo "${usage}" 1>&2
+ exit 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo $prefix
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+ --version)
+ echo @VERSION@
+ ;;
+ --cflags)
+ if test @prefix@/include != /usr/include ; then
+ includes="-I@prefix@/include"
+ fi
+ echo $includes
+ ;;
+ --libs)
+ libdirs=-L@libdir@
+ echo $libdirs -lImlib2 @my_libs@
+ ;;
+ *)
+ echo "${usage}" 1>&2
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+exit 0
diff --git a/imlib2.spec.in b/imlib2.spec.in
index 5866264..f43b216 100644
--- a/imlib2.spec.in
+++ b/imlib2.spec.in
@@ -158,6 +158,7 @@ test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
%{_libdir}/*.a
%{_libdir}/imlib2/*/*.a
%{_libdir}/imlib2/*/*.la
+%{_bindir}/imlib2-config
%{_libdir}/pkgconfig/*
%{_includedir}/*
%{_datadir}/%{name}