From be70b86c5764b296f7ad75cf91f2e0b4c3d7cfe8 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 9 Sep 2014 22:55:29 -0700 Subject: [PATCH] configure: simplify libpng-config invocation use --ldflags over --prefix + --libs combination based on comment in issue #180. Change-Id: If2ca06053d5237b6722ddf4117917e5f3c06ab59 --- configure.ac | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 4f1ef58d..a472d270 100644 --- a/configure.ac +++ b/configure.ac @@ -296,15 +296,12 @@ AC_ARG_ENABLE([png], AS_HELP_STRING([--disable-png], @<:@default=auto@:>@])) AS_IF([test "x$enable_png" != "xno"], [ CLEAR_LIBVARS([PNG]) - AC_PATH_PROGS(LIBPNG_CONFIG, - [libpng-config libpng15-config libpng14-config libpng12-config]) + AC_PATH_PROGS([LIBPNG_CONFIG], + [libpng-config libpng16-config libpng15-config libpng14-config \ + libpng12-config]) if test -n "$LIBPNG_CONFIG"; then PNG_INCLUDES=`$LIBPNG_CONFIG --cflags` - PNG_PREFIX=`$LIBPNG_CONFIG --prefix` - if test "${PNG_PREFIX}/lib" != "/usr/lib" ; then - PNG_LIBS="-L${PNG_PREFIX}/lib" - fi - PNG_LIBS="$PNG_LIBS `$LIBPNG_CONFIG --libs`" + PNG_LIBS="`$LIBPNG_CONFIG --ldflags`" fi WITHLIB_OPTION([png], [PNG])