--- configure.ac.orig 2014-09-30 14:20:26.000000000 +0400 +++ configure.ac 2014-12-11 23:42:51.000000000 +0300 @@ -40,6 +40,8 @@ AC_SUBST(MIKMOD_FLAGS) AC_SUBST(MIKMOD_LIBS) +AC_LANG_PUSH([C++]) + AC_CHECK_LIB([tinyxml], [main], [ TINYXML_LIBS="-ltinyxml" ],[ @@ -47,6 +49,8 @@ ]) AC_SUBST(TINYXML_LIBS) +AC_LANG_POP([C++]) + # Checks for header files. AC_CHECK_HEADERS([fcntl.h stddef.h stdlib.h string.h sys/time.h unistd.h]) @@ -63,9 +67,9 @@ if test "x${enable_devel}" = "xyes"; then AC_DEFINE(UNDER_DEVELOPMENT, 1, Define to enable development version) - CXXFLAGS="-Werror -O2 -Wall -pedantic -Wextra -std=gnu++98 -g" + CXXFLAGS="$CXXFLAGS -Werror -O2 -Wall -pedantic -Wextra -std=gnu++98 -g" else - CXXFLAGS="-O2 -Werror -Wall -pedantic -Wextra -std=gnu++98" + CXXFLAGS="$CXXFLAGS -O2 -Werror -Wall -pedantic -Wextra -std=gnu++98" fi AC_OUTPUT( --- src/controller_magnetic_eyes.cc.orig 2014-09-30 14:20:26.000000000 +0400 +++ src/controller_magnetic_eyes.cc 2014-12-11 23:41:57.000000000 +0300 @@ -85,7 +85,7 @@ #if __WORDSIZE == 64 random += (long) eye; #else - random += (Sint32) eye; + random += (intptr_t) eye; #endif eye->centerPosy = y_coordinates[random & 31] * res; random += keyboard->get_mouse_y (); --- src/sprite_ship.cc.orig 2014-09-30 14:20:26.000000000 +0400 +++ src/sprite_ship.cc 2014-12-11 23:41:57.000000000 +0300 @@ -74,7 +74,7 @@ #if __WORDSIZE == 64 random_counter += (long) this; #else - random_counter += (Sint32) this; + random_counter += (intptr_t) this; #endif Sint32 k = *monPT; frame_index_min = k; @@ -217,7 +217,7 @@ #if __WORDSIZE == 64 random_counter += (long) this; #else - random_counter += (Sint32) this; + random_counter += (intptr_t) this; #endif i = 4 * resolution; --- src/tecnoballz.cc.orig 2014-09-30 14:20:26.000000000 +0400 +++ src/tecnoballz.cc 2014-12-11 23:41:57.000000000 +0300 @@ -58,7 +58,7 @@ #if __WORDSIZE == 64 random_counter = (long) first_init; #else - random_counter = (Sint32) first_init; + random_counter = (intptr_t) first_init; #endif resources = handler_resources::get_instance (); high_score = handler_high_score::get_instance (); --- src/tiles_background.cc.orig 2014-09-30 14:20:26.000000000 +0400 +++ src/tiles_background.cc 2014-12-11 23:41:57.000000000 +0300 @@ -289,9 +289,9 @@ Sint32 rand2 = (long) current_tiles; #else /* use pointer address as random value */ - Sint32 rand1 = (Sint32) display; + Sint32 rand1 = (intptr_t) display; /* use pointer address as random value */ - Sint32 rand2 = (Sint32) current_tiles; + Sint32 rand2 = (intptr_t) current_tiles; #endif for (Uint32 v = 0; v < map_height; v++) {