source: neercs/trunk/configure.ac @ 2455

Last change on this file since 2455 was 2455, checked in by sam, 6 years ago
  • Do not build grab.c conditionally; instead, make grab_process() and create_pty_grab() return an error if the feature isn't available.
File size: 1.7 KB
Line 
1# $Id: configure.ac 98 2006-09-22 16:27:37Z sam $
2
3AC_INIT(neercs, 0.0)
4
5AC_PREREQ(2.50)
6AC_CONFIG_SRCDIR(src/main.c)
7AC_CONFIG_AUX_DIR(.auto)
8AC_CANONICAL_SYSTEM
9
10AM_INIT_AUTOMAKE(neercs, 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
28CACA="no"
29PKG_CHECK_MODULES(CACA, caca >= 0.99.beta13,
30 [CACA="yes"],
31 [AC_MSG_RESULT(no)
32  AC_MSG_ERROR([you need libcaca version 0.99.beta13 or later])])
33
34AC_CHECK_HEADERS(stdio.h pty.h sys/ioctl.h sys/ptrace.h sys/stat.h sys/syscall.h sys/user.h sys/wait.h linux/kdev_t.h linux/major.h)
35
36AC_CHECK_LIB(util, forkpty, UTIL_LIBS="${UTIL_LIBS} -lutil")
37AC_SUBST(UTIL_LIBS)
38
39case $target_cpu in
40  i?86)
41    case $target_os in
42      linux*) grab=yes;;
43      *) grab=no;;
44    esac;;
45  *)    grab=no;;
46esac
47
48if test "$grab" = "yes"; then
49  AC_DEFINE(USE_GRAB, 1, [Grabbing processes is supported])
50fi
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  data/Makefile
61])
62
Note: See TracBrowser for help on using the repository browser.