FTGL.h not found

View: New views
19 Messages — Rating Filter:   Alert me  

FTGL.h not found

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

After applying the latest patches from the octave-graphics-mq archive,
I see this when configuring:

  configure: WARNING: FTGL library not found. Native renderer will not have on-screen text
  configure: WARNING:
  configure: WARNING: I didn't find the necessary libraries to compile native
  configure: WARNING: graphics. It isn't necessary to have native graphics
  configure: WARNING: but you will have to use gnuplot or you won't be able
  configure: WARNING: to use any of Octave's plotting commands
  configure: WARNING:
  configure:

  NOTE: libraries may be skipped if a library is not found OR
        if the library on your system is missing required features.

My system (Debian testing) has /usr/include/FTGL/ftgl.h, not FTGL.h.

jwe

Re: FTGL.h not found

by Shai Ayal-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jul 9, 2008 at 6:35 PM, John W. Eaton <jwe@...> wrote:

> After applying the latest patches from the octave-graphics-mq archive,
> I see this when configuring:
>
>  configure: WARNING: FTGL library not found. Native renderer will not have on-screen text
>  configure: WARNING:
>  configure: WARNING: I didn't find the necessary libraries to compile native
>  configure: WARNING: graphics. It isn't necessary to have native graphics
>  configure: WARNING: but you will have to use gnuplot or you won't be able
>  configure: WARNING: to use any of Octave's plotting commands
>  configure: WARNING:
>  configure:
>
>  NOTE: libraries may be skipped if a library is not found OR
>        if the library on your system is missing required features.
>
> My system (Debian testing) has /usr/include/FTGL/ftgl.h, not FTGL.h.

On fedora it's /usr/include/FTGL/FTGL.h. I guess we should check for
both and change the include ... (beyond my autconf powers, sorry)

Shai

Re: FTGL.h not found

by Thomas Weber-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Mittwoch, den 09.07.2008, 19:09 +0300 schrieb Shai Ayal:

> On Wed, Jul 9, 2008 at 6:35 PM, John W. Eaton <jwe@...> wrote:
> > After applying the latest patches from the octave-graphics-mq archive,
> > I see this when configuring:
> >
> >  configure: WARNING: FTGL library not found. Native renderer will not have on-screen text
> >  configure: WARNING:
> >  configure: WARNING: I didn't find the necessary libraries to compile native
> >  configure: WARNING: graphics. It isn't necessary to have native graphics
> >  configure: WARNING: but you will have to use gnuplot or you won't be able
> >  configure: WARNING: to use any of Octave's plotting commands
> >  configure: WARNING:
> >  configure:
> >
> >  NOTE: libraries may be skipped if a library is not found OR
> >        if the library on your system is missing required features.
> >
> > My system (Debian testing) has /usr/include/FTGL/ftgl.h, not FTGL.h.
>
> On fedora it's /usr/include/FTGL/FTGL.h. I guess we should check for
> both and change the include ... (beyond my autconf powers, sorry)

Which versions of ftgl do both of you have?

        Thomas


Re: FTGL.h not found

by Shai Ayal-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 10, 2008 at 10:28 AM, Thomas Weber
<thomas.weber.mail@...> wrote:

> Am Mittwoch, den 09.07.2008, 19:09 +0300 schrieb Shai Ayal:
>> On Wed, Jul 9, 2008 at 6:35 PM, John W. Eaton <jwe@...> wrote:
>> > After applying the latest patches from the octave-graphics-mq archive,
>> > I see this when configuring:
>> >
>> >  configure: WARNING: FTGL library not found. Native renderer will not have on-screen text
>> >  configure: WARNING:
>> >  configure: WARNING: I didn't find the necessary libraries to compile native
>> >  configure: WARNING: graphics. It isn't necessary to have native graphics
>> >  configure: WARNING: but you will have to use gnuplot or you won't be able
>> >  configure: WARNING: to use any of Octave's plotting commands
>> >  configure: WARNING:
>> >  configure:
>> >
>> >  NOTE: libraries may be skipped if a library is not found OR
>> >        if the library on your system is missing required features.
>> >
>> > My system (Debian testing) has /usr/include/FTGL/ftgl.h, not FTGL.h.
>>
>> On fedora it's /usr/include/FTGL/FTGL.h. I guess we should check for
>> both and change the include ... (beyond my autconf powers, sorry)
>
> Which versions of ftgl do both of you have?
>

