1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
Subject: build epiphany against shared tinyxml library
From: Ricardo Mones <mones@debian.org>
Forwarded: not-needed
Last-Update: 2014-10-09
--- a/configure.in
+++ b/configure.in
@@ -6,8 +6,8 @@
AC_PROG_INSTALL
AC_CHECK_HEADER(SDL/SDL.h,, [echo "Please install SDL from http://www.libsdl.org";exit])
AC_CHECK_HEADER(SDL/SDL_mixer.h,, [echo "Please install SDL_mixer from http://www.libsdl.org/projects/SDL_mixer/";exit])
-
-
+AC_LANG_PUSH(C++)
+AC_CHECK_HEADER(tinyxml.h,, [echo "Please install tinyxml library from http://www.grinninglizard.com/tinyxml/";exit])
AC_CHECK_LIB( SDL, main,, [
@@ -22,6 +22,13 @@
echo "if that doesn't help have a look at the file config.log and look into"
echo "the FAQ."
exit
+ ])
+
+AC_CHECK_LIB( tinyxml, main,, [
+ echo "tinyxml installed, but -ltinyxml not found, run 'ldconfig' and try again,"
+ echo "if that doesn't help have a look at the file config.log and look into"
+ echo "the FAQ."
+ exit
])
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,11 +14,10 @@
screen.cpp sprite.cpp menu.cpp game.cpp surface_manager.cpp input.cpp fonts/font.cpp \
fonts/font_factory.cpp fonts/font_manager.cpp surface.cpp resource_factory.cpp \
menu_entry_ranged.cpp menu_list_epiphany.cpp menu_list_options.cpp \
- tinyxml/tinystr.cpp tinyxml/tinyxmlerror.cpp tinyxml/tinyxmlparser.cpp \
- tinyxml/tinyxml.cpp menu_entry_bool.cpp music_manager.cpp xml_configuration.cpp \
+ menu_entry_bool.cpp music_manager.cpp xml_configuration.cpp \
commandline_configuration.cpp
-epiphany_game_LDADD = -lSDL -lSDL_mixer
+epiphany_game_LDADD = -lSDL -lSDL_mixer -ltinyxml
noinst_HEADERS = entity_type.h emdlparser.h levelmap.h \
@@ -35,6 +34,6 @@
entities/entity_gem.h entities/entity_emerald.h entities/entity_tomato.h \
resource_factory.h sprite.h epimap.h entity.h \
menu_entry.h menu_entry_simple.h menu_entry_ranged.h menu_list.h \
- menu_list_epiphany.h menu_list_options.h tinyxml/tinystr.h \
- tinyxml/tinyxml.h menu_entry_bool.h music_manager.h abstract_configuration.h \
- xml_configuration.h commandline_configuration.h
\ No newline at end of file
+ menu_list_epiphany.h menu_list_options.h \
+ menu_entry_bool.h music_manager.h abstract_configuration.h \
+ xml_configuration.h commandline_configuration.h
--- a/src/epiconfig.cpp
+++ b/src/epiconfig.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
#include "epiconfig.h"
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
#include <cstdlib>
#include "sprite.h"
--- a/src/xml_configuration.cpp
+++ b/src/xml_configuration.cpp
@@ -3,7 +3,7 @@
#include <string>
#include <cstring>
#include <cassert>
-#include "tinyxml/tinyxml.h"
+#include <tinyxml.h>
|