configure: Add a pkg-config check for liblcms.

This commit is contained in:
Alexandre Julliard 2013-05-06 11:47:31 +02:00
parent 2a897ef242
commit 9ddd30d11c
3 changed files with 62 additions and 19 deletions

49
configure vendored
View File

@ -652,7 +652,8 @@ LIBGETTEXTPO
ZLIB ZLIB
FREETYPE_LIBS FREETYPE_LIBS
FREETYPE_CFLAGS FREETYPE_CFLAGS
LCMSLIBS LCMS_LIBS
LCMS_CFLAGS
RESOLVLIBS RESOLVLIBS
GPHOTO2_PORT_LIBS GPHOTO2_PORT_LIBS
GPHOTO2_PORT_CFLAGS GPHOTO2_PORT_CFLAGS
@ -878,6 +879,8 @@ GPHOTO2_CFLAGS
GPHOTO2_LIBS GPHOTO2_LIBS
GPHOTO2_PORT_CFLAGS GPHOTO2_PORT_CFLAGS
GPHOTO2_PORT_LIBS GPHOTO2_PORT_LIBS
LCMS_CFLAGS
LCMS_LIBS
FREETYPE_CFLAGS FREETYPE_CFLAGS
FREETYPE_LIBS FREETYPE_LIBS
GSTREAMER_CFLAGS GSTREAMER_CFLAGS
@ -1590,6 +1593,8 @@ Some influential environment variables:
C compiler flags for libgphoto2_port, overriding pkg-config C compiler flags for libgphoto2_port, overriding pkg-config
GPHOTO2_PORT_LIBS GPHOTO2_PORT_LIBS
Linker flags for libgphoto2_port, overriding pkg-config Linker flags for libgphoto2_port, overriding pkg-config
LCMS_CFLAGS C compiler flags for lcms, overriding pkg-config
LCMS_LIBS Linker flags for lcms, overriding pkg-config
FREETYPE_CFLAGS FREETYPE_CFLAGS
C compiler flags for freetype2, overriding pkg-config C compiler flags for freetype2, overriding pkg-config
FREETYPE_LIBS FREETYPE_LIBS
@ -2603,7 +2608,7 @@ fi
# Check whether --with-cms was given. # Check whether --with-cms was given.
if test "${with_cms+set}" = set; then : if test "${with_cms+set}" = set; then :
withval=$with_cms; if test "x$withval" = "xno"; then ac_cv_header_lcms_h=no; ac_cv_header_lcms_lcms_h=no; fi withval=$with_cms;
fi fi
@ -5851,8 +5856,6 @@ for ac_header in \
jpeglib.h \ jpeglib.h \
kstat.h \ kstat.h \
lber.h \ lber.h \
lcms.h \
lcms/lcms.h \
ldap.h \ ldap.h \
link.h \ link.h \
linux/cdrom.h \ linux/cdrom.h \
@ -10843,7 +10846,35 @@ rm -f core conftest.err conftest.$ac_objext \
LIBS="$ac_save_LIBS" LIBS="$ac_save_LIBS"
fi fi
LCMSLIBS="" if test "x$with_lcms" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
if test -n "$LCMS_CFLAGS"; then :
elif test -n "$PKG_CONFIG"; then :
LCMS_CFLAGS=`$PKG_CONFIG --cflags lcms 2>/dev/null`
fi
CPPFLAGS="$CPPFLAGS $LCMS_CFLAGS"
if test -n "$LCMS_LIBS"; then :
elif test -n "$PKG_CONFIG"; then :
LCMS_LIBS=`$PKG_CONFIG --libs lcms 2>/dev/null`
fi
LCMS_LIBS=${LCMS_LIBS:-"-llcms"}
for ac_header in lcms.h lcms/lcms.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
if test "$ac_cv_header_lcms_h" = "yes" -o "$ac_cv_header_lcms_lcms_h" = "yes" if test "$ac_cv_header_lcms_h" = "yes" -o "$ac_cv_header_lcms_lcms_h" = "yes"
then then
@ -10887,9 +10918,15 @@ if test "x$ac_cv_lib_lcms_cmsOpenProfileFromFile" = xyes; then :
$as_echo "#define HAVE_LCMS 1" >>confdefs.h $as_echo "#define HAVE_LCMS 1" >>confdefs.h
LCMSLIBS="-llcms" else
LCMS_LIBS=""
fi fi
else
LCMS_CFLAGS=""
LCMS_LIBS=""
fi
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
if test "$ac_cv_lib_lcms_cmsOpenProfileFromFile" != "yes"; then : if test "$ac_cv_lib_lcms_cmsOpenProfileFromFile" != "yes"; then :
case "x$with_cms" in case "x$with_cms" in

