source: toilet/trunk/configure.ac

Last change on this file was 4874, checked in by sam, 12 months ago

Prepare Changelog for version 0.3.

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