Ian Pilcher <ian.pilcher(a)home.com> writes:
I *believe* that <freetype/freetype.h> should always include the header that defines the macros. If not, it's going to be a nightmare checking for 2.0.1, 2.0.2, 2.0.3, etc. -- let alone every intermediate snapshot that a rawhide/cooker distribution might use.
It seems the rule is now to use ft2build.h instead of freetype.h. And this will certainly change in the next release again... so yes, it will be a nightmare if we actually try to use the silly macros. But if we simply bypass them and do autoconf checks like we do for every other package, I think it should work, and be harder to break (though I'm sure the freetype guys will manage to do it ;-) Basically do a AC_CHECK_HEADERS(freetype/freetype.h freetype/foo.h freetype/bar.h) and then #ifdef HAVE_FREETYPE_FREETYPE_H #include <freetype/freetype.h> #endif #ifdef HAVE_FREETYPE_FOO_H #include <freetype/foo.h> #endif etc. Then when they change all the header names again in the next release we can simply add the new names to the list. -- Alexandre Julliard julliard(a)winehq.com
Alexandre Julliard wrote:
It seems the rule is now to use ft2build.h instead of freetype.h. And this will certainly change in the next release again... so yes, it will be a nightmare if we actually try to use the silly macros. But if we simply bypass them and do autoconf checks like we do for every other package, I think it should work, and be harder to break (though I'm sure the freetype guys will manage to do it ;-)
Did you read somewhere that they're getting rid of freetype.h? I've looked at 2.0.1 and 2.0.2: * In 2.0.1, the header macros are defined in freetype/config/ftbuild.h, which is included in freetype/freetype.h. * In 2.0.2, the header macros are defined in ft2build.h, which is included in freetype/freetype.h. So as long as they keep freetype/freetype.h around, we can include that and get the macro definitions. We still have to test which macros are defined and only include the ones that exist, but it does save the work of adding extra autoconf checks. I sent a test patch to wine-devel earlier today which does this, and I'm waiting to hear how it works. I'd prefer to stick with this scheme *until* it breaks; anyone looked at 2.0.3? -- ======================================================================== Ian Pilcher ian.pilcher(a)home.com ========================================================================
participants (2)
-
Alexandre Julliard -
Ian Pilcher