source: zzuf/trunk/configure.ac @ 1595

Last change on this file since 1595 was 1595, checked in by Sam Hocevar, 14 years ago
  • Always define getc(), but undefine the getc macro beforehands just in case.
  • Implemented _IO_getc().
File size: 1.3 KB
Line 
1# $Id: configure.ac 98 2006-09-22 16:27:37Z sam $
2
3AC_INIT(zzuf, 0.2)
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.2)
11AM_CONFIG_HEADER(config.h)
12
13AM_PROG_CC_C_O
14AC_PROG_CPP
15AC_PROG_LIBTOOL
16
17AC_CHECK_HEADERS(inttypes.h stdint.h getopt.h)
18AC_CHECK_FUNCS(open64 lseek64 mmap64 fopen64 fseeko _IO_getc getline getdelim __getdelim fgetln)
19AC_CHECK_TYPES(sighandler_t, [], [],
20  [#define _GNU_SOURCE
21   #include <signal.h>])
22AC_CHECK_TYPES(sig_t, [], [],
23  [#include <signal.h>])
24
25AC_CHECK_FUNCS(getopt_long,
26 [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)],
27 [AC_CHECK_LIB(gnugetopt, getopt_long,
28   [AC_DEFINE(HAVE_GETOPT_LONG, 1, Define to 1 if you have the `getopt_long' function.)
29    GETOPT_LIBS="${GETOPT_LIBS} -lgnugetopt"])])
30AC_SUBST(GETOPT_LIBS)
31
32AC_CHECK_LIB(dl, dlopen, [DL_LIBS="-ldl"])
33AC_SUBST(DL_LIBS)
34
35# Optimizations
36CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
37# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
38CFLAGS="${CFLAGS} -Wall -W -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
39
40AC_OUTPUT([
41  Makefile
42  src/Makefile
43  doc/Makefile
44  test/Makefile
45])
46
Note: See TracBrowser for help on using the repository browser.