source: zzuf/trunk/configure.ac @ 1543

Last change on this file since 1543 was 1543, checked in by Sam Hocevar, 14 years ago
  • The whole crap now builds on OS X. Now if it only agreed to run, too...
File size: 1.7 KB
Line 
1# $Id: configure.ac 98 2006-09-22 16:27:37Z sam $
2
3AC_INIT(zzuf, 0.1)
4
5AC_PREREQ(2.50)
6AC_CONFIG_SRCDIR(src/zzuf.c)
7AC_CONFIG_AUX_DIR(autotools)
8AC_CANONICAL_SYSTEM
9
10AM_INIT_AUTOMAKE(zzuf, 0.1)
11AM_CONFIG_HEADER(config.h)
12
13AM_PROG_CC_C_O
14AC_PROG_CPP
15AC_PROG_LIBTOOL
16
17dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
18dnl now otherwise it might be set in an obscure if statement. Same thing for
19dnl PKG_PROG_PKG_CONFIG which needs to be called first.
20AC_EGREP_CPP(yes, foo)
21PKG_PROG_PKG_CONFIG()
22
23dnl Don't let pkg-config fuck our cross-compilation environment
24m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
25if test "$build" != "$host" -a "${PKG_CONFIG_LIBDIR}" = ""; then
26  export PKG_CONFIG_LIBDIR=/dev/null
27fi
28
29AC_CHECK_HEADERS(inttypes.h stdint.h getopt.h)
30AC_CHECK_FUNCS(open64 lseek64 fopen64 getline getdelim __getdelim)
31AC_CHECK_TYPES(sighandler_t, [], [],
32  [#define _GNU_SOURCE
33   #include <signal.h>])
34AC_CHECK_TYPES(sig_t, [], [],
35  [#include <signal.h>])
36
37AC_CHECK_FUNCS(getopt_long,
38 [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)],
39 [AC_CHECK_LIB(gnugetopt, getopt_long,
40   [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)
41    GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])])
42AC_SUBST(GETOPT_LIBS)
43
44# Optimizations
45CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
46# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
47CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
48
49AC_OUTPUT([
50  Makefile
51  src/Makefile
52  doc/Makefile
53  test/Makefile
54])
55
Note: See TracBrowser for help on using the repository browser.