]> git.ipfire.org Git - oddments/fireinfo.git/blame - configure.ac
virt: Fix off-by-one error when detecting hypervisor
[oddments/fireinfo.git] / configure.ac
CommitLineData
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
21AC_PREREQ([2.64])
22
23AC_INIT([fireinfo],
905b2843 24 [2.2.0],
77c01e52
MT
25 [info@ipfire.org],
26 [fireinfo],
27 [http://git.ipfire.org/?p=oddments/fireinfo.git;a=summary])
28
29AC_CONFIG_MACRO_DIR([m4])
30AC_CONFIG_HEADERS([config.h])
31AC_CONFIG_AUX_DIR([build-aux])
32
33AC_USE_SYSTEM_EXTENSIONS
34AC_SYS_LARGEFILE
35AC_PREFIX_DEFAULT([/usr])
36
37AM_INIT_AUTOMAKE([
38 foreign
39 1.11
40 -Wall
41 -Wno-portability
42 silent-rules
43 tar-pax
44 subdir-objects
45])
46AM_SILENT_RULES([yes])
47LT_PREREQ(2.2)
48LT_INIT([disable-static])
49
50# pkg-config
51PKG_PROG_PKG_CONFIG
52# This makes sure pkg.m4 is available.
53m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
54
55# C Compiler
56AC_PROG_CC
57AC_PROG_CC_C99
58AC_PROG_CC_C_O
59AC_PROG_GCC_TRADITIONAL
60AC_OPENMP
61
62CC_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])
76AC_SUBST([OUR_CFLAGS], $with_cflags)
77
78AS_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])])
82AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
83
84CC_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])
90AC_SUBST([OUR_LDFLAGS], $with_ldflags)
91
92# Python
904bd532 93AM_PATH_PYTHON([3.7])
1d70d3cb 94PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}-embed python-${PYTHON_VERSION}])
77c01e52
MT
95
96AC_CONFIG_FILES([
97 Makefile
98 src/fireinfo/__init__.py
99])
100
101AC_OUTPUT
102AC_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])