source: neercs/trunk/configure.ac @ 3916

Last change on this file since 3916 was 3916, checked in by Sam Hocevar, 13 years ago

Temporary check for triangle texturing (SVN libcaca). If not available,
cube transitions will not work.

File size: 2.4 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
28dnl conditional builds
29AC_ARG_ENABLE(debug,
30  [  --enable-debug          build debug versions of neercs (default no)])
31
32CACA="no"
33PKG_CHECK_MODULES(CACA, caca >= 0.99.beta15,
34 [CACA="yes"],
35 [AC_MSG_RESULT(no)
36  AC_MSG_ERROR([you need libcaca version 0.99.beta15 or later])])
37
38AC_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 security/pam_appl.h security/pam_misc.h)
39
40AC_CHECK_LIB(pam, pam_authenticate,
41 [PAM_LIBS="${PAM_LIBS} -lpam"
42  AC_DEFINE(USE_LOCK, 1, [Locking the PTY is supported])])
43AC_SUBST(PAM_LIBS)
44
45AC_CHECK_LIB(caca, caca_clear_dirty_rect_list,
46 [AC_DEFINE(HAVE_CACA_DIRTY_RECTANGLES, 1, [libcaca has dirty rectangles])])
47
48AC_CHECK_LIB(caca, caca_fill_triangle_textured,
49 [AC_DEFINE(HAVE_CACA_TRIANGLE_TEXTURING, 1, [libcaca has trifiller])])
50
51AC_CHECK_LIB(util, forkpty, UTIL_LIBS="${UTIL_LIBS} -lutil")
52AC_SUBST(UTIL_LIBS)
53
54AC_MSG_CHECKING(for pty grab support)
55case $target in
56  i?86-*-linux-*|amd64-*-linux-*|x86_64-*-linux-*)
57    AC_DEFINE(USE_GRAB, 1, [Grabbing processes is supported])
58    grab=yes ;;
59  *)
60    grab=no ;;
61esac
62AC_MSG_RESULT($grab)
63
64if test "${enable_debug}" = "yes"; then
65  AC_DEFINE(DEBUG, 1, Define to 1 to activate debug)
66fi
67
68AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extentions])
69
70# Optimizations
71CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
72# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
73CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
74
75AC_OUTPUT([
76  Makefile
77  doc/Makefile
78  src/Makefile
79  data/Makefile
80])
81
Note: See TracBrowser for help on using the repository browser.