[GRASS-dev] Is libjpeg actually used?

Dear developers!

REQUIREMENTS.html mentions libjpeg as a requirement for Grass,
specifically for r.out.tiff. The configure script will exit if no
libjpeg is present.

On the other hand, the final libraries are not linked to libjpeg and I
couldn't find a reference in the code.

Is libjpeg still required?

Greetings,

Volker Fröhlich

Volker Froehlich wrote:

REQUIREMENTS.html mentions libjpeg as a requirement for Grass,
specifically for r.out.tiff. The configure script will exit if no
libjpeg is present.

On the other hand, the final libraries are not linked to libjpeg and I
couldn't find a reference in the code.

Is libjpeg still required?

No, and I'm not sure that it has ever actually been required. In all
probability, the test was a workaround for someone with a version of
libtiff which lacked dependency information. None of the Makefiles or
*.make files use any of JPEGINCPATH, JPEGLIBPATH or JPEGLIB. The last
two are used within configure.in as optional dependencies for libtiff
in the event that the check with -ltiff alone fails.

Everything related to JPEG should be removed from configure.in. The
TIFF check should simply add -ljpeg as an optional dependency, i.e.:

-LOC_CHECK_LIBS(tiff,TIFFOpen,TIFF,$TIFF_LIBRARY_DIRS,TIFFLIB,$JPEGLIBPATH $JPEGLIB,$ZLIB,$MATHLIB)
+LOC_CHECK_LIBS(tiff,TIFFOpen,TIFF,$TIFF_LIBRARY_DIRS,TIFFLIB,-ljpeg,$ZLIB,$MATHLIB)

If additional library directories are required for libjpeg, they can
be added via the --with-tiff-libs= option. Additional header
directories will never be required (the TIFF headers don't include the
JPEG headers).

--
Glynn Clements <glynn@gclements.plus.com>

Is somebody taking care of this or interested to do so? If not I'll file
a ticket.

Volker

On Mon, 2012-03-05 at 21:48 +0000, Glynn Clements wrote:

Volker Froehlich wrote:

> REQUIREMENTS.html mentions libjpeg as a requirement for Grass,
> specifically for r.out.tiff. The configure script will exit if no
> libjpeg is present.
>
> On the other hand, the final libraries are not linked to libjpeg and I
> couldn't find a reference in the code.
>
> Is libjpeg still required?

No, and I'm not sure that it has ever actually been required. In all
probability, the test was a workaround for someone with a version of
libtiff which lacked dependency information. None of the Makefiles or
*.make files use any of JPEGINCPATH, JPEGLIBPATH or JPEGLIB. The last
two are used within configure.in as optional dependencies for libtiff
in the event that the check with -ltiff alone fails.

Everything related to JPEG should be removed from configure.in. The
TIFF check should simply add -ljpeg as an optional dependency, i.e.:

-LOC_CHECK_LIBS(tiff,TIFFOpen,TIFF,$TIFF_LIBRARY_DIRS,TIFFLIB,$JPEGLIBPATH $JPEGLIB,$ZLIB,$MATHLIB)
+LOC_CHECK_LIBS(tiff,TIFFOpen,TIFF,$TIFF_LIBRARY_DIRS,TIFFLIB,-ljpeg,$ZLIB,$MATHLIB)

If additional library directories are required for libjpeg, they can
be added via the --with-tiff-libs= option. Additional header
directories will never be required (the TIFF headers don't include the
JPEG headers).

On Sun, Mar 11, 2012 at 6:58 PM, Volker Froehlich <volker27@gmx.at> wrote:

Is somebody taking care of this or interested to do so? If not I'll file
a ticket.

I have fixed it in SVN (6.4, 6.5 and 7).

Markus

On Sun, 2012-03-11 at 20:53 +0100, Markus Neteler wrote:

On Sun, Mar 11, 2012 at 6:58 PM, Volker Froehlich <volker27@gmx.at> wrote:
> Is somebody taking care of this or interested to do so? If not I'll file
> a ticket.

I have fixed it in SVN (6.4, 6.5 and 7).

Thank you! The reference in REQUIREMENTS.html is still left.

Volker

Markus

On Sun, Mar 11, 2012 at 9:14 PM, Volker Froehlich <volker27@gmx.at> wrote:

On Sun, 2012-03-11 at 20:53 +0100, Markus Neteler wrote:

On Sun, Mar 11, 2012 at 6:58 PM, Volker Froehlich <volker27@gmx.at> wrote:
> Is somebody taking care of this or interested to do so? If not I'll file
> a ticket.

I have fixed it in SVN (6.4, 6.5 and 7).

Thank you! The reference in REQUIREMENTS.html is still left.

Good catch, fixed.

I also updated
http://grass.osgeo.org/wiki/Compile_and_Install
http://grass.osgeo.org/wiki/Compile_and_Install/id
http://grass.osgeo.org/wiki/Compiling_on_MacOSX

Markus