From 690529369b17d770d9c453b574a4287ae197cd0b Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Thu, 9 Jun 2016 03:05:23 +0300 Subject: [PATCH 3/7] Disable libpng check --- configure.bash | 52 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/configure.bash b/configure.bash index 25e293c..984001f 100755 --- a/configure.bash +++ b/configure.bash @@ -349,58 +349,10 @@ fi # libpng # try if given flags are enough -HAS_LIBPNG=0 -if echo "#include \"png.h\" - int main(){ - return !png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); -}" | "$CC" -xc -std=c99 -o /dev/null $CFLAGS $LDFLAGS - &> /dev/null; then - status "libpng" "custom flags" - HAS_LIBPNG=1 -fi +HAS_LIBPNG=1 +status "libpng" "custom flags" if [ "$HAS_LIBPNG" -eq 0 ]; then - # try static in the given directory - PNGH=$(find_h "$LIBPNG_DIR" "png.h") - if [ -n "$PNGH" ]; then - PNGH_STRING=$(pngh_string "$PNGH") - PNGH_MAJMIN=$(pngh_majmin "$PNGH") - if [[ -n "$PNGH_STRING" && -n "$PNGH_MAJMIN" ]]; then - LIBPNGA=$(find_f "$LIBPNG_DIR" "libpng${PNGH_MAJMIN}.a") - if [ -n "$LIBPNGA" ]; then - cflags "-I${PNGH%/*}" - lflags "${LIBPNGA}" - status "libpng" "static (${PNGH_STRING})" - HAS_LIBPNG=1 - fi - fi - fi -fi -# try shared -if [ "$HAS_LIBPNG" -eq 0 ]; then - if find_pkgconfig libpng; then - HAS_LIBPNG=1 - else - for i in "${DIRS[@]}"; do - DIR=($i) - PNGH=$(find_h "${DIR[0]}" "png.h") - if [ -n "$PNGH" ]; then - PNGH_STRING=$(pngh_string "$PNGH") - PNGH_MAJMIN=$(pngh_majmin "$PNGH") - if [[ -n "$PNGH_STRING" && -n "$PNGH_MAJMIN" ]]; then - LIBPNGSO=$(find_f "${DIR[1]}" "libpng${PNGH_MAJMIN}.$SOLIBSUFFIX*") - if [ -n "$LIBPNGSO" ]; then - cflags "-I${PNGH%/*}" - lflags "-L${LIBPNGSO%/*} -lpng${PNGH_MAJMIN}" - status "libpng" "shared (${PNGH_STRING})" - HAS_LIBPNG=1 - break - fi - fi - fi - done - fi -fi -if [ "$HAS_LIBPNG" -eq 0 ]; then if [[ "$OSTYPE" =~ "darwin" ]]; then LIBPNG_CMD='`brew install libpng`' else -- 2.10.2