]>
Commit | Line | Data |
---|---|---|
77c01e52 MT |
1 | ############################################################################### |
2 | # # | |
3 | # Pakfire - The IPFire package management system # | |
4 | # Copyright (C) 2013 Pakfire development team # | |
5 | # # | |
6 | # This program is free software: you can redistribute it and/or modify # | |
7 | # it under the terms of the GNU General Public License as published by # | |
8 | # the Free Software Foundation, either version 3 of the License, or # | |
9 | # (at your option) any later version. # | |
10 | # # | |
11 | # This program is distributed in the hope that it will be useful, # | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
14 | # GNU General Public License for more details. # | |
15 | # # | |
16 | # You should have received a copy of the GNU General Public License # | |
17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. # | |
18 | # # | |
19 | ############################################################################### | |
20 | ||
21 | AC_PREREQ([2.64]) | |
22 | ||
23 | AC_INIT([fireinfo], | |
e855f53f | 24 | [2.1.9], |
77c01e52 MT |
25 | [info@ipfire.org], |
26 | [fireinfo], | |
27 | [http://git.ipfire.org/?p=oddments/fireinfo.git;a=summary]) | |
28 | ||
29 | AC_CONFIG_MACRO_DIR([m4]) | |
30 | AC_CONFIG_HEADERS([config.h]) | |
31 | AC_CONFIG_AUX_DIR([build-aux]) | |
32 | ||
33 | AC_USE_SYSTEM_EXTENSIONS | |
34 | AC_SYS_LARGEFILE | |
35 | AC_PREFIX_DEFAULT([/usr]) | |
36 | ||
37 | AM_INIT_AUTOMAKE([ | |
38 | foreign | |
39 | 1.11 | |
40 | -Wall | |
41 | -Wno-portability | |
42 | silent-rules | |
43 | tar-pax | |
44 | subdir-objects | |
45 | ]) | |
46 | AM_SILENT_RULES([yes]) | |
47 | LT_PREREQ(2.2) | |
48 | LT_INIT([disable-static]) | |
49 | ||
50 | # pkg-config | |
51 | PKG_PROG_PKG_CONFIG | |
52 | # This makes sure pkg.m4 is available. | |
53 | m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config]) | |
54 | ||
55 | # C Compiler | |
56 | AC_PROG_CC | |
57 | AC_PROG_CC_C99 | |
58 | AC_PROG_CC_C_O | |
59 | AC_PROG_GCC_TRADITIONAL | |
60 | AC_OPENMP | |
61 | ||
62 | CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ | |
63 | -pipe \ | |
64 | -Wall \ | |
65 | -Wextra \ | |
66 | -Wno-inline \ | |
67 | -Wundef \ | |
68 | "-Wformat=2 -Wformat-security -Wformat-nonliteral" \ | |
69 | -Wno-unused-parameter \ | |
70 | -Wno-unused-result \ | |
71 | -fno-strict-aliasing \ | |
72 | -ffunction-sections \ | |
73 | -fdata-sections \ | |
74 | -fstack-protector-all \ | |
75 | --param=ssp-buffer-size=4]) | |
76 | AC_SUBST([OUR_CFLAGS], $with_cflags) | |
77 | ||
78 | AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*], | |
79 | [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\ | |
80 | -Wp,-D_FORTIFY_SOURCE=2])], | |
81 | [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])]) | |
82 | AC_SUBST([OUR_CPPFLAGS], $with_cppflags) | |
83 | ||
84 | CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ | |
85 | -Wl,--as-needed \ | |
86 | -Wl,--no-undefined \ | |
87 | -Wl,--gc-sections \ | |
88 | -Wl,-z,relro \ | |
89 | -Wl,-z,now]) | |
90 | AC_SUBST([OUR_LDFLAGS], $with_ldflags) | |
91 | ||
92 | # Python | |
93 | AM_PATH_PYTHON([2.7]) | |
94 | PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}]) | |
95 | ||
96 | AC_CONFIG_FILES([ | |
97 | Makefile | |
98 | src/fireinfo/__init__.py | |
99 | ]) | |
100 | ||
101 | AC_OUTPUT | |
102 | AC_MSG_RESULT([ | |
103 | $PACKAGE_NAME $VERSION | |
104 | ||
105 | CFLAGS: ${OUR_CFLAGS} ${CFLAGS} | |
106 | CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} | |
107 | LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS} | |
108 | PYTHON_CFLAGS: ${PYTHON_DEVEL_CFLAGS} | |
109 | PYTHON_LIBS: ${PYTHON_DEVEL_LIBS} | |
110 | ]) |