From b9f520a85a29618e7062801ebac2a11e1c316981 Mon Sep 17 00:00:00 2001 From: riccardom Date: Thu, 18 Jun 2009 19:50:51 +0000 Subject: [PATCH] Allow compilation of linux cli without glib since it does not need it. Probably there is a cleaner way but since desmume still compiles fine with glib it is not regressing. Guillame take a look at this and remember we should take a serious look at configure.ac ;). --- desmume/configure.ac | 8 ++++++-- desmume/src/Makefile.am | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/desmume/configure.ac b/desmume/configure.ac index ba2b67ca1..3719fd764 100644 --- a/desmume/configure.ac +++ b/desmume/configure.ac @@ -88,6 +88,7 @@ if test "x$osmesa" = "xyes" ; then fi dnl - Check for GTK and/or libglade +FOUND_GLIB=no GLIB_VER=2.8 GTK_VER=2.6 AC_CHECK_TOOL(HAVE_PKG, pkg-config) @@ -95,8 +96,8 @@ AC_PROVIDE_IFELSE([PKG_PROG_PKG_CONFIG], [ if test ! "x$HAVE_PKG" = "x" ; then PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_VER, - HAVE_GLIB=yes, - HAVE_GLIB=no) + FOUND_GLIB=yes, + FOUND_GLIB=no) PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_VER, @@ -134,6 +135,9 @@ AC_PROVIDE_IFELSE([PKG_PROG_PKG_CONFIG], [ echo "WARNING: pkg-config is not available therefore gtk and gtk-glade UIs are not available either." ]) +dnl - set conditional for glib, needed to avoid commandline.cpp compilation for cli frontend since it depends on glib +AM_CONDITIONAL([HAVE_GLIB], [test "${FOUND_GLIB}" = "yes"]) + dnl - If the gtkGLext package is available define the corresponding C macro if test "x$HAVE_GTKGLEXT" = "xyes"; then AC_DEFINE([GTKGLEXT_AVAILABLE], [1]) diff --git a/desmume/src/Makefile.am b/desmume/src/Makefile.am index b25a8a8c2..d67309241 100644 --- a/desmume/src/Makefile.am +++ b/desmume/src/Makefile.am @@ -16,7 +16,7 @@ libdesmume_a_SOURCES = \ arm_instructions.cpp arm_instructions.h \ bios.cpp bios.h bits.h cp15.cpp cp15.h \ cflash.cpp cflash.h fs.h \ - common.cpp common.h commandline.h commandline.cpp \ + common.cpp common.h \ debug.cpp debug.h driver.h \ Disassembler.cpp Disassembler.h \ dscard.h fat.h FIFO.cpp FIFO.h \ @@ -53,6 +53,9 @@ libdesmume_a_SOURCES = \ cheatSystem.cpp cheatSystem.h \ texcache.cpp texcache.h rasterize.cpp rasterize.h \ version.h +if HAVE_GLIB +libdesmume_a_SOURCES += commandline.h commandline.cpp +endif if HAVE_GDB_STUB libdesmume_a_SOURCES += gdbstub.h endif