Commit cb386337 authored by Noam Postavsky's avatar Noam Postavsky

Use pkg-config to find lcms2 CFLAGS and LIBS (Bug#30346)

* configure.ac: Use EMACS_CHECK_MODULES fors LCMS2 rather than
AC_SEARCH_LIBS.
* src/Makefile.in: Get LCMS2_LIBS and LCMS2_CFLAGS from configure,
instead of just LIBLCMS2.
parent 0f5cc9a0
......@@ -3514,23 +3514,20 @@ fi
AC_SUBST(LIBJPEG)
HAVE_LCMS2=no
LIBLCMS2=
LCMS2_CFLAGS=
LCMS2_LIBS=
if test "${with_lcms2}" != "no"; then
OLIBS=$LIBS
AC_SEARCH_LIBS([cmsCreateTransform], [lcms2], [HAVE_LCMS2=yes])
LIBS=$OLIBS
case $ac_cv_search_cmsCreateTransform in
-*) LIBLCMS2=$ac_cv_search_cmsCreateTransform ;;
esac
EMACS_CHECK_MODULES([LCMS2], [lcms2])
fi
if test "${HAVE_LCMS2}" = "yes"; then
AC_DEFINE([HAVE_LCMS2], 1, [Define to 1 if you have the lcms2 library (-llcms2).])
### mingw32 doesn't use -llcms2, since it loads the library dynamically.
if test "${opsys}" = "mingw32"; then
LIBLCMS2=
LCMS2_LIBS=
fi
fi
AC_SUBST(LIBLCMS2)
AC_SUBST(LCMS2_CFLAGS)
AC_SUBST(LCMS2_LIBS)
HAVE_ZLIB=no
LIBZ=
......
......@@ -234,7 +234,8 @@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
GETADDRINFO_A_LIBS = @GETADDRINFO_A_LIBS@
LIBLCMS2 = @LIBLCMS2@
LCMS2_LIBS = @LCMS2_LIBS@
LCMS2_CFLAGS = @LCMS2_CFLAGS@
LIBZ = @LIBZ@
......@@ -365,7 +366,7 @@ EMACS_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \
$(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \
$(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \
$(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(XFIXES_CFLAGS) $(XDBE_CFLAGS) \
$(WEBKIT_CFLAGS) \
$(WEBKIT_CFLAGS) $(LCMS2_CFLAGS) \
$(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
$(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \
$(LIBSYSTEMD_CFLAGS) $(JSON_CFLAGS) \
......@@ -497,7 +498,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
$(LIBXML2_LIBS) $(LIBGPM) $(LIBS_SYSTEM) $(CAIRO_LIBS) \
$(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \
$(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
$(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LIBLCMS2) \
$(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LCMS2_LIBS) \
$(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) \
$(JSON_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