1 | # $Id: configure.ac 98 2006-09-22 16:27:37Z sam $ |
---|
2 | |
---|
3 | AC_INIT(zzuf, 0.0) |
---|
4 | |
---|
5 | AC_PREREQ(2.50) |
---|
6 | AC_CONFIG_SRCDIR(src/zzuf.c) |
---|
7 | AC_CONFIG_AUX_DIR(autotools) |
---|
8 | AC_CANONICAL_SYSTEM |
---|
9 | |
---|
10 | AM_INIT_AUTOMAKE(zzuf, 0.0) |
---|
11 | AM_CONFIG_HEADER(config.h) |
---|
12 | |
---|
13 | AM_PROG_CC_C_O |
---|
14 | AC_PROG_CPP |
---|
15 | AC_PROG_LIBTOOL |
---|
16 | |
---|
17 | dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right |
---|
18 | dnl now otherwise it might be set in an obscure if statement. Same thing for |
---|
19 | dnl PKG_PROG_PKG_CONFIG which needs to be called first. |
---|
20 | AC_EGREP_CPP(yes, foo) |
---|
21 | PKG_PROG_PKG_CONFIG() |
---|
22 | |
---|
23 | dnl Don't let pkg-config fuck our cross-compilation environment |
---|
24 | m4_pattern_allow([^PKG_CONFIG_LIBDIR$]) |
---|
25 | if test "$build" != "$host" -a "${PKG_CONFIG_LIBDIR}" = ""; then |
---|
26 | export PKG_CONFIG_LIBDIR=/dev/null |
---|
27 | fi |
---|
28 | |
---|
29 | AC_CHECK_HEADERS(inttypes.h stdint.h getopt.h) |
---|
30 | |
---|
31 | AC_CHECK_FUNCS(getopt_long, |
---|
32 | [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)], |
---|
33 | [AC_CHECK_LIB(gnugetopt, getopt_long, |
---|
34 | [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.) |
---|
35 | GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])]) |
---|
36 | AC_SUBST(GETOPT_LIBS) |
---|
37 | |
---|
38 | # Optimizations |
---|
39 | CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer" |
---|
40 | # Code qui fait des warnings == code de porc == deux baffes dans ta gueule |
---|
41 | CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare" |
---|
42 | |
---|
43 | AC_OUTPUT([ |
---|
44 | Makefile |
---|
45 | src/Makefile |
---|
46 | doc/Makefile |
---|
47 | test/Makefile |
---|
48 | ]) |
---|
49 | |
---|