blob: e3a24f8cd23a52cc6e14558bd498d63cf11d4ef4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
--- sane-backends-1.0.27.orig/acinclude.m4
+++ sane-backends-1.0.27/acinclude.m4
@@ -439,15 +439,19 @@ AC_DEFUN([SANE_CHECK_GPHOTO2],
# a program. And, if that works, then add the -l flags to
# GPHOTO2_LIBS and any other flags to GPHOTO2_LDFLAGS to pass to
# sane-config.
- if test "$with_gphoto2" != "no" ; then
- AC_CHECK_TOOL(HAVE_GPHOTO2, pkg-config, false)
+ AS_IF([test "$with_gphoto2" != "no"],[
+ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+ if test "x$PKG_CONFIG" = x; then
+ HAVE_GPHOTO2=false
+ else
+ HAVE_GPHOTO2=$PKG_CONFIG
+ fi
if test ${HAVE_GPHOTO2} != "false" ; then
- if pkg-config --exists libgphoto2 ; then
- with_gphoto2="`pkg-config --modversion libgphoto2`"
- GPHOTO2_CPPFLAGS="`pkg-config --cflags libgphoto2`"
- GPHOTO2_LIBS="`pkg-config --libs libgphoto2`"
-
+ if $PKG_CONFIG --exists libgphoto2 ; then
+ with_gphoto2="`$PKG_CONFIG --modversion libgphoto2`"
+ GPHOTO2_CPPFLAGS="`$PKG_CONFIG --cflags libgphoto2`"
+ GPHOTO2_LIBS="`$PKG_CONFIG --libs libgphoto2`"
saved_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${GPHOTO2_CPPFLAGS}"
saved_LIBS="${LIBS}"
@@ -431,13 +436,13 @@
GPHOTO2_LIBS=""
else
SANE_EXTRACT_LDFLAGS(GPHOTO2_LIBS, GPHOTO2_LDFLAGS)
- if pkg-config --atleast-version=2.5.0 libgphoto2; then
+ if $PKG_CONFIG --atleast-version=2.5.0 libgphoto2; then
AC_DEFINE([GPLOGFUNC_NO_VARGS], [1],
[Define if GPLogFunc does not take a va_list.])
fi
fi
fi
- fi
+ ])
AC_SUBST(GPHOTO2_CPPFLAGS)
AC_SUBST(GPHOTO2_LIBS)
AC_SUBST(GPHOTO2_LDFLAGS)
|