changeset 32717:465b9f294519

Simplify OpenJPEG check with define_statement_check() helper function.
author diego
date Thu, 20 Jan 2011 11:27:32 +0000
parents 72dfebf10aff
children 1fc2df65b915
files configure
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Thu Jan 20 11:21:34 2011 +0000
+++ b/configure	Thu Jan 20 11:27:32 2011 +0000
@@ -4854,12 +4854,7 @@
 echocheck "OpenJPEG (JPEG2000) support"
 if test "$libopenjpeg" = auto ; then
   libopenjpeg=no
-cat > $TMPC << EOF
-#define  OPJ_STATIC
-#include <openjpeg.h>
-int main(void) { opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params); return 0; }
-EOF
-  cc_check -lopenjpeg $_ld_lm && libopenjpeg=yes
+  define_statement_check OPJ_STATIC openjpeg.h 'opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params)' -lopenjpeg $_ld_lm && libopenjpeg=yes
 fi
 echores "$libopenjpeg"
 if test "$libopenjpeg" = yes ; then