toilet/configure.ac
2006-09-22 17:03:41 +00:00

44 lines
1.2 KiB
Text

# $Id: configure.ac 98 2006-09-22 16:27:37Z sam $
AC_INIT(toilet, 0.0)
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR(src/main.c)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE(toilet, 0.0)
AM_CONFIG_HEADER(config.h)
AM_PROG_CC_C_O
AC_PROG_CPP
dnl AC_PROG_EGREP only exists in autoconf 2.54+, so we use AC_EGREP_CPP right
dnl now otherwise it might be set in an obscure if statement. Same thing for
dnl PKG_PROG_PKG_CONFIG which needs to be called first.
AC_EGREP_CPP(yes, foo)
PKG_PROG_PKG_CONFIG()
dnl Don't let pkg-config fuck our cross-compilation environment
m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
if test "$build" != "$host" -a "${PKG_CONFIG_LIBDIR}" = ""; then
export PKG_CONFIG_LIBDIR=/dev/null
fi
CUCUL="no"
PKG_CHECK_MODULES(cucul, cucul,
[CUCUL="yes"],
[AC_MSG_RESULT(no)
AC_MSG_ERROR([you need libcucul version 0.99 or later])])
# Optimizations
CFLAGS="${CFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare"
AC_OUTPUT([
Makefile
src/Makefile
data/Makefile
])