2009-12-01 19:44:26 +02:00
|
|
|
AC_INIT([WrapSix], [0.1.99.0], [xhire@mujmalysvet.cz])
|
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror])
|
2012-07-04 12:37:42 +03:00
|
|
|
|
|
|
|
# prevent automatic adding of "-g -O2" to CFLAGS
|
|
|
|
OLD_CFLAGS=$CFLAGS
|
2009-12-01 19:44:26 +02:00
|
|
|
AC_PROG_CC
|
2012-07-04 12:37:42 +03:00
|
|
|
CFLAGS=$OLD_CFLAGS
|
|
|
|
|
2009-12-04 00:05:16 +02:00
|
|
|
AC_CONFIG_FILES([
|
2009-12-01 19:44:26 +02:00
|
|
|
Makefile
|
|
|
|
src/Makefile
|
|
|
|
])
|
2009-12-04 00:05:16 +02:00
|
|
|
|
2012-07-04 12:37:42 +03:00
|
|
|
###
|
|
|
|
# Configuration options
|
|
|
|
###
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([debug],
|
|
|
|
AS_HELP_STRING([--enable-debug], [enable debugging]),
|
|
|
|
[debug=$enableval],
|
|
|
|
[debug=no])
|
|
|
|
|
|
|
|
if test "x$debug" = "xyes"; then
|
|
|
|
AM_CFLAGS="${AM_CFLAGS} -g -ggdb -O0 -pipe -pedantic -Wshadow -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wold-style-definition -Wdeclaration-after-statement -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wformat-nonliteral -Wformat-security -Wswitch-enum -Wswitch-default -Winit-self -Wmissing-include-dirs -Wundef -Waggregate-return -Wnested-externs -Wunsafe-loop-optimizations"
|
|
|
|
AC_DEFINE([DEBUG])
|
|
|
|
else
|
|
|
|
AM_CFLAGS="${AM_CFLAGS} -O2"
|
|
|
|
fi
|
|
|
|
|
|
|
|
###
|
|
|
|
# Final commands
|
|
|
|
###
|
|
|
|
|
|
|
|
AC_SUBST([AM_CFLAGS])
|
2009-12-04 00:05:16 +02:00
|
|
|
|
|
|
|
AC_OUTPUT
|