git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/ttyvaders/trunk@112 92316355-f0b4-4df1-b90c-862c8a59935fmaster
@@ -21,20 +21,16 @@ AC_ARG_ENABLE(ncurses, | |||||
USE_SLANG=false | USE_SLANG=false | ||||
USE_NCURSES=false | USE_NCURSES=false | ||||
if test "${enable_ncurses}" = "yes" | |||||
then | |||||
if test "${enable_ncurses}" = "yes"; then | |||||
AC_CHECK_HEADER(ncurses.h,:,AC_MSG_ERROR([cannot find ncurses headers])) | AC_CHECK_HEADER(ncurses.h,:,AC_MSG_ERROR([cannot find ncurses headers])) | ||||
AC_CHECK_LIB(ncurses,initscr,:,AC_MSG_ERROR([cannot find ncurses library])) | AC_CHECK_LIB(ncurses,initscr,:,AC_MSG_ERROR([cannot find ncurses library])) | ||||
AC_DEFINE(USE_NCURSES, 1, Define if the backend driver is ncurses) | |||||
USE_NCURSES=: | USE_NCURSES=: | ||||
else | |||||
if test "${enable_slang}" != "no" | |||||
then | |||||
AC_CHECK_HEADER(slang.h,:,AC_MSG_ERROR([cannot find slang headers])) | |||||
AC_CHECK_LIB(slang,SLkp_init,:,AC_MSG_ERROR([cannot find slang library])) | |||||
USE_SLANG=: | |||||
else | |||||
: | |||||
fi | |||||
elif test "${enable_slang}" != "no"; then | |||||
AC_CHECK_HEADER(slang.h,:,AC_MSG_ERROR([cannot find slang headers])) | |||||
AC_CHECK_LIB(slang,SLkp_init,:,AC_MSG_ERROR([cannot find slang library])) | |||||
AC_DEFINE(USE_SLANG, 1, Define if the backend driver is slang) | |||||
USE_SLANG=: | |||||
fi | fi | ||||
AM_CONDITIONAL(USE_SLANG, ${USE_SLANG}) | AM_CONDITIONAL(USE_SLANG, ${USE_SLANG}) | ||||
@@ -7,13 +7,6 @@ AM_CFLAGS = -g -O2 -fno-strength-reduce -fomit-frame-pointer | |||||
# Code qui fait des warnings == code de porc == deux baffes dans ta gueule | # Code qui fait des warnings == code de porc == deux baffes dans ta gueule | ||||
AM_CFLAGS += -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs | AM_CFLAGS += -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs | ||||
if USE_SLANG | |||||
CPPFLAGS_slang = -DUSE_SLANG | |||||
endif | |||||
if USE_NCURSES | |||||
CPPFLAGS_ncurses = -DUSE_NCURSES | |||||
endif | |||||
lib_LIBRARIES = libee.a | lib_LIBRARIES = libee.a | ||||
libee_a_SOURCES = \ | libee_a_SOURCES = \ | ||||
ee.c \ | ee.c \ | ||||
@@ -24,5 +17,4 @@ libee_a_SOURCES = \ | |||||
circle.c \ | circle.c \ | ||||
triangle.c \ | triangle.c \ | ||||
$(NULL) | $(NULL) | ||||
libee_a_CPPFLAGS = $(CPPFLAGS_slang) $(CPPFLAGS_ncurses) | |||||
@@ -8,11 +8,9 @@ AM_CFLAGS = -g -O2 -fno-strength-reduce -fomit-frame-pointer | |||||
AM_CFLAGS += -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs | AM_CFLAGS += -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs | ||||
if USE_SLANG | if USE_SLANG | ||||
CPPFLAGS_slang = -DUSE_SLANG | |||||
LDFLAGS_slang = -lslang | LDFLAGS_slang = -lslang | ||||
endif | endif | ||||
if USE_NCURSES | if USE_NCURSES | ||||
CPPFLAGS_ncurses = -DUSE_NCURSES | |||||
LDFLAGS_ncurses = -lncurses | LDFLAGS_ncurses = -lncurses | ||||
endif | endif | ||||
@@ -34,6 +32,6 @@ ttyvaders_SOURCES = \ | |||||
weapons.c \ | weapons.c \ | ||||
$(NULL) | $(NULL) | ||||
ttyvaders_CPPFLAGS = -I../libee $(CPPFLAGS_slang) $(CPPFLAGS_ncurses) | |||||
ttyvaders_CPPFLAGS = -I../libee | |||||
ttyvaders_LDADD = ../libee/libee.a $(LDFLAGS_slang) $(LDFLAGS_ncurses) | ttyvaders_LDADD = ../libee/libee.a $(LDFLAGS_slang) $(LDFLAGS_ncurses) | ||||
@@ -8,17 +8,15 @@ AM_CFLAGS = -g -O2 -fno-strength-reduce -fomit-frame-pointer | |||||
AM_CFLAGS += -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs | AM_CFLAGS += -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs | ||||
if USE_SLANG | if USE_SLANG | ||||
CPPFLAGS_slang = -DUSE_SLANG | |||||
LDFLAGS_slang = -lslang | LDFLAGS_slang = -lslang | ||||
endif | endif | ||||
if USE_NCURSES | if USE_NCURSES | ||||
CPPFLAGS_ncurses = -DUSE_NCURSES | |||||
LDFLAGS_ncurses = -lncurses | LDFLAGS_ncurses = -lncurses | ||||
endif | endif | ||||
bin_PROGRAMS = demo | bin_PROGRAMS = demo | ||||
demo_SOURCES = demo.c | demo_SOURCES = demo.c | ||||
demo_CPPFLAGS = -I../libee $(CPPFLAGS_slang) $(CPPFLAGS_ncurses) | |||||
demo_CPPFLAGS = -I../libee | |||||
demo_LDADD = ../libee/libee.a $(LDFLAGS_slang) $(LDFLAGS_ncurses) -lm | demo_LDADD = ../libee/libee.a $(LDFLAGS_slang) $(LDFLAGS_ncurses) -lm | ||||