I'd like to make the following proposal: All the ImageMagick code
relating to X Windows should be moved to its own library. The rationale
is that this makes it much easier for distributions to provide packages
that don't depend on X.
This doesn't seem to be very hard to achieve. Attached is a proof of
concept patch that moves the code in
magick/animate.c
magick/display.c
magick/PreRvIcccm.c
magick/widget.c
magick/xwindow.c
wand/animate.c
wand/display.c
wand/import.c
to a new library libMagickX11. Some notes about the patch:
- AnnotateImage() loses the ability to work with X fonts
- DestroyXResources() isn't called from MagickCoreTerminus() any more.
- I chose to let PerlMagick and Magick++ not depend on libMagickX11,
so Magick++ doesn't support Magick::Image::display and PerlMagick
doesn't support ->Animate(), ->Display() and ->Remote() any more.
This could be changed, of course.
- I didn't move the functions MagickAnimateImages() and
MagickDisplayImage() from wand/magick-image.c to libMagickX11 yet.
I know this is a rather intrusive change that would have to wait for a
major revision. You could also make this configurable but this probably
wouldn't be a good idea.
What do you think?
Nick
Index: configure.ac
===================================================================
--- configure.ac (revision 283)
+++ configure.ac (working copy)
@@ -60,7 +60,9 @@
wand/MagickWand-config \
wand/MagickWand.pc \
wand/Wand-config \
- wand/Wand.pc ])
+ wand/Wand.pc \
+ x11/MagickX11-config \
+ x11/MagickX11.pc ])
#
# Save initial user-tunable values
@@ -1081,7 +1083,7 @@
# Most delegates have includes in the same directory as the library, but
not all...
#
# Includes
- for dir in bzlib fftw fpx jp2 jp2/src/libjasper/include jbig/libjbig jpeg
lcms/include magick png tiff/libtiff ttf/include wand wmf/include xml/include
zlib; do
+ for dir in bzlib fftw fpx jp2 jp2/src/libjasper/include jbig/libjbig jpeg
lcms/include magick png tiff/libtiff ttf/include wand wmf/include x11
xml/include zlib; do
if test -d "$builddir/$dir"; then
CPPFLAGS="$CPPFLAGS -I$builddir/$dir"
else
@@ -1092,7 +1094,7 @@
done
# Libraries
- for dir in bzlib fftw fpx jp2 jp2/src/libjasper jbig/libjbig jpeg lcms/src
magick png tiff/libtiff ttf/objs wand wmf/src xml zlib; do
+ for dir in bzlib fftw fpx jp2 jp2/src/libjasper jbig/libjbig jpeg lcms/src
magick png tiff/libtiff ttf/objs wand wmf/src x11 xml zlib; do
if test -d "$builddir/$dir/.libs"; then
LDFLAGS="$LDFLAGS -L$builddir/$dir/.libs"
else
@@ -3266,7 +3268,7 @@
AC_SUBST(MAGICK_LTDLDEPS)
if test "$with_modules" != 'no'; then
- MAGICK_DEP_LIBS="$LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $LQR_LIBS
$FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $BZLIB_LIBS
$ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS
$GOMP_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $LQR_LIBS
$FFTW_LIBS $FONTCONFIG_LIBS $BZLIB_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS
$CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS $THREAD_LIBS"
else
MAGICK_DEP_LIBS="$JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JP2_LIBS
$JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS
$FPX_LIBS $FONTCONFIG_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS
$X11_LIBS $BZLIB_LIBS $OPENEXR_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS
$GDI32_LIBS $MATH_LIBS $CCMALLOC_LIBS $EFENCE_LIBS $UMEM_LIBS $GOMP_LIBS
$THREAD_LIBS"
fi
@@ -3321,6 +3323,7 @@
AC_CONFIG_COMMANDS([Magick-config.in],[chmod +x magick/Magick-config])
AC_CONFIG_COMMANDS([MagickWand-config.in],[chmod +x wand/MagickWand-config])
AC_CONFIG_COMMANDS([Wand-config.in],[chmod +x wand/Wand-config])
+AC_CONFIG_COMMANDS([MagickX11-config.in],[chmod +x x11/MagickX11-config])
AC_CONFIG_COMMANDS([Magick++-config.in],[chmod +x
Magick++/bin/Magick++-config])
AC_CONFIG_COMMANDS([PerlMagick/check.sh.in],[chmod +x PerlMagick/check.sh])
Index: magick/annotate.c
===================================================================
--- magick/annotate.c (revision 283)
+++ magick/annotate.c (working copy)
@@ -1743,7 +1743,7 @@
% o metrics: bounding box of text.
%
*/
-#if defined(MAGICKCORE_X11_DELEGATE)
+#if 0 && defined(MAGICKCORE_X11_DELEGATE)
static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info,
const PointInfo *offset,TypeMetric *metrics)
{
Index: magick/Makefile.am
===================================================================
--- magick/Makefile.am (revision 283)
+++ magick/Makefile.am (working copy)
@@ -54,9 +54,6 @@
MAGICK_BASE_SRCS = \
magick/ImageMagick.h \
magick/MagickCore.h \
- magick/animate.c \
- magick/animate.h \
- magick/animate-private.h \
magick/annotate.c \
magick/annotate.h \
magick/api.h \
@@ -103,9 +100,6 @@
magick/delegate-private.h \
magick/deprecate.c \
magick/deprecate.h \
- magick/display.c \
- magick/display.h \
- magick/display-private.h \
magick/distort.c \
magick/distort.h \
magick/draw.c \
@@ -176,8 +170,6 @@
magick/pixel-private.h \
magick/policy.c \
magick/policy.h \
- magick/PreRvIcccm.c \
- magick/PreRvIcccm.h \
magick/prepress.c \
magick/prepress.h \
magick/property.c \
@@ -244,12 +236,8 @@
magick/version.c \
magick/version.h \
magick/vms.h \
- magick/widget.c \
- magick/widget.h \
magick/xml-tree.c \
- magick/xml-tree.h \
- magick/xwindow.c \
- magick/xwindow.h
+ magick/xml-tree.h
if WIN32_NATIVE_BUILD
MAGICK_PLATFORM_SRCS = \
@@ -270,8 +258,6 @@
MAGICK_INCLUDE_HDRS = \
magick/ImageMagick.h \
magick/MagickCore.h \
- magick/PreRvIcccm.h \
- magick/animate.h \
magick/annotate.h \
magick/api.h \
magick/artifact.h \
@@ -292,7 +278,6 @@
magick/decorate.h \
magick/delegate.h \
magick/deprecate.h \
- magick/display.h \
magick/distort.h \
magick/draw.h \
magick/effect.h \
@@ -350,12 +335,9 @@
magick/type.h \
magick/utility.h \
magick/version.h \
- magick/widget.h \
- magick/xml-tree.h \
- magick/xwindow.h
+ magick/xml-tree.h
MAGICK_NOINST_HDRS = \
- magick/animate-private.h \
magick/blob-private.h \
magick/cache-private.h \
magick/color-private.h \
@@ -363,7 +345,6 @@
magick/colorspace-private.h \
magick/composite-private.h \
magick/delegate-private.h \
- magick/display-private.h \
magick/draw-private.h \
magick/exception-private.h \
magick/fx-private.h \
@@ -385,7 +366,6 @@
magick/thread_.h \
magick/thread-private.h \
magick/token-private.h \
- magick/xwindow-private.h \
magick/vms.h
MAGICK_EXTRA_DIST = \
Index: magick/magick.c
===================================================================
--- magick/magick.c (revision 283)
+++ magick/magick.c (working copy)
@@ -1271,7 +1271,8 @@
*/
MagickExport void MagickCoreTerminus(void)
{
-#if defined(MAGICKCORE_X11_DELEGATE)
+/* TODO: move to MagickX11Terminus? */
+#if 0 && defined(MAGICKCORE_X11_DELEGATE)
DestroyXResources();
#endif
DestroyConstitute();
Index: Magick++/lib/Image.cpp
===================================================================
--- Magick++/lib/Image.cpp (revision 283)
+++ Magick++/lib/Image.cpp (working copy)
@@ -739,7 +739,8 @@
// Display image
void Magick::Image::display( void )
{
- DisplayImages( imageInfo(), image() );
+ // TODO
+ //DisplayImages( imageInfo(), image() );
}
// Distort image. distorts an image using various distortion methods, by
Index: magick.sh.in
===================================================================
--- magick.sh.in (revision 283)
+++ magick.sh.in (working copy)
@@ -35,7 +35,7 @@
echo "$@"
fi
env \
-
LD_LIBRARY_PATH="${top_builddir}/magick/.libs:${top_builddir}/wand/.libs:${LD_LIBRARY_PATH}"
\
+
LD_LIBRARY_PATH="${top_builddir}/magick/.libs:${top_builddir}/wand/.libs:${top_builddir}/x11/.libs:${LD_LIBRARY_PATH}"
\
MAGICK_CODER_MODULE_PATH="${MAGICK_CODER_MODULE_PATH}" \
MAGICK_CONFIGURE_PATH="${MAGICK_CONFIGURE_BUILD_PATH}${DIRSEP}${MAGICK_CONFIGURE_SRC_PATH}"
\
MAGICK_FILTER_MODULE_PATH="${MAGICK_FILTER_MODULE_PATH}" \
Index: Makefile.am
===================================================================
--- Makefile.am (revision 283)
+++ Makefile.am (working copy)
@@ -48,6 +48,7 @@
bin_SCRIPTS = \
$(MAGICK_BIN_SCRPTS) \
$(WAND_BIN_SCRPTS) \
+ $(X11_BIN_SCRPTS) \
$(MAGICKPP_SCRPTS)
include_HEADERS = \
@@ -124,11 +125,12 @@
$(CONFIG_EXTRA_DIST) \
$(MAGICK_EXTRA_DIST) \
$(WAND_EXTRA_DIST) \
+ $(X11_EXTRA_DIST) \
$(MAGICKPP_EXTRA_DIST) \
$(UTILITIES_EXTRA_DIST) \
$(TESTS_EXTRA_DIST)
-lib_LTLIBRARIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) $(MAGICKPP_LIBS)
+lib_LTLIBRARIES = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS) $(MAGICKX11_LIBS)
$(MAGICKPP_LIBS)
AM_LDFLAGS =
noinst_LTLIBRARIES =
EXTRA_LTLIBRARIES =
@@ -147,6 +149,7 @@
include magick/Makefile.am
include filters/Makefile.am
include wand/Makefile.am
+include x11/Makefile.am
include Magick++/Makefile.am
include utilities/Makefile.am
include tests/Makefile.am
@@ -159,12 +162,14 @@
pkgconfig_DATA = \
$(MAGICK_PKGCONFIG) \
$(WAND_PKGCONFIG) \
+ $(X11_PKGCONFIG) \
$(MAGICKPP_PKGCONFIG)
# Manual pages to install
man_MANS = \
$(MAGICK_MANS) \
$(WAND_MANS) \
+ $(X11_MANS) \
$(MAGICKPP_MANS) \
$(UTILITIES_MANS)
Index: PerlMagick/Magick.xs
===================================================================
--- PerlMagick/Magick.xs (revision 283)
+++ PerlMagick/Magick.xs (working copy)
@@ -2325,6 +2325,9 @@
###############################################################################
#
#
+
+#if 0
+
void
Animate(ref,...)
Image::Magick ref=NO_INIT
@@ -2390,6 +2393,8 @@
ST(0)=sv_2mortal(perl_exception);
XSRETURN(1);
}
+
+#endif
#
###############################################################################
@@ -3406,6 +3411,9 @@
###############################################################################
#
#
+
+#if 0
+
void
Display(ref,...)
Image::Magick ref=NO_INIT
@@ -3471,6 +3479,8 @@
ST(0)=sv_2mortal(perl_exception);
XSRETURN(1);
}
+
+#endif
#
###############################################################################
@@ -12365,6 +12375,9 @@
###############################################################################
#
#
+
+#if 0
+
void
Remote(ref,...)
Image::Magick ref=NO_INIT
@@ -12403,6 +12416,8 @@
exception=DestroyExceptionInfo(exception);
SvREFCNT_dec(perl_exception); /* throw away all errors */
}
+
+#endif
#
###############################################################################
Index: utilities/Makefile.am
===================================================================
--- utilities/Makefile.am (revision 283)
+++ utilities/Makefile.am (working copy)
@@ -14,6 +14,7 @@
#
# Makefile for building ImageMagick utilities.
+if X11_DELEGATE
UTILITIES_PGMS = \
utilities/animate \
utilities/compare \
@@ -26,12 +27,23 @@
utilities/mogrify \
utilities/montage \
utilities/stream
+else
+UTILITIES_PGMS = \
+ utilities/compare \
+ utilities/composite \
+ utilities/conjure \
+ utilities/convert \
+ utilities/identify \
+ utilities/mogrify \
+ utilities/montage \
+ utilities/stream
+endif
UTILITIES_XFAIL_TESTS = \
$(UTILITIES_TTF_XFAIL_TESTS) \
$(UTILITIES_XML_XFAIL_TESTS)
-utilities_animate_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)
+utilities_animate_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)
$(MAGICKX11_LIBS)
utilities_animate_LDFLAGS = $(LDFLAGS)
utilities_animate_SOURCES = utilities/animate.c
@@ -51,7 +63,7 @@
utilities_convert_LDFLAGS = $(LDFLAGS)
utilities_convert_SOURCES = utilities/convert.c
-utilities_display_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)
+utilities_display_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)
$(MAGICKX11_LIBS)
utilities_display_LDFLAGS = $(LDFLAGS)
utilities_display_SOURCES = utilities/display.c
@@ -59,7 +71,7 @@
utilities_identify_LDFLAGS = $(LDFLAGS)
utilities_identify_SOURCES = utilities/identify.c
-utilities_import_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)
+utilities_import_LDADD = $(MAGICKCORE_LIBS) $(MAGICKWAND_LIBS)
$(MAGICKX11_LIBS)
utilities_import_LDFLAGS = $(LDFLAGS)
utilities_import_SOURCES = utilities/import.c
Index: wand/magick-image.c
===================================================================
--- wand/magick-image.c (revision 283)
+++ wand/magick-image.c (working copy)
@@ -652,6 +652,8 @@
return(status);
}
+/* TODO: move to libMagickX11 */
+#if 0
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -693,6 +695,7 @@
InheritException(wand->exception,&wand->images->exception);
return(status);
}
+#endif
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2446,6 +2449,8 @@
return(DestroyImage(image));
}
+/* TODO: move to libMagickX11 */
+#if 0
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -2538,6 +2543,7 @@
InheritException(wand->exception,&wand->images->exception);
return(status);
}
+#endif
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Index: wand/Makefile.am
===================================================================
--- wand/Makefile.am (revision 283)
+++ wand/Makefile.am (working copy)
@@ -21,8 +21,6 @@
WAND_SOURCES = \
wand/MagickWand.h \
- wand/animate.c \
- wand/animate.h \
wand/compare.c \
wand/compare.h \
wand/composite.c \
@@ -33,14 +31,10 @@
wand/convert.h \
wand/deprecate.h \
wand/deprecate.c \
- wand/display.c \
- wand/display.h \
wand/drawing-wand.c \
wand/drawing-wand.h \
wand/identify.c \
wand/identify.h \
- wand/import.c \
- wand/import.h \
wand/magick-image.c \
wand/magick-image.h \
wand/magick-property.c \
@@ -68,16 +62,13 @@
WAND_INCLUDE_HDRS = \
wand/MagickWand.h \
- wand/animate.h \
wand/compare.h \
wand/composite.h \
wand/conjure.h \
wand/convert.h \
wand/deprecate.h \
- wand/display.h \
wand/drawing-wand.h \
wand/identify.h \
- wand/import.h \
wand/magick-image.h \
wand/magick-property.h \
wand/magick-wand.h \
@@ -121,7 +112,7 @@
wand_libMagickWand_la_LDFLAGS = -no-undefined -export-symbols-regex ".*" \
-version-info \
$(MAGICK_LIBRARY_CURRENT):$(MAGICK_LIBRARY_REVISION):$(MAGICK_LIBRARY_AGE)
-wand_libMagickWand_la_LIBADD = $(MAGICKCORE_LIBS) $(X11_LIBS) $(GOMP_LIBS)
$(MATH_LIBS)
+wand_libMagickWand_la_LIBADD = $(MAGICKCORE_LIBS) $(GOMP_LIBS) $(MATH_LIBS)
WAND_EXTRA_DIST = \
wand/ChangeLog \
Index: x11/MagickX11-config.1
===================================================================
--- x11/MagickX11-config.1 (revision 0)
+++ x11/MagickX11-config.1 (revision 0)
@@ -0,0 +1,69 @@
+.ad l
+.nh
+.TH MagickX11-Config 1 "2 May 2002" "X11"
+.SH NAME
+MagickX11-config \- get information about the installed version of the Magick
X11
+.SH SYNOPSIS
+.B MagickX11-config
+.B [--cflags]
+.B [--cppflags]
+.B [--exec-prefix]
+.B [--ldflags]
+.B [--libs]
+.B [--prefix]
+.B [--version]
+.SH DESCRIPTION
+.B MagickX11-config
+prints the compiler and linker flags required to compile and link programs
+that use the
+.BR X11
+Application Programmer Interface.
+.SH EXAMPLES
+To print the version of the installed distribution of
+.BR X11 ,
+use:
+
+.nf
+ MagickX11-config \-\-version
+.fi
+
+To compile a program that calls the
+.BR X11
+Application Programmer Interface, use:
+
+.nf
+ cc `MagickX11-config \-\-cflags \-\-cppflags \-\-ldflags \-\-libs` program.c
+.fi
+
+.SH OPTIONS
+.TP
+.B \-\-cflags
+Print the compiler flags that were used to compile
+.BR libX11 .
+.TP
+.B \-\-cppflags
+Print the preprocessor flags that are needed to find the
+.B X11
+C include files and defines to ensure that the X11 data structures match
between
+your program and the installed libraries.
+.TP
+.B \-\-exec-prefix
+Print the directory under which target specific binaries and executables are
installed.
+.TP
+.B \-\-ldflags
+Print the linker flags that are needed to link with the
+.B X11
+library.
+.TP
+.B \-\-libs
+Print the linker flags that are needed to link a program with
+.BR libX11 .
+.TP
+.B \-\-version
+Print the version of the
+.B X11
+distribution to standard output.
+.SH COPYRIGHT
+See http://www.imagemagick.org/script/license.php
+.SH AUTHORS
+John Cristy, ImageMagick Studio LLC
Index: x11/Makefile.am
===================================================================
--- x11/Makefile.am (revision 0)
+++ x11/Makefile.am (revision 0)
@@ -0,0 +1,84 @@
+# Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization
+# dedicated to making software imaging solutions freely available.
+#
+# You may not use this file except in compliance with the License. You may
+# obtain a copy of the License at
+#
+# http://www.imagemagick.org/script/license.php
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Copyright (C) 2003 - 2008 GraphicsMagick Group
+#
+# Makefile for building MagickX11 API.
+#
+
+if X11_DELEGATE
+MAGICKX11_LIBS = x11/libMagickX11.la
+X11_BIN_SCRPTS = x11/MagickX11-config
+X11_PKGCONFIG = x11/MagickX11.pc
+X11_MANS = x11/MagickX11-config.1
+X11_EXTRA_DIST = \
+ x11/ChangeLog \
+ x11/MagickX11-config.1 \
+ x11/MagickX11.pc.in
+else
+MAGICKX11_LIBS =
+X11_BIN_SCRPTS =
+X11_PKGCONFIG =
+X11_MANS =
+X11_EXTRA_DIST =
+endif
+
+x11incdir = $(topincludedir)/x11
+
+X11_SOURCES = \
+ magick/animate.c \
+ magick/animate.h \
+ magick/display.c \
+ magick/display.h \
+ magick/display-private.h \
+ magick/PreRvIcccm.c \
+ magick/PreRvIcccm.h \
+ magick/widget.c \
+ magick/widget.h \
+ magick/xwindow.c \
+ magick/xwindow.h \
+ magick/xwindow-private.h \
+ wand/animate.c \
+ wand/animate.h \
+ wand/display.c \
+ wand/display.h \
+ wand/import.c \
+ wand/import.h
+
+X11_INCLUDE_HDRS = \
+ magick/animate.h \
+ magick/display.h \
+ magick/PreRvIcccm.h \
+ magick/widget.h \
+ magick/xwindow.h \
+ wand/animate.h \
+ wand/display.h \
+ wand/import.h
+
+X11_NOINST_HDRS = \
+ magick/animate-private.h \
+ magick/import-private.h \
+ magick/xwindow-private.h
+
+# Headers which are installed
+x11inc_HEADERS = \
+ $(X11_INCLUDE_HDRS)
+
+x11_libMagickX11_la_SOURCES = $(X11_SOURCES)
+x11_libMagickX11_la_CPPFLAGS = $(LIBRARY_EXTRA_CPPFLAGS)
+x11_libMagickX11_la_LDFLAGS = -no-undefined -export-symbols-regex ".*" \
+ -version-info \
+ $(MAGICK_LIBRARY_CURRENT):$(MAGICK_LIBRARY_REVISION):$(MAGICK_LIBRARY_AGE)
+x11_libMagickX11_la_LIBADD = $(MAGICKCORE_LIBS) $(X11_LIBS) $(XEXT_LIBS)
$(MATH_LIBS)
+
Index: x11/MagickX11.pc.in
===================================================================
--- x11/MagickX11.pc.in (revision 0)
+++ x11/MagickX11.pc.in (revision 0)
@@ -0,0 +1,11 @@
+pref...@prefix@
+exec_pref...@exec_prefix@
+libd...@libdir@
+included...@includedir@/ImageMagick
+
+Name: MagickX11
+Version: @PACKAGE_VERSION@
+Description: MagickX11 - C API for ImageMagick
+Requires: ImageMagick
+Libs: -L${libdir} -lMagickX11 -lMagickCore
+Cflags: -I${includedir} @MAGICK_PCFLAGS@
Index: x11/MagickX11-config.in
===================================================================
--- x11/MagickX11-config.in (revision 0)
+++ x11/MagickX11-config.in (revision 0)
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+# Configure options script for re-calling MagickX11 compilation options
+# required to use the MagickX11 library.
+#
+
+pref...@prefix@
+exec_pref...@exec_prefix@
+libd...@libdir@
+included...@includedir@/ImageMagick
+
+usage="\
+Usage: MagickX11-config [--cflags] [--cppflags] [--exec-prefix] [--ldflags]
[--libs] [--prefix] [--version]"
+
+if test $# -eq 0; then
+ echo "${usage}" 1>&2
+ echo "Example: gcc \`MagickX11-config --cflags --cppflags\` -o x11 x11.c
\`MagickX11-config --ldflags --libs\`" 1>&2
+ exit 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ ;;
+ --prefix)
+ echo $prefix
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ ;;
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+ --version)
+ echo '@PACKAGE_VERSION@ q...@quantum_depth@ @MAGICK_HDRI@'
+ ;;
+ --cflags)
+ echo "-I${includedir} @MAGICK_PCFLAGS@"
+ ;;
+ --cxxflags)
+ echo '@MAGICK_CXXFLAGS@'
+ ;;
+ --cppflags)
+ echo '@MAGICK_CPPFLAGS@'
+ ;;
+ --ldflags)
+ echo '@MAGICK_LDFLAGS@'
+ ;;
+ --libs)
+ echo "-L${libdir} -lMagickX11 @MAGICK_LIBS@"
+ ;;
+ *)
+ echo "${usage}" 1>&2
+ exit 1
+ ;;
+ esac
+ shift
+done
+
_______________________________________________
Magick-developers mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-developers