[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[changeset] GraphicsMagick++ configuration
From: |
David Grundberg |
Subject: |
[changeset] GraphicsMagick++ configuration |
Date: |
Thu, 06 Aug 2009 16:55:48 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090302) |
Hi,
I've rearranged the GraphicsMagick++ configuration. I had some trouble
since I'm running a custom GraphicsMagick installation. The Octave build
system was running GraphicsMagick++-config during make. It was missing
ldflags and using only the basename of the config executable (as opposed
to a full path).
I've changed it so that GraphicsMagick++-config is only run in the
configure script. Also introduced MAGICK_CONFIG as a precious variable.
Best regards,
David
# HG changeset patch
# User David Grundberg <address@hidden>
# Date 1249569411 -7200
# Node ID 446c124e0d05459b531da5d397f6d11278fbd1e5
# Parent 54ae52abd4c9549981e44fe5c09a5f309937e527
Use the found or provided GraphicsMagick++-config and also use --ldflags.
diff -r 54ae52abd4c9 -r 446c124e0d05 ChangeLog
--- a/ChangeLog Thu Aug 06 10:57:11 2009 +0200
+++ b/ChangeLog Thu Aug 06 16:36:51 2009 +0200
@@ -1,3 +1,13 @@
+2009-08-06 David Grundberg <address@hidden>
+
+ * configure.in (MAGICK_LIBS, MAGICK_INCFLAGS): Run $MAGICK_CONFIG
+ and determine flags here. Substitute.
+ (MAGICK_CONFIG): Declare as precious variable.
+
+ * Makeconf.in (MAGICK_LIBS, MAGICK_INCFLAGS): Don't run
+ $(MAGICK_CONFIG) here. Use substituted values.
+ (MAGICK_CONFIG): Remove variable.
+
2009-08-05 John W. Eaton <address@hidden>
* acx_pthread.m4: New file.
diff -r 54ae52abd4c9 -r 446c124e0d05 Makeconf.in
--- a/Makeconf.in Thu Aug 06 10:57:11 2009 +0200
+++ b/Makeconf.in Thu Aug 06 16:36:51 2009 +0200
@@ -151,9 +151,8 @@
CARBON_LIBS = @CARBON_LIBS@
-MAGICK_CONFIG = @MAGICK_CONFIG@
-MAGICK_INCFLAGS = $(shell $(MAGICK_CONFIG) --cppflags)
-MAGICK_LIBS = $(shell $(MAGICK_CONFIG) --libs)
+MAGICK_INCFLAGS = @MAGICK_INCFLAGS@
+MAGICK_LIBS = @MAGICK_LIBS@
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
diff -r 54ae52abd4c9 -r 446c124e0d05 configure.in
--- a/configure.in Thu Aug 06 10:57:11 2009 +0200
+++ b/configure.in Thu Aug 06 16:36:51 2009 +0200
@@ -670,13 +670,47 @@
# GraphicsMagick++
-warn_magick=
-AC_CHECK_PROGS(MAGICK_CONFIG, [GraphicsMagick++-config GraphicsMagick-config])
+warn_magick="GraphicsMagick++ library not found. The imread function for
reading image files will not be fully functional."
+
+MAGICK_INCFLAGS=
+MAGICK_LIBS=
+AC_ARG_VAR(MAGICK_CONFIG, [GraphicsMagick++-config used to locate
GraphicsMagick++])
if test -z "$MAGICK_CONFIG"; then
- warn_magick="GraphicsMagick++ config script not found. Assuming
GraphicsMagic++ library and header files are missing, so imread will not be
fully functional"
+ AC_PATH_PROGS(MAGICK_CONFIG, [GraphicsMagick++-config GraphicsMagick-config])
+fi
+if test -n "$MAGICK_CONFIG"; then
+ MAGICK_LIBS=`$MAGICK_CONFIG --ldflags`' '`$MAGICK_CONFIG --libs`
+ MAGICK_INCFLAGS=`$MAGICK_CONFIG --cppflags`
+
+ warn_magick="GraphicsMagick++ library fails tests. The imread function for
reading image files will not be fully functional."
+
+ save_LIBS="$LIBS"
+ save_CPPFLAGS="$CPPFLAGS"
+ LIBS="$LIBS $MAGICK_LIBS"
+ CPPFLAGS="$CPPFLAGS $MAGICK_INCFLAGS"
+ AC_LANG_PUSH(C++)
+ AC_CHECK_HEADER([Magick++.h], [
+ AC_MSG_CHECKING([for Magick::ColorRGB in Magick++.h])
+ AC_TRY_LINK([#include <Magick++.h>], [Magick::ColorRGB c;], [
+ AC_MSG_RESULT(yes)
+ warn_magick=
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+ ])
+ AC_LANG_POP(C++)
+ LIBS="$save_LIBS"
+ CPPFLAGS="$save_CPPFLAGS"
+fi
+
+if test -z "$warn_magick"; then
+ AC_DEFINE(HAVE_MAGICK, 1, [Define if GraphicsMagick++ is available.])
else
- AC_DEFINE(HAVE_MAGICK, 1, [Define if GraphicsMagick++ is available.])
+ MAGICK_LIBS=
+ MAGICK_INCFLAGS=
fi
+AC_SUBST(MAGICK_LIBS)
+AC_SUBST(MAGICK_INCFLAGS)
# ---------------------------------------------------------------------
diff -r 54ae52abd4c9 -r 446c124e0d05 src/ChangeLog
--- a/src/ChangeLog Thu Aug 06 10:57:11 2009 +0200
+++ b/src/ChangeLog Thu Aug 06 16:36:51 2009 +0200
@@ -1,3 +1,9 @@
+2009-08-06 David Grundberg <address@hidden>
+
+ * DLD-FUNCTIONS/__magick_read__.cc [HAVE_MAGICK]: Include
+ Magick++.h instead of GraphicsMagick/Magic++.h to please
+ GraphicsMagick++-config.
+
2009-08-05 John W. Eaton <address@hidden>
* pt-eval.cc (tree_evaluator::visit_complex_for_command):
diff -r 54ae52abd4c9 -r 446c124e0d05 src/DLD-FUNCTIONS/__magick_read__.cc
--- a/src/DLD-FUNCTIONS/__magick_read__.cc Thu Aug 06 10:57:11 2009 +0200
+++ b/src/DLD-FUNCTIONS/__magick_read__.cc Thu Aug 06 16:36:51 2009 +0200
@@ -33,7 +33,7 @@
#ifdef HAVE_MAGICK
-#include <GraphicsMagick/Magick++.h>
+#include <Magick++.h>
unsigned int
scale_quantum_to_depth (const Magick::Quantum& quantum, unsigned int depth)
- [changeset] GraphicsMagick++ configuration,
David Grundberg <=
- [changeset] GraphicsMagick++ configuration, John W. Eaton, 2009/08/06
- Re: [changeset] GraphicsMagick++ configuration, David Grundberg, 2009/08/06
- Re: [changeset] GraphicsMagick++ configuration, John W. Eaton, 2009/08/06
- Re: [changeset] GraphicsMagick++ configuration, David Grundberg, 2009/08/06
- Re: [changeset] GraphicsMagick++ configuration, Thomas Weber, 2009/08/16
- Re: [changeset] GraphicsMagick++ configuration, David Grundberg, 2009/08/17
- Re: [changeset] GraphicsMagick++ configuration, Thomas Weber, 2009/08/25
- Re: [changeset] GraphicsMagick++ configuration, David Grundberg, 2009/08/25
- Re: [changeset] GraphicsMagick++ configuration, David Grundberg, 2009/08/25
- Re: [changeset] GraphicsMagick++ configuration, Jaroslav Hajek, 2009/08/27