rmagick 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rmagick might be problematic. Click here for more details.
- data/ChangeLog +232 -0
- data/Makefile.in +28 -0
- data/README.html +404 -0
- data/README.txt +397 -0
- data/configure +8554 -0
- data/configure.ac +497 -0
- data/doc/comtasks.html +241 -0
- data/doc/constants.html +1195 -0
- data/doc/css/doc.css +299 -0
- data/doc/css/popup.css +34 -0
- data/doc/draw.html +3108 -0
- data/doc/ex/Adispatch.rb +43 -0
- data/doc/ex/Zconstitute.rb +9 -0
- data/doc/ex/adaptive_threshold.rb +19 -0
- data/doc/ex/add_noise.rb +18 -0
- data/doc/ex/affine.rb +48 -0
- data/doc/ex/affine_transform.rb +20 -0
- data/doc/ex/arc.rb +47 -0
- data/doc/ex/arcpath.rb +33 -0
- data/doc/ex/average.rb +15 -0
- data/doc/ex/axes.rb +64 -0
- data/doc/ex/bilevel_channel.rb +20 -0
- data/doc/ex/blur_image.rb +12 -0
- data/doc/ex/border.rb +10 -0
- data/doc/ex/bounding_box.rb +48 -0
- data/doc/ex/cbezier1.rb +40 -0
- data/doc/ex/cbezier2.rb +40 -0
- data/doc/ex/cbezier3.rb +40 -0
- data/doc/ex/cbezier4.rb +41 -0
- data/doc/ex/cbezier5.rb +41 -0
- data/doc/ex/cbezier6.rb +51 -0
- data/doc/ex/channel.rb +26 -0
- data/doc/ex/channel_threshold.rb +48 -0
- data/doc/ex/charcoal.rb +12 -0
- data/doc/ex/chop.rb +29 -0
- data/doc/ex/circle.rb +31 -0
- data/doc/ex/clip_path.rb +56 -0
- data/doc/ex/coalesce.rb +60 -0
- data/doc/ex/color_fill_to_border.rb +29 -0
- data/doc/ex/color_floodfill.rb +28 -0
- data/doc/ex/color_histogram.rb +60 -0
- data/doc/ex/color_reset.rb +11 -0
- data/doc/ex/colorize.rb +16 -0
- data/doc/ex/colors.rb +65 -0
- data/doc/ex/composite.rb +135 -0
- data/doc/ex/contrast.rb +37 -0
- data/doc/ex/crop.rb +31 -0
- data/doc/ex/crop_with_gravity.rb +46 -0
- data/doc/ex/cycle_colormap.rb +21 -0
- data/doc/ex/demo.rb +324 -0
- data/doc/ex/drawcomp.rb +42 -0
- data/doc/ex/drop_shadow.rb +60 -0
- data/doc/ex/edge.rb +11 -0
- data/doc/ex/ellipse.rb +43 -0
- data/doc/ex/emboss.rb +11 -0
- data/doc/ex/enhance.rb +28 -0
- data/doc/ex/equalize.rb +11 -0
- data/doc/ex/flatten_images.rb +38 -0
- data/doc/ex/flip.rb +11 -0
- data/doc/ex/flop.rb +11 -0
- data/doc/ex/fonts.rb +20 -0
- data/doc/ex/frame.rb +12 -0
- data/doc/ex/gaussian_blur.rb +11 -0
- data/doc/ex/get_multiline_type_metrics.rb +53 -0
- data/doc/ex/get_pixels.rb +48 -0
- data/doc/ex/get_type_metrics.rb +140 -0
- data/doc/ex/gradientfill.rb +27 -0
- data/doc/ex/grav.rb +44 -0
- data/doc/ex/gravity.rb +80 -0
- data/doc/ex/hatchfill.rb +27 -0
- data/doc/ex/images/Ballerina.jpg +0 -0
- data/doc/ex/images/Ballerina3.jpg +0 -0
- data/doc/ex/images/Button_0.gif +0 -0
- data/doc/ex/images/Button_1.gif +0 -0
- data/doc/ex/images/Button_2.gif +0 -0
- data/doc/ex/images/Button_3.gif +0 -0
- data/doc/ex/images/Button_4.gif +0 -0
- data/doc/ex/images/Button_5.gif +0 -0
- data/doc/ex/images/Button_6.gif +0 -0
- data/doc/ex/images/Button_7.gif +0 -0
- data/doc/ex/images/Button_8.gif +0 -0
- data/doc/ex/images/Button_9.gif +0 -0
- data/doc/ex/images/Button_A.gif +0 -0
- data/doc/ex/images/Button_B.gif +0 -0
- data/doc/ex/images/Button_C.gif +0 -0
- data/doc/ex/images/Button_D.gif +0 -0
- data/doc/ex/images/Button_E.gif +0 -0
- data/doc/ex/images/Button_F.gif +0 -0
- data/doc/ex/images/Button_G.gif +0 -0
- data/doc/ex/images/Button_H.gif +0 -0
- data/doc/ex/images/Button_I.gif +0 -0
- data/doc/ex/images/Button_J.gif +0 -0
- data/doc/ex/images/Button_K.gif +0 -0
- data/doc/ex/images/Button_L.gif +0 -0
- data/doc/ex/images/Button_M.gif +0 -0
- data/doc/ex/images/Button_N.gif +0 -0
- data/doc/ex/images/Button_O.gif +0 -0
- data/doc/ex/images/Button_P.gif +0 -0
- data/doc/ex/images/Button_Q.gif +0 -0
- data/doc/ex/images/Button_R.gif +0 -0
- data/doc/ex/images/Button_S.gif +0 -0
- data/doc/ex/images/Button_T.gif +0 -0
- data/doc/ex/images/Button_U.gif +0 -0
- data/doc/ex/images/Button_V.gif +0 -0
- data/doc/ex/images/Button_W.gif +0 -0
- data/doc/ex/images/Button_X.gif +0 -0
- data/doc/ex/images/Button_Y.gif +0 -0
- data/doc/ex/images/Button_Z.gif +0 -0
- data/doc/ex/images/Cheetah.jpg +0 -0
- data/doc/ex/images/Coffee.wmf +0 -0
- data/doc/ex/images/Flower_Hat.jpg +0 -0
- data/doc/ex/images/Gold_Statue.jpg +0 -0
- data/doc/ex/images/Hot_Air_Balloons.jpg +0 -0
- data/doc/ex/images/Hot_Air_Balloons_H.jpg +0 -0
- data/doc/ex/images/No.wmf +0 -0
- data/doc/ex/images/Polynesia.jpg +0 -0
- data/doc/ex/images/Red_Rocks.jpg +0 -0
- data/doc/ex/images/Shorts.jpg +0 -0
- data/doc/ex/images/Snake.wmf +0 -0
- data/doc/ex/images/Violin.jpg +0 -0
- data/doc/ex/images/graydient230x6.gif +0 -0
- data/doc/ex/images/logo400x83.gif +0 -0
- data/doc/ex/images/model.miff +0 -0
- data/doc/ex/images/notimplemented.gif +0 -0
- data/doc/ex/images/smile.miff +0 -0
- data/doc/ex/images/spin.gif +0 -0
- data/doc/ex/implode.rb +32 -0
- data/doc/ex/level.rb +12 -0
- data/doc/ex/level_channel.rb +33 -0
- data/doc/ex/line.rb +40 -0
- data/doc/ex/map.rb +28 -0
- data/doc/ex/map_f.rb +15 -0
- data/doc/ex/matte_fill_to_border.rb +42 -0
- data/doc/ex/matte_floodfill.rb +35 -0
- data/doc/ex/matte_replace.rb +42 -0
- data/doc/ex/median_filter.rb +28 -0
- data/doc/ex/modulate.rb +11 -0
- data/doc/ex/mono.rb +23 -0
- data/doc/ex/morph.rb +26 -0
- data/doc/ex/mosaic.rb +35 -0
- data/doc/ex/motion_blur.rb +11 -0
- data/doc/ex/negate.rb +11 -0
- data/doc/ex/negate_channel.rb +19 -0
- data/doc/ex/normalize.rb +11 -0
- data/doc/ex/oil_paint.rb +11 -0
- data/doc/ex/opacity.rb +38 -0
- data/doc/ex/opaque.rb +14 -0
- data/doc/ex/ordered_dither.rb +11 -0
- data/doc/ex/path.rb +62 -0
- data/doc/ex/pattern1.rb +25 -0
- data/doc/ex/pattern2.rb +26 -0
- data/doc/ex/polygon.rb +24 -0
- data/doc/ex/polyline.rb +23 -0
- data/doc/ex/posterize.rb +19 -0
- data/doc/ex/preview.rb +16 -0
- data/doc/ex/qbezierpath.rb +49 -0
- data/doc/ex/quantize-m.rb +25 -0
- data/doc/ex/radial_blur.rb +19 -0
- data/doc/ex/raise.rb +11 -0
- data/doc/ex/random_channel_threshold.rb +17 -0
- data/doc/ex/random_threshold_channel.rb +18 -0
- data/doc/ex/rectangle.rb +33 -0
- data/doc/ex/reduce_noise.rb +28 -0
- data/doc/ex/roll.rb +9 -0
- data/doc/ex/rotate.rb +43 -0
- data/doc/ex/rotate_f.rb +14 -0
- data/doc/ex/roundrect.rb +32 -0
- data/doc/ex/rubyname.rb +31 -0
- data/doc/ex/segment.rb +11 -0
- data/doc/ex/shade.rb +11 -0
- data/doc/ex/shave.rb +15 -0
- data/doc/ex/shear.rb +10 -0
- data/doc/ex/skewx.rb +50 -0
- data/doc/ex/skewy.rb +45 -0
- data/doc/ex/smile.rb +124 -0
- data/doc/ex/solarize.rb +11 -0
- data/doc/ex/splice.rb +16 -0
- data/doc/ex/spread.rb +11 -0
- data/doc/ex/stegano.rb +50 -0
- data/doc/ex/stroke_dasharray.rb +41 -0
- data/doc/ex/stroke_linecap.rb +44 -0
- data/doc/ex/stroke_linejoin.rb +48 -0
- data/doc/ex/stroke_width.rb +47 -0
- data/doc/ex/swirl.rb +17 -0
- data/doc/ex/text.rb +32 -0
- data/doc/ex/text_align.rb +36 -0
- data/doc/ex/text_antialias.rb +33 -0
- data/doc/ex/text_undercolor.rb +26 -0
- data/doc/ex/texture_fill_to_border.rb +34 -0
- data/doc/ex/texture_floodfill.rb +31 -0
- data/doc/ex/texturefill.rb +25 -0
- data/doc/ex/threshold.rb +13 -0
- data/doc/ex/to_blob.rb +14 -0
- data/doc/ex/translate.rb +37 -0
- data/doc/ex/transparent.rb +38 -0
- data/doc/ex/trim.rb +25 -0
- data/doc/ex/unsharp_mask.rb +28 -0
- data/doc/ex/viewex.rb +36 -0
- data/doc/ex/wave.rb +9 -0
- data/doc/ilist.html +1592 -0
- data/doc/image1.html +3009 -0
- data/doc/image2.html +2169 -0
- data/doc/image3.html +2815 -0
- data/doc/imageattrs.html +1319 -0
- data/doc/imusage.html +403 -0
- data/doc/index.html +418 -0
- data/doc/info.html +949 -0
- data/doc/magick.html +439 -0
- data/doc/scripts/doc.js +9 -0
- data/doc/struct.html +1334 -0
- data/doc/usage.html +1318 -0
- data/examples/describe.rb +44 -0
- data/examples/histogram.rb +289 -0
- data/examples/image_opacity.rb +29 -0
- data/examples/import_export.rb +31 -0
- data/examples/pattern_fill.rb +38 -0
- data/examples/rotating_text.rb +47 -0
- data/examples/thumbnail.rb +65 -0
- data/examples/vignette.rb +79 -0
- data/ext/RMagick/MANIFEST +239 -0
- data/ext/RMagick/extconf.rb.in +21 -0
- data/ext/RMagick/rmagick.h +938 -0
- data/ext/RMagick/rmagick_config.h.in +170 -0
- data/ext/RMagick/rmdraw.c +1308 -0
- data/ext/RMagick/rmfill.c +609 -0
- data/ext/RMagick/rmilist.c +685 -0
- data/ext/RMagick/rmimage.c +7980 -0
- data/ext/RMagick/rminfo.c +982 -0
- data/ext/RMagick/rmmain.c +1497 -0
- data/ext/RMagick/rmutil.c +2685 -0
- data/install.rb +1015 -0
- data/lib/RMagick.rb +1486 -0
- data/metaconfig.in +6 -0
- data/post-clean.rb +12 -0
- data/post-install.rb +36 -0
- data/post-setup.rb +245 -0
- data/rmagick.gemspec +22 -0
- data/uninstall.rb +71 -0
- metadata +286 -0
data/configure.ac
ADDED
@@ -0,0 +1,497 @@
|
|
1
|
+
|
2
|
+
# RMagick configure.ac
|
3
|
+
|
4
|
+
AC_INIT(RMagick, 1.7.1, rmagick@rubyforge.org, RMagick-1.7.1.tar.gz)
|
5
|
+
echo "Configuring ${PACKAGE_STRING}"
|
6
|
+
|
7
|
+
AC_CONFIG_HEADER([ext/RMagick/rmagick_config.h])
|
8
|
+
|
9
|
+
# Save caller's CFLAGS before configure changes it.
|
10
|
+
rm_saved_CFLAGS=${CFLAGS}
|
11
|
+
|
12
|
+
# Check for required programs
|
13
|
+
AC_PROG_CC
|
14
|
+
AC_PROG_CC_STDC
|
15
|
+
AC_PATH_PROG(RUBY, ruby,)
|
16
|
+
if test -z "$RUBY"; then
|
17
|
+
AC_MSG_ERROR([Can't install RMagick. Ruby must be installed first.])
|
18
|
+
fi
|
19
|
+
|
20
|
+
# See if user prefers GraphicsMagick over ImageMagick
|
21
|
+
AC_ARG_WITH(graphics-magick,
|
22
|
+
AC_HELP_STRING([--with-graphics-magick], [configure RMagick with GraphicsMagick]),
|
23
|
+
[with_graphics_magick=$withval],
|
24
|
+
[with_graphics_magick='no'])
|
25
|
+
|
26
|
+
if test "$with_graphics_magick" != 'no' ; then
|
27
|
+
AC_CHECK_PROGS(MAGICKCONFIG, GraphicsMagick-config)
|
28
|
+
if test -z "$MAGICKCONFIG"; then
|
29
|
+
AC_MSG_ERROR([Can't install RMagick. Can't find GraphicsMagick-config program.])
|
30
|
+
fi
|
31
|
+
MAGICKNAME=GraphicsMagick
|
32
|
+
MAGICKLIB=GraphicsMagick
|
33
|
+
AC_DEFINE(GRAPHICSMAGICK,1)
|
34
|
+
|
35
|
+
# Otherwise see which one is installed
|
36
|
+
else
|
37
|
+
AC_CHECK_PROGS(MAGICKCONFIG, [Magick-config GraphicsMagick-config])
|
38
|
+
if test -z "$MAGICKCONFIG"; then
|
39
|
+
AC_MSG_ERROR([Can't install RMagick. Can't find Magick-config or GraphicsMagick-config program.])
|
40
|
+
else
|
41
|
+
case "$MAGICKCONFIG" in
|
42
|
+
Magick-config )
|
43
|
+
MAGICKNAME=ImageMagick
|
44
|
+
MAGICKLIB=Magick
|
45
|
+
;;
|
46
|
+
GraphicsMagick-config )
|
47
|
+
MAGICKNAME=GraphicsMagick
|
48
|
+
MAGICKLIB=GraphicsMagick
|
49
|
+
AC_DEFINE(GRAPHICSMAGICK,1)
|
50
|
+
;;
|
51
|
+
esac
|
52
|
+
fi
|
53
|
+
fi
|
54
|
+
|
55
|
+
# Append ***Magick's lists of flags to the user's lists (if any)
|
56
|
+
LDFLAGS="${LDFLAGS} `${MAGICKCONFIG} --ldflags`"
|
57
|
+
CPPFLAGS="${CPPFLAGS} `${MAGICKCONFIG} --cppflags`"
|
58
|
+
|
59
|
+
AC_SUBST(LDFLAGS, ${LDFLAGS})
|
60
|
+
AC_SUBST(CFLAGS, ${rm_saved_CFLAGS})
|
61
|
+
AC_SUBST(CPPFLAGS, ${CPPFLAGS})
|
62
|
+
AC_SUBST(LOCAL_LIBS, `${MAGICKCONFIG} --libs`)
|
63
|
+
|
64
|
+
AC_CHECK_LIB($MAGICKLIB, InitializeMagick, [],
|
65
|
+
[AC_MSG_ERROR([Can't install RMagick. Can't find lib${MAGICKLIB}])],
|
66
|
+
[`${MAGICKCONFIG} --libs`])
|
67
|
+
|
68
|
+
|
69
|
+
AC_SUBST(MAGICKLIB)
|
70
|
+
AC_SUBST(MAGICKNAME)
|
71
|
+
AC_SUBST(MAGICKCONFIG)
|
72
|
+
AC_DEFINE_UNQUOTED(MAGICKNAME, $MAGICKNAME)
|
73
|
+
|
74
|
+
AC_CHECK_HEADER(magick/api.h, [],
|
75
|
+
[AC_MSG_ERROR([Can't find magick/api.h])])
|
76
|
+
|
77
|
+
# What standard functions?
|
78
|
+
AC_CHECK_FUNCS([snprintf])
|
79
|
+
|
80
|
+
# Append ***Magick's lists of libs to the user's list (if any)
|
81
|
+
LIBS="${LIBS} `${MAGICKCONFIG} --libs`"
|
82
|
+
|
83
|
+
# What ImageMagick/GraphicsMagick functions?
|
84
|
+
AC_CHECK_FUNCS([AdaptiveThresholdImage AppendImageToList LevelImageChannel])
|
85
|
+
AC_CHECK_FUNCS([ThumbnailImage RemoveFirstImageFromList GetNextImageInList])
|
86
|
+
AC_CHECK_FUNCS([SetLogFormat XImportImage ExportImagePixels ImportImagePixels])
|
87
|
+
AC_CHECK_FUNCS([ThresholdImageChannel RandomChannelThresholdImage StripImage])
|
88
|
+
AC_CHECK_FUNCS([AcquireMagickMemory AcquireStringInfo BlackThresholdImage WhiteThresholdImage])
|
89
|
+
AC_CHECK_FUNCS([GetMagickInfoArray GetColorInfoArray GetLocaleExceptionMessage])
|
90
|
+
AC_CHECK_FUNCS([GetMagickGeometry ParseSizeGeometry TintImage GetColorHistogram])
|
91
|
+
AC_CHECK_FUNCS([GetImageHistogram FuzzyColorCompare GetImageProfile GetNextImageProfile])
|
92
|
+
AC_CHECK_FUNCS([GetImageChannelDepth GetImageChannelExtrema GetImageChannelMean])
|
93
|
+
AC_CHECK_FUNCS([CompareImageChannels PreviewImage SetImageColorspace])
|
94
|
+
|
95
|
+
# We need to be able to query this later in the configure script, so set a shell variable here
|
96
|
+
# as well as defining a symbol.
|
97
|
+
AC_CHECK_FUNC(GetImageQuantumDepth,
|
98
|
+
rm_have_getimagequantumdepth=yes,
|
99
|
+
rm_have_getimagequantumdepth=no)
|
100
|
+
if test "$rm_have_getimagequantumdepth" = yes; then
|
101
|
+
AC_DEFINE(HAVE_GETIMAGEQUANTUMDEPTH)
|
102
|
+
fi
|
103
|
+
|
104
|
+
AC_CHECK_FUNCS([BilevelImageChannel GammaImageChannel NegateImageChannel])
|
105
|
+
AC_CHECK_FUNCS([SetImageOption AddDefinitions GrayscalePseudoClassImage])
|
106
|
+
AC_CHECK_FUNCS([RadialBlurImage RandomThresholdImageChannel SeparateImageChannel])
|
107
|
+
AC_CHECK_FUNCS([QuantumOperatorRegionImage GetImageStatistics])
|
108
|
+
|
109
|
+
# We need to be able to query these symbols later in the configure script, so set a shell
|
110
|
+
# variable here as well as defining symbols.
|
111
|
+
AC_CHECK_FUNC(GetColorInfoList,
|
112
|
+
rm_have_getcolorinfolist=yes,
|
113
|
+
rm_have_getcolorinfolist=no)
|
114
|
+
if test "$rm_have_getcolorinfolist" = yes; then
|
115
|
+
AC_DEFINE(HAVE_GETCOLORINFOLIST)
|
116
|
+
fi
|
117
|
+
|
118
|
+
AC_CHECK_FUNC(GetTypeInfoList,
|
119
|
+
rm_have_gettypeinfolist=yes,
|
120
|
+
rm_have_gettypeinfolist=no)
|
121
|
+
if test "$rm_have_gettypeinfolist" = yes; then
|
122
|
+
AC_DEFINE(HAVE_GETTYPEINFOLIST)
|
123
|
+
fi
|
124
|
+
|
125
|
+
AC_CHECK_FUNC(GetMagickInfoList,
|
126
|
+
rm_have_getmagickinfolist=yes,
|
127
|
+
rm_have_getmagickinfolist=no)
|
128
|
+
if test "$rm_have_getmagickinfolist" = yes; then
|
129
|
+
AC_DEFINE(HAVE_GETMAGICKINFOLIST)
|
130
|
+
fi
|
131
|
+
|
132
|
+
AC_CHECK_FUNCS([EvaluateImageChannel PosterizeImage GaussianBlurImageChannel])
|
133
|
+
AC_CHECK_FUNCS([ConvolveImageChannel SpliceImage SharpenImageChannel])
|
134
|
+
AC_CHECK_FUNCS([SetImageChannelDepth BlurImageChannel GetMultilineTypeMetrics])
|
135
|
+
AC_CHECK_FUNCS([NormalizeImageChannel UnsharpMaskImageChannel])
|
136
|
+
|
137
|
+
# What typedefs?
|
138
|
+
AC_CHECK_TYPES([DisposeType,
|
139
|
+
magick_int64_t,
|
140
|
+
magick_uint64_t,
|
141
|
+
ExtendedSignedIntegralType,
|
142
|
+
ExtendedUnsignedIntegralType,
|
143
|
+
MagickOffsetType,
|
144
|
+
MagickSizeType,
|
145
|
+
MagickBooleanType],
|
146
|
+
[], [],
|
147
|
+
[#include <stdio.h>
|
148
|
+
#if HAVE_SYS_TYPES_H
|
149
|
+
#include <sys/types.h>
|
150
|
+
#endif
|
151
|
+
#include "magick/api.h"])
|
152
|
+
|
153
|
+
|
154
|
+
AC_CHECK_MEMBERS([ExceptionInfo.module],,,
|
155
|
+
[#include <stdio.h>
|
156
|
+
#if HAVE_SYS_TYPES_H
|
157
|
+
#include <sys/types.h>
|
158
|
+
#endif
|
159
|
+
#include "magick/api.h"])
|
160
|
+
|
161
|
+
# Don't use AC_CHECK_MEMBERS!
|
162
|
+
AC_CACHE_CHECK(for Image.extract_info, rm_cv_member_Image_extract_info,
|
163
|
+
AC_TRY_COMPILE([
|
164
|
+
#if HAVE_SYS_TYPES_H
|
165
|
+
#include <sys/types.h>
|
166
|
+
#endif
|
167
|
+
#include <stdio.h>
|
168
|
+
#include "magick/api.h"],
|
169
|
+
[Image i; i.extract_info.x = 0;],
|
170
|
+
rm_cv_member_Image_extract_info=yes,
|
171
|
+
rm_cv_member_Image_extract_info=no))
|
172
|
+
if test "$rm_cv_member_Image_extract_info" = yes; then
|
173
|
+
AC_DEFINE(HAVE_IMAGE_EXTRACT_INFO)
|
174
|
+
fi
|
175
|
+
|
176
|
+
AC_CACHE_CHECK(for ImageInfo.number_scenes, rm_cv_member_ImageInfo_number_scenes,
|
177
|
+
AC_TRY_COMPILE([
|
178
|
+
#if HAVE_SYS_TYPES_H
|
179
|
+
#include <sys/types.h>
|
180
|
+
#endif
|
181
|
+
#include <stdio.h>
|
182
|
+
#include "magick/api.h"],
|
183
|
+
[ImageInfo i; i.number_scenes = 0;],
|
184
|
+
rm_cv_member_ImageInfo_number_scenes=yes,
|
185
|
+
rm_cv_member_ImageInfo_number_scenes=no))
|
186
|
+
if test "$rm_cv_member_ImageInfo_number_scenes" = yes; then
|
187
|
+
AC_DEFINE(HAVE_IMAGEINFO_NUMBER_SCENES)
|
188
|
+
fi
|
189
|
+
|
190
|
+
AC_CACHE_CHECK(for NoCompliance enum value, rm_cv_enum_nocompliance,
|
191
|
+
[AC_TRY_COMPILE(
|
192
|
+
[#include <stdio.h>
|
193
|
+
#if HAVE_SYS_TYPES_H
|
194
|
+
#include <sys/types.h>
|
195
|
+
#endif
|
196
|
+
#include "magick/api.h"],
|
197
|
+
[ComplianceType x; x = NoCompliance],
|
198
|
+
rm_cv_enum_nocompliance='yes',
|
199
|
+
rm_cv_enum_nocompliance='no')])
|
200
|
+
|
201
|
+
if test "$rm_cv_enum_nocompliance" = yes; then
|
202
|
+
AC_DEFINE(HAVE_NOCOMPLIANCE)
|
203
|
+
fi
|
204
|
+
|
205
|
+
AC_CACHE_CHECK(for HSLColorspace enum value, rm_cv_enum_hslcolorspace,
|
206
|
+
[AC_TRY_COMPILE(
|
207
|
+
[#include <stdio.h>
|
208
|
+
#if HAVE_SYS_TYPES_H
|
209
|
+
#include <sys/types.h>
|
210
|
+
#endif
|
211
|
+
#include "magick/api.h"],
|
212
|
+
[ColorspaceType x; x = HSLColorspace],
|
213
|
+
rm_cv_enum_hslcolorspace='yes',
|
214
|
+
rm_cv_enum_hslcolorspace='no')])
|
215
|
+
|
216
|
+
if test "$rm_cv_enum_hslcolorspace" = yes; then
|
217
|
+
AC_DEFINE(HAVE_HSLCOLORSPACE)
|
218
|
+
fi
|
219
|
+
|
220
|
+
AC_CACHE_CHECK(for HWBColorspace enum value, rm_cv_enum_hwbcolorspace,
|
221
|
+
[AC_TRY_COMPILE(
|
222
|
+
[#include <stdio.h>
|
223
|
+
#if HAVE_SYS_TYPES_H
|
224
|
+
#include <sys/types.h>
|
225
|
+
#endif
|
226
|
+
#include "magick/api.h"],
|
227
|
+
[ColorspaceType x; x = HWBColorspace],
|
228
|
+
rm_cv_enum_hwbcolorspace='yes',
|
229
|
+
rm_cv_enum_hwbcolorspace='no')])
|
230
|
+
|
231
|
+
if test "$rm_cv_enum_hwbcolorspace" = yes; then
|
232
|
+
AC_DEFINE(HAVE_HWBCOLORSPACE)
|
233
|
+
fi
|
234
|
+
|
235
|
+
AC_CACHE_CHECK(for HSBColorspace enum value, rm_cv_enum_hsbcolorspace,
|
236
|
+
[AC_TRY_COMPILE(
|
237
|
+
[#include <stdio.h>
|
238
|
+
#if HAVE_SYS_TYPES_H
|
239
|
+
#include <sys/types.h>
|
240
|
+
#endif
|
241
|
+
#include "magick/api.h"],
|
242
|
+
[ColorspaceType x; x = HSBColorspace],
|
243
|
+
rm_cv_enum_hsbcolorspace='yes',
|
244
|
+
rm_cv_enum_hsbcolorspace='no')])
|
245
|
+
|
246
|
+
if test "$rm_cv_enum_hsbcolorspace" = yes; then
|
247
|
+
AC_DEFINE(HAVE_HSBCOLORSPACE)
|
248
|
+
fi
|
249
|
+
|
250
|
+
AC_CACHE_CHECK(for CopyCyanCompositeOp enum value, rm_cv_enum_copycyancompositeop,
|
251
|
+
[AC_TRY_COMPILE(
|
252
|
+
[#include <stdio.h>
|
253
|
+
#if HAVE_SYS_TYPES_H
|
254
|
+
#include <sys/types.h>
|
255
|
+
#endif
|
256
|
+
#include "magick/api.h"],
|
257
|
+
[CompositeOperator x; x = CopyCyanCompositeOp],
|
258
|
+
rm_cv_enum_copycyancompositeop='yes',
|
259
|
+
rm_cv_enum_copycyancompositeop='no')])
|
260
|
+
|
261
|
+
if test "$rm_cv_enum_copycyancompositeop" = yes; then
|
262
|
+
AC_DEFINE(HAVE_COPYCYANCOMPOSITEOP)
|
263
|
+
fi
|
264
|
+
|
265
|
+
AC_CACHE_CHECK(for ReplaceCompositeOp enum value, rm_cv_enum_replacecompositeop,
|
266
|
+
[AC_TRY_COMPILE(
|
267
|
+
[#include <stdio.h>
|
268
|
+
#if HAVE_SYS_TYPES_H
|
269
|
+
#include <sys/types.h>
|
270
|
+
#endif
|
271
|
+
#include "magick/api.h"],
|
272
|
+
[CompositeOperator x; x = ReplaceCompositeOp],
|
273
|
+
rm_cv_enum_replacecompositeop='yes',
|
274
|
+
rm_cv_enum_replacecompositeop='no')])
|
275
|
+
|
276
|
+
if test "$rm_cv_enum_replacecompositeop" = yes; then
|
277
|
+
AC_DEFINE(HAVE_REPLACECOMPOSITEOP)
|
278
|
+
fi
|
279
|
+
|
280
|
+
AC_CACHE_CHECK(for DstCompositeOp enum value, rm_cv_enum_dstcompositeop,
|
281
|
+
[AC_TRY_COMPILE(
|
282
|
+
[#include <stdio.h>
|
283
|
+
#if HAVE_SYS_TYPES_H
|
284
|
+
#include <sys/types.h>
|
285
|
+
#endif
|
286
|
+
#include "magick/api.h"],
|
287
|
+
[CompositeOperator x; x = DstCompositeOp],
|
288
|
+
rm_cv_enum_dstcompositeop='yes',
|
289
|
+
rm_cv_enum_dstcompositeop='no')])
|
290
|
+
|
291
|
+
if test "$rm_cv_enum_dstcompositeop" = yes; then
|
292
|
+
AC_DEFINE(HAVE_DSTCOMPOSITEOP)
|
293
|
+
fi
|
294
|
+
|
295
|
+
AC_CACHE_CHECK(for ColorDodgeCompositeOp enum value, rm_cv_enum_ColorDodgeCompositeOp,
|
296
|
+
[AC_TRY_COMPILE(
|
297
|
+
[#include <stdio.h>
|
298
|
+
#if HAVE_SYS_TYPES_H
|
299
|
+
#include <sys/types.h>
|
300
|
+
#endif
|
301
|
+
#include "magick/api.h"],
|
302
|
+
[CompositeOperator x; x = ColorDodgeCompositeOp],
|
303
|
+
rm_cv_enum_ColorDodgeCompositeOp='yes',
|
304
|
+
rm_cv_enum_ColorDodgeCompositeOp='no')])
|
305
|
+
|
306
|
+
if test "$rm_cv_enum_ColorDodgeCompositeOp" = yes; then
|
307
|
+
AC_DEFINE(HAVE_COLORDODGECOMPOSITEOP)
|
308
|
+
fi
|
309
|
+
|
310
|
+
|
311
|
+
AC_CACHE_CHECK(for IndexChannel enum value, rm_cv_enum_indexchannel,
|
312
|
+
[AC_TRY_COMPILE(
|
313
|
+
[#include <stdio.h>
|
314
|
+
#if HAVE_SYS_TYPES_H
|
315
|
+
#include <sys/types.h>
|
316
|
+
#endif
|
317
|
+
#include "magick/api.h"],
|
318
|
+
[ChannelType x; x = IndexChannel],
|
319
|
+
rm_cv_enum_indexchannel='yes',
|
320
|
+
rm_cv_enum_indexchannel='no')])
|
321
|
+
|
322
|
+
if test "$rm_cv_enum_indexchannel" = yes; then
|
323
|
+
AC_DEFINE(HAVE_INDEXCHANNEL)
|
324
|
+
fi
|
325
|
+
|
326
|
+
AC_CACHE_CHECK(for AllChannels enum value, rm_cv_enum_allchannels,
|
327
|
+
[AC_TRY_COMPILE(
|
328
|
+
[#include <stdio.h>
|
329
|
+
#if HAVE_SYS_TYPES_H
|
330
|
+
#include <sys/types.h>
|
331
|
+
#endif
|
332
|
+
#include "magick/api.h"],
|
333
|
+
[ChannelType x; x = AllChannels],
|
334
|
+
rm_cv_enum_allchannels='yes',
|
335
|
+
rm_cv_enum_allchannels='no')])
|
336
|
+
|
337
|
+
if test "$rm_cv_enum_allchannels" = yes; then
|
338
|
+
AC_DEFINE(HAVE_ALLCHANNELS)
|
339
|
+
fi
|
340
|
+
|
341
|
+
if test "$rm_have_getimagequantumdepth" = yes; then
|
342
|
+
# IM 6.0.5 changed the number of arguments to GetImageQuantumDepth.
|
343
|
+
AC_CACHE_CHECK(if GetImageQuantumDepth has only 1 argument, rm_cv_args_get_image_quantum_depth,
|
344
|
+
[AC_TRY_COMPILE(
|
345
|
+
[#include <stdio.h>
|
346
|
+
#if HAVE_SYS_TYPES_H
|
347
|
+
#include <sys/types.h>
|
348
|
+
#endif
|
349
|
+
#include "magick/api.h"],
|
350
|
+
[Image *image; (void)GetImageQuantumDepth(image)],
|
351
|
+
rm_cv_args_get_image_quantum_depth='yes',
|
352
|
+
rm_cv_args_get_image_quantum_depth='no')])
|
353
|
+
|
354
|
+
if test "$rm_cv_args_get_image_quantum_depth" = yes; then
|
355
|
+
AC_DEFINE(HAVE_OLD_GETIMAGEQUANTUMDEPTH)
|
356
|
+
fi
|
357
|
+
fi
|
358
|
+
|
359
|
+
if test "$rm_have_getcolorinfolist" = yes; then
|
360
|
+
# IM 6.1.3 changed the number of arguments to GetColorInfoList
|
361
|
+
AC_CACHE_CHECK(if GetColorInfoList has only 2 arguments, rm_cv_args_get_color_info_list,
|
362
|
+
[AC_TRY_COMPILE(
|
363
|
+
[#include <stdio.h>
|
364
|
+
#if HAVE_SYS_TYPES_H
|
365
|
+
#include <sys/types.h>
|
366
|
+
#endif
|
367
|
+
#include "magick/api.h"],
|
368
|
+
[const char *pattern; unsigned long ncolors; (void)GetColorInfoList(pattern, &ncolors)],
|
369
|
+
rm_cv_args_get_color_info_list='yes',
|
370
|
+
rm_cv_args_get_color_info_list='no')])
|
371
|
+
|
372
|
+
if test "$rm_cv_args_get_color_info_list" = yes; then
|
373
|
+
AC_DEFINE(HAVE_OLD_GETCOLORINFOLIST)
|
374
|
+
fi
|
375
|
+
fi
|
376
|
+
|
377
|
+
if test "$rm_have_gettypeinfolist" = yes; then
|
378
|
+
# IM 6.1.3 changed the number of arguments to GetTypeInfoList
|
379
|
+
AC_CACHE_CHECK(if GetTypeInfoList has only 2 arguments, rm_cv_args_get_type_info_list,
|
380
|
+
[AC_TRY_COMPILE(
|
381
|
+
[#include <stdio.h>
|
382
|
+
#if HAVE_SYS_TYPES_H
|
383
|
+
#include <sys/types.h>
|
384
|
+
#endif
|
385
|
+
#include "magick/api.h"],
|
386
|
+
[const char *pattern; unsigned long ncolors; (void)GetTypeInfoList(pattern, &ncolors)],
|
387
|
+
rm_cv_args_get_type_info_list='yes',
|
388
|
+
rm_cv_args_get_type_info_list='no')])
|
389
|
+
|
390
|
+
if test "$rm_cv_args_get_type_info_list" = yes; then
|
391
|
+
AC_DEFINE(HAVE_OLD_GETTYPEINFOLIST)
|
392
|
+
fi
|
393
|
+
fi
|
394
|
+
|
395
|
+
if test "$rm_have_getmagickinfolist" = yes; then
|
396
|
+
# IM 6.1.3 changed the number of arguments to GetMagickInfoList
|
397
|
+
AC_CACHE_CHECK(if GetMagickInfoList has only 2 arguments, rm_cv_args_get_magick_info_list,
|
398
|
+
[AC_TRY_COMPILE(
|
399
|
+
[#include <stdio.h>
|
400
|
+
#if HAVE_SYS_TYPES_H
|
401
|
+
#include <sys/types.h>
|
402
|
+
#endif
|
403
|
+
#include "magick/api.h"],
|
404
|
+
[const char *pattern; unsigned long ncolors; (void)GetMagickInfoList(pattern, &ncolors)],
|
405
|
+
rm_cv_args_get_magick_info_list='yes',
|
406
|
+
rm_cv_args_get_magick_info_list='no')])
|
407
|
+
|
408
|
+
if test "$rm_cv_args_get_magick_info_list" = yes; then
|
409
|
+
AC_DEFINE(HAVE_OLD_GETMAGICKINFOLIST)
|
410
|
+
fi
|
411
|
+
fi
|
412
|
+
|
413
|
+
# Where is ****Magick installed?
|
414
|
+
MAGICKPREFIX=`${MAGICKCONFIG} --prefix`
|
415
|
+
|
416
|
+
# Options to pass to ruby config step
|
417
|
+
|
418
|
+
RUBY_CONFIG_OPTS=''
|
419
|
+
|
420
|
+
if test "x$prefix" != xNONE; then
|
421
|
+
RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --prefix=$prefix"
|
422
|
+
fi
|
423
|
+
if test `eval echo $bindir` != NONE/bin; then
|
424
|
+
RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --bin-dir=`eval echo $bindir`"
|
425
|
+
fi
|
426
|
+
if test `eval echo $datadir` != ${prefix}/share; then
|
427
|
+
RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --data-dir=`eval echo $datadir`"
|
428
|
+
fi
|
429
|
+
|
430
|
+
AC_ARG_WITH(doc-dir,
|
431
|
+
AC_HELP_STRING([--with-doc-dir=DIR], [RMagick documentation directory [[PREFIX/share/RMagick]]]),
|
432
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --doc-dir=$withval"], )
|
433
|
+
|
434
|
+
AC_ARG_WITH(std-ruby,
|
435
|
+
AC_HELP_STRING([--with-std-ruby=DIR], [the directory for standard ruby libraries [[PREFIX/lib/ruby/1.x]]]),
|
436
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --std-ruby=$withval"], )
|
437
|
+
|
438
|
+
AC_ARG_WITH(site-ruby,
|
439
|
+
AC_HELP_STRING([--with-site-ruby=DIR], [the directory for non-standard ruby libraries [[PREFIX/lib/ruby/site_ruby/1.x]]]),
|
440
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --site-ruby=$withval"], )
|
441
|
+
|
442
|
+
AC_ARG_WITH(site-ruby-common,
|
443
|
+
AC_HELP_STRING([--with-site-ruby-common=DIR], [the directory for version-independent non-standard ruby libraries [[PREFIX/lib/ruby/site_ruby]]]),
|
444
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --site-ruby-common=$withval"], )
|
445
|
+
|
446
|
+
AC_ARG_WITH(rb-dir,
|
447
|
+
AC_HELP_STRING([--with-rb-dir=DIR], [the directory for ruby scripts [[PREFIX/lib/ruby/site_ruby/1.x]]]),
|
448
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --rb-dir=$withval"], )
|
449
|
+
|
450
|
+
AC_ARG_WITH(so-dir,
|
451
|
+
AC_HELP_STRING([--with-so-dir=DIR], [the directory for ruby extensions]),
|
452
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --so-dir=$withval"], )
|
453
|
+
|
454
|
+
AC_ARG_WITH(ruby-path,
|
455
|
+
AC_HELP_STRING([--with-ruby-path=DIR], [path to set to #! line [PREFIX/bin/ruby]]),
|
456
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --ruby-path=$withval"], )
|
457
|
+
|
458
|
+
AC_ARG_WITH(ruby-prog,
|
459
|
+
AC_HELP_STRING([--with-ruby-prog=NAME], [the ruby program used for installation [[PREFIX/bin/ruby]]]),
|
460
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --ruby-prog=$withval"
|
461
|
+
RUBY=$withval], )
|
462
|
+
|
463
|
+
AC_ARG_WITH(make-prog,
|
464
|
+
AC_HELP_STRING([--with-make-prog=NAME], [the make program to compile ruby extensions [[make]]]),
|
465
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --make-prog=$withval"], )
|
466
|
+
|
467
|
+
AC_ARG_WITH(rbconfig,
|
468
|
+
AC_HELP_STRING([--with-rbconfig=PATH], [your rbconfig to load [[ruby's]]]),
|
469
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --rbconfig=$withval"], )
|
470
|
+
|
471
|
+
AC_ARG_ENABLE(without-ext,
|
472
|
+
AC_HELP_STRING([--enable-without-ext], [does not compile/install ruby extensions [[--disable-without-ext]]]),
|
473
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --without-ext"], )
|
474
|
+
|
475
|
+
AC_ARG_ENABLE(no-harm,
|
476
|
+
AC_HELP_STRING([--enable-no-harm], [only display what to do if given [[--disable-no-harm]]]),
|
477
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --no-harm"], )
|
478
|
+
|
479
|
+
AC_ARG_ENABLE(allow-example-errors,
|
480
|
+
AC_HELP_STRING([--enable-allow-example-errors], [allow installation to proceed even if a lot of examples fail [--disable-allow-example-errors]]),
|
481
|
+
[RUBY_CONFIG_OPTS="$RUBY_CONFIG_OPTS --allow-example-errors"], )
|
482
|
+
|
483
|
+
|
484
|
+
RUBY_VERSION_STRING=`$RUBY --version`
|
485
|
+
AC_DEFINE_UNQUOTED(RUBY_VERSION_STRING, "$RUBY_VERSION_STRING")
|
486
|
+
AC_SUBST(RUBY)
|
487
|
+
AC_SUBST(RUBY_CONFIG_OPTS)
|
488
|
+
|
489
|
+
AC_CONFIG_FILES(Makefile ext/RMagick/extconf.rb metaconfig)
|
490
|
+
AC_OUTPUT
|
491
|
+
|
492
|
+
echo ""
|
493
|
+
echo ""
|
494
|
+
echo "This installation of $PACKAGE_STRING is configured for"
|
495
|
+
echo "$RUBY_VERSION_STRING and $MAGICKNAME `$MAGICKCONFIG --version`."
|
496
|
+
|
497
|
+
|