Bug 21789 - more flexibility in openjpeg detection
Summary: more flexibility in openjpeg detection
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: low minor
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-18 04:40 UTC by Moritz Barsnick
Modified: 2012-02-24 03:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to find openjpeg header in more complex locations as well (1.79 KB, patch)
2009-05-18 04:40 UTC, Moritz Barsnick
Details | Splinter Review
use pkgconfig to find openjpeg (2.24 KB, patch)
2012-02-22 02:57 UTC, Adrian Johnson
Details | Splinter Review
replace openjpeg compile test with version check (1.32 KB, patch)
2012-02-22 03:05 UTC, Adrian Johnson
Details | Splinter Review

Description Moritz Barsnick 2009-05-18 04:40:44 UTC
Created attachment 25960 [details] [review]
Patch to find openjpeg header in more complex locations as well

RedHat/Fedora happen to package the openjpeg header in a peculiar (non-standard) location, namely ${includedir}/openjpeg/openjpeg.h. Note the extra subdirectory.

Poppler doesn't need to comply (a bug ticket is already opened against Fedora, see https://bugzilla.redhat.com/show_bug.cgi?id=484887), but it _could_. I'm attaching a patch which gives poppler's openjpeg detection that bit more flexibility. 

As a side-effect, Fedora could then build poppler against openjpeg out of the box.
Comment 1 Albert Astals Cid 2009-05-18 11:49:15 UTC
The patch looks a bit ugly, isn't there a better way to check for things like this? (total autotools newbie here)
Comment 2 Adrian Johnson 2012-02-22 02:57:58 UTC
Created attachment 57444 [details] [review]
use pkgconfig to find openjpeg

openjpeg >= 1.4 installs a pkgconfig file. The attached patch first tries pkgconfig to find libopenjpeg then falls back to the old test.
Comment 3 Adrian Johnson 2012-02-22 03:05:17 UTC
Created attachment 57445 [details] [review]
replace openjpeg compile test with version check

Now that openjpeg 1.5 is out and it installs a pkgconfig file the WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG test can be replaced with a pkgconfig check for >= 1.5.
Comment 4 Albert Astals Cid 2012-02-23 09:51:40 UTC
If it works feel free to commit to master, I'd like the cmake version to be adapted accordingly but if not, well though life
Comment 5 Adrian Johnson 2012-02-24 03:40:46 UTC
Committed


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.