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.

configure.ac 1.8 KiB

18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
18 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. AC_INIT([toilet],[0.3])
  2. AC_PREREQ([2.69])
  3. AC_CONFIG_SRCDIR(src/main.c)
  4. AC_CONFIG_AUX_DIR(.auto)
  5. AC_CANONICAL_TARGET
  6. AM_INIT_AUTOMAKE([dist-bzip2 foreign])
  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_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/ioctl.h>]], [[struct winsize ws;
  24. ioctl(1, TIOCGWINSZ, &ws);]])],[ac_cv_have_tiocgwinsz=yes],[ac_cv_have_tiocgwinsz=no])])
  25. if test "${ac_cv_have_tiocgwinsz}" = "yes"; then
  26. AC_DEFINE(HAVE_TIOCGWINSZ, 1, [Define if you have TIOCGWINSZ])
  27. fi
  28. PKG_CHECK_MODULES(CACA, caca >= 0.99.beta18,
  29. [:],
  30. [AC_MSG_RESULT(no)
  31. AC_MSG_ERROR([you need libcaca version 0.99.beta18 or later])])
  32. AC_MSG_CHECKING([for release date])
  33. tmp="${stamp%-*}"
  34. ac_build_date="${stamp##*-} ${tmp#*-} ${stamp%%-*}"
  35. AC_MSG_RESULT([$ac_build_date])
  36. AC_DEFINE_UNQUOTED(DATE, "$ac_build_date", [Define the version date])
  37. # Optimizations
  38. CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
  39. # Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  40. CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
  41. AC_CONFIG_FILES([
  42. Makefile
  43. src/Makefile
  44. tools/Makefile
  45. fonts/Makefile
  46. doc/Makefile
  47. test/Makefile
  48. ])
  49. AC_OUTPUT