1 ###############################################################################
3 # Pakfire - The IPFire package management system #
4 # Copyright (C) 2013 Pakfire development team #
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. #
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. #
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/>. #
19 ###############################################################################
27 [http://git.ipfire.org/?p=pakfire.git;a=summary])
29 AC_CONFIG_MACRO_DIR([m4])
30 AC_CONFIG_HEADERS([config.h])
31 AC_CONFIG_AUX_DIR([build-aux])
33 AC_USE_SYSTEM_EXTENSIONS
35 AC_PREFIX_DEFAULT([/usr])
46 AM_SILENT_RULES([yes])
48 LT_INIT([disable-static])
50 IT_PROG_INTLTOOL([0.40.0])
52 XGETTEXT="${XGETTEXT} --keyword=_:1,2 --keyword=N_:1,2 --no-location"
54 GETTEXT_PACKAGE=pakfire
55 AC_SUBST(GETTEXT_PACKAGE)
61 AC_ARG_ENABLE([debug],
62 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
63 [], [enable_debug=no])
64 AS_IF([test "x$enable_debug" = "xyes"], [
65 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
70 # This makes sure pkg.m4 is available.
71 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
77 AC_PROG_GCC_TRADITIONAL
80 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
86 "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
87 -Wno-unused-parameter \
89 -fno-strict-aliasing \
92 -fstack-protector-all \
93 --param=ssp-buffer-size=4])
94 AC_SUBST([OUR_CFLAGS], $with_cflags)
96 AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*],
97 [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
98 -Wp,-D_FORTIFY_SOURCE=2])],
99 [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
100 AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
102 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
108 AC_SUBST([OUR_LDFLAGS], $with_ldflags)
112 AC_PATH_PROG([BISON],[bison])
118 AM_PATH_PYTHON([3.6])
121 AC_CHECK_LIB([m], [round])
158 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
164 PKG_CHECK_MODULES([ARCHIVE], [libarchive >= 3.3.3])
165 PKG_CHECK_MODULES([CURL], [libcurl])
166 PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}])
167 PKG_CHECK_MODULES([JSON_C], [json-c])
168 PKG_CHECK_MODULES([LZMA], [liblzma])
169 PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.1.1])
170 PKG_CHECK_MODULES([PCRE2], [libpcre2-8])
171 PKG_CHECK_MODULES([SOLV], [libsolv])
172 PKG_CHECK_MODULES([SQLITE3], [sqlite3])
173 PKG_CHECK_MODULES([UUID], [uuid])
175 AM_PATH_GPGME([1.6.0], [], [AC_MSG_ERROR([*** GPGME not found])])
177 AC_ARG_WITH([systemdsystemunitdir],
178 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
179 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
180 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
181 AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
183 AC_DEFINE_UNQUOTED([PAKFIRE_PRIVATE_DIR], ["/var/lib/${PACKAGE_NAME}"],
184 [The path where Pakfire stores its private data])
189 src/pakfire/__version__.py
194 $PACKAGE_NAME $VERSION
196 Debug: ${enable_debug}
198 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
199 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
200 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
201 PYTHON_CFLAGS: ${PYTHON_DEVEL_CFLAGS}
202 PYTHON_LIBS: ${PYTHON_DEVEL_LIBS}