You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

71 regels
2.2 KiB

  1. # $Id$
  2. AC_INIT(ttyvaders,0.0cvs-20031110)
  3. AC_PREREQ(2.50)
  4. AC_CONFIG_SRCDIR(src/main.c)
  5. AC_CONFIG_AUX_DIR(autotools)
  6. AC_CANONICAL_SYSTEM
  7. AM_INIT_AUTOMAKE(ttyvaders,0.0cvs-20031110)
  8. AM_CONFIG_HEADER(config.h)
  9. AM_PROG_CC_C_O
  10. AC_PROG_CPP
  11. AC_PROG_RANLIB
  12. dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
  13. dnl now otherwise it might be set in an obscure if statement.
  14. AC_EGREP_CPP(foo,foo)
  15. AC_ARG_ENABLE(slang,
  16. [ --enable-slang slang graphics support (default enabled)])
  17. AC_ARG_ENABLE(ncurses,
  18. [ --enable-ncurses ncurses graphics support (default disabled)])
  19. AC_ARG_ENABLE(conio,
  20. [ --enable-conio DOS conio.h graphics support (default disabled)])
  21. USE_SLANG=false
  22. USE_NCURSES=false
  23. USE_CONIO=false
  24. if test "${enable_conio}" = "yes"; then
  25. AC_CHECK_HEADER(conio.h,:,AC_MSG_ERROR([cannot find conio.h header]))
  26. AC_MSG_CHECKING(for ScreenUpdate in pc.h)
  27. AC_EGREP_HEADER(ScreenUpdate,pc.h,[
  28. AC_MSG_RESULT(yes)
  29. AC_DEFINE(SCREENUPDATE_IN_PC_H, 1,
  30. Define if <pc.h> defines ScreenUpdate.)],[
  31. AC_MSG_RESULT(no)])
  32. AC_DEFINE(USE_CONIO, 1, Define if the backend driver is conio.h)
  33. USE_CONIO=:
  34. elif test "${enable_ncurses}" = "yes"; then
  35. AC_CHECK_HEADER(ncurses.h,:,AC_MSG_ERROR([cannot find ncurses headers]))
  36. AC_CHECK_LIB(ncurses,initscr,:,AC_MSG_ERROR([cannot find ncurses library]))
  37. AC_DEFINE(USE_NCURSES, 1, Define if the backend driver is ncurses)
  38. USE_NCURSES=:
  39. elif test "${enable_slang}" != "no"; then
  40. AC_CHECK_HEADER(slang.h,:,AC_MSG_ERROR([cannot find slang headers]))
  41. AC_CHECK_LIB(slang,SLkp_init,:,AC_MSG_ERROR([cannot find slang library]))
  42. AC_DEFINE(USE_SLANG, 1, Define if the backend driver is slang)
  43. USE_SLANG=:
  44. fi
  45. AM_CONDITIONAL(USE_SLANG, ${USE_SLANG})
  46. AM_CONDITIONAL(USE_NCURSES, ${USE_NCURSES})
  47. # Optimizations
  48. CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
  49. # Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  50. CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
  51. AC_OUTPUT([
  52. Makefile
  53. libcaca/Makefile
  54. test/Makefile
  55. src/Makefile
  56. autotools/Makefile
  57. data/Makefile
  58. debian/Makefile
  59. ])