1
0
mirror of https://code.semirocket.science/wrapsix synced 2024-09-19 15:01:06 +03:00
wrapsix/configure.ac

41 lines
1.2 KiB
Plaintext
Raw Normal View History

2013-02-13 15:40:33 +02:00
# This file uses AC_CONFIG_MACRO_DIR, so we need Autoconf 2.58 or better.
AC_PREREQ([2.58])
AC_INIT([WrapSix], [0.2.0], [xhire@wrapsix.org])
AM_INIT_AUTOMAKE([-Wall -Werror])
# prevent automatic adding of "-g -O2" to CFLAGS
OLD_CFLAGS=$CFLAGS
AC_PROG_CC
CFLAGS=$OLD_CFLAGS
AC_CONFIG_FILES([
Makefile
src/Makefile
])
2013-02-13 15:40:33 +02:00
AC_CONFIG_MACRO_DIR([m4])
###
# Configuration options
###
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [enable debugging]),
[debug=$enableval],
[debug=no])
if test "x$debug" = "xyes"; then
2013-02-13 15:40:33 +02:00
AS_COMPILER_FLAGS(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 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wformat-nonliteral -Wformat-security -Wswitch-enum -Winit-self -Wmissing-include-dirs -Wundef -Waggregate-return -Wnested-externs -Wunsafe-loop-optimizations -Winvalid-pch")
AC_DEFINE([DEBUG])
else
2013-02-13 15:40:33 +02:00
AS_COMPILER_FLAGS(AM_CFLAGS, "-O2")
fi
###
# Final commands
###
AC_SUBST([AM_CFLAGS])
AC_OUTPUT