Description: Keep /usr/lib/sane as a fallback for SANE backends Make /usr/lib/arch_triplet/sane the default location for SANE backends, but keep /usr/lib/sane as a fallback for now. Author: Julien BLACHE Index: trunk/backend/dll.c =================================================================== --- trunk.orig/backend/dll.c +++ trunk/backend/dll.c @@ -430,7 +430,7 @@ load (struct backend *be) if (path) { - src_len = strlen (path) + strlen (LIBDIR) + 1 + 1; + src_len = strlen (path) + strlen (DEB_DLL_LIBDIR) + 1 + 1; src = malloc (src_len); if (!src) { @@ -438,12 +438,11 @@ load (struct backend *be) return SANE_STATUS_NO_MEM; } orig_src = src; - snprintf (src, src_len, "%s:%s", path, LIBDIR); + snprintf (src, src_len, "%s:%s", path, DEB_DLL_LIBDIR); } else { - src = LIBDIR; - src = strdup (src); + src = strdup (DEB_DLL_LIBDIR); if (!src) { DBG (1, "load: strdup failed: %s\n", strerror (errno)); Index: trunk/backend/Makefile.in =================================================================== --- trunk.orig/backend/Makefile.in +++ trunk/backend/Makefile.in @@ -1914,7 +1914,7 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -DLIBDIR="\"$(libdir)/sane\"" +AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -DLIBDIR="$(libdir)/sane" -DDEB_DLL_LIBDIR="\"$(libdir)/sane:$(prefix)/lib/sane\"" AM_LDFLAGS = @STRICT_LDFLAGS@ # The -rpath option is added because we are creating _LTLIBRARIES based # on configure substitution. This causes automake to not know the Index: trunk/backend/Makefile.am =================================================================== --- trunk.orig/backend/Makefile.am +++ trunk/backend/Makefile.am @@ -24,7 +24,7 @@ USB_LIBS = @USB_LIBS@ SCSI_LIBS = @SCSI_LIBS@ PTHREAD_LIBS = @PTHREAD_LIBS@ -AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -DLIBDIR="\"$(libdir)/sane\"" +AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -DLIBDIR="\"$(libdir)/sane\"" -DDEB_DLL_LIBDIR="\"$(libdir)/sane:$(prefix)/lib/sane\"" V_MAJOR = @V_MAJOR@ V_MINOR = @V_MINOR@