G'day again,

Revision 738 for CD fixed an include directive ("<ft2build.h>").
However, after upgrading my Subversion repository to this revision
on my Gentoo Linux system, quite a number of instances of a new
diagnostic message appeared:

        #include expects "FILENAME" or <FILENAME>

After some surfing the 'web, I found that "pkg-config" was intended
to help provide system-specific information, without client
packages needing to guess or to use version-specific information.
In addition to the "#includes" within the code, the Freetype2 docs
state that you also need to add the freetype2 directory to the
standard include paths via a compiler directive.

Attached is a patch that uses "pkg-config freetype2 --cflags-only-I"
to edit the compiler invocation flags, both for normal compilation,
and when dependencies are calculated, e.g.

        DEPINCS += $(shell pkg-config freetype2 --cflags-only-I)

I don't know about the portability of pkg-config across a wider set
of OSes and hardware; therefore, it may be best to treat this patch
as a demonstration that the diagnostic is eliminated under Linux,
and hopefully someone can help with either or both of:

    a) A more appropriate place within cd/tecmake.mak to add the
       pkg-config ouput; and
    b) If pkg-config is not available (and not installable?) on some
       OS/hardware combination, then work out what's needed.

The patch to cd's tecmake.mak is attached.

cheers,

s-b.
Index: tecmake.mak
===================================================================
--- tecmake.mak	(revision 738)
+++ tecmake.mak	(working copy)
@@ -615,6 +615,7 @@
 
 ifneq ($(findstring CentOS, $(TEC_UNAME)), )
   UNIX_LINUX = Yes
+  STDFLAGS += $(shell pkg-config freetype2 --cflags-only-I)
   ifdef BUILD_64
     ifeq ($(TEC_SYSARCH), ia64)
       STDFLAGS += -fPIC
@@ -1409,6 +1410,7 @@
 
 DEPINCS ?= $(INCLUDES) $(EXTRAINCS)
 DEPINCS := $(addprefix -I, $(DEPINCS))
+DEPINCS += $(shell pkg-config freetype2 --cflags-only-I)
 
 INCLUDES := $(addprefix -I, $(INCLUDES))
 STDINCS := $(addprefix -I, $(STDINCS))
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to