Commit c84f9942 authored by Frediano Ziglio's avatar Frediano Ziglio
Browse files

Better error reporting if zlib or libpng are not static

Tell the specific library which is not static.
Previously any would be reported as libpng.

This fixes #17

Signed-off-by: Frediano Ziglio's avatarFrediano Ziglio <freddy77@gmail.com>
Acked-by: default avatarJakub Janků <jjanku@redhat.com>
parent a737a2b6
Pipeline #328864 passed with stage
in 4 minutes and 18 seconds
......@@ -103,8 +103,27 @@ dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES_STATIC(LIBPNG, [libpng])
ACX_SET_VAR(CFLAGS, "$CFLAGS -Wall",
ACX_SET_VAR(LDFLAGS, "$LDFLAGS -static",
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]], [[
printf("hello");
return 0
]])], [], AC_MSG_ERROR([some base static library (possibly pthread) not found]))
)
)
PKG_CHECK_MODULES_STATIC(ZLIB, [zlib])
ACX_SET_VAR(CFLAGS, "$CFLAGS $ZLIB_CFLAGS -Wall",
ACX_SET_VAR(LDFLAGS, "$LDFLAGS -static",
ACX_SET_VAR(LIBS, "$LIBS $ZLIB_LIBS",
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <zlib.h>]], [[
return !!zlibVersion()
]])], [], AC_MSG_ERROR([static zlib not found]))
)
)
)
PKG_CHECK_MODULES_STATIC(LIBPNG, [libpng])
ACX_SET_VAR(CFLAGS, "$CFLAGS $LIBPNG_CFLAGS -Wall",
ACX_SET_VAR(LDFLAGS, "$LDFLAGS -static",
ACX_SET_VAR(LIBS, "$LIBS $LIBPNG_LIBS",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment