aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/graphicsmagick/dependencies.diff
blob: 83d2c23c6d4e32365b2267c0aaa1fe772f1f554c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
diff --git a/configure.ac b/configure.ac
index bc9acc9..94449f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1876,12 +1876,12 @@ then
   fi
   AC_CHECK_HEADER([zconf.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
   AC_CHECK_HEADER([zlib.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
-  AC_CHECK_LIB([z],[compress],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
-  AC_CHECK_LIB([z],[uncompress],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
-  AC_CHECK_LIB([z],[deflate],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
-  AC_CHECK_LIB([z],[inflate],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
-  AC_CHECK_LIB([z],[gzseek],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
-  AC_CHECK_LIB([z],[gztell],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+  AC_SEARCH_LIBS([compress],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+  AC_SEARCH_LIBS([uncompress],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+  AC_SEARCH_LIBS([deflate],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+  AC_SEARCH_LIBS([inflate],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+  AC_SEARCH_LIBS([gzseek],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+  AC_SEARCH_LIBS([gztell],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
   AC_MSG_CHECKING([if ZLIB package is complete])
   if test $passed -gt 0
   then
@@ -1895,8 +1895,7 @@ then
       LDFLAGS=$OLD_LDFLAGS
       LIBS=$OLD_LIBS
     else
-      LIB_ZLIB='-lz'
-      pkg_config_to_flags 'zlib' "${LIB_ZLIB}" ''
+      LIB_ZLIB=''
       AC_DEFINE([HasZLIB],[1],[Define if you have zlib compression library])
       AC_MSG_RESULT([yes])
       have_zlib='yes'
@@ -1922,8 +1921,10 @@ then
   failed=0
   passed=0
   found_libbz=0
+  PKG_CHECK_MODULES([BZIP2], [bzip2], [passed=`expr $passed + 1`], [failed=`expr $failed + 1`])
+  pkg_config_to_flags 'bzip2' "${BZIP2_LIBS}" "${BZIP2_CFLAGS}"
   AC_CHECK_HEADER([bzlib.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
-  AC_CHECK_LIB([bz2],[BZ2_bzDecompress],[found_libbz=`expr $found_libbz + 1`],,)
+  AC_SEARCH_LIBS([BZ2_bzDecompress],[],[found_libbz=`expr $found_libbz + 1`],,)
   if test "$native_win32_build" = 'yes'
   then
     # Under MinGW, libbz2 obfuscates its functions by declaring them
@@ -1931,7 +1932,7 @@ then
     # somehow include bzlib.h during the test but Autoconf does not
     # make that possible.  We check for BZ2_decompress since that is
     # one of the few functions exported from the DLL (very strange).
-    AC_CHECK_LIB([bz2],[_imp__BZ2_decompress],[found_libbz=`expr $found_libbz + 1`],,)
+    :
   fi
   if test $found_libbz -gt 0
   then
@@ -1950,8 +1951,7 @@ then
       AC_MSG_RESULT([no -- some components failed test])
       have_bzlib='no (failed tests)'
     else
-      LIB_BZLIB='-lbz2'
-      LIBS="$LIB_BZLIB $LIBS"
+      LIB_BZLIB=''
       AC_DEFINE([HasBZLIB],[1],[Define if you have the bzip2 library])
       AC_MSG_RESULT([yes])
       have_bzlib='yes'
@@ -2391,7 +2391,18 @@ then
         if test "x${var}" = 'x' ; then
           pnglib='png'
         else
-          pnglib="png1${var}"
+          case "${PNG_LIBS}" in
+          *-lpng1${var}d*)
+            pnglib="png1${var}d"
+            ;;
+          *-lpng1${var}*)
+            pnglib="png1${var}"
+            ;;
+          *)
+            # don't pick system lib
+            pnglib="NOT_IN_PC_FILE"
+            ;;
+          esac
         fi
         if test "$have_png" = 'no'
         then
@@ -2457,8 +2468,7 @@ return 0;
                   LDFLAGS=$OLD_LDFLAGS
                   LIBS=$OLD_LIBS
                 else
-                  LIB_PNG="-l${pnglib}"
-                  pkg_config_to_flags 'libpng' "${LIB_PNG}" ''
+                  LIB_PNG=''
                   #LIBS="$LIB_PNG $LIBS"
                   AC_DEFINE([HasPNG],[1],[Define if you have PNG library])
                   AC_MSG_RESULT([yes])
@@ -2515,7 +2525,7 @@ then
     AC_CHECK_HEADER([jerror.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
     AC_CHECK_HEADER([jmorecfg.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
     AC_CHECK_HEADER([jpeglib.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
-    AC_CHECK_LIB([jpeg],[jpeg_read_header],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+    AC_SEARCH_LIBS([jpeg_read_header],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
     AC_MSG_CHECKING([if JPEG package is complete])
     if test $passed -gt 0
     then
@@ -2527,8 +2537,7 @@ then
         LDFLAGS=$OLD_LDFLAGS
         LIBS=$OLD_LIBS
     else
-        LIB_JPEG='-ljpeg'
-        pkg_config_to_flags 'libjpeg' "${LIB_JPEG}" ''
+        LIB_JPEG=''
         #LIBS="$LIB_JPEG $LIBS"
         AC_DEFINE([HasJPEG],[1],[Define if you have JPEG library])
         AC_MSG_RESULT([yes])
@@ -2624,7 +2633,7 @@ then
     fi
 
 dnl First see if there is a library
-    AC_CHECK_LIB([freetype],[FT_Init_FreeType],[LIB_TTF="-lfreetype"],[LIB_TTF=''],[])
+    AC_SEARCH_LIBS([FT_Init_FreeType],[],[LIB_TTF="-lfreetype"],[LIB_TTF=''],[])
     if test "$LIB_TTF" != ''
     then
       passed=`expr $passed + 1`
@@ -2665,7 +2674,7 @@ dnl Now test for the headers
             LDFLAGS=$OLD_LDFLAGS
             LIBS=$OLD_LIBS
         else
-            pkg_config_to_flags 'freetype2' "${LIB_TTF}" ''
+            LIB_TTF=''
             #LIBS="$LIB_TTF $LIBS"
             AC_DEFINE([HasTTF],[1],[Define if you have FreeType (TrueType font) library])
             if test "$ac_cv_header_ft2build_h" = 'yes'
@@ -2718,7 +2727,6 @@ then
         printf "WEBPMUX_LIBS=${WEBPMUX_LIBS}\n"
         printf "WEBPMUX_CFLAGS=${WEBPMUX_CFLAGS}\n"
       fi
-      pkg_config_to_flags 'libwebpmux' "${WEBPMUX_LIBS}" "${WEBPMUX_CFLAGS}"
     else
       if test -n "${WEBPMUX_PKG_ERRORS}"
       then
@@ -2742,7 +2750,7 @@ then
 
     # pkg-config libwebp --static --libs
     #-L/work/lib -lwebp -lm -lsharpyuv -lm
-    PKG_CHECK_MODULES([WEBP], [libwebp], [passed=`expr $passed + 1`], [failed=`expr $failed + 1`])
+    PKG_CHECK_MODULES([WEBP], [libwebp libwebpmux], [passed=`expr $passed + 1`], [failed=`expr $failed + 1`])
     if test $failed -eq 0 ; then
       if test -n "$VERBOSE"
       then
@@ -2760,9 +2768,9 @@ then
 
     AC_CHECK_HEADER([webp/decode.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],[])
     AC_CHECK_HEADER([webp/encode.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],[])
-    AC_CHECK_LIB([webp],[WebPDecodeRGB],[passed=`expr $passed + 1`; LIB_WEBP='-lwebp'],[failed=`expr $failed + 1`],[])
-    AC_CHECK_LIB([webpmux],[WebPMuxSetImage],[LIB_WEBP="$LIB_WEBP -lwebpmux"],[],[-lwebp])
-    AC_CHECK_LIB([sharpyuv],[SharpYuvConvert],[LIB_WEBP="$LIB_WEBP -lsharpyuv"],[],[])
+    AC_SEARCH_LIBS([WebPDecodeRGB],[],[passed=`expr $passed + 1`; LIB_WEBP='-lwebp'],[failed=`expr $failed + 1`],[])
+    AC_SEARCH_LIBS([WebPMuxSetImage],[],[LIB_WEBP="$LIB_WEBP -lwebpmux"],[],[])
+    AC_SEARCH_LIBS([SharpYuvConvert],[],[LIB_WEBP="$LIB_WEBP -lsharpyuv"],[],[])
     AC_MSG_CHECKING([if WEBP package is complete])
     if test $passed -gt 0
     then
@@ -2774,7 +2782,7 @@ then
             LDFLAGS=$OLD_LDFLAGS
             LIBS=$OLD_LIBS
         else
-            pkg_config_to_flags 'libwebp' "${LIB_WEBP}" ''
+            LIB_WEBP=''
             # LIBS="$LIB_WEBP $LIBS"
             AC_DEFINE([HasWEBP],[1],[Define if you have WEBP library])
             AC_MSG_RESULT([yes])
@@ -2918,11 +2926,11 @@ then
     #set +x
     AC_CHECK_HEADER([tiff.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
     AC_CHECK_HEADER([tiffio.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
-    AC_CHECK_LIB([tiff],[TIFFOpen],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
-    AC_CHECK_LIB([tiff],[TIFFClientOpen],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
-    AC_CHECK_LIB([tiff],[TIFFIsByteSwapped],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
-    AC_CHECK_LIB([tiff],[TIFFReadRGBATile],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
-    AC_CHECK_LIB([tiff],[TIFFReadRGBAStrip],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+    AC_SEARCH_LIBS([TIFFOpen],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+    AC_SEARCH_LIBS([TIFFClientOpen],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+    AC_SEARCH_LIBS([TIFFIsByteSwapped],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+    AC_SEARCH_LIBS([TIFFReadRGBATile],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
+    AC_SEARCH_LIBS([TIFFReadRGBAStrip],[],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],)
     AC_MSG_CHECKING([if TIFF package is complete])
     if test $passed -gt 0
     then
@@ -2934,8 +2942,7 @@ then
             CPPFLAGS=$OLD_CPPFLAGS
             LIBS=$OLD_LIBS
         else
-            LIB_TIFF='-ltiff'
-            pkg_config_to_flags 'libtiff-4' "${LIB_TIFF}" ''
+            LIB_TIFF=''
             #LIBS="$LIB_TIFF $LIBS"
             AC_DEFINE([HasTIFF],[1],[Define if you have TIFF library])
             AC_MSG_RESULT([yes])
@@ -4266,7 +4273,7 @@ MAGICK_EXTRA_DEP_LIBS=`echo $MAGICK_EXTRA_DEP_LIBS | sed -e 's/  */ /g'`
 
 MAGICK_API_CFLAGS=$CFLAGS
 MAGICK_API_CPPFLAGS=`echo $MAGICK_API_CPPFLAGS | sed -e 's/  */ /g'`
-MAGICK_API_LDFLAGS="-L$LIB_DIR $LDFLAGS"
+MAGICK_API_LDFLAGS="-L$LIB_DIR"
 MAGICK_API_DEP_LIBS="$MAGICK_DEP_LIBS"
 MAGICK_API_LIBS="-lGraphicsMagick $MAGICK_API_DEP_LIBS $MAGICK_EXTRA_DEP_LIBS"
 
diff --git a/magick/GraphicsMagick.pc.in b/magick/GraphicsMagick.pc.in
index e968715..6b7c404 100644
--- a/magick/GraphicsMagick.pc.in
+++ b/magick/GraphicsMagick.pc.in
@@ -9,5 +9,5 @@ Version: @PACKAGE_VERSION@
 Description: GraphicsMagick image processing library
 URL: http://www.graphicsmagick.org/
 Libs: -L${libdir} -lGraphicsMagick
-Libs.private: @LDFLAGS@ @MAGICK_API_DEP_LIBS@ @MAGICK_EXTRA_DEP_LIBS@
+Libs.private: @MAGICK_API_DEP_LIBS@ @MAGICK_EXTRA_DEP_LIBS@
 Cflags: -I${includedir} @MAGICK_API_PC_CPPFLAGS@