Make lcms support depend on headers _and_ libraries, not just the

headers.
This commit is contained in:
Hans Leidekker 2005-07-18 15:10:36 +00:00 committed by Alexandre Julliard
parent 48533ae97d
commit bb72a06e54
5 changed files with 36 additions and 40 deletions

View File

@ -29,7 +29,7 @@
#include "mscms_priv.h" #include "mscms_priv.h"
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
static CRITICAL_SECTION MSCMS_handle_cs; static CRITICAL_SECTION MSCMS_handle_cs;
static CRITICAL_SECTION_DEBUG MSCMS_handle_cs_debug = static CRITICAL_SECTION_DEBUG MSCMS_handle_cs_debug =
@ -284,4 +284,4 @@ void MSCMS_destroy_htransform_handle( HTRANSFORM transform )
} }
} }
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */

View File

@ -36,7 +36,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(mscms); WINE_DEFAULT_DEBUG_CHANNEL(mscms);
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
static inline void MSCMS_adjust_endianess32( ULONG *ptr ) static inline void MSCMS_adjust_endianess32( ULONG *ptr )
{ {
@ -107,4 +107,4 @@ DWORD MSCMS_get_profile_size( icProfile *iccprofile )
return size; return size;
} }
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */

View File

@ -18,11 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifdef HAVE_LCMS_LCMS_H #ifdef HAVE_LCMS
#define HAVE_LCMS_H 1
#endif
#ifdef HAVE_LCMS_H
/* These basic Windows types are defined in lcms.h when compiling on /* These basic Windows types are defined in lcms.h when compiling on
* a non-Windows platform (why?), so they would normally not conflict * a non-Windows platform (why?), so they would normally not conflict
@ -92,4 +88,4 @@ extern void MSCMS_get_profile_header( icProfile *iccprofile, PROFILEHEADER *head
extern void MSCMS_set_profile_header( icProfile *iccprofile, PROFILEHEADER *header ); extern void MSCMS_set_profile_header( icProfile *iccprofile, PROFILEHEADER *header );
extern DWORD MSCMS_get_profile_size( icProfile *iccprofile ); extern DWORD MSCMS_get_profile_size( icProfile *iccprofile );
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */

View File

