2011-09-16 12:42:00 +00:00
|
|
|
From 62b327a3a6a289ef3b89d6cfe239a9008a0303c3 Mon Sep 17 00:00:00 2001
|
2011-03-16 17:17:05 +00:00
|
|
|
From: Nils Philippsen <nils@redhat.com>
|
2011-09-16 12:42:00 +00:00
|
|
|
Date: Fri, 16 Sep 2011 12:23:57 +0200
|
2011-03-16 17:17:05 +00:00
|
|
|
Subject: [PATCH] patch: pkgconfig
|
|
|
|
|
|
|
|
Squashed commit of the following:
|
|
|
|
|
2011-09-16 12:42:00 +00:00
|
|
|
commit 8232a5fdf931da4b1adfade313c17c9cd118790d
|
2011-03-16 17:17:05 +00:00
|
|
|
Author: Nils Philippsen <nils@redhat.com>
|
2011-09-16 12:42:00 +00:00
|
|
|
Date: Fri Sep 16 12:18:06 2011 +0200
|
2011-03-16 17:17:05 +00:00
|
|
|
|
2011-09-16 12:42:00 +00:00
|
|
|
use pkg-config in sane-config
|
|
|
|
|
|
|
|
As we require pkg-config anyway, simply let sane-config use it to make
|
|
|
|
it compatible with multilib systems. Previously, sane-config contained
|
|
|
|
paths which were different on e.g. x86_64 and i386 which made the 64 and
|
|
|
|
32 bit versions conflict if installed in parallel.
|
2011-03-16 17:17:05 +00:00
|
|
|
---
|
2011-09-16 12:42:00 +00:00
|
|
|
tools/sane-config.in | 49 +++++++------------------------------------------
|
|
|
|
1 files changed, 7 insertions(+), 42 deletions(-)
|
2011-03-16 17:17:05 +00:00
|
|
|
|
|
|
|
diff --git a/tools/sane-config.in b/tools/sane-config.in
|
2011-09-16 12:42:00 +00:00
|
|
|
index 22c02b5..1fae2e5 100644
|
2011-03-16 17:17:05 +00:00
|
|
|
--- a/tools/sane-config.in
|
|
|
|
+++ b/tools/sane-config.in
|
2011-09-16 12:42:00 +00:00
|
|
|
@@ -7,31 +7,10 @@
|
|
|
|
PACKAGE="@PACKAGE@"
|
|
|
|
scriptname="sane-config"
|
|
|
|
|
|
|
|
-LINKER_RPATH="@LINKER_RPATH@"
|
|
|
|
-
|
|
|
|
prefix="@prefix@"
|
|
|
|
exec_prefix="@exec_prefix@"
|
2011-03-16 17:17:05 +00:00
|
|
|
|
2011-09-16 12:42:00 +00:00
|
|
|
-LDFLAGS="@LDFLAGS@ @GPHOTO2_LDFLAGS@"
|
|
|
|
-LIBS="@LIBS@ @DL_LIBS@ @LIBV4L_LIBS@ @MATH_LIB@ @TIFF_LIBS@ @JPEG_LIBS@ @GPHOTO2_LIBS@ @SOCKET_LIBS@ @AVAHI_LIBS@ @USB_LIBS@ @SCSI_LIBS@ @RESMGR_LIBS@"
|
|
|
|
-pkgincludedir="@pkgincludedir@"
|
|
|
|
-pkglibdir="@pkglibdir@"
|
|
|
|
-includedir="@includedir@"
|
|
|
|
-mandir="@mandir@"
|
|
|
|
-infodir="@infodir@"
|
|
|
|
-libdir="@libdir@"
|
|
|
|
-localstatedir="@localstatedir@"
|
|
|
|
-sysconfdir="@sysconfdir@"
|
|
|
|
-datarootdir="@datarootdir@"
|
|
|
|
-datadir="@datadir@"
|
|
|
|
-libexecdir="@libexecdir@"
|
|
|
|
-sbindir="@sbindir@"
|
|
|
|
-bindir="@bindir@"
|
|
|
|
-#${prefix}
|
|
|
|
-#exec_prefix_set=no
|
|
|
|
-srcdir="@srcdir@"
|
|
|
|
-top_srcdir="@top_srcdir@"
|
|
|
|
-cflags=
|
2011-03-16 17:17:05 +00:00
|
|
|
+pkgconfig_package=sane-backends
|
2011-09-16 12:42:00 +00:00
|
|
|
|
2011-03-16 17:17:05 +00:00
|
|
|
usage ()
|
|
|
|
{
|
2011-09-16 12:42:00 +00:00
|
|
|
@@ -60,7 +39,7 @@ if test $# -gt 0; then
|
2011-03-16 17:17:05 +00:00
|
|
|
if test $# -eq 1; then
|
|
|
|
usage
|
|
|
|
elif test $# -eq 2; then
|
|
|
|
- case $2 in
|
|
|
|
+ case $2 in
|
|
|
|
--cflags)
|
|
|
|
echo "Usage: $0 --cflags"
|
|
|
|
echo " Print C compiler flags for compiling code that uses SANE."
|
2011-09-16 12:42:00 +00:00
|
|
|
@@ -85,33 +64,19 @@ if test $# -gt 0; then
|
|
|
|
exit 1
|
2011-03-16 17:17:05 +00:00
|
|
|
;;
|
|
|
|
--ldflags)
|
2011-09-16 12:42:00 +00:00
|
|
|
-
|
2011-03-16 17:17:05 +00:00
|
|
|
- if test -z "$LINKER_RPATH"; then
|
|
|
|
- echo "-L${libdir} @LDFLAGS@"
|
2011-09-16 12:42:00 +00:00
|
|
|
- else
|
2011-03-16 17:17:05 +00:00
|
|
|
- echo "-L${libdir} @LDFLAGS@ ${LINKER_RPATH}${libdir}"
|
2011-09-16 12:42:00 +00:00
|
|
|
- fi
|
|
|
|
+ pkg-config --libs-only-L "$pkgconfig_package"
|
2011-03-16 17:17:05 +00:00
|
|
|
;;
|
|
|
|
--libs)
|
|
|
|
- echo "-lsane ${LIBS}"
|
2011-09-16 12:42:00 +00:00
|
|
|
+ pkg-config --libs "$pkgconfig_package"
|
2011-03-16 17:17:05 +00:00
|
|
|
;;
|
|
|
|
--cflags)
|
|
|
|
- unique_cflags=
|
|
|
|
- if test "${includedir}" != "/usr/include"; then
|
|
|
|
- unique_cflags="${unique_cflags} -I${includedir}"
|
|
|
|
- fi
|
|
|
|
- for i in $cflags; do
|
|
|
|
- if test "${i}" != "-I${includedir}"; then
|
|
|
|
- unique_cflags="${unique_cflags} $i"
|
2011-09-16 12:42:00 +00:00
|
|
|
- fi
|
2011-03-16 17:17:05 +00:00
|
|
|
- done
|
|
|
|
- echo ${unique_cflags}
|
2011-09-16 12:42:00 +00:00
|
|
|
+ pkg-config --cflags "$pkgconfig_package"
|
2011-03-16 17:17:05 +00:00
|
|
|
;;
|
|
|
|
--prefix)
|
2011-09-16 12:42:00 +00:00
|
|
|
- echo ${prefix}
|
|
|
|
+ echo "${prefix}"
|
|
|
|
;;
|
|
|
|
--exec-prefix)
|
|
|
|
- echo ${exec_prefix}
|
|
|
|
+ echo "${exec_prefix}"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
usage
|
2011-03-16 17:17:05 +00:00
|
|
|
--
|
2011-09-16 12:42:00 +00:00
|
|
|
1.7.6.1
|
2011-03-16 17:17:05 +00:00
|
|
|
|