25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

configure.ac 1.8 KiB

18 yıl önce
18 yıl önce
18 yıl önce
18 yıl önce
18 yıl önce
18 yıl önce
18 yıl önce
18 yıl önce
18 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. AC_INIT(toilet, 0.2)
  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.2)
  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. CUCUL="no"
  33. PKG_CHECK_MODULES(CACA, caca >= 0.99.beta18,
  34. [CUCUL="yes"],
  35. [AC_MSG_RESULT(no)
  36. AC_MSG_ERROR([you need libcaca version 0.99.beta18 or later])])
  37. AC_MSG_CHECKING([for release date])
  38. tmp="${stamp%-*}"
  39. ac_build_date="${stamp##*-} ${tmp#*-} ${stamp%%-*}"
  40. AC_MSG_RESULT([$ac_build_date])
  41. AC_DEFINE_UNQUOTED(DATE, "$ac_build_date", [Define the version date])
  42. # Optimizations
  43. CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
  44. # Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  45. CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
  46. AC_OUTPUT([
  47. Makefile
  48. src/Makefile
  49. tools/Makefile
  50. fonts/Makefile
  51. doc/Makefile
  52. test/Makefile
  53. ])