Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2000 19:21:23 +0200
From:      Norbert Irmer <norbert.irmer@heim9.tu-clausthal.de>
To:        freebsd-ports@FreeBSD.ORG
Cc:        nectar@FreeBSD.ORG
Subject:   Re: Problems building ports/x11-toolkits/wxGTK
Message-ID:  <39539C93.1B9E604A@heim9.tu-clausthal.de>
References:  <39536EFF.215A7623@heim9.tu-clausthal.de> <20000623094031.G76049@bone.nectar.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Jacques A . Vidrine" wrote:
> 
> [Please send followups to -ports, where this belongs.]
> 

Hi,

I thought that the question if there shall exist a link

 /usr/include/X11 -> /usr/X11R6/include/X11

or not, is also of interest to ~current.

I remember that the X11 comittee recommended such a link
to make development easier (and more portable). 

But on the other hand a $(X11BASE) variable doesn't make
much sense with such a hard-coded link, so I agree with you.


> 
> However, I guess there is a bug in the configure script.  At that point
> configure has already found the X11 include files, but then it doesn't
> use them (see around line 1445 of `configure.in' for all of the
> directories searched for X11 header files).  I'll fix when I get the
> chance.
> 

In the configure script the autoconf macro AC_CHECK_HEADERS is used:

if test "$wxUSE_GUI" = "yes"; then
    if test "$wxUSE_UNIX" = "yes"; then
        dnl defines HAVE_X11_XKBLIB_H
        AC_CHECK_HEADERS(X11/XKBlib.h)
    fi
fi

and autoconf only searches in the standard include paths and
the ones given by CCFLAGS, so this isn't a bug in the configure
script.

The variable SEARCH_INCLUDE is used by the wx developers for
their own macro WX_PATH_FIND_INCLUDES, and is not (and should not,
because this is a system dependent thing) be used for that.

So I think both autoconf and configure.in behave correctly,
and that CCFLAGS="-I/usr/X11R6/include" _must_ be set from
within the ports file, if you don't have the X11 recommended link.


> Hmm, wxGTK doesn't use this information anyway (no reference to
> HAVE_X11_XKBLIB_H in the sources).
> 

It is used in "src/gtk/utilsgtk.cpp":

  #ifdef HAVE_X11_XKBLIB_H
  bool wxSetDetectableAutoRepeat( bool flag )
  {
    Bool result;
    XkbSetDetectableAutoRepeat( GDK_DISPLAY(), flag, &result );
    return result;       /* TRUE if keyboard hardware supports this mode */
  }
  #else
  bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
  {
    return FALSE;
  }
  #endif

I am using this function to determine how long a key is hold down.
It makes it possible to determine if a keypress event is triggered
by the software keyboard auto-repeat, or not.


> > The opengl header file <GL/gl.h> is also not found, and
> > the link test with "libGL" or "libMesaGL" fails too.
> 
> It fails for the same reasons as the test for <X11/XKBlib.h>.

Yes, this time it is because of the autoconf AC_CHECK_LIB() macro,
which only searches in the standard library paths and the ones
set with LDFLAGS,

  if test "$wxUSE_OPENGL" = "yes"; then
    AC_CHECK_HEADER(GL/gl.h, [
    AC_DEFINE(wxUSE_OPENGL)
    AC_DEFINE(wxUSE_GLCANVAS)
    AC_CHECK_LIB(GL, glFlush, [
      OPENGL_LINK="-lGL -lGLU"
      ],[
        AC_CHECK_LIB(MesaGL, glFlush, [
        OPENGL_LINK="-lMesaGL -lMesaGLU"
      ],)
     ],)
    ],wxUSE_OPENGL=0)
  fi

> 
> > CONFIGURE_ARGS= "--with-opengl=yes"
> 
> One would have to include dependencies for Mesa as well, which
> is why I'll wrap such with a WANT_OPENGL knob.
> 

A commented line within the Makefile would be sufficient for my part, like:

  # uncomment this if you want OpenGL support:
  # CONFIGURE_ARGS= "--with-opengl=yes"

Regards,
Norbert


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39539C93.1B9E604A>