I have fedora core 8 with the following packages:
ftgl-2.1.2-6.fc8
ftgl-devel-2.1.2-6.fc8

Re: FTGL.h not found

by Thomas Weber-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Donnerstag, den 10.07.2008, 10:35 +0300 schrieb Shai Ayal:

> On Thu, Jul 10, 2008 at 10:28 AM, Thomas Weber
> <thomas.weber.mail@...> wrote:
> > Am Mittwoch, den 09.07.2008, 19:09 +0300 schrieb Shai Ayal:
> >> On Wed, Jul 9, 2008 at 6:35 PM, John W. Eaton <jwe@...> wrote:
> >> > After applying the latest patches from the octave-graphics-mq archive,
> >> > I see this when configuring:
> >> >
> >> >  configure: WARNING: FTGL library not found. Native renderer will not have on-screen text
> >> >  configure: WARNING:
> >> >  configure: WARNING: I didn't find the necessary libraries to compile native
> >> >  configure: WARNING: graphics. It isn't necessary to have native graphics
> >> >  configure: WARNING: but you will have to use gnuplot or you won't be able
> >> >  configure: WARNING: to use any of Octave's plotting commands
> >> >  configure: WARNING:
> >> >  configure:
> >> >
> >> >  NOTE: libraries may be skipped if a library is not found OR
> >> >        if the library on your system is missing required features.
> >> >
> >> > My system (Debian testing) has /usr/include/FTGL/ftgl.h, not FTGL.h.
> >>
> >> On fedora it's /usr/include/FTGL/FTGL.h. I guess we should check for
> >> both and change the include ... (beyond my autconf powers, sorry)
> >
> > Which versions of ftgl do both of you have?
> >
>
> I have fedora core 8 with the following packages:
> ftgl-2.1.2-6.fc8
> ftgl-devel-2.1.2-6.fc8

Okay, I just checked the ftgl tarballs on sourceforge. The 2.1.2 release
has FTGL.h, the 2.1.3 release has ftgl.h.

Looking over the NEWS file, I think we should enforce the usage of 2.1.3
(2.1.2 is from 2004):

========================================================================
----------------------------------------------------------------------
--- 2008-06-12  Release 2.1.3~rc5                                  ---
----------------------------------------------------------------------

    * Stable API. Public headers are now frozen.
    * Fixed several memory corruption and crash bugs - Sam Hocevar
    * Fixed several memory leaks - Sam Hocevar
    * Kerning and glyph performance enhancements - Sean Morrison
    * The library now also exports a pure C interface - Éric Beets
    * Inset/outset contour support for fonts - Éric Beets
    * Fix the FTLayout rendering - Éric Beets
    * Added new FTLayout and FTSimpleLayout support for layout
      managers - Sam Hocevar
    * Fixed the paths in the XCode project - Henry Maddocks
    * Changed the behaviour of some objects so that if there is an
      error their state isn't changed - Henry Maddocks
    * New, fast FTBufferFont texture fonts - Sam Hocevar
    * UTF-8 support - Daniel Remenak
========================================================================

Especially the "crash bugs" and "memory leaks".

I know this will cause some grief, no need to tell me that.

        Thomas



Re: FTGL.h not found

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10-Jul-2008, Thomas Weber wrote:

