summaryrefslogtreecommitdiffstats
path: root/patches/poppler-0.10.4/m4_libjpeg-fix.diff
blob: 1457cf145b68fc708f08ecc5a09067fb5ec3b82a (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
From: Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [libjpeg.m4] use AC_CHECK_HEADER to find headers

The original m4/libjpeg.m4 used AC_FIND_FILE to look for jpeg header file.
This test is not cross-compiling save. This patch uses the autoconf function
AC_CHECK_HEADER to look for the jpeg header, which works in the native and
the cross compiling scenaria.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

reported upstream as:
https://bugs.freedesktop.org/show_bug.cgi?id=20538

fixed upstream, will be included in the next release (0.10.5)

---
 m4/libjpeg.m4 |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: poppler-0.10.4/m4/libjpeg.m4
===================================================================
--- poppler-0.10.4.orig/m4/libjpeg.m4
+++ poppler-0.10.4/m4/libjpeg.m4
@@ -68,8 +68,7 @@ KDE_FIND_JPEG_HELPER(6b, 6b,
 
 dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h
 dnl requires system dependent includes loaded before it)
-jpeg_incdirs="`eval echo $includedir` /usr/include /usr/local/include /mingw/include"
-AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir)
+AC_CHECK_HEADER([jpeglib.h], [jpeg_incdir=yes], [jpeg_incdir=NO])
 test "x$jpeg_incdir" = xNO && jpeg_incdir=
 
 dnl if headers _and_ libraries are missing, this is no error, and we