|
From: Alan W. I. <ir...@be...> - 2002-11-24 01:44:21
|
I have been trying some various options to get freetype configured for the
AT branch today, and I believe I have come up with a reasonable solution
that builds on what we currently do for MAIN HEAD.
Instead of using the INCS or LIBS symbols (which tends to put in lots of
stuff that is not needed for a particular compile or link step) my approach
is to generate specific symbols for each library. In the freetype case
these symbols are FREETYPEINCCMD and FREETYPELIBCMD.
Currently I include sysloc.in (a version of cf/sysloc.in that has been
copied to the top-level directory and edited to remove all the OS-specific
stuff) into configure.in. sysloc.in optionally defines the symbols
FREETYPEINCDIR, FREETYPELIBDIR, and FREETYPELIBSTR
in the usual way (which I believe is a big advantage since it allows our
users maximum flexibility in specifying their own locations for libfreetype
[or any other library we are using]).
I use these symbols to generate FREETYPEINCCMD and FREETYPELIBCMD with the
following configure.in fragment:
if test "$with_freetype" = yes; then
if test "$FREETYPEINCDIR" != default; then
FREETYPEINCCMD="-I"$FREETYPEINCDIR
AC_SUBST(FREETYPEINCCMD)
fi
if test "$FREETYPELIBDIR" = default; then
FREETYPELIBCMD=$FREETYPELIBSTR
else
FREETYPELIBCMD="-L "$FREETYPELIBDIR" "$FREETYPELIBSTR
fi
AC_SUBST(FREETYPELIBCMD)
fi
(or I could add this fragment to sysloc.in....I don't care.) I then use
@FREETYPEINCCMD@ and @FREETYPEINCCMD@ in the src/Makefile.am where they
affect how plfreetype.c is built and libplplot(d) is linked. I have just
tested the AT changes which implement this scheme, and configuration with
and without freetype seems to be working properly. I have also just
committed the changes to the AT branch so you can try this scheme for
yourself.
Here is your chance to comment on this design before I go ahead and
duplicate it for every other library that we need. Note there will be a
fair number of LIBRARYINCCMD and LIBRARYLIBCMD symbols defined, but they
will only be used in a very limited manner. For example, I intend to use
GDINCCMD and GDLIBCMD only to compile gd.c and link the associated dynamic
driver.
Alan
email: ir...@be...
phone: 250-727-2902 FAX: 250-721-7715
snail-mail:
Dr. Alan W. Irwin
Department of Physics and Astronomy,
University of Victoria, P.O. Box 3055,
Victoria, British Columbia, Canada, V8W 3P6
__________________________
Linux-powered astrophysics
__________________________
|