]> git.ipfire.org Git - pakfire.git/blame - configure.ac
Bump version to 0.9.26.
[pakfire.git] / configure.ac
CommitLineData
b55979b4
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([pakfire],
bea9210a 24 [0.9.26],
b55979b4
MT
25 [info@ipfire.org],
26 [pakfire],
27 [http://git.ipfire.org/?p=pakfire.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
50IT_PROG_INTLTOOL([0.40.0])
51
52GETTEXT_PACKAGE=pakfire
53AC_SUBST(GETTEXT_PACKAGE)
54
55AC_PROG_LN_S
56AC_PROG_MKDIR_P
57AC_PROG_SED
58
59# pkg-config
60PKG_PROG_PKG_CONFIG
61# This makes sure pkg.m4 is available.
62m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
63
64# C Compiler
65AC_PROG_CC
66AC_PROG_CC_C99
67AC_PROG_CC_C_O
68AC_PROG_GCC_TRADITIONAL
69AC_OPENMP
70
71CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
72 -pipe \
73 -Wall \
74 -Wextra \
75 -Wno-inline \
76 -Wundef \
77 "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
78 -Wno-unused-parameter \
79 -Wno-unused-result \
80 -fno-strict-aliasing \
81 -ffunction-sections \
82 -fdata-sections \
83 -fstack-protector-all \
84 --param=ssp-buffer-size=4])
85AC_SUBST([OUR_CFLAGS], $with_cflags)
86
87AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*],
88 [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
89 -Wp,-D_FORTIFY_SOURCE=2])],
90 [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
91AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
92
93CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
94 -Wl,--as-needed \
95 -Wl,--no-undefined \
96 -Wl,--gc-sections \
97 -Wl,-z,relro \
98 -Wl,-z,now])
99AC_SUBST([OUR_LDFLAGS], $with_ldflags)
100
101# Python
102AM_PATH_PYTHON([2.7])
103
104save_LIBS="$LIBS"
105
106# beecrypt
107LIBS=
108AC_SEARCH_LIBS([hashFunctionContextInit], [beecrypt], [], [AC_MSG_ERROR([*** beecrypt library not found])])
109BEECRYPT_LIBS="$LIBS"
110AC_SUBST(BEECRYPT_LIBS)
111
112# libdl
113LIBS=
114AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
115DL_LIBS="$LIBS"
116AC_SUBST(DL_LIBS)
117
118# libcap
119AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
120
121LIBS=
122AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
123CAP_LIBS="$LIBS"
124AC_SUBST(CAP_LIBS)
125
126# libelf
127AC_CHECK_HEADERS([libelf.h gelf.h], [], [AC_MSG_ERROR([*** libelf headers not found])])
128
129LIBS=
130AC_SEARCH_LIBS([gelf_getvernaux], [elf], [], [AC_MSG_ERROR([*** libelf library not found])])
131ELF_LIBS="$LIBS"
132AC_SUBST(ELF_LIBS)
133
134# libpopt
135AC_CHECK_HEADERS([popt.h], [], [AC_MSG_ERROR([*** libpopt headers not found])])
136
137LIBS=
138AC_SEARCH_LIBS([poptGetContext], [popt], [], [AC_MSG_ERROR([*** libpopt library not found])])
139POPT_LIBS="$LIBS"
140AC_SUBST(POPT_LIBS)
141
142# libsolv
143AC_CHECK_HEADERS([solv/solvversion.h], [], [AC_MSG_ERROR([*** libsolv headers not found])])
144
145LIBS=
146AC_SEARCH_LIBS([solver_create], [solv], [], [AC_MSG_ERROR([*** libsolv library not found])])
147SOLV_LIBS="$LIBS"
148AC_SUBST(SOLV_LIBS)
149LIBS="$save_LIBS"
150
151PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}])
152PKG_CHECK_MODULES([LZMA], [liblzma])
153
154AC_ARG_WITH([systemdsystemunitdir],
155 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
156 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
157AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
158AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
159
160AC_CONFIG_FILES([
161 Makefile
162 po/Makefile.in
b55979b4
MT
163 src/pakfire/__version__.py
164])
165
166AC_OUTPUT
167AC_MSG_RESULT([
168 $PACKAGE_NAME $VERSION
169
170 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
171 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
172 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
173 PYTHON_CFLAGS: ${PYTHON_DEVEL_CFLAGS}
174 PYTHON_LIBS: ${PYTHON_DEVEL_LIBS}
175])