[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
patch: robustify libpng check.
- To: VSIPL++ Developers List <vsipl++@xxxxxxxxxxxxxxxx>
- Subject: patch: robustify libpng check.
- From: Stefan Seefeld <stefan@xxxxxxxxxxxxxxxx>
- Date: Mon, 05 May 2008 16:52:49 -0400
The attached patch robustifies the check for libpng by not only looking
for the header, but also attempting to link. Previously we ran into a
situation where libpng.h was found (as part of a 32-bit package, but the
64-bit version of the library then was not, resulting in a failure at
compile-time, instead of simply disabling png-support at configure time.
The patch is checked in as obvious.
Thanks,
Stefan
--
Stefan Seefeld
CodeSourcery
stefan@xxxxxxxxxxxxxxxx
(650) 331-3385 x718
Index: configure.ac
===================================================================
--- configure.ac (revision 206786)
+++ configure.ac (working copy)
@@ -704,10 +704,8 @@
#endif])
AC_CHECK_HEADERS([png.h],
- [AC_SUBST(HAVE_PNG_H, 1)],
- [], [// no prerequisites])
+ [AC_CHECK_LIB(png, png_read_info,[AC_SUBST(VSIP_CSL_HAVE_PNG, 1)])])
-
SVXX_CHECK_FFT
SVXX_CHECK_PARALLEL
SVXX_CHECK_SAL
Index: src/vsip_csl/GNUmakefile.inc.in
===================================================================
--- src/vsip_csl/GNUmakefile.inc.in (revision 206767)
+++ src/vsip_csl/GNUmakefile.inc.in (working copy)
@@ -17,7 +17,7 @@
# Variables
########################################################################
-VSIP_CSL_HAVE_PNG := @HAVE_PNG_H@
+VSIP_CSL_HAVE_PNG := @VSIP_CSL_HAVE_PNG@
src_vsip_csl_CXXINCLUDES := -I$(srcdir)/src
src_vsip_csl_CXXFLAGS := $(src_vsip_csl_CXXINCLUDES)
|