1 | # $Id: configure.ac 125 2003-11-10 14:19:21Z sam $ |
---|
2 | |
---|
3 | AC_INIT(ttyvaders,0.0cvs-20031110) |
---|
4 | |
---|
5 | AC_PREREQ(2.50) |
---|
6 | AC_CONFIG_SRCDIR(src/main.c) |
---|
7 | AC_CONFIG_AUX_DIR(autotools) |
---|
8 | AC_CANONICAL_SYSTEM |
---|
9 | |
---|
10 | AM_INIT_AUTOMAKE(ttyvaders,0.0cvs-20031110) |
---|
11 | AM_CONFIG_HEADER(config.h) |
---|
12 | |
---|
13 | AM_PROG_CC_C_O |
---|
14 | AC_PROG_CPP |
---|
15 | AC_PROG_RANLIB |
---|
16 | |
---|
17 | AC_ARG_ENABLE(slang, |
---|
18 | [ --enable-slang slang graphics support (default enabled)]) |
---|
19 | AC_ARG_ENABLE(ncurses, |
---|
20 | [ --enable-ncurses ncurses graphics support (default disabled)]) |
---|
21 | |
---|
22 | USE_SLANG=false |
---|
23 | USE_NCURSES=false |
---|
24 | if test "${enable_ncurses}" = "yes"; then |
---|
25 | AC_CHECK_HEADER(ncurses.h,:,AC_MSG_ERROR([cannot find ncurses headers])) |
---|
26 | AC_CHECK_LIB(ncurses,initscr,:,AC_MSG_ERROR([cannot find ncurses library])) |
---|
27 | AC_DEFINE(USE_NCURSES, 1, Define if the backend driver is ncurses) |
---|
28 | USE_NCURSES=: |
---|
29 | elif test "${enable_slang}" != "no"; then |
---|
30 | AC_CHECK_HEADER(slang.h,:,AC_MSG_ERROR([cannot find slang headers])) |
---|
31 | AC_CHECK_LIB(slang,SLkp_init,:,AC_MSG_ERROR([cannot find slang library])) |
---|
32 | AC_DEFINE(USE_SLANG, 1, Define if the backend driver is slang) |
---|
33 | USE_SLANG=: |
---|
34 | fi |
---|
35 | |
---|
36 | AM_CONDITIONAL(USE_SLANG, ${USE_SLANG}) |
---|
37 | AM_CONDITIONAL(USE_NCURSES, ${USE_NCURSES}) |
---|
38 | |
---|
39 | # Optimizations |
---|
40 | CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer" |
---|
41 | # Code qui fait des warnings == code de porc == deux baffes dans ta gueule |
---|
42 | CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs" |
---|
43 | |
---|
44 | AC_OUTPUT([ |
---|
45 | Makefile |
---|
46 | libee/Makefile |
---|
47 | test/Makefile |
---|
48 | src/Makefile |
---|
49 | autotools/Makefile |
---|
50 | data/Makefile |
---|
51 | debian/Makefile |
---|
52 | ]) |
---|
53 | |
---|