[vlc-devel] [PATCH] Fix libpng checking on OpenBSD

Brad Smith brad at comstyle.com
Mon Jan 30 08:58:38 CET 2012


This fixes the libpng check on OpenBSD. Although the code was passing libm to
ultimately link the library the test itself was not and thus failing. Also at
Remi's request I changed the existing and newly introduced use of -lm to $LIBM.


diff --git a/configure.ac b/configure.ac
index e4afd39..db47a2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2741,11 +2741,11 @@ AC_ARG_ENABLE(png,
 if test "${enable_png}" != "no"; then
 AC_CHECK_HEADERS(png.h, [
   VLC_SAVE_FLAGS
-  LDFLAGS="${LDFLAGS} -lz"
+  LDFLAGS="${LDFLAGS} -lz $LIBM"
   AC_CHECK_LIB(png, png_set_rows, [
-    VLC_ADD_LIBS([png],[-lpng -lz -lm])
+    VLC_ADD_LIBS([png],[-lpng -lz $LIBM])
     VLC_ADD_PLUGIN([png osdmenu osd_parser])],
-    [],[-lz])
+    [],[-lz $LIBM] )
   VLC_RESTORE_FLAGS
   ])
 fi

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the vlc-devel mailing list