make sane-config multilib-aware

This commit is contained in:
Nils Philippsen 2009-06-17 11:16:47 +00:00
parent 218b987178
commit 95750866e9
2 changed files with 40 additions and 6 deletions

View File

@ -1,11 +1,17 @@
commit c230f04bf3590fbfcd4aaa529e9f10eb0478379c
commit e4a01aa9f45cd2420bed7a9131a6d0044c182a05
Author: Nils Philippsen <nils@redhat.com>
Date: Tue Jun 16 17:02:26 2009 +0200
Date: Wed Jun 17 13:10:47 2009 +0200
patch: pkgconfig
Squashed commit of the following:
commit 52ef5f47ccc0128c78ab3ad38ac7b7918dd7ac88
Author: Nils Philippsen <nils@redhat.com>
Date: Wed Jun 17 13:09:51 2009 +0200
make sane-config multilib-aware on Linux
commit 7787640dd567b93dd0a458fd5fb662bb7b85ff36
Author: Nils Philippsen <nils@redhat.com>
Date: Fri Jun 5 12:55:39 2009 +0200
@ -90,23 +96,50 @@ index 0000000..fb64e3b
+Libs: -L${libdir} -lsane ${pc_libs}
+Cflags:
diff --git a/tools/sane-config.in b/tools/sane-config.in
index 85add1a..9e5a2fc 100644
index 85add1a..c0450d4 100644
--- a/tools/sane-config.in
+++ b/tools/sane-config.in
@@ -32,6 +32,12 @@ srcdir="@srcdir@"
@@ -18,7 +18,7 @@ pkglibdir="@pkglibdir@"
includedir="@includedir@"
mandir="@mandir@"
infodir="@infodir@"
-libdir="@libdir@"
+#libdir=
localstatedir="@localstatedir@"
sysconfdir="@sysconfdir@"
datarootdir="@datarootdir@"
@@ -32,6 +32,30 @@ srcdir="@srcdir@"
top_srcdir="@top_srcdir@"
cflags=
+pkgconfig_package=sane-backends
+use_pkgconfig=0
+if test -x "@bindir@/pkg-config" -a "@bindir@/pkg-config" --exists "$pkgconfig_package"
+if test -x "@bindir@/pkg-config" && "@bindir@/pkg-config" --exists "$pkgconfig_package"; then
+ use_pkgconfig=1
+else
+ libdir=
+ if kernel="`uname -s 2>/dev/null`"; then
+ case "$kernel" in
+ Linux)
+ if hw="`uname -i 2>/dev/null`"; then
+ case "$hw" in
+ *64)
+ libdir="@exec_prefix@/lib64"
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ fi
+ if test "x$libdir" = "x"; then
+ libdir="@exec_prefix@/lib"
+ fi
+fi
+
usage ()
{
echo "Usage: " 1>&2
@@ -85,26 +91,38 @@ if test $# -gt 0; then
@@ -85,26 +109,38 @@ if test $# -gt 0; then
;;
--ldflags)

View File

@ -156,6 +156,7 @@ rm -rf %{buildroot}
%changelog
* Wed Jun 17 2009 Nils Philippsen <nils@redhat.com> - 1.0.20-3
- disable rpath
- make sane-config multilib-aware
* Wed Jun 17 2009 Nils Philippsen <nils@redhat.com> - 1.0.20-2
- fix permissions for Epson Expression 800 (#456656)