* Can configure figure out if a C library supports a feature?
@ 2010-05-14 8:57 joakim
2010-05-14 9:33 ` Miles Bader
2010-05-14 9:35 ` Eli Zaretskii
0 siblings, 2 replies; 3+ messages in thread
From: joakim @ 2010-05-14 8:57 UTC (permalink / raw)
To: Emacs development discussions
Can configure figure out if a C library supports a feature?
I have refreshed the ImageMagick branch, and want to support more
versions of ImageMagick.
At some point ImageMagick introduced MagickExportImagePixels(). I can
optionaly take advantage of this function. How do I figure out and
handle in my code that this function is available?
Im looking for something like having autoconf emitting a #define
HAVE_MAGICKEXPORTIMAGEPIXELS.
--
Joakim Verona
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can configure figure out if a C library supports a feature?
2010-05-14 8:57 Can configure figure out if a C library supports a feature? joakim
@ 2010-05-14 9:33 ` Miles Bader
2010-05-14 9:35 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Miles Bader @ 2010-05-14 9:33 UTC (permalink / raw)
To: joakim; +Cc: Emacs development discussions
joakim@verona.se writes:
> Can configure figure out if a C library supports a feature?
>
> I have refreshed the ImageMagick branch, and want to support more
> versions of ImageMagick.
>
> At some point ImageMagick introduced MagickExportImagePixels(). I can
> optionaly take advantage of this function. How do I figure out and
> handle in my code that this function is available?
AC_CHECK_FUNC([MagickExportImagePixels])
You can set the (shell) variable "LIBS" before the use of AC_CHECK_FUNC
to specify whatever libraries are necessary, if they aren't already
available there, e.g. something like:
OLD_LIBS="$LIBS"
LIBS="$LIBS_FOR_IMAGE_MAGICK $LIBS"
AC_CHECK_FUNC([MagickExportImagePixels])
LIBS="$OLD_LIBS"
[The emacs configure.in should contains lots of examples of similar
tests you can look at...]
-Miles
--
Idiot, n. A member of a large and powerful tribe whose influence in human
affairs has always been dominant and controlling.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can configure figure out if a C library supports a feature?
2010-05-14 8:57 Can configure figure out if a C library supports a feature? joakim
2010-05-14 9:33 ` Miles Bader
@ 2010-05-14 9:35 ` Eli Zaretskii
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2010-05-14 9:35 UTC (permalink / raw)
To: joakim; +Cc: emacs-devel
> From: joakim@verona.se
> Date: Fri, 14 May 2010 10:57:15 +0200
>
> Can configure figure out if a C library supports a feature?
>
> I have refreshed the ImageMagick branch, and want to support more
> versions of ImageMagick.
>
> At some point ImageMagick introduced MagickExportImagePixels(). I can
> optionaly take advantage of this function. How do I figure out and
> handle in my code that this function is available?
You link with the appropriate library to see whether the link
succeeds.
> Im looking for something like having autoconf emitting a #define
> HAVE_MAGICKEXPORTIMAGEPIXELS.
Check out AC_CHECK_FUNC and AC_CHECK_FUNCS macros in Autoconf. You
can see how they are used in configure.in.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-14 9:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14 8:57 Can configure figure out if a C library supports a feature? joakim
2010-05-14 9:33 ` Miles Bader
2010-05-14 9:35 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).