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 2.3 KiB

vor 18 Jahren
vor 18 Jahren
vor 18 Jahren
vor 18 Jahren
vor 18 Jahren
vor 18 Jahren
vor 18 Jahren
vor 18 Jahren
vor 18 Jahren
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. AC_INIT(toilet, 0.1)
  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.1)
  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(getopt.h sys/ioctl.h zlib.h)
  21. ac_cv_have_getopt_long="no"
  22. AC_CHECK_FUNCS(getopt_long,
  23. [ac_cv_have_getopt_long="yes"],
  24. [AC_CHECK_LIB(gnugetopt, getopt_long,
  25. [ac_cv_have_getopt_long="yes"
  26. GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])])
  27. if test "$ac_cv_have_getopt_long" != "no"; then
  28. AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the ‘getopt_long’ function.)
  29. fi
  30. AM_CONDITIONAL(NEED_GETOPT_LONG, test "$ac_cv_have_getopt_long" = "no")
  31. AC_SUBST(GETOPT_LIBS)
  32. AC_CHECK_LIB(z, gzopen,
  33. [ZLIB_LIBS="${ZLIB_LIBS} -lz"])
  34. AC_SUBST(ZLIB_LIBS)
  35. AC_CACHE_CHECK([for TIOCGWINSZ],
  36. [ac_cv_have_tiocgwinsz],
  37. [AC_TRY_COMPILE(
  38. [#include <sys/ioctl.h>],
  39. [struct winsize ws;
  40. ioctl(1, TIOCGWINSZ, &ws);],
  41. ac_cv_have_tiocgwinsz=yes,
  42. ac_cv_have_tiocgwinsz=no)])
  43. if test "${ac_cv_have_tiocgwinsz}" = "yes"; then
  44. AC_DEFINE(HAVE_TIOCGWINSZ, 1, [Define if you have TIOCGWINSZ])
  45. fi
  46. CUCUL="no"
  47. PKG_CHECK_MODULES(CACA, caca >= 0.99.beta17,
  48. [CUCUL="yes"],
  49. [AC_MSG_RESULT(no)
  50. AC_MSG_ERROR([you need libcaca version 0.99.beta17 or later])])
  51. AC_MSG_CHECKING([for release date])
  52. tmp="${stamp%-*}"
  53. ac_build_date="${stamp##*-} ${tmp#*-} ${stamp%%-*}"
  54. AC_MSG_RESULT([$ac_build_date])
  55. AC_DEFINE_UNQUOTED(DATE, "$ac_build_date", [Define the version date])
  56. # Optimizations
  57. CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
  58. # Code qui fait des warnings == code de porc == deux baffes dans ta gueule
  59. CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
  60. AC_OUTPUT([
  61. Makefile
  62. src/Makefile
  63. tools/Makefile
  64. fonts/Makefile
  65. doc/Makefile
  66. test/Makefile
  67. ])