Search
lxdream.org :: lxdream/configure.in :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename configure.in
changeset 681:1755a126b109
prev675:b97020f9af1c
next687:6bdc2b7032ea
author nkeynes
date Sun Jun 01 00:47:45 2008 +0000 (11 years ago)
permissions -rw-r--r--
last change First cut of the Cocoa GUI implementation
file annotate diff log raw
1.1 --- a/configure.in Mon May 26 11:01:42 2008 +0000
1.2 +++ b/configure.in Sun Jun 01 00:47:45 2008 +0000
1.3 @@ -31,9 +31,10 @@
1.4 AC_ARG_WITH( osmesa,
1.5 AS_HELP_STRING( [--with-osmesa], [Build with the osmesa GL library (software rendering)]),
1.6 [], [with_osmesa=no])
1.7 +AC_ARG_WITH( gtk,
1.8 + AS_HELP_STRING( [--with-gtk], [Build with the GTK UI. Default on X11 systems]), [with_gtk=yes], [with_gtk=x11] )
1.9
1.10 -
1.11 -dnl ------------ Check if we're building on Darwn --------------
1.12 +dnl ------------ Check if we're building on Darwin --------------
1.13
1.14 dnl For starters, do we have a working objective-c compiler?
1.15 lxdream_save_cppflags="$CPPFLAGS"
1.16 @@ -49,8 +50,12 @@
1.17 AC_DEFINE(APPLE_BUILD,[1],[Building on an apple platform. Things are different...])
1.18 ])
1.19
1.20 + if test "x$with_gtk" = "xx11"; then
1.21 + with_gtk=no
1.22 + fi
1.23 +
1.24 ], [CPPFLAGS="$lxdream_save_cppflags"] )
1.25 -AM_CONDITIONAL(GUI_COCOA, [test "$HAVE_COCOA" = 'yes'])
1.26 +AM_CONDITIONAL(GUI_COCOA, [test "$HAVE_COCOA" = 'yes' -a "$with_gtk" = "no"])
1.27
1.28 dnl ----------- Check for mandatory dependencies --------------
1.29 dnl Check for libpng (required)
1.30 @@ -61,23 +66,28 @@
1.31 echo "Zlib (libz.so) could not be found, but is required."
1.32 exit 1])
1.33
1.34 +if test "x$with_gtk" = "xno"; then
1.35 + dnl Check for GLIB only
1.36 + PKG_CHECK_MODULES(GLIB, glib-2.0)
1.37 +else
1.38 + dnl Check for GTK
1.39 + PKG_CHECK_MODULES(GTK, gtk+-2.0, [
1.40 + HAVE_GTK='yes'
1.41 + AC_DEFINE([HAVE_GTK],1,[Have GTK libraries])
1.42 + ])
1.43
1.44 -dnl Check for GTK (currently compulsory)
1.45 -PKG_CHECK_MODULES(GTK, gtk+-2.0, [
1.46 - HAVE_GTK='yes'
1.47 - AC_DEFINE([HAVE_GTK],1,[Have GTK libraries])
1.48 -])
1.49 + dnl Which GTK port do we have?
1.50 + LIBS="$LIBS $GTK_LIBS"
1.51 + AC_CHECK_FUNC(gdk_x11_display_get_xdisplay, [
1.52 + HAVE_GTK_X11='yes'
1.53 + AC_DEFINE([HAVE_GTK_X11],1,[Building with GTK+X11]) ], [])
1.54 + AC_CHECK_FUNC(gdk_quartz_window_get_nsview, [
1.55 + HAVE_GTK_OSX='yes'
1.56 + AC_DEFINE([HAVE_GTK_OSX],1,[Building with GTK+Cocoa]) ], [])
1.57 +fi
1.58 +
1.59 AM_CONDITIONAL(GUI_GTK, [test "$HAVE_GTK" = 'yes'])
1.60
1.61 -dnl Which GTK port do we have?
1.62 -LIBS="$LIBS $GTK_LIBS"
1.63 -AC_CHECK_FUNC(gdk_x11_display_get_xdisplay, [
1.64 - HAVE_GTK_X11='yes'
1.65 - AC_DEFINE([HAVE_GTK_X11],1,[Building with GTK+X11]) ], [])
1.66 -AC_CHECK_FUNC(gdk_quartz_window_get_nsview, [
1.67 - HAVE_GTK_OSX='yes'
1.68 - AC_DEFINE([HAVE_GTK_OSX],1,[Building with GTK+Cocoa]) ], [])
1.69 -
1.70 dnl ------------------ Video driver support -------------------
1.71 AS_IF([test "x$with_osmesa" != xno], [
1.72
1.73 @@ -96,6 +106,10 @@
1.74 AC_MSG_FAILURE( ["The OpenGL library (libGL.so) could not be found, but is required."])])
1.75 AC_CHECK_HEADER([GL/gl.h], [], [
1.76 AC_MSG_FAILURE( ["The OpenGL header files (eg GL/gl.h) could not be found, but are required."])])
1.77 + else
1.78 + AC_CHECK_FUNC(NSOpenGLGetVersion, [
1.79 + HAVE_NSGL='yes'
1.80 + AC_DEFINE([HAVE_NSGL],1, [Have NSOpenGL support]) ] )
1.81 fi
1.82
1.83 dnl Now work out how to get from the UI to GL - this is usually the painful part.
1.84 @@ -106,10 +120,7 @@
1.85 AC_CHECK_FUNC(glXQueryVersion, [
1.86 HAVE_GLX='yes'
1.87 AC_DEFINE([HAVE_GLX], 1, [Have GLX support]) ] )
1.88 - elif test "x$HAVE_GTK_OSX" = "xyes"; then
1.89 - AC_CHECK_FUNC(NSOpenGLGetVersion, [
1.90 - HAVE_NSGL='yes'
1.91 - AC_DEFINE([HAVE_NSGL],1, [Have NSOpenGL support]) ] )
1.92 +dnl elif test "x$HAVE_GTK_OSX" = "xyes"; then
1.93 fi
1.94
1.95 ])
.