ych wrote:
> 
> +have_jpeglib=no
> +AC_CHECK_LIB([jpeg],[jpeg_std_error],[have_jpeglib=yes],,)
> +
> +if test "x$have_jpeglib" = "xyes"; then
> +   LIBS="-ljpeg $LIBS"
> +   AC_DEFINE([HAVE_JPEGLIB], [1], [The jpeglib library is available])
> +fi
> +AM_CONDITIONAL([JPEGLIB], [test "x$have_jpeglib" = "xyes"])

Sorry to interfere, but why not simply:

AC_CHECK_LIB([jpeg], [jpeg_std_error], [], [have_jpeglib=no])
AM_CONDITIONAL([JPEGLIB], [test "$have_jpeglib" != "no"])
...
Using JPEG filter?                ${ac_cv_lib_jpeg_jpeg_std_error}


By default this will automatically define the preprocessor symbol
HAVE_LIBJPEG and will add -ljpeg to LIBS.  The Automake conditional
could be the same as the symbol, of course.



Reply via email to