@ -148,7 +148,7 @@ BOOL WINAPI GetColorProfileElement( HPROFILE profile, TAGTYPE type, DWORD offset
PVOID buffer, PBOOL ref ) PVOID buffer, PBOOL ref )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
DWORD i, count; DWORD i, count;
icTag tag; icTag tag;
@ -177,7 +177,7 @@ BOOL WINAPI GetColorProfileElement( HPROFILE profile, TAGTYPE type, DWORD offset
} }
} }
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -202,7 +202,7 @@ BOOL WINAPI GetColorProfileElement( HPROFILE profile, TAGTYPE type, DWORD offset
BOOL WINAPI GetColorProfileElementTag( HPROFILE profile, DWORD index, PTAGTYPE type ) BOOL WINAPI GetColorProfileElementTag( HPROFILE profile, DWORD index, PTAGTYPE type )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
DWORD count; DWORD count;
icTag tag; icTag tag;
@ -219,7 +219,7 @@ BOOL WINAPI GetColorProfileElementTag( HPROFILE profile, DWORD index, PTAGTYPE t
ret = TRUE; ret = TRUE;
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -244,7 +244,7 @@ BOOL WINAPI GetColorProfileElementTag( HPROFILE profile, DWORD index, PTAGTYPE t
BOOL WINAPI GetColorProfileFromHandle( HPROFILE profile, PBYTE buffer, PDWORD size ) BOOL WINAPI GetColorProfileFromHandle( HPROFILE profile, PBYTE buffer, PDWORD size )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
PROFILEHEADER header; PROFILEHEADER header;
@ -265,7 +265,7 @@ BOOL WINAPI GetColorProfileFromHandle( HPROFILE profile, PBYTE buffer, PDWORD si
*size = header.phSize; *size = header.phSize;
ret = TRUE; ret = TRUE;
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -288,7 +288,7 @@ BOOL WINAPI GetColorProfileFromHandle( HPROFILE profile, PBYTE buffer, PDWORD si
BOOL WINAPI GetColorProfileHeader( HPROFILE profile, PPROFILEHEADER header ) BOOL WINAPI GetColorProfileHeader( HPROFILE profile, PPROFILEHEADER header )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
TRACE( "( %p, %p )\n", profile, header ); TRACE( "( %p, %p )\n", profile, header );
@ -298,7 +298,7 @@ BOOL WINAPI GetColorProfileHeader( HPROFILE profile, PPROFILEHEADER header )
MSCMS_get_profile_header( iccprofile, header ); MSCMS_get_profile_header( iccprofile, header );
return TRUE; return TRUE;
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -319,7 +319,7 @@ BOOL WINAPI GetColorProfileHeader( HPROFILE profile, PPROFILEHEADER header )
BOOL WINAPI GetCountColorProfileElements( HPROFILE profile, PDWORD count ) BOOL WINAPI GetCountColorProfileElements( HPROFILE profile, PDWORD count )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
TRACE( "( %p, %p )\n", profile, count ); TRACE( "( %p, %p )\n", profile, count );
@ -328,7 +328,7 @@ BOOL WINAPI GetCountColorProfileElements( HPROFILE profile, PDWORD count )
*count = MSCMS_get_tag_count( iccprofile ); *count = MSCMS_get_tag_count( iccprofile );
ret = TRUE; ret = TRUE;
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -508,7 +508,7 @@ BOOL WINAPI InstallColorProfileW( PCWSTR machine, PCWSTR profile )
BOOL WINAPI IsColorProfileTagPresent( HPROFILE profile, TAGTYPE type, PBOOL present ) BOOL WINAPI IsColorProfileTagPresent( HPROFILE profile, TAGTYPE type, PBOOL present )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
DWORD i, count; DWORD i, count;
icTag tag; icTag tag;
@ -530,7 +530,7 @@ BOOL WINAPI IsColorProfileTagPresent( HPROFILE profile, TAGTYPE type, PBOOL pres
} }
} }
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -551,7 +551,7 @@ BOOL WINAPI IsColorProfileTagPresent( HPROFILE profile, TAGTYPE type, PBOOL pres
BOOL WINAPI IsColorProfileValid( HPROFILE profile, PBOOL valid ) BOOL WINAPI IsColorProfileValid( HPROFILE profile, PBOOL valid )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
TRACE( "( %p, %p )\n", profile, valid ); TRACE( "( %p, %p )\n", profile, valid );
@ -559,7 +559,7 @@ BOOL WINAPI IsColorProfileValid( HPROFILE profile, PBOOL valid )
if (!valid) return FALSE; if (!valid) return FALSE;
if (iccprofile) return *valid = TRUE; if (iccprofile) return *valid = TRUE;
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -584,7 +584,7 @@ BOOL WINAPI SetColorProfileElement( HPROFILE profile, TAGTYPE type, DWORD offset
PVOID buffer ) PVOID buffer )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
DWORD i, count, access = MSCMS_hprofile2access( profile ); DWORD i, count, access = MSCMS_hprofile2access( profile );
icTag tag; icTag tag;
@ -609,7 +609,7 @@ BOOL WINAPI SetColorProfileElement( HPROFILE profile, TAGTYPE type, DWORD offset
} }
} }
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -629,7 +629,7 @@ BOOL WINAPI SetColorProfileElement( HPROFILE profile, TAGTYPE type, DWORD offset
BOOL WINAPI SetColorProfileHeader( HPROFILE profile, PPROFILEHEADER header ) BOOL WINAPI SetColorProfileHeader( HPROFILE profile, PPROFILEHEADER header )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
DWORD access = MSCMS_hprofile2access( profile ); DWORD access = MSCMS_hprofile2access( profile );
@ -641,7 +641,7 @@ BOOL WINAPI SetColorProfileHeader( HPROFILE profile, PPROFILEHEADER header )
MSCMS_set_profile_header( iccprofile, header ); MSCMS_set_profile_header( iccprofile, header );
return TRUE; return TRUE;
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -763,7 +763,7 @@ HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing
*/ */
HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation ) HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing, DWORD creation )
{ {
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
cmsHPROFILE cmsprofile = NULL; cmsHPROFILE cmsprofile = NULL;
icProfile *iccprofile = NULL; icProfile *iccprofile = NULL;
HANDLE handle = NULL; HANDLE handle = NULL;
@ -831,7 +831,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
if (cmsprofile) if (cmsprofile)
return MSCMS_create_hprofile_handle( handle, iccprofile, cmsprofile, access ); return MSCMS_create_hprofile_handle( handle, iccprofile, cmsprofile, access );
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return NULL; return NULL;
} }
@ -850,7 +850,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
BOOL WINAPI CloseColorProfile( HPROFILE profile ) BOOL WINAPI CloseColorProfile( HPROFILE profile )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile ); icProfile *iccprofile = MSCMS_hprofile2iccprofile( profile );
HANDLE file = MSCMS_hprofile2handle( profile ); HANDLE file = MSCMS_hprofile2handle( profile );
DWORD access = MSCMS_hprofile2access( profile ); DWORD access = MSCMS_hprofile2access( profile );
@ -872,6 +872,6 @@ BOOL WINAPI CloseColorProfile( HPROFILE profile )
CloseHandle( MSCMS_hprofile2handle( profile ) ); CloseHandle( MSCMS_hprofile2handle( profile ) );
MSCMS_destroy_hprofile_handle( profile ); MSCMS_destroy_hprofile_handle( profile );
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }

