Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

configure.ac 3.2 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. # $Id$
  2. AC_INIT(src/caca.c)
  3. AC_PREREQ(2.50)
  4. AC_CONFIG_AUX_DIR(autotools)
  5. AC_CANONICAL_SYSTEM
  6. AM_INIT_AUTOMAKE(libcaca, 0.1)
  7. AM_CONFIG_HEADER(config.h)
  8. AM_PROG_CC_C_O
  9. AC_PROG_CPP
  10. AC_PROG_RANLIB
  11. dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
  12. dnl now otherwise it might be set in an obscure if statement.
  13. AC_EGREP_CPP(foo,foo)
  14. AC_ARG_ENABLE(slang,
  15. [ --enable-slang slang graphics support (default enabled)])
  16. AC_ARG_ENABLE(ncurses,
  17. [ --enable-ncurses ncurses graphics support (default disabled)])
  18. AC_ARG_ENABLE(conio,
  19. [ --enable-conio DOS conio.h graphics support (default disabled)])
  20. AC_CHECK_HEADERS(inttypes.h)
  21. AC_CHECK_FUNCS(vsnprintf getenv putenv)
  22. USE_SLANG=false
  23. USE_NCURSES=false
  24. USE_CONIO=false
  25. if test "${enable_conio}" = "yes"; then
  26. AC_CHECK_HEADER(conio.h,:,AC_MSG_ERROR([cannot find conio.h header]))
  27. AC_MSG_CHECKING(for ScreenUpdate in pc.h)
  28. AC_EGREP_HEADER(ScreenUpdate,pc.h,[
  29. AC_MSG_RESULT(yes)
  30. AC_DEFINE(SCREENUPDATE_IN_PC_H, 1,
  31. Define if <pc.h> defines ScreenUpdate.)],[
  32. AC_MSG_RESULT(no)])
  33. AC_DEFINE(USE_CONIO, 1, Define if the backend driver is conio.h)
  34. USE_CONIO=:
  35. elif test "${enable_ncurses}" = "yes"; then
  36. AC_CHECK_HEADER(ncurses.h,:,AC_MSG_ERROR([cannot find ncurses headers]))
  37. AC_CHECK_LIB(ncurses,initscr,:,AC_MSG_ERROR([cannot find ncurses library]))
  38. AC_DEFINE(USE_NCURSES, 1, Define if the backend driver is ncurses)
  39. USE_NCURSES=:
  40. elif test "${enable_slang}" != "no"; then
  41. AC_CHECK_HEADER(slang.h,:,AC_MSG_ERROR([cannot find slang headers]))
  42. AC_CHECK_LIB(slang,SLkp_init,:,AC_MSG_ERROR([cannot find slang library]))
  43. AC_DEFINE(USE_SLANG, 1, Define if the backend driver is slang)
  44. USE_SLANG=:
  45. else
  46. AC_MSG_ERROR([could not find any terminal graphics interface])
  47. fi
  48. AM_CONDITIONAL(USE_SLANG, ${USE_SLANG})
  49. AM_CONDITIONAL(USE_NCURSES, ${USE_NCURSES})
  50. # Optimizations
  51. CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
  52. # Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  53. CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
  54. # Build the PIC library?
  55. case "${target_os}" in
  56. *mingw32* | *cygwin* | *djgpp*)
  57. NEED_PIC=false
  58. ;;
  59. *)
  60. NEED_PIC=:
  61. ;;
  62. esac
  63. AM_CONDITIONAL(NEED_PIC, ${NEED_PIC})
  64. # Build cacaview?
  65. save_CPPFLAGS="${CPPFLAGS}"
  66. AC_PATH_PROG(IMLIB2_CONFIG, imlib2-config, no)
  67. if test "${IMLIB2_CONFIG}" != "no"; then
  68. CPPFLAGS="${CPPFLAGS} `imlib2-config --cflags` -DX_DISPLAY_MISSING=1"
  69. fi
  70. AC_CHECK_HEADER(Imlib2.h, USE_IMLIB2=:, USE_IMLIB2=false)
  71. CPPFLAGS="${save_CPPFLAGS}"
  72. AM_CONDITIONAL(USE_IMLIB2, ${USE_IMLIB2})
  73. # Build documentation?
  74. AC_PATH_PROG(DOXYGEN, doxygen, no)
  75. AM_CONDITIONAL(DOXYGEN, test "${DOXYGEN}" != "no")
  76. AC_PATH_PROG(LATEX, latex, no)
  77. AC_MSG_CHECKING(for a4wide.sty)
  78. if test -f /usr/share/texmf/tex/latex/misc/a4wide.sty; then
  79. AC_MSG_RESULT(yes)
  80. else
  81. LATEX=no
  82. AC_MSG_RESULT(no)
  83. fi
  84. AM_CONDITIONAL(LATEX, test "${LATEX}" != "no")
  85. AC_OUTPUT([
  86. Makefile
  87. src/Makefile
  88. examples/Makefile
  89. doc/Makefile
  90. autotools/Makefile
  91. debian/Makefile
  92. caca-config
  93. ],[
  94. chmod 0755 caca-config
  95. ])