| Am Donnerstag, den 10.07.2008, 10:35 +0300 schrieb Shai Ayal:
| > On Thu, Jul 10, 2008 at 10:28 AM, Thomas Weber
| > <thomas.weber.mail@...> wrote:
| > > Am Mittwoch, den 09.07.2008, 19:09 +0300 schrieb Shai Ayal:
| > >> On Wed, Jul 9, 2008 at 6:35 PM, John W. Eaton <jwe@...> wrote:
| > >> > After applying the latest patches from the octave-graphics-mq archive,
| > >> > I see this when configuring:
| > >> >
| > >> >  configure: WARNING: FTGL library not found. Native renderer will not have on-screen text
| > >> >  configure: WARNING:
| > >> >  configure: WARNING: I didn't find the necessary libraries to compile native
| > >> >  configure: WARNING: graphics. It isn't necessary to have native graphics
| > >> >  configure: WARNING: but you will have to use gnuplot or you won't be able
| > >> >  configure: WARNING: to use any of Octave's plotting commands
| > >> >  configure: WARNING:
| > >> >  configure:
| > >> >
| > >> >  NOTE: libraries may be skipped if a library is not found OR
| > >> >        if the library on your system is missing required features.
| > >> >
| > >> > My system (Debian testing) has /usr/include/FTGL/ftgl.h, not FTGL.h.
| > >>
| > >> On fedora it's /usr/include/FTGL/FTGL.h. I guess we should check for
| > >> both and change the include ... (beyond my autconf powers, sorry)
| > >
| > > Which versions of ftgl do both of you have?
| > >
| >
| > I have fedora core 8 with the following packages:
| > ftgl-2.1.2-6.fc8
| > ftgl-devel-2.1.2-6.fc8
|
| Okay, I just checked the ftgl tarballs on sourceforge. The 2.1.2 release
| has FTGL.h, the 2.1.3 release has ftgl.h.
|
| Looking over the NEWS file, I think we should enforce the usage of 2.1.3
| (2.1.2 is from 2004):

OK.  I have the following packages installed:

segfault:847> dpkg -l '*ftgl*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  ftgl-dev       2.1.3~rc5-2    transitional dummy package
ii  libftgl-dev    2.1.3~rc5-2    development files for libftgl
ii  libftgl2       2.1.3~rc5-2    library to render text in OpenGL using FreeT

So do we agree that the configure script and sources should be changed
to look for and use ftgl.h?

jwe

Re: FTGL.h not found

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10-Jul-2008, John W. Eaton wrote:

| So do we agree that the configure script and sources should be changed
| to look for and use ftgl.h?

After taking a closer look, I don't see any FTGL headers included
anywhere in the Octave sources, and the configure test actually
includes FTGLTextureFont.h, so it seems we should check for that
instead.  I made that change, but then the check still failed, so I
finally looked in the config.log file and found that FTGLTextureFont.h
is deprecated, so ftgl.h should be used instead.  OK, changing the
test to use that, I now see:

  configure:11194: checking FTGL/ftgl.h usability
  configure:11211: g++ -c -ggdb3   conftest.cpp >&5
  In file included from /usr/include/FTGL/ftgl.h:32,
                   from conftest.cpp:76:
  /usr/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
  In file included from conftest.cpp:76:
  /usr/include/FTGL/ftgl.h:33:10: error: #include expects "FILENAME" or <FILENAME>
  /usr/include/FTGL/ftgl.h:34:10: error: #include expects "FILENAME" or <FILENAME>
  /usr/include/FTGL/ftgl.h:35:10: error: #include expects "FILENAME" or <FILENAME>
  In file included from /usr/include/FTGL/ftgl.h:110,
                   from conftest.cpp:76:
  /usr/include/FTGL/FTPoint.h:75: error: expected ',' or '...' before '&' token
  /usr/include/FTGL/FTPoint.h: In constructor 'FTPoint::FTPoint(int)':
  /usr/include/FTGL/FTPoint.h:77: error: 'ft_vector' was not declared in this scope
  ...

in config.log.

