forked from agordon/libgtextutils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
89 lines (76 loc) · 2.41 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright (C) 2008-2013 Assaf Gordon <assafgordon@gmail.com>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AC_INIT([Gordon-Text_utils-Library],
[0.7],
[A. Gordon assafgordon@gmail.com],
[libgtextutils])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([m4])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([dist-bzip2])
# dynamic library version
LIBGTU_CURRENT=0
LIBGTU_REVISION=0
LIBGTU_AGE=0
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
dnl --enable-wall
EXTRA_CHECKS="-Wall -Wextra -Wformat-nonliteral -Wformat-security -Wswitch-default -Wswitch-enum -Wunused-parameter -Wfloat-equal -Werror"
AC_ARG_ENABLE(wall,
[ --enable-wall Enable many common GCC warnings (-Wall,-Wextra, -Werror etc., default enabled)],
[case "${enableval}" in
yes) wall=true ;;
no) wall=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-wall) ;;
esac],[wall=true])
if test "$wall" = "true"
then
CFLAGS="${CFLAGS} ${EXTRA_CHECKS}"
CXXFLAGS="${CXXFLAGS} ${EXTRA_CHECKS}"
fi
dnl --enable-debug
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug mode (default enabled)],
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[debug=true])
if test "$debug" = "true"
then
CFLAGS="${CFLAGS} -DDEBUG -g -O1"
CXXFLAGS="${CFLAGS} -DDEBUG -g -O1"
else
CFLAGS="${CFLAGS} -O3"
CXXFLAGS="${CFLAGS} -O3"
fi
dnl --enable-tuple-parser-check
AC_ARG_ENABLE(tuple-parser-check,
[ --enable-tuple-parser-check Enable Tuple Parser Check (default disabled, requires g++ > 4.3.2)],
[case "${enableval}" in
yes) tuple_parser_check=true ;;
no) tuple_parser_check=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-tuple-parser-check) ;;
esac],[tuple_parser_check=false])
AM_CONDITIONAL([TUPLE_PARSER_CHECK], [test x$tuple_parser_check = xtrue])
AC_SUBST(LIBGTU_CURRENT)
AC_SUBST(LIBGTU_REVISION)
AC_SUBST(LIBGTU_AGE)
AC_CONFIG_FILES([
Makefile
doc/Makefile
m4/Makefile
src/Makefile
src/gtextutils/Makefile
gtextutils.pc
tests/Makefile
])
AC_OUTPUT