[72] | 1 | # $Id: configure.ac 186 2003-11-16 00:33:35Z sam $ |
---|
[18] | 2 | |
---|
[126] | 3 | AC_INIT(ttyvaders,0.0cvs-20031110) |
---|
[18] | 4 | |
---|
| 5 | AC_PREREQ(2.50) |
---|
| 6 | AC_CONFIG_SRCDIR(src/main.c) |
---|
[40] | 7 | AC_CONFIG_AUX_DIR(autotools) |
---|
[18] | 8 | AC_CANONICAL_SYSTEM |
---|
| 9 | |
---|
[126] | 10 | AM_INIT_AUTOMAKE(ttyvaders,0.0cvs-20031110) |
---|
[18] | 11 | AM_CONFIG_HEADER(config.h) |
---|
| 12 | |
---|
| 13 | AM_PROG_CC_C_O |
---|
| 14 | AC_PROG_CPP |
---|
[78] | 15 | AC_PROG_RANLIB |
---|
[18] | 16 | |
---|
[158] | 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 | |
---|
[52] | 21 | AC_ARG_ENABLE(slang, |
---|
| 22 | [ --enable-slang slang graphics support (default enabled)]) |
---|
[18] | 23 | AC_ARG_ENABLE(ncurses, |
---|
[52] | 24 | [ --enable-ncurses ncurses graphics support (default disabled)]) |
---|
[156] | 25 | AC_ARG_ENABLE(conio, |
---|
| 26 | [ --enable-conio DOS conio.h graphics support (default disabled)]) |
---|
[18] | 27 | |
---|
[66] | 28 | USE_SLANG=false |
---|
| 29 | USE_NCURSES=false |
---|
[156] | 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])) |
---|
[158] | 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)]) |
---|
[156] | 39 | AC_DEFINE(USE_CONIO, 1, Define if the backend driver is conio.h) |
---|
| 40 | USE_CONIO=: |
---|
| 41 | elif test "${enable_ncurses}" = "yes"; then |
---|
[18] | 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])) |
---|
[112] | 44 | AC_DEFINE(USE_NCURSES, 1, Define if the backend driver is ncurses) |
---|
[66] | 45 | USE_NCURSES=: |
---|
[112] | 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=: |
---|
[18] | 51 | fi |
---|
| 52 | |
---|
[66] | 53 | AM_CONDITIONAL(USE_SLANG, ${USE_SLANG}) |
---|
| 54 | AM_CONDITIONAL(USE_NCURSES, ${USE_NCURSES}) |
---|
[18] | 55 | |
---|
[126] | 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" |
---|
| 60 | |
---|
[18] | 61 | AC_OUTPUT([ |
---|
| 62 | Makefile |
---|
[186] | 63 | libcaca/Makefile |
---|
[78] | 64 | test/Makefile |
---|
[18] | 65 | src/Makefile |
---|
[40] | 66 | autotools/Makefile |
---|
[118] | 67 | data/Makefile |
---|
[18] | 68 | debian/Makefile |
---|
| 69 | ]) |
---|
| 70 | |
---|