Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

66 rader
1.8 KiB

  1. AC_INIT(toilet, 0.3)
  2. AC_PREREQ(2.50)
  3. AC_CONFIG_SRCDIR(src/main.c)
  4. AC_CONFIG_AUX_DIR(.auto)
  5. AC_CANONICAL_SYSTEM
  6. AM_INIT_AUTOMAKE(toilet, 0.3)
  7. AM_CONFIG_HEADER(config.h)
  8. AM_PROG_CC_C_O
  9. AC_PROG_CPP
  10. dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
  11. dnl now otherwise it might be set in an obscure if statement. Same thing for
  12. dnl PKG_PROG_PKG_CONFIG which needs to be called first.
  13. AC_EGREP_CPP(yes, foo)
  14. PKG_PROG_PKG_CONFIG()
  15. dnl Don't let pkg-config fuck our cross-compilation environment
  16. m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
  17. if test "$build" != "$host" -a "${PKG_CONFIG_LIBDIR}" = ""; then
  18. export PKG_CONFIG_LIBDIR=/dev/null
  19. fi
  20. AC_CHECK_HEADERS(sys/ioctl.h)
  21. AC_CACHE_CHECK([for TIOCGWINSZ],
  22. [ac_cv_have_tiocgwinsz],
  23. [AC_TRY_COMPILE(
  24. [#include <sys/ioctl.h>],
  25. [struct winsize ws;
  26. ioctl(1, TIOCGWINSZ, &ws);],
  27. ac_cv_have_tiocgwinsz=yes,
  28. ac_cv_have_tiocgwinsz=no)])
  29. if test "${ac_cv_have_tiocgwinsz}" = "yes"; then
  30. AC_DEFINE(HAVE_TIOCGWINSZ, 1, [Define if you have TIOCGWINSZ])
  31. fi
  32. PKG_CHECK_MODULES(CACA, caca >= 0.99.beta18,
  33. [:],
  34. [AC_MSG_RESULT(no)
  35. AC_MSG_ERROR([you need libcaca version 0.99.beta18 or later])])
  36. AC_MSG_CHECKING([for release date])
  37. tmp="${stamp%-*}"
  38. ac_build_date="${stamp##*-} ${tmp#*-} ${stamp%%-*}"
  39. AC_MSG_RESULT([$ac_build_date])
  40. AC_DEFINE_UNQUOTED(DATE, "$ac_build_date", [Define the version date])
  41. # Optimizations
  42. CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
  43. # Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  44. CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
  45. AC_OUTPUT([
  46. Makefile
  47. src/Makefile
  48. tools/Makefile
  49. fonts/Makefile
  50. doc/Makefile
  51. test/Makefile
  52. ])