kopia lustrzana https://gitlab.com/sane-project/backends
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.merge-requests/1/head
rodzic
e09f3c4345
commit
26ea2a2569
|
@ -7,31 +7,10 @@
|
||||||
PACKAGE="@PACKAGE@"
|
PACKAGE="@PACKAGE@"
|
||||||
scriptname="sane-config"
|
scriptname="sane-config"
|
||||||
|
|
||||||
LINKER_RPATH="@LINKER_RPATH@"
|
|
||||||
|
|
||||||
prefix="@prefix@"
|
prefix="@prefix@"
|
||||||
exec_prefix="@exec_prefix@"
|
exec_prefix="@exec_prefix@"
|
||||||
|
|
||||||
LDFLAGS="@LDFLAGS@ @GPHOTO2_LDFLAGS@"
|
pkgconfig_package=sane-backends
|
||||||
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=
|
|
||||||
|
|
||||||
usage ()
|
usage ()
|
||||||
{
|
{
|
||||||
|
@ -60,7 +39,7 @@ if test $# -gt 0; then
|
||||||
if test $# -eq 1; then
|
if test $# -eq 1; then
|
||||||
usage
|
usage
|
||||||
elif test $# -eq 2; then
|
elif test $# -eq 2; then
|
||||||
case $2 in
|
case $2 in
|
||||||
--cflags)
|
--cflags)
|
||||||
echo "Usage: $0 --cflags"
|
echo "Usage: $0 --cflags"
|
||||||
echo " Print C compiler flags for compiling code that uses SANE."
|
echo " Print C compiler flags for compiling code that uses SANE."
|
||||||
|
@ -85,33 +64,19 @@ if test $# -gt 0; then
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
--ldflags)
|
--ldflags)
|
||||||
|
pkg-config --libs-only-L "$pkgconfig_package"
|
||||||
if test -z "$LINKER_RPATH"; then
|
|
||||||
echo "-L${libdir} @LDFLAGS@"
|
|
||||||
else
|
|
||||||
echo "-L${libdir} @LDFLAGS@ ${LINKER_RPATH}${libdir}"
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
--libs)
|
--libs)
|
||||||
echo "-lsane ${LIBS}"
|
pkg-config --libs "$pkgconfig_package"
|
||||||
;;
|
;;
|
||||||
--cflags)
|
--cflags)
|
||||||
unique_cflags=
|
pkg-config --cflags "$pkgconfig_package"
|
||||||
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"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo ${unique_cflags}
|
|
||||||
;;
|
;;
|
||||||
--prefix)
|
--prefix)
|
||||||
echo ${prefix}
|
echo "${prefix}"
|
||||||
;;
|
;;
|
||||||
--exec-prefix)
|
--exec-prefix)
|
||||||
echo ${exec_prefix}
|
echo "${exec_prefix}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage
|
usage
|
||||||
|
|
Ładowanie…
Reference in New Issue