diff --git a/desmume/configure.ac b/desmume/configure.ac index 096f31c2b..39ddc7fe7 100644 --- a/desmume/configure.ac +++ b/desmume/configure.ac @@ -173,8 +173,10 @@ else AC_MSG_ERROR([Antigrain library is required to build desmume]) fi -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 - depends on glib, reference pkg-config since it is needed for checking glib +if test "x$FOUND_GLIB" = "xno"; then + AC_MSG_ERROR([Glib and pkg-config are required to build desmume]) +fi dnl - If the gtkGLext package is available define the corresponding C macro if test "x$HAVE_GTKGLEXT" = "xyes"; then diff --git a/desmume/src/Makefile.am b/desmume/src/Makefile.am index 755b08edb..8e6a218fb 100644 --- a/desmume/src/Makefile.am +++ b/desmume/src/Makefile.am @@ -14,6 +14,7 @@ libdesmume_a_SOURCES = \ armcpu.cpp armcpu.h ARM9.h \ arm_instructions.cpp arm_instructions.h \ bios.cpp bios.h bits.h cp15.cpp cp15.h \ + commandline.h commandline.cpp \ common.cpp common.h \ debug.cpp debug.h driver.h \ Disassembler.cpp Disassembler.h \ @@ -49,9 +50,6 @@ libdesmume_a_SOURCES = \ texcache.cpp texcache.h rasterize.cpp rasterize.h \ version.h -if HAVE_GLIB -libdesmume_a_SOURCES += commandline.h commandline.cpp -endif if HAVE_ALSA libdesmume_a_SOURCES += mic_alsa.cpp else diff --git a/desmume/src/cli/Makefile.am b/desmume/src/cli/Makefile.am index 4e37d2543..298bba56c 100644 --- a/desmume/src/cli/Makefile.am +++ b/desmume/src/cli/Makefile.am @@ -1,11 +1,11 @@ SUBDIRS = doc include $(top_srcdir)/src/desmume.mk -AM_CPPFLAGS += $(SDL_CFLAGS) $(ALSA_CFLAGS) $(LIBAGG_CFLAGS) +AM_CPPFLAGS += $(SDL_CFLAGS) $(ALSA_CFLAGS) $(LIBAGG_CFLAGS) $(GLIB_CFLAGS) bin_PROGRAMS = desmume-cli desmume_cli_SOURCES = main.cpp ../sndsdl.cpp ../ctrlssdl.h ../ctrlssdl.cpp -desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) +desmume_cli_LDADD = ../libdesmume.a $(SDL_LIBS) $(ALSA_LIBS) $(LIBAGG_LIBS) $(GLIB_LIBS) if HAVE_GDB_STUB desmume_cli_LDADD += ../gdbstub/libgdbstub.a endif