source: ttyvaders/trunk/configure.ac @ 186

Last change on this file since 186 was 186, checked in by Sam Hocevar, 17 years ago
  • Renamed libee to libcaca. Far less collisions.
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# $Id: configure.ac 186 2003-11-16 00:33:35Z sam $
2
3AC_INIT(ttyvaders,0.0cvs-20031110)
4
5AC_PREREQ(2.50)
6AC_CONFIG_SRCDIR(src/main.c)
7AC_CONFIG_AUX_DIR(autotools)
8AC_CANONICAL_SYSTEM
9
10AM_INIT_AUTOMAKE(ttyvaders,0.0cvs-20031110)
11AM_CONFIG_HEADER(config.h)
12
13AM_PROG_CC_C_O
14AC_PROG_CPP
15AC_PROG_RANLIB
16
17dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
18dnl now otherwise it might be set in an obscure if statement.
19AC_EGREP_CPP(foo,foo)
20
21AC_ARG_ENABLE(slang,
22  [  --enable-slang          slang graphics support (default enabled)])
23AC_ARG_ENABLE(ncurses,
24  [  --enable-ncurses        ncurses graphics support (default disabled)])
25AC_ARG_ENABLE(conio,
26  [  --enable-conio          DOS conio.h graphics support (default disabled)])
27
28USE_SLANG=false
29USE_NCURSES=false
30USE_CONIO=false
31if 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=:
41elif 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=:
46elif 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=:
51fi
52
53AM_CONDITIONAL(USE_SLANG, ${USE_SLANG})
54AM_CONDITIONAL(USE_NCURSES, ${USE_NCURSES})
55
56# Optimizations
57CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
58# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
59CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs"
60
61AC_OUTPUT([
62  Makefile
63  libcaca/Makefile
64  test/Makefile
65  src/Makefile
66  autotools/Makefile
67  data/Makefile
68  debian/Makefile
69])
70
Note: See TracBrowser for help on using the repository browser.