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 GETTEXT_PACKAGE=pakfire
53 AC_SUBST(GETTEXT_PACKAGE)
61 # This makes sure pkg.m4 is available.
62 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
68 AC_PROG_GCC_TRADITIONAL
71 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
77 "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
78 -Wno-unused-parameter \
80 -fno-strict-aliasing \
83 -fstack-protector-all \
84 --param=ssp-buffer-size=4])
85 AC_SUBST([OUR_CFLAGS], $with_cflags)
87 AS_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])])
91 AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
93 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
99 AC_SUBST([OUR_LDFLAGS], $with_ldflags)
102 AM_PATH_PYTHON([2.7])
108 AC_SEARCH_LIBS([hashFunctionContextInit], [beecrypt], [], [AC_MSG_ERROR([*** beecrypt library not found])])
109 BEECRYPT_LIBS="$LIBS"
110 AC_SUBST(BEECRYPT_LIBS)
114 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
119 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
122 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
127 AC_CHECK_HEADERS([libelf.h gelf.h], [], [AC_MSG_ERROR([*** libelf headers not found])])
130 AC_SEARCH_LIBS([gelf_getvernaux], [elf], [], [AC_MSG_ERROR([*** libelf library not found])])
135 AC_CHECK_HEADERS([popt.h], [], [AC_MSG_ERROR([*** libpopt headers not found])])
138 AC_SEARCH_LIBS([poptGetContext], [popt], [], [AC_MSG_ERROR([*** libpopt library not found])])
143 AC_CHECK_HEADERS([solv/solvversion.h], [], [AC_MSG_ERROR([*** libsolv headers not found])])
146 AC_SEARCH_LIBS([solver_create], [solv], [], [AC_MSG_ERROR([*** libsolv library not found])])
151 PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}])
152 PKG_CHECK_MODULES([LZMA], [liblzma])
154 AC_ARG_WITH([systemdsystemunitdir],
155 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
156 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
157 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
158 AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
164 src/pakfire/__version__.py
169 $PACKAGE_NAME $VERSION
171 CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
172 CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
173 LDFLAGS: ${OUR_LDFLAGS} ${LDFLAGS}
174 PYTHON_CFLAGS: ${PYTHON_DEVEL_CFLAGS}
175 PYTHON_LIBS: ${PYTHON_DEVEL_LIBS}