This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
Re: XFree 4.2.1 + fontconfig-2
- From: Alexander Gottwald <Alexander dot Gottwald at informatik dot tu-chemnitz dot de>
- To: cygwin-xfree at cygwin dot com
- Date: Fri, 27 Sep 2002 19:40:44 +0200 (MEST)
- Subject: Re: XFree 4.2.1 + fontconfig-2
- Reply-to: cygwin-xfree at cygwin dot com
Alexander Gottwald wrote:
> #if Concat(SharedLib,libname)
> #define LibraryTargetName(libname) Concat3(lib,libname,.dll.a)
> #else
> #define LibraryTargetName(libname) Concat3(lib,libname,l.a)
> #endif
>
> But I don't know if this is either valid for imake or if it will
> break anything. And when you do a shared and a static version, the
> static version will most likely be name libName.dll.a too.
I just checked and the above violates the cpp syntax. You can not have a
macro with a conditional which depends on a parameter.
|#define MACRO(x)
|#if x
|#define RESULT YES
|#else
|#define RESULT NO
|#endif
does not work. The preprocessor can not decide which one will be used later.
Those preprocessor macros are not functions.
What does this mean for us? Imagine you have libX11 as shared library and
eg. libXt as static library (current configuration).
a dependency like this
| program: LibraryTargetName(X11) LibraryTargetName(Xt)
which we want to resolve to
| program: libX11.dll.a libXt.a
is not possible. We'd have to build something like this
| #if SharedLibraryX11
| #define X11lib SharedLibraryTargetName(X11)
| #else
| #define X11lib LibraryTargetName(X11)
| #endif
| ...
| program: $(X11lib) $(Xtlib)
and this must be done for all the code.
My conclusion: We should stay with libName.a even for import libraries.
Changing it and don't being able to build a simple macro which wraps it
properly will sooner ar later cause compile problems.
comments?
bye
ago
--
Alexander.Gottwald@informatik.tu-chemnitz.de
http://www.gotti.org ICQ: 126018723