This happens because on my system, /usr/include/FTGL/ftgl.h has the
lines

  /* We need the Freetype headers */
  #include <ft2build.h>
  #include FT_FREETYPE_H
  #include FT_GLYPH_H
  #include FT_OUTLINE_H

and, other than comments and a multiple-inclusion guard,
/usr/include/ft2build.h is just the line

    /* `<prefix>/include/freetype2' must be in your current inclusion path */
  #include <freetype/config/ftheader.h>

but the -I flags don't include the freetype2 directory.  So it looks
like we need to check for the location of the freetype2 directory and
add that to the include flags.  What is the best way to do that?  Will
someone please fix this and submit a changeset?

Thanks,

jwe


Re: FTGL.h not found

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John W. Eaton schrieb:

> On 10-Jul-2008, John W. Eaton wrote:
>
> | So do we agree that the configure script and sources should be changed
> | to look for and use ftgl.h?
>
> After taking a closer look, I don't see any FTGL headers included
> anywhere in the Octave sources, and the configure test actually
> includes FTGLTextureFont.h, so it seems we should check for that
> instead.  I made that change, but then the check still failed, so I
> finally looked in the config.log file and found that FTGLTextureFont.h
> is deprecated, so ftgl.h should be used instead.
The current test for ftgl fails on my system (MacOSX, gcc-4.0.1) because '#fi'
isn't understood by my preprocessor:



Further, the headers FTGL/ftgl.h and ftgl.h are checked sequentially and I see a
dominant result when checking for ftgl.h even when FTGL/ftgl.h should be used:

   checking for FreeType -- version >= 9.0.3... yes
   checking FTGL/ftgl.h usability... yes
   checking FTGL/ftgl.h presence... yes
   checking for FTGL/ftgl.h... yes
   checking for FTGLTextureFont in -lftgl... yes
   checking ftgl.h usability... no
   checking ftgl.h presence... no
   checking for ftgl.h... no

results in

   configure: WARNING: FTGL library not found. Native renderer will not have
on-screen text

and

   fltk backend libs:

I removed the ftgl.h entry and then the test succeeded and FTGL/ftgl.h is used
correctly:

   fltk backend libs: -lfltk_gl -framework AGL -framework OpenGL -lfltk
-framework Carbon -framework ApplicationServices

I have created a normal patch because my changes are not a solution for this
(that's why I don't send a changeset) ...

Regards,

   Thomas

diff -r e56bb65186f6 configure.in
--- a/configure.in Wed Jun 25 22:11:07 2008 +0200
+++ b/configure.in Thu Jul 10 22:18:25 2008 +0200
@@ -654,7 +654,7 @@ if test "x$OPENGL_LIBS" != "x"; then
     [warn_graphics="FreeType library not found. Native renderer will not have on-screen text"])
   if test "x$warn_graphics" = "x" ; then
     AC_LANG_PUSH(C++)
