autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Missing test for optional libraries?


From: Lars Clausen
Subject: Missing test for optional libraries?
Date: 06 Mar 2002 13:07:48 -0600
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1

Hi!

In Dia, we're in the middle of introducing Freetype support.  So far,
Freetype is optional.  Earlier we used hand-built macros to check for
Freetype, but since we have to check the version, we now use the
AC_CHECK_FT2 macro.  The macro itself works fine, but when compiling
without --enable-freetype on a system without freetype installed, I get the
following:

./configure: line 6267: syntax error near unexpected token `AC_CHECK_FT2(2.0.5,'
./configure: line 6267: `  AC_CHECK_FT2(2.0.5,'

The entry for freetype in configure.in is:

dnl check for libfreetype
AC_ARG_ENABLE(freetype, 
[  --enable-freetype       enable (LIMITED, EXPERIMENTAL) freetype support],,
        freetype=yes)
FREETYPE_CFLAGS=
FREETYPE_LIBS=
have_freetype=false
yn_have_freetype=no

if test "$enable_freetype" = "yes"; then
  AC_CHECK_FT2(2.0.5,
    [have_freetype=true
     FREETYPE_CFLAGS=$FT2_CFLAGS
     FREETYPE_LIBS=$FT2_LIBS
     AC_DEFINE(HAVE_FREETYPE,, Freetype support library available)
     yn_have_freetype=yes])
fi
AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)
AM_CONDITIONAL(HAVE_FREETYPE,$have_freetype)

Why does configure try to find AC_CHECK_FT2 when $enable_freetype is not
"yes"?  Can I get it to not do so?  Can I define a fake version if it
doesn't exists?

Thanks,
-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| HÃ¥rdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]