@@ -67,9 +67,24 @@ if test "${ac_cv_my_have_sdl}" = "no" -a "${ac_cv_my_have_imlib2}" = "no"; then | |||||
AC_MSG_ERROR([[cannot find SDL_Image or GTK+, please install one of them]]) | AC_MSG_ERROR([[cannot find SDL_Image or GTK+, please install one of them]]) | ||||
fi | fi | ||||
if test "${enable_debug}" = "yes"; then | |||||
AC_DEFINE(DEBUG, 1, Define to 1 to activate debug) | |||||
# Use libcaca? (required for font generation) | |||||
ac_cv_my_have_caca="no" | |||||
PKG_CHECK_MODULES(CACA, caca >= 0.99.beta17, [ac_cv_my_have_caca="yes"], [:]) | |||||
if test "${ac_cv_my_have_caca}" != "no"; then | |||||
AC_DEFINE(USE_CACA, 1, Define to 1 to use libcaca) | |||||
fi | fi | ||||
AM_CONDITIONAL(USE_CACA, test "${ac_cv_my_have_caca}" != "no") | |||||
# Use libpipi? (required for video recording) | |||||
ac_cv_my_have_pipi="no" | |||||
PKG_CHECK_MODULES(PIPI, pipi, [ac_cv_my_have_pipi="yes"], [:]) | |||||
if test "${ac_cv_my_have_pipi}" != "no"; then | |||||
AC_DEFINE(USE_PIPI, 1, Define to 1 to use libpipi) | |||||
fi | |||||
AM_CONDITIONAL(USE_PIPI, test "${ac_cv_my_have_pipi}" != "no") | |||||
if test "${enable_release}" = "yes"; then | if test "${enable_release}" = "yes"; then | ||||
AC_DEFINE(FINAL_RELEASE, 1, Define to 1 to activate final release) | AC_DEFINE(FINAL_RELEASE, 1, Define to 1 to activate final release) | ||||
@@ -1,4 +1,5 @@ | |||||
if USE_CACA | |||||
all: ascii.png | all: ascii.png | ||||
ascii.png: | ascii.png: | ||||
@@ -6,4 +7,5 @@ ascii.png: | |||||
clean: | clean: | ||||
rm -f ascii.png | rm -f ascii.png | ||||
endif | |||||
@@ -14,9 +14,9 @@ libcommon_a_SOURCES = \ | |||||
libcommon_a_CXXFLAGS = `pkg-config --cflags sdl gl SDL_image` | libcommon_a_CXXFLAGS = `pkg-config --cflags sdl gl SDL_image` | ||||
test_map_SOURCES = test-map.cpp sdlinput.cpp sdlinput.h | test_map_SOURCES = test-map.cpp sdlinput.cpp sdlinput.h | ||||
test_map_CXXFLAGS = `pkg-config --cflags sdl gl SDL_image` | |||||
test_map_CXXFLAGS = `pkg-config --cflags sdl gl SDL_image` @PIPI_CFLAGS@ | |||||
test_map_LDADD = libcommon.a | test_map_LDADD = libcommon.a | ||||
test_map_LDFLAGS = `pkg-config --libs sdl gl SDL_image` -lpipi | |||||
test_map_LDFLAGS = `pkg-config --libs sdl gl SDL_image` @PIPI_LIBS@ | |||||
editor_SOURCES = gtk/editor.cpp gtk/glmapview.cpp gtk/glmapview.h | editor_SOURCES = gtk/editor.cpp gtk/glmapview.cpp gtk/glmapview.h | ||||
editor_CXXFLAGS = `pkg-config --cflags sdl gl SDL_image gtk+-2.0 gtkgl-2.0` | editor_CXXFLAGS = `pkg-config --cflags sdl gl SDL_image gtk+-2.0 gtkgl-2.0` | ||||
@@ -10,7 +10,7 @@ | |||||
#include <cstdio> | #include <cstdio> | ||||
#include <cstring> | #include <cstring> | ||||
#if defined HAVE_PIPI_H | |||||
#if defined USE_PIPI | |||||
# include <pipi.h> | # include <pipi.h> | ||||
#endif | #endif | ||||
@@ -28,7 +28,7 @@ class DebugRecordData | |||||
private: | private: | ||||
char const *path; | char const *path; | ||||
int width, height; | int width, height; | ||||
#if defined HAVE_PIPI_H | |||||
#if defined USE_PIPI | |||||
pipi_sequence_t *sequence; | pipi_sequence_t *sequence; | ||||
#endif | #endif | ||||
}; | }; | ||||
@@ -43,7 +43,7 @@ DebugRecord::DebugRecord(char const *path) | |||||
data->path = strdup(path); | data->path = strdup(path); | ||||
data->width = 0; | data->width = 0; | ||||
data->height = 0; | data->height = 0; | ||||
#if defined HAVE_PIPI_H | |||||
#if defined USE_PIPI | |||||
data->sequence = NULL; | data->sequence = NULL; | ||||
#endif | #endif | ||||
} | } | ||||
@@ -70,7 +70,7 @@ void DebugRecord::TickDraw(float deltams) | |||||
data->width = width; | data->width = width; | ||||
data->height = height; | data->height = height; | ||||
#if defined HAVE_PIPI_H | |||||
#if defined USE_PIPI | |||||
if (data->sequence) | if (data->sequence) | ||||
pipi_close_sequence(data->sequence); | pipi_close_sequence(data->sequence); | ||||
@@ -78,7 +78,7 @@ void DebugRecord::TickDraw(float deltams) | |||||
#endif | #endif | ||||
} | } | ||||
#if defined HAVE_PIPI_H | |||||
#if defined USE_PIPI | |||||
if (data->sequence) | if (data->sequence) | ||||
{ | { | ||||
uint32_t *buffer = new uint32_t[width * height]; | uint32_t *buffer = new uint32_t[width * height]; | ||||
@@ -1,7 +1,11 @@ | |||||
noinst_PROGRAMS = make-font | |||||
noinst_PROGRAMS = $(make_font) | |||||
make_font_SOURCES = make-font.cpp | make_font_SOURCES = make-font.cpp | ||||
make_font_CXXFLAGS = `pkg-config --cflags caca` | |||||
make_font_LDFLAGS = `pkg-config --libs caca` | |||||
make_font_CXXFLAGS = @CACA_CFLAGS@ | |||||
make_font_LDFLAGS = @CACA_LIBS@ | |||||
if USE_CACA | |||||
make_font = make-font | |||||
endif | |||||