[crossfire] GTK client build configuration stuff

Kurt Fitzner kurt.fitzner at gmail.com
Wed Apr 3 19:57:57 CDT 2013


Hi all,

First of all a better re-introduction.  For those that don't remember, I
joined the project long ago to work on the gtk client in Windows.  I got
it working, sort of, with OpenGL on Windows and then joined the navy and
got busy.  I've subsequently become re-interested, and still having SVN
access through SourceForge, I intend to work on getting the gtk client
working better in Windows.

I've been looking at the client's configure.ac and
gtk-v2/src/Makefile.am in trunk and there are a couple changes there
that are breaking MinGW's builds.  The problems are A) X11_LIBS are
being set even if no X is detected and B) OpenGL support is only enabled
if X is present.  On Linux these assumptions work, but not in Windows. 

I don't think killing the requirement for X to be present before OpenGL
is detected will break anything in Linux.  If a person is trying to
build/run the client without X, then there are bigger problems with that
scenario than whether or not OpenGL is detected.

I've attached a patch I intend to commit unless it breaks things in Linux.

Thanks.

       Kurt.

-------------- next part --------------
Index: configure.ac
===================================================================
--- configure.ac	(revision 18654)
+++ configure.ac	(working copy)
@@ -54,7 +54,7 @@
 dnl Use the autoconf macro if no pkg-config files
 if test "$x11_pkgconfig" = yes; then
     PKG_CHECK_MODULES([X11], [x11])
-else
+elif test "$have_x" = yes; then
     AC_PATH_XTRA
     test -z "$X11_CFLAGS" && X11_CFLAGS="$X_CFLAGS"
     test -z "$X11_LIBS" && X11_LIBS="$X_LIBS -lX11"
@@ -264,7 +264,7 @@
 AC_SUBST(X11_CFLAGS)
 AC_SUBST(X11_LIBS)
 
-# Check for OpenGL - Important, OpenGL needs X.
+# Check for OpenGL
 AX_CHECK_GL
    if test "$no_gl" != "yes"; then
       OPENGL_LIBS="$GL_LIBS"
@@ -280,7 +280,7 @@
       OPENGL_LIBS="$OPENGL_LIBS $GLUT_LIBS"
       OPENGL_CFLAGS="$OPENGL_CFLAGS $GLUT_CFLAGS"
    fi
-if test "x$no_x" != "xyes" -a "x$no_gl" != "xyes" \
+if test "x$no_gl" != "xyes" \
 		-a "x$no_glu" != "xyes" -a "x$no_glut" != "xyes" ; then
     AC_DEFINE(HAVE_OPENGL, 1, [Define if you have OpenGL.])
     AC_SUBST(OPENGL_CFLAGS)


More information about the crossfire mailing list