View File

@ -57,7 +57,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest,
HPROFILE target, DWORD flags ) HPROFILE target, DWORD flags )
{ {
HTRANSFORM ret = NULL; HTRANSFORM ret = NULL;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
cmsHTRANSFORM cmstransform; cmsHTRANSFORM cmstransform;
cmsHPROFILE cmsprofiles[3]; cmsHPROFILE cmsprofiles[3];
int intent; int intent;
@ -84,7 +84,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest,
} }
ret = MSCMS_create_htransform_handle( cmstransform ); ret = MSCMS_create_htransform_handle( cmstransform );
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -92,7 +92,7 @@ HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofil
PDWORD intents, DWORD nintents, DWORD flags, DWORD cmm ) PDWORD intents, DWORD nintents, DWORD flags, DWORD cmm )
{ {
HTRANSFORM ret = NULL; HTRANSFORM ret = NULL;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
cmsHPROFILE *cmsprofiles; cmsHPROFILE *cmsprofiles;
cmsHTRANSFORM cmstransform; cmsHTRANSFORM cmstransform;
DWORD i; DWORD i;
@ -115,14 +115,14 @@ HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofil
HeapFree( GetProcessHeap(), 0, cmsprofiles ); HeapFree( GetProcessHeap(), 0, cmsprofiles );
ret = MSCMS_create_htransform_handle( cmstransform ); ret = MSCMS_create_htransform_handle( cmstransform );
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
BOOL WINAPI DeleteColorTransform( HTRANSFORM transform ) BOOL WINAPI DeleteColorTransform( HTRANSFORM transform )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
cmsHTRANSFORM cmstransform; cmsHTRANSFORM cmstransform;
TRACE( "( %p )\n", transform ); TRACE( "( %p )\n", transform );
@ -133,7 +133,7 @@ BOOL WINAPI DeleteColorTransform( HTRANSFORM transform )
MSCMS_destroy_htransform_handle( transform ); MSCMS_destroy_htransform_handle( transform );
ret = TRUE; ret = TRUE;
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }
@ -142,7 +142,7 @@ BOOL WINAPI TranslateBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT i
DWORD outputstride, PBMCALLBACKFN callback, ULONG data ) DWORD outputstride, PBMCALLBACKFN callback, ULONG data )
{ {
BOOL ret = FALSE; BOOL ret = FALSE;
#ifdef HAVE_LCMS_H #ifdef HAVE_LCMS
cmsHTRANSFORM cmstransform; cmsHTRANSFORM cmstransform;
TRACE( "( %p, %p, 0x%08x, 0x%08lx, 0x%08lx, 0x%08lx, %p, 0x%08x, 0x%08lx, %p, 0x%08lx )\n", TRACE( "( %p, %p, 0x%08x, 0x%08lx, 0x%08lx, 0x%08lx, %p, 0x%08x, 0x%08lx, %p, 0x%08lx )\n",
@ -154,6 +154,6 @@ BOOL WINAPI TranslateBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT i
cmsDoTransform( cmstransform, srcbits, destbits, width * height ); cmsDoTransform( cmstransform, srcbits, destbits, width * height );
ret = TRUE; ret = TRUE;
#endif /* HAVE_LCMS_H */ #endif /* HAVE_LCMS */
return ret; return ret;
} }