[1436] | 1 | # $Id: configure.ac 98 2006-09-22 16:27:37Z sam $ |
---|
| 2 | |
---|
| 3 | AC_INIT(neercs, 0.0) |
---|
| 4 | |
---|
| 5 | AC_PREREQ(2.50) |
---|
| 6 | AC_CONFIG_SRCDIR(src/main.c) |
---|
[2439] | 7 | AC_CONFIG_AUX_DIR(.auto) |
---|
[1436] | 8 | AC_CANONICAL_SYSTEM |
---|
| 9 | |
---|
| 10 | AM_INIT_AUTOMAKE(neercs, 0.0) |
---|
| 11 | AM_CONFIG_HEADER(config.h) |
---|
| 12 | |
---|
| 13 | AM_PROG_CC_C_O |
---|
| 14 | AC_PROG_CPP |
---|
| 15 | |
---|
| 16 | dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right |
---|
| 17 | dnl now otherwise it might be set in an obscure if statement. Same thing for |
---|
| 18 | dnl PKG_PROG_PKG_CONFIG which needs to be called first. |
---|
| 19 | AC_EGREP_CPP(yes, foo) |
---|
| 20 | PKG_PROG_PKG_CONFIG() |
---|
| 21 | |
---|
| 22 | dnl Don't let pkg-config fuck our cross-compilation environment |
---|
| 23 | m4_pattern_allow([^PKG_CONFIG_LIBDIR$]) |
---|
| 24 | if test "$build" != "$host" -a "${PKG_CONFIG_LIBDIR}" = ""; then |
---|
| 25 | export PKG_CONFIG_LIBDIR=/dev/null |
---|
| 26 | fi |
---|
| 27 | |
---|
| 28 | CACA="no" |
---|
[2143] | 29 | PKG_CHECK_MODULES(CACA, caca >= 0.99.beta13, |
---|
[1436] | 30 | [CACA="yes"], |
---|
| 31 | [AC_MSG_RESULT(no) |
---|
[2143] | 32 | AC_MSG_ERROR([you need libcaca version 0.99.beta13 or later])]) |
---|
[1436] | 33 | |
---|
[2457] | 34 | AC_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) |
---|
[1437] | 35 | |
---|
[2457] | 36 | AC_CHECK_LIB(pam, pam_authenticate, PAM_LIBS="${PAM_LIBS} -lpam") |
---|
| 37 | AC_SUBST(PAM_LIBS) |
---|
| 38 | |
---|
| 39 | |
---|
[1437] | 40 | AC_CHECK_LIB(util, forkpty, UTIL_LIBS="${UTIL_LIBS} -lutil") |
---|
| 41 | AC_SUBST(UTIL_LIBS) |
---|
| 42 | |
---|
[2492] | 43 | AC_MSG_CHECKING(for pty grab support) |
---|
| 44 | case $target in |
---|
[2506] | 45 | i?86-*-linux-*|amd64-*-linux-*|x86_64-*-linux-*) |
---|
[2492] | 46 | grab=yes ;; |
---|
| 47 | *) |
---|
| 48 | grab=no;; |
---|
[2457] | 49 | esac |
---|
[2492] | 50 | AC_MSG_RESULT($grab) |
---|
[2431] | 51 | if test "$grab" = "yes"; then |
---|
| 52 | AC_DEFINE(USE_GRAB, 1, [Grabbing processes is supported]) |
---|
| 53 | fi |
---|
| 54 | |
---|
[2494] | 55 | |
---|
| 56 | AC_DEFINE(_GNU_SOURCE, 1, [Use GNU extentions]) |
---|
| 57 | |
---|
[1436] | 58 | # Optimizations |
---|
| 59 | CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer" |
---|
| 60 | # Code qui fait des warnings == code de porc == deux baffes dans ta gueule |
---|
| 61 | CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare" |
---|
| 62 | |
---|
| 63 | AC_OUTPUT([ |
---|
| 64 | Makefile |
---|
[2490] | 65 | doc/Makefile |
---|
[1436] | 66 | src/Makefile |
---|
| 67 | data/Makefile |
---|
| 68 | ]) |
---|
| 69 | |
---|