source: libcaca/trunk/configure.ac @ 202

Last change on this file since 202 was 202, checked in by Sam Hocevar, 17 years ago
  • debian/control: + Changed section to libs/libdevel instead of games/games. + Changed package name to libcaca-dev.
  • debian/rules: + Use debian/compat instead of DH_COMPAT. + Install README, BUGS and TODO into /usr/share/doc.
  • caca-config.in: + First version of the config script.
  • configure.ac src/Makefile.am: + Build a static PIC library as well.
  • README TODO: + Various updates.
  • Property svn:keywords set to Id
File size: 2.4 KB
RevLine 
[71]1# $Id: configure.ac 202 2003-11-20 16:54:04Z sam $
[17]2
[189]3AC_INIT(libcaca,0.0cvs-20031110)
[17]4
5AC_PREREQ(2.50)
[190]6AC_CONFIG_SRCDIR(src/caca.c)
[39]7AC_CONFIG_AUX_DIR(autotools)
[17]8AC_CANONICAL_SYSTEM
9
[189]10AM_INIT_AUTOMAKE(libcaca,0.0cvs-20031110)
[17]11AM_CONFIG_HEADER(config.h)
12
13AM_PROG_CC_C_O
14AC_PROG_CPP
[77]15AC_PROG_RANLIB
[17]16
[157]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
[51]21AC_ARG_ENABLE(slang,
22  [  --enable-slang          slang graphics support (default enabled)])
[17]23AC_ARG_ENABLE(ncurses,
[51]24  [  --enable-ncurses        ncurses graphics support (default disabled)])
[155]25AC_ARG_ENABLE(conio,
26  [  --enable-conio          DOS conio.h graphics support (default disabled)])
[17]27
[65]28USE_SLANG=false
29USE_NCURSES=false
[155]30USE_CONIO=false
31if test "${enable_conio}" = "yes"; then
32  AC_CHECK_HEADER(conio.h,:,AC_MSG_ERROR([cannot find conio.h header]))
[157]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)])
[155]39  AC_DEFINE(USE_CONIO, 1, Define if the backend driver is conio.h)
40  USE_CONIO=:
41elif test "${enable_ncurses}" = "yes"; then
[17]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]))
[111]44  AC_DEFINE(USE_NCURSES, 1, Define if the backend driver is ncurses)
[65]45  USE_NCURSES=:
[111]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=:
[17]51fi
52
[65]53AM_CONDITIONAL(USE_SLANG, ${USE_SLANG})
54AM_CONDITIONAL(USE_NCURSES, ${USE_NCURSES})
[17]55
[125]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
[187]59CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
[125]60
[202]61# Build the PIC library?
62case "${target_os}" in
63  *mingw32* | *cygwin*)
64    NEED_PIC=false
65    ;;
66  *)
67    NEED_PIC=:
68    ;;
69esac
70
71AM_CONDITIONAL(NEED_PIC, ${NEED_PIC})
72
[17]73AC_OUTPUT([
74  Makefile
[190]75  src/Makefile
76  examples/Makefile
[39]77  autotools/Makefile
[17]78  debian/Makefile
[202]79  caca-config
80],[
81  chmod 0755 caca-config
[17]82])
83
Note: See TracBrowser for help on using the repository browser.