-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
121 lines (109 loc) · 2.93 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_CONFIG_HEADERS([config.h])
AC_INIT(gvalgrind, 0.0.0.2, [email protected], gvalgrind, http://2lgc.org)
AC_CONFIG_SRCDIR([src/main.c])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
GTK_REQUIRED_VERSION=3.0.3
GLIB_REQUIRED_VERSION=2.28.3
LIBXML_REQUIRED_VERSION=2.7.0
AC_SUBST(XML_CPPFLAGS)
AC_SUBST(XML_LIBS)
AM_PATH_GTK_3_0($GTK_REQUIRED_VERSION, :, AC_MSG_ERROR(Test for GTK+ failed.))
AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :, AC_MSG_ERROR(Test for GLIB failed.))
AM_PATH_XML2($LIBXML_REQUIRED_VERSION, :, AC_MSG_ERROR(Test for libXML failed.))
AM_GNU_GETTEXT([external])
ALL_LINGUAS="fr"
for NEW_FLAG in \
-fmax-errors=10 \
-fstack-protector-all \
-fstrict-overflow \
-Wall \
-Wcast-align \
-Wcast-qual \
-Wconditionally-supported \
-Wconversion \
-Wextra \
-Wfloat-equal \
-Wformat=2 \
-Wformat-nonliteral \
-Wformat-security \
-Wformat-extra-args\
-Wformat-zero-length \
-Wformat-y2k \
-Wformat-signedness \
-Winit-self \
-Winline \
-Wlogical-op \
-Wmissing-format-attribute \
-Wno-comment \
-Wno-error=deprecated-declarations \
-Wno-overloaded-virtual \
-Wno-unused-parameter \
-Wold-style-cast \
-Wpacked \
-Wpedantic \
-Wpointer-arith \
-Wredundant-decls \
-Wshadow \
-Wsign-conversion \
-Wstrict-aliasing=1 \
-fstrict-aliasing \
-Wstrict-overflow=5 \
-Wswitch-default \
-Wswitch-enum \
-Wtrampolines \
-Wundef \
-Wuninitialized \
-Wunused-parameter \
-Wuseless-cast \
-Wsuggest-attribute=pure \
-Wsuggest-attribute=const \
-Wsuggest-attribute=noreturn \
-Wsuggest-attribute=format \
-Wmissing-format-attribute \
-Wsuggest-final-types \
-Wsuggest-final-methods \
-Wwrite-strings \
-Wzero-as-null-pointer-constant \
-Wctor-dtor-privacy \
-Wc++11-compat \
-Weffc++ \
-Wstrict-null-sentinel \
-Woverloaded-virtual \
-Weverything \
-Winconsistent-missing-override
do
AC_MSG_CHECKING([if $CC accepts $NEW_FLAG])
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $NEW_FLAG -Werror"
#AC_COMPILE_IFELSE utilise CFLAGS pas AM_CFLAGS
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
[void foo(void); void foo(void) { }])], [
AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
])
CFLAGS="$OLD_CFLAGS"
done
AC_SUBST(CFLAGS)
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([libintl.h locale.h stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([strstr strtol])
AC_CONFIG_FILES([Makefile po/Makefile.in
files/Makefile
src/Makefile])
AC_OUTPUT