source: toilet/trunk/configure.ac @ 1100

Last change on this file since 1100 was 1087, checked in by Sam Hocevar, 17 years ago
  • Import toilet source code from libcaca's repository.
File size: 1.6 KB
Line 
1# $Id: configure.ac 98 2006-09-22 16:27:37Z sam $
2
3AC_INIT(toilet, 0.0)
4
5AC_PREREQ(2.50)
6AC_CONFIG_SRCDIR(src/main.c)
7AC_CONFIG_AUX_DIR(autotools)
8AC_CANONICAL_SYSTEM
9
10AM_INIT_AUTOMAKE(toilet, 0.0)
11AM_CONFIG_HEADER(config.h)
12
13AM_PROG_CC_C_O
14AC_PROG_CPP
15
16dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
17dnl now otherwise it might be set in an obscure if statement. Same thing for
18dnl PKG_PROG_PKG_CONFIG which needs to be called first.
19AC_EGREP_CPP(yes, foo)
20PKG_PROG_PKG_CONFIG()
21
22dnl Don't let pkg-config fuck our cross-compilation environment
23m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
24if test "$build" != "$host" -a "${PKG_CONFIG_LIBDIR}" = ""; then
25  export PKG_CONFIG_LIBDIR=/dev/null
26fi
27
28AC_CHECK_HEADERS(getopt.h)
29AC_CHECK_FUNCS(getopt_long,
30 [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)],
31 [AC_CHECK_LIB(gnugetopt, getopt_long,
32   [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)
33    GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])])
34AC_SUBST(GETOPT_LIBS)
35
36CUCUL="no"
37PKG_CHECK_MODULES(cucul, cucul >= 0.99.beta5,
38 [CUCUL="yes"],
39 [AC_MSG_RESULT(no)
40  AC_MSG_ERROR([you need libcucul version 0.99.beta5 or later])])
41
42# Optimizations
43CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
44# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
45CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
46
47AC_OUTPUT([
48  Makefile
49  src/Makefile
50  data/Makefile
51])
52
Note: See TracBrowser for help on using the repository browser.