-      AC_CHECK_HEADERS([FTGL/ftgl.h ftgl.h], [
+      AC_CHECK_HEADERS([FTGL/ftgl.h], [
  AC_MSG_CHECKING([for FTGLTextureFont in -lftgl])
         save_LIBS="$LIBS"
  save_CXXFLAGS="$CXXFLAGS"
@@ -665,7 +665,7 @@ if test "x$OPENGL_LIBS" != "x"; then
 #include <FTGL/ftgl.h>
 #elif HAVE_FTGL_H
 #include <ftgl.h>
-#fi], [
+#endif], [
 FTGLTextureFont font("");], [
           OPENGL_LIBS="$OPENGL_LIBS $FT2_LIBS -lftgl"
   LIBS="$save_LIBS"

Re: FTGL.h not found

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10-Jul-2008, Thomas Treichl wrote:

| John W. Eaton schrieb:
| > On 10-Jul-2008, John W. Eaton wrote:
| >
| > | So do we agree that the configure script and sources should be changed
| > | to look for and use ftgl.h?
| >
| > After taking a closer look, I don't see any FTGL headers included
| > anywhere in the Octave sources, and the configure test actually
| > includes FTGLTextureFont.h, so it seems we should check for that
| > instead.  I made that change, but then the check still failed, so I
| > finally looked in the config.log file and found that FTGLTextureFont.h
| > is deprecated, so ftgl.h should be used instead.
|
| The current test for ftgl fails on my system (MacOSX, gcc-4.0.1) because '#fi'
| isn't understood by my preprocessor:

Doh.  Yeah, that was just a brain glitch.  I fixed it.

|    configure: WARNING: FTGL library not found. Native renderer will not have
| on-screen text
|
| and
|
|    fltk backend libs:
|
| I removed the ftgl.h entry and then the test succeeded and FTGL/ftgl.h is used
| correctly:
|
|    fltk backend libs: -lfltk_gl -framework AGL -framework OpenGL -lfltk
| -framework Carbon -framework ApplicationServices
|
| I have created a normal patch because my changes are not a solution for this
| (that's why I don't send a changeset) ...

I think we need to check for ftgl.h, at least if FTGL/ftgl.h is not
found since I don't see any reason to assume that ftgl.h will always
be installed in a directory called FTGL on all systems.  Looking at
the other checks for header files, I assumed that listing both in the
AC_CHECK_HEADERS macro would be OK, and I don't understand why it is
failing for you.

jwe

Re: FTGL.h not found

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John W. Eaton schrieb:

> |    configure: WARNING: FTGL library not found. Native renderer will not have
> | on-screen text
> |
> | and
> |
> |    fltk backend libs:
> |
> | I removed the ftgl.h entry and then the test succeeded and FTGL/ftgl.h is used
> | correctly:
> |
> |    fltk backend libs: -lfltk_gl -framework AGL -framework OpenGL -lfltk
> | -framework Carbon -framework ApplicationServices
> |
> | I have created a normal patch because my changes are not a solution for this
> | (that's why I don't send a changeset) ...
>
> I think we need to check for ftgl.h, at least if FTGL/ftgl.h is not
> found since I don't see any reason to assume that ftgl.h will always
> be installed in a directory called FTGL on all systems.  Looking at
> the other checks for header files, I assumed that listing both in the
> AC_CHECK_HEADERS macro would be OK, and I don't understand why it is
> failing for you.
I do now. This one was really tricky ;) The check for FTGL/ftgl.h is good, the
test for ftgl.h fails. With this fail the variable warn_graphics ist set to the
string

   warn_graphics="FTGL library not found. Native renderer will not have
on-screen text"

The variable warn_graphics is used later for the test of fltk - all fltk tests
are good but warn_graphics is still set. Finally we get to the line 730 in
configure.in

   if test "x$warn_graphics" = "x" ; then
     ->good
   else
     ->bad

and I get into ->bad because the check for ftgl.h failed (long before).

My solution resp. my suggestion would be to initialize warn_graphics once again
for the test of fltk. A changeset for this is attached.

Regards,

   Thomas

# HG changeset patch
# User Thomas Treichl <Thomas.Treichl@...>
# Date 1215808210 -7200
# Node ID ad2b6aa8040b0a473897f28259e34b1d18caf197
# Parent  55f6ad8e81d325673ca9e55d47c193dfc54689aa
Update

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@ 2008-07-10  John W. Eaton  <jwe@...
+2008-07-11  Thomas Treichl  <Thomas.Treichl@...>
+
+ * configure.in: Fixed test for FLTK if ftgl.h is not found
+
 2008-07-10  John W. Eaton  <jwe@...>
 
  * octMakefile.in (DIRS_TO_MAKE): Delete $(localfcnfilepath) and

Re: FTGL.h not found

by Thomas Treichl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thomas Treichl schrieb:

> John W. Eaton schrieb:
>> |    configure: WARNING: FTGL library not found. Native renderer will
>> not have | on-screen text
>> | | and
>> | |    fltk backend libs:
>> | | I removed the ftgl.h entry and then the test succeeded and
>> FTGL/ftgl.h is used | correctly:
>> | |    fltk backend libs: -lfltk_gl -framework AGL -framework OpenGL
>> -lfltk | -framework Carbon -framework ApplicationServices
>> | | I have created a normal patch because my changes are not a
>> solution for this | (that's why I don't send a changeset) ...
>>
>> I think we need to check for ftgl.h, at least if FTGL/ftgl.h is not
>> found since I don't see any reason to assume that ftgl.h will always
>> be installed in a directory called FTGL on all systems.  Looking at
>> the other checks for header files, I assumed that listing both in the
>> AC_CHECK_HEADERS macro would be OK, and I don't understand why it is
>> failing for you.
>
> I do now. This one was really tricky ;) The check for FTGL/ftgl.h is
> good, the test for ftgl.h fails. With this fail the variable
> warn_graphics ist set to the string
>
>   warn_graphics="FTGL library not found. Native renderer will not have
> on-screen text"
>
> The variable warn_graphics is used later for the test of fltk - all fltk
> tests are good but warn_graphics is still set. Finally we get to the
> line 730 in configure.in
>
>   if test "x$warn_graphics" = "x" ; then
>     ->good
>   else
>     ->bad
>
> and I get into ->bad because the check for ftgl.h failed (long before).
>
> My solution resp. my suggestion would be to initialize warn_graphics
> once again for the test of fltk. A changeset for this is attached.
>
> Regards,
>
>   Thomas

Ooops, just a portion of it in the changeset?! Here is the second, sorry.


# HG changeset patch
# User Thomas Treichl <Thomas.Treichl@...>
# Date 1215808058 -7200
# Node ID 55f6ad8e81d325673ca9e55d47c193dfc54689aa
# Parent  fcc70f30fe31cd4bc694ce773df17bb69131f8c1
Fixed test for FLTK if ftgl.h is not found

diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -714,6 +714,7 @@ if test "$FLTK_CONFIG" = "no" ; then
 if test "$FLTK_CONFIG" = "no" ; then
   warn_graphics="fltk library (www.fltk.org) not found.  Native graphics will be disabled."
 else
+  warn_graphics="" # may be set to a string if ftgl.h is not found
   FLTK_CFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --cflags`"
   FLTK_LDFLAGS="`$FLTK_CONFIG $fltkconf_args --use-gl --ldflags`"
   

Re: FTGL.h not found

by David Bateman-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As far as I can see every RPM based distribution has FTGL 2.1.2 and not
2.1.3 and so the change to check for the header ftgl.h and not FTGL.h
means that no RPM based distribution can now use the FTLK backend.

D.


John W. Eaton wrote:

> On 10-Jul-2008, John W. Eaton wrote:
>
> | So do we agree that the configure script and sources should be changed
> | to look for and use ftgl.h?
>
> After taking a closer look, I don't see any FTGL headers included
> anywhere in the Octave sources, and the configure test actually
> includes FTGLTextureFont.h, so it seems we should check for that
> instead.  I made that change, but then the check still failed, so I
> finally looked in the config.log file and found that FTGLTextureFont.h
> is deprecated, so ftgl.h should be used instead.  OK, changing the
> test to use that, I now see:
>
>   configure:11194: checking FTGL/ftgl.h usability
>   configure:11211: g++ -c -ggdb3   conftest.cpp >&5
>   In file included from /usr/include/FTGL/ftgl.h:32,
>   from conftest.cpp:76:
>   /usr/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
>   In file included from conftest.cpp:76:
>   /usr/include/FTGL/ftgl.h:33:10: error: #include expects "FILENAME" or <FILENAME>
>   /usr/include/FTGL/ftgl.h:34:10: error: #include expects "FILENAME" or <FILENAME>
>   /usr/include/FTGL/ftgl.h:35:10: error: #include expects "FILENAME" or <FILENAME>
>   In file included from /usr/include/FTGL/ftgl.h:110,
>   from conftest.cpp:76:
>   /usr/include/FTGL/FTPoint.h:75: error: expected ',' or '...' before '&' token
>   /usr/include/FTGL/FTPoint.h: In constructor 'FTPoint::FTPoint(int)':
>   /usr/include/FTGL/FTPoint.h:77: error: 'ft_vector' was not declared in this scope
>   ...
>
> in config.log.
>
> This happens because on my system, /usr/include/FTGL/ftgl.h has the
> lines
>
>   /* We need the Freetype headers */
>   #include <ft2build.h>
>   #include FT_FREETYPE_H
>   #include FT_GLYPH_H
>   #include FT_OUTLINE_H
>
> and, other than comments and a multiple-inclusion guard,
> /usr/include/ft2build.h is just the line
>
>     /* `<prefix>/include/freetype2' must be in your current inclusion path */
>   #include <freetype/config/ftheader.h>
>
> but the -I flags don't include the freetype2 directory.  So it looks
> like we need to check for the location of the freetype2 directory and
> add that to the include flags.  What is the best way to do that?  Will
> someone please fix this and submit a changeset?
>
> Thanks,
>
> jwe
>
>
>  


Re: FTGL.h not found

by David Bateman-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David Bateman wrote:
> As far as I can see every RPM based distribution has FTGL 2.1.2 and not
> 2.1.3 and so the change to check for the header ftgl.h and not FTGL.h
> means that no RPM based distribution can now use the FTLK backend.
>

Looking at

http://sourceforge.net/project/showfiles.php?group_id=202130

You'll see that FTGL 2.1.3 is at RC5 and is not considered stable, which
explains why there are no RPM versions of this code. It appears debian
jumped the gun by upgrading to this version.

D.

Re: FTGL.h not found

by Jaroslav Hajek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

is it possible to simply support both 2.1.2 and 2.1.3? Or are they too
incompatible?

On Thu, Jul 17, 2008 at 1:43 PM, David Bateman <adb014@...> wrote:

> David Bateman wrote:
>> As far as I can see every RPM based distribution has FTGL 2.1.2 and not
>> 2.1.3 and so the change to check for the header ftgl.h and not FTGL.h
>> means that no RPM based distribution can now use the FTLK backend.
>>
>
> Looking at
>
> http://sourceforge.net/project/showfiles.php?group_id=202130
>
> You'll see that FTGL 2.1.3 is at RC5 and is not considered stable, which
> explains why there are no RPM versions of this code. It appears debian
> jumped the gun by upgrading to this version.
>
> D.
>



--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

Re: FTGL.h not found

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 17-Jul-2008, Jaroslav Hajek wrote:

| is it possible to simply support both 2.1.2 and 2.1.3? Or are they too
| incompatible?

I don't think there is any code in Octave that specifically depends on
the newer version.  It's just a matter of making the configure check
do the right thing.  What's the best way to write the check so it
distinguishes between FTGL.h and ftgl.h?  I think by default, autoconf
would generate HAVE_FTGL_H for both.

jwe

Re: FTGL.h not found

by Jaroslav Hajek-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jul 18, 2008 at 6:53 PM, John W. Eaton <jwe@...> wrote:

> On 17-Jul-2008, Jaroslav Hajek wrote:
>
> | is it possible to simply support both 2.1.2 and 2.1.3? Or are they too
> | incompatible?
>
> I don't think there is any code in Octave that specifically depends on
> the newer version.  It's just a matter of making the configure check
> do the right thing.  What's the best way to write the check so it
> distinguishes between FTGL.h and ftgl.h?  I think by default, autoconf
> would generate HAVE_FTGL_H for both.
>
I see no smarter solution than to introduce a new variable. Attached
is a patch. Since there are now 4 cases, I guess we should also wrap
all the #ifdefs in oct-ftgl.h. I'm just not sure whether it should go
in liboctave/ or src/.

cheers

> jwe
>

--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

[FTGL.diff]

# HG changeset patch
# User Jaroslav Hajek <highegg@...>
# Date 1216416810 -7200
# Node ID 044e25678cc16b478538fc156acf155e51db1197
# Parent  c2449e91f50a49ffa8bd65012445125f41f0df59
make configure compatible with FTGL ver <= 2.1.2

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-18  Jaroslav Hajek <highegg@...>
+
+ * configure.in: Extend FTGL test to test for both ftgl.h and FTGL.h.
+ Use HAVE_FTGL_UPPERCASE to indicate the latter (version <= 2.1.2).
+
 2008-07-18  John W. Eaton  <jwe@...>
 
  * configure.in: Fix FTGL test to handle either FTGL/ftgl.h or ftgl.h.
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -664,9 +664,13 @@
     [warn_freetype="FreeType library not found. Native renderer will not have on-screen text"])
   if test -z "$warn_freetype"; then
     AC_LANG_PUSH(C++)
-      AC_CHECK_HEADERS([FTGL/ftgl.h ftgl.h])
-      if test "$ac_cv_header_FTGL_ftgl_h" = yes \
-        || test "$ac_cv_header_ftgl_h" = yes; then
+      has_ftgl_h=yes
+      AC_CHECK_HEADERS([FTGL/ftgl.h ftgl.h], break, [
+ AC_CHECK_HEADERS([FTGL/FTGL.h FTGL.h], [
+          AC_DEFINE(HAVE_FTGL_UPPERCASE,1,[Define to 1 if you have FTGL.h or FTGL/FTGL.h])
+  break
+  ], has_ftgl_h=no)])
+      if test "$has_ftgl_h" = yes; then
  AC_MSG_CHECKING([for FTGLTextureFont in -lftgl])
         save_LIBS="$LIBS"
  save_CXXFLAGS="$CXXFLAGS"
@@ -674,9 +678,17 @@
  CXXFLAGS="$CXXFLAGS $FT2_CFLAGS"
         AC_TRY_LINK([
 #ifdef HAVE_FTGL_FTGL_H
+#ifdef HAVE_FTGL_UPPERCASE
+#include <FTGL/FTGL.h>
+#else
 #include <FTGL/ftgl.h>
+#endif
 #elif HAVE_FTGL_H
+#ifdef HAVE_FTGL_UPPERCASE
+#include <FTGL.h>
+#else
 #include <ftgl.h>
+#endif
 #endif], [
 FTGLTextureFont font("");], [
           OPENGL_LIBS="$OPENGL_LIBS $FT2_LIBS -lftgl"


Re: FTGL.h not found

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 18-Jul-2008, Jaroslav Hajek wrote:

| On Fri, Jul 18, 2008 at 6:53 PM, John W. Eaton <jwe@...> wrote:
| > On 17-Jul-2008, Jaroslav Hajek wrote:
| >
| > | is it possible to simply support both 2.1.2 and 2.1.3? Or are they too
| > | incompatible?
| >
| > I don't think there is any code in Octave that specifically depends on
| > the newer version.  It's just a matter of making the configure check
| > do the right thing.  What's the best way to write the check so it
| > distinguishes between FTGL.h and ftgl.h?  I think by default, autoconf
| > would generate HAVE_FTGL_H for both.
| >
|
| I see no smarter solution than to introduce a new variable. Attached
| is a patch.

I applied this patch.

| Since there are now 4 cases, I guess we should also wrap
| all the #ifdefs in oct-ftgl.h. I'm just not sure whether it should go
| in liboctave/ or src/.

The funny thing is that the ftgl.h file is not actually included
directly in any Octave source files.  But we need to know about the
header file to write the test becuase it is in C++, so we have to get
the declaration right to find out whether the library exists with the
required functionality.  But looking at this, I don't see how it is
supposed to work to enable text.  Shai or Michael, can you explain?
How can simply linking with a library enable a feature?  Are we
missing some code to use the ftgl library and enable text?

Thanks,

jwe