From f0094304da19007005d1711e7aa6df2b5996fb37 Mon Sep 17 00:00:00 2001 From: xapantu Date: Wed, 30 Jun 2010 17:07:42 +0000 Subject: [PATCH] Adding the '--with-addons' option in configure.ac git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5596 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- configure.ac | 10 +++++++++- src/Makefile.am | 2 +- src/main.cpp | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 2e25b8920..558003d1a 100644 --- a/configure.ac +++ b/configure.ac @@ -399,10 +399,18 @@ ENETTREE="src/enet" # Check for gettext CHECK_GETTEXT(external) - +#disable/enable addons support +AC_ARG_WITH(addons,[AS_HELP_STRING([--with-addons], + [This option is used to enable/disable addons support])]) +if test "x$with_addons" == "xyes" ; then + PKG_CHECK_MODULES(LIBCURL, libcurl >= 0.1) + echo "STK will compile with addons support" + AC_DEFINE(ADDONS_MANAGER) +fi # ========================= # subst bars in Makefile.am # ========================= + AC_SUBST(irrlicht_LIBS) AC_SUBST(fribidi_LIBS) AC_SUBST(bullet_LIBS) diff --git a/src/Makefile.am b/src/Makefile.am index 2be52e2a0..a34b38298 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -361,5 +361,5 @@ supertuxkart_SOURCES = \ supertuxkart_LDADD = \ $(irrlicht_LIBS) $(fribidi_LIBS) $(bullet_LIBS) $(enet_LIBS) \ $(opengl_LIBS) $(openal_LIBS) $(oggvorbis_LIBS) \ - $(INTLLIBS) + $(INTLLIBS) $(LIBCURL_LIBS) $(LIBCURL_CFLAGS) diff --git a/src/main.cpp b/src/main.cpp index 3fa473373..19bd1dc5d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -581,6 +581,10 @@ void cleanTuxKart() int main(int argc, char *argv[] ) { + +#ifdef ADDONS_MANAGER +std::cout << "Addons manager enabled." << std::endl; +#endif try { // Init the minimum managers so that user config exists, then // handle all command line options that do not need (or must