1 | # $Id: configure.ac 191 2003-11-16 12:20:58Z 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 | dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right |
---|
18 | dnl now otherwise it might be set in an obscure if statement. |
---|
19 | AC_EGREP_CPP(foo,foo) |
---|
20 | |
---|
21 | AC_ARG_ENABLE(slang, |
---|
22 | [ --enable-slang slang graphics support (default enabled)]) |
---|
23 | AC_ARG_ENABLE(ncurses, |
---|
24 | [ --enable-ncurses ncurses graphics support (default disabled)]) |
---|
25 | AC_ARG_ENABLE(conio, |
---|
26 | [ --enable-conio DOS conio.h graphics support (default disabled)]) |
---|
27 | |
---|
28 | USE_SLANG=false |
---|
29 | USE_NCURSES=false |
---|
30 | USE_CONIO=false |
---|
31 | if test "${enable_conio}" = "yes"; then |
---|
32 | AC_CHECK_HEADER(conio.h,:,AC_MSG_ERROR([cannot find conio.h header])) |
---|
33 | AC_MSG_CHECKING(for ScreenUpdate in pc.h) |
---|
34 | AC_EGREP_HEADER(ScreenUpdate,pc.h,[ |
---|
35 | AC_MSG_RESULT(yes) |
---|
36 | AC_DEFINE(SCREENUPDATE_IN_PC_H, 1, |
---|
37 | Define if <pc.h> defines ScreenUpdate.)],[ |
---|
38 | AC_MSG_RESULT(no)]) |
---|
39 | AC_DEFINE(USE_CONIO, 1, Define if the backend driver is conio.h) |
---|
40 | USE_CONIO=: |
---|
41 | elif test "${enable_ncurses}" = "yes"; then |
---|
42 | AC_CHECK_HEADER(ncurses.h,:,AC_MSG_ERROR([cannot find ncurses headers])) |
---|
43 | AC_CHECK_LIB(ncurses,initscr,:,AC_MSG_ERROR([cannot find ncurses library])) |
---|
44 | AC_DEFINE(USE_NCURSES, 1, Define if the backend driver is ncurses) |
---|
45 | USE_NCURSES=: |
---|
46 | elif test "${enable_slang}" != "no"; then |
---|
47 | AC_CHECK_HEADER(slang.h,:,AC_MSG_ERROR([cannot find slang headers])) |
---|
48 | AC_CHECK_LIB(slang,SLkp_init,:,AC_MSG_ERROR([cannot find slang library])) |
---|
49 | AC_DEFINE(USE_SLANG, 1, Define if the backend driver is slang) |
---|
50 | USE_SLANG=: |
---|
51 | fi |
---|
52 | |
---|
53 | AM_CONDITIONAL(USE_SLANG, ${USE_SLANG}) |
---|
54 | AM_CONDITIONAL(USE_NCURSES, ${USE_NCURSES}) |
---|
55 | |
---|
56 | # Optimizations |
---|
57 | CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer" |
---|
58 | # Code qui fait des warnings == code de porc == deux baffes dans ta gueule |
---|
59 | CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare" |
---|
60 | |
---|
61 | AC_OUTPUT([ |
---|
62 | Makefile |
---|
63 | src/Makefile |
---|
64 | autotools/Makefile |
---|
65 | data/Makefile |
---|
66 | debian/Makefile |
---|
67 | ]) |
---|
68 | |
---|