toilet/configure.ac

63 lines
1.8 KiB
Text
Raw Normal View History

2006-09-22 19:03:41 +02:00
2016-06-01 21:46:53 +02:00
AC_INIT([toilet],[0.3])
2006-09-22 19:03:41 +02:00
2016-06-01 21:46:53 +02:00
AC_PREREQ([2.69])
2006-09-22 19:03:41 +02:00
AC_CONFIG_SRCDIR(src/main.c)
AC_CONFIG_AUX_DIR(.auto)
2016-06-01 21:46:53 +02:00
AC_CANONICAL_TARGET
2006-09-22 19:03:41 +02:00
2016-06-01 21:46:53 +02:00
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
2006-09-22 19:03:41 +02:00
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
AC_CHECK_HEADERS(sys/ioctl.h)
AC_CACHE_CHECK([for TIOCGWINSZ],
[ac_cv_have_tiocgwinsz],
2016-06-01 21:46:53 +02:00
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/ioctl.h>]], [[struct winsize ws;
ioctl(1, TIOCGWINSZ, &ws);]])],[ac_cv_have_tiocgwinsz=yes],[ac_cv_have_tiocgwinsz=no])])
if test "${ac_cv_have_tiocgwinsz}" = "yes"; then
AC_DEFINE(HAVE_TIOCGWINSZ, 1, [Define if you have TIOCGWINSZ])
fi
PKG_CHECK_MODULES(CACA, caca >= 0.99.beta18,
[:],
2006-09-22 19:03:41 +02:00
[AC_MSG_RESULT(no)
AC_MSG_ERROR([you need libcaca version 0.99.beta18 or later])])
2006-09-22 19:03:41 +02:00
2006-11-10 15:19:13 +01:00
AC_MSG_CHECKING([for release date])
2010-02-09 01:24:47 +01:00
tmp="${stamp%-*}"
ac_build_date="${stamp##*-} ${tmp#*-} ${stamp%%-*}"
2006-11-10 15:19:13 +01:00
AC_MSG_RESULT([$ac_build_date])
AC_DEFINE_UNQUOTED(DATE, "$ac_build_date", [Define the version date])
2006-09-22 19:03:41 +02:00
# 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"
2016-06-01 21:46:53 +02:00
AC_CONFIG_FILES([
2006-09-22 19:03:41 +02:00
Makefile
src/Makefile
tools/Makefile
fonts/Makefile
2006-11-10 09:54:04 +01:00
doc/Makefile
2009-12-16 16:54:17 +01:00
test/Makefile
2006-09-22 19:03:41 +02:00
])
2016-06-01 21:46:53 +02:00
AC_OUTPUT
2006-09-22 19:03:41 +02:00