From 69bf4a0b038c45bbec7f04b84650d939a5a70ea6 Mon Sep 17 00:00:00 2001 From: riccardom Date: Mon, 1 Feb 2010 20:22:30 +0000 Subject: [PATCH] Don't link unconditionally against libosmesa fix cli frontend --opengl-2d when libosmesa is available. --- desmume/configure.ac | 4 +++- desmume/src/gtk/Makefile.am | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/desmume/configure.ac b/desmume/configure.ac index 09b468560..55ecbb62f 100644 --- a/desmume/configure.ac +++ b/desmume/configure.ac @@ -83,9 +83,11 @@ if test "x$osmesa" = "xyes" ; then AC_CHECK_LIB(OSMesa, main,[ useosmesa=yes AC_DEFINE(HAVE_LIBOSMESA) - LIBS="-lOSMesa $LIBS" + OSMESA_LIBS="-lOSMesa" + AC_SUBST(OSMESA_LIBS) ]) fi +AM_CONDITIONAL([HAVE_LIBOSMESA], [test "${useosmesa}" = "yes"]) dnl - hack to help zero build gtk frontend macos x package AC_ARG_ENABLE(macosxhack, diff --git a/desmume/src/gtk/Makefile.am b/desmume/src/gtk/Makefile.am index 0eb93c11f..fd5d005f6 100644 --- a/desmume/src/gtk/Makefile.am +++ b/desmume/src/gtk/Makefile.am @@ -23,6 +23,9 @@ desmume_LDADD = ../libdesmume.a \ if HAVE_GDB_STUB desmume_LDADD += ../gdbstub/libgdbstub.a endif +if HAVE_LIBOSMESA +desmume_LDADD += $(OSMESA_LIBS) +endif UPDATE_DESKTOP = \ appsdir=$(DESTDIR)$(datadir)/applications ; \