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 ; \