~ubuntu-branches/ubuntu/karmic/fltk1.1/karmic

« back to all changes in this revision

Viewing changes to CMake/PlatformTests.cxx

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-05-22 13:57:06 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050522135706-mchag24yf42lu7bu
Tags: 1.1.6-5
* Revert previous change, which seems to have been ineffective for some
  reason, in favor of commenting out the problematic Makefile rule
  altogether.  (Closes: #310151.)
* debian/control: Go back to specifying the URL as part of the
  description rather than via a non-standard field that doesn't seem to
  have caught on.  (Closes: #310240.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifdef HAVE_LIBZ
 
2
 
 
3
#include <zlib.h>
 
4
 
 
5
int main()
 
6
{
 
7
        unsigned long compressedSize = 0;
 
8
        unsigned char cd[100];
 
9
        const unsigned char ud[100] = "";
 
10
        unsigned long uncompressedSize = 0;
 
11
 
 
12
        // Call zlib's compress function.
 
13
        if(compress(cd, &compressedSize, ud, uncompressedSize) != Z_OK)
 
14
                {
 
15
                return 0;
 
16
                }
 
17
        return 1;
 
18
}
 
19
 
 
20
 
 
21
#endif
 
22
 
 
23
#ifdef HAVE_LIBJPEG
 
24
 
 
25
#include <stdio.h>
 
26
#include <jpeglib.h>
 
27
 
 
28
int main()
 
29
{
 
30
        struct jpeg_decompress_struct cinfo;
 
31
        jpeg_create_decompress(&cinfo);
 
32
        jpeg_read_header(&cinfo, TRUE);
 
33
        return 1;
 
34
}
 
35
 
 
36
#endif
 
37
 
 
38
#ifdef HAVE_LIBPNG
 
39
#include <png.h>
 
40
int main()
 
41
{
 
42
        png_structp png_ptr = png_create_read_struct
 
43
                (PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
 
44
                 NULL, NULL);
 
45
        png_infop info_ptr = png_create_info_struct(png_ptr);
 
46
        png_set_sig_bytes(png_ptr, 8);
 
47
        png_read_info(png_ptr, info_ptr);
 
48
 
 
49
        return 0;
 
50
}
 
51
#endif
 
52
 
 
53
#ifdef HAVE_PNG_H
 
54
#include <png.h>
 
55
int main() { retunr 0;}
 
56
#endif
 
57
 
 
58
#ifdef HAVE_PNG_GET_VALID
 
59
#include <png.h>
 
60
int main()
 
61
{
 
62
        png_structp png_ptr = png_create_read_struct
 
63
                (PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
 
64
                 NULL, NULL);
 
65
        png_infop info_ptr = png_create_info_struct(png_ptr);
 
66
        png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS);
 
67
        return 0;
 
68
}
 
69
#endif
 
70
 
 
71
#ifdef HAVE_PNG_SET_TRNS_TO_ALPHA
 
72
#include <png.h>
 
73
int main()
 
74
{
 
75
        png_structp png_ptr = png_create_read_struct
 
76
                (PNG_LIBPNG_VER_STRING, (png_voidp)NULL,
 
77
                 NULL, NULL);
 
78
        png_set_tRNS_to_alpha(png_ptr);
 
79
        return 0;
 
80
}
 
81
#endif