View File

@ -35,8 +35,7 @@ AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa soun
[if test "x$withval" = "xno"; then ac_cv_header_sys_asoundlib_h=no; ac_cv_header_alsa_asoundlib_h=no; fi]) [if test "x$withval" = "xno"; then ac_cv_header_sys_asoundlib_h=no; ac_cv_header_alsa_asoundlib_h=no; fi])
AC_ARG_WITH(capi, AS_HELP_STRING([--without-capi],[do not use CAPI (ISDN support)]), AC_ARG_WITH(capi, AS_HELP_STRING([--without-capi],[do not use CAPI (ISDN support)]),
[if test "x$withval" = "xno"; then ac_cv_header_capi20_h=no; ac_cv_header_linux_capi_h=no; fi]) [if test "x$withval" = "xno"; then ac_cv_header_capi20_h=no; ac_cv_header_linux_capi_h=no; fi])
AC_ARG_WITH(cms, AS_HELP_STRING([--without-cms],[do not use CMS (color management support)]), AC_ARG_WITH(cms, AS_HELP_STRING([--without-cms],[do not use CMS (color management support)]))
[if test "x$withval" = "xno"; then ac_cv_header_lcms_h=no; ac_cv_header_lcms_lcms_h=no; fi])
AC_ARG_WITH(coreaudio, AS_HELP_STRING([--without-coreaudio],[do not use the CoreAudio sound support]), AC_ARG_WITH(coreaudio, AS_HELP_STRING([--without-coreaudio],[do not use the CoreAudio sound support]),
[if test "x$withval" = "xno"; then ac_cv_header_CoreAudio_CoreAudio_h=no; fi]) [if test "x$withval" = "xno"; then ac_cv_header_CoreAudio_CoreAudio_h=no; fi])
AC_ARG_WITH(cups, AS_HELP_STRING([--without-cups],[do not use CUPS])) AC_ARG_WITH(cups, AS_HELP_STRING([--without-cups],[do not use CUPS]))
@ -434,8 +433,6 @@ AC_CHECK_HEADERS(\
jpeglib.h \ jpeglib.h \
kstat.h \ kstat.h \
lber.h \ lber.h \
lcms.h \
lcms/lcms.h \
ldap.h \ ldap.h \
link.h \ link.h \
linux/cdrom.h \ linux/cdrom.h \
@ -1445,12 +1442,20 @@ then
fi fi
dnl **** Check for LittleCMS *** dnl **** Check for LittleCMS ***
AC_SUBST(LCMSLIBS,"") if test "x$with_lcms" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
WINE_PACKAGE_FLAGS(LCMS,[lcms],[-llcms])
AC_CHECK_HEADERS([lcms.h lcms/lcms.h])
if test "$ac_cv_header_lcms_h" = "yes" -o "$ac_cv_header_lcms_lcms_h" = "yes" if test "$ac_cv_header_lcms_h" = "yes" -o "$ac_cv_header_lcms_lcms_h" = "yes"
then then
AC_CHECK_LIB(lcms, cmsOpenProfileFromFile, AC_CHECK_LIB(lcms, cmsOpenProfileFromFile,
[AC_DEFINE(HAVE_LCMS, 1, [Define if you have the LittleCMS development environment]) [AC_DEFINE(HAVE_LCMS, 1, [Define if you have the LittleCMS development environment])],[LCMS_LIBS=""])
LCMSLIBS="-llcms"]) else
LCMS_CFLAGS=""
LCMS_LIBS=""
fi
CPPFLAGS="$ac_save_CPPFLAGS"
fi fi
WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms_cmsOpenProfileFromFile" != "yes"], WINE_NOTICE_WITH(cms,[test "$ac_cv_lib_lcms_cmsOpenProfileFromFile" != "yes"],
[liblcms ${notice_platform}development files not found, Color Management won't be supported.]) [liblcms ${notice_platform}development files not found, Color Management won't be supported.])

View File

@ -1,7 +1,8 @@
MODULE = mscms.dll MODULE = mscms.dll
IMPORTLIB = mscms IMPORTLIB = mscms
IMPORTS = shlwapi advapi32 IMPORTS = shlwapi advapi32
EXTRALIBS = @LCMSLIBS@ EXTRAINCL = @LCMS_CFLAGS@
EXTRALIBS = @LCMS_LIBS@
C_SRCS = \ C_SRCS = \
handle.c \ handle.c \