]>
Commit | Line | Data |
---|---|---|
dd926c7a DM |
1 | # -*- Autoconf -*- |
2 | # Process this file with autoconf to produce a configure script. | |
3 | # Minimum version of autoconf required | |
f489e969 | 4 | AC_PREREQ(2.62) |
dd926c7a | 5 | |
16c91bed DM |
6 | # UPDATING VERSION NUMBERS FOR RELEASES |
7 | # | |
8 | # libalpm: | |
9 | # current | |
10 | # The most recent interface number that this library implements. | |
11 | # revision | |
12 | # The implementation number of the current interface. | |
13 | # age | |
14 | # The difference between the newest and oldest interfaces that this library | |
15 | # implements. In other words, the library implements all the interface | |
16 | # numbers in the range from number current - age to current. | |
17 | # | |
18 | # 1. Start with version information of `0:0:0' for each libtool library. | |
19 | # 2. Update the version information only immediately before a public release of | |
20 | # your software. More frequent updates are unnecessary, and only guarantee | |
21 | # that the current interface number gets larger faster. | |
22 | # 3. If the library source code has changed at all since the last update, then | |
23 | # increment revision (`c:r:a' becomes `c:r+1:a'). | |
24 | # 4. If any interfaces have been added, removed, or changed since the last | |
25 | # update, increment current, and set revision to 0. | |
26 | # 5. If any interfaces have been added since the last public release, then | |
27 | # increment age. | |
28 | # 6. If any interfaces have been removed since the last public release, then | |
29 | # set age to 0. | |
30 | # | |
31 | # pacman: | |
32 | # Extreme huge major changes: | |
33 | # pacman_version_major += 1 | |
34 | # pacman_version_minor = 0 | |
35 | # pacman_version_micro = 0 | |
36 | # | |
37 | # Real releases: | |
38 | # pacman_version_minor += 1 | |
39 | # pacman_version_micro = 0 | |
40 | # | |
41 | # Bugfix releases: | |
42 | # pacman_version_micro += 1 | |
16c91bed | 43 | |
312e9252 | 44 | m4_define([lib_current], [8]) |
5a0c659a | 45 | m4_define([lib_revision], [2]) |
4eb14697 | 46 | m4_define([lib_age], [0]) |
16c91bed | 47 | |
c5eccedc | 48 | m4_define([pacman_version_major], [4]) |
312e9252 | 49 | m4_define([pacman_version_minor], [1]) |
5a0c659a | 50 | m4_define([pacman_version_micro], [2]) |
16c91bed DM |
51 | m4_define([pacman_version], |
52 | [pacman_version_major.pacman_version_minor.pacman_version_micro]) | |
16c91bed | 53 | |
dd926c7a | 54 | # Autoconf initialization |
63661043 | 55 | AC_INIT([pacman], [pacman_version], [pacman-dev@archlinux.org]) |
dd926c7a DM |
56 | AC_CONFIG_SRCDIR([config.h.in]) |
57 | AC_CONFIG_HEADERS([config.h]) | |
5f774025 | 58 | AC_CONFIG_MACRO_DIR([m4]) |
30ca48df | 59 | AC_CONFIG_AUX_DIR([build-aux]) |
403c175d | 60 | AC_REQUIRE_AUX_FILE([tap-driver.sh]) |
dd926c7a | 61 | |
332c1271 | 62 | AC_CANONICAL_HOST |
14383774 | 63 | AM_INIT_AUTOMAKE([1.11 foreign]) |
dacda1f6 | 64 | AM_SILENT_RULES([yes]) |
a1526a3e | 65 | |
5f774025 | 66 | LT_INIT |
3b464dc8 | 67 | LIB_VERSION=`expr lib_current - lib_age`.lib_age.lib_revision |
16c91bed | 68 | LIB_VERSION_INFO="lib_current:lib_revision:lib_age" |
a1526a3e | 69 | |
d2669b47 | 70 | # Respect empty CFLAGS during compiler tests |
1d0ab50c | 71 | if test "x$CFLAGS" = "x"; then |
d2669b47 AM |
72 | CFLAGS="" |
73 | fi | |
74 | ||
dd926c7a DM |
75 | # Set subsitution values for version stuff in Makefiles and anywhere else, |
76 | # and put LIB_VERSION in config.h | |
332c1271 DM |
77 | AC_SUBST(LIB_VERSION) |
78 | AC_SUBST(LIB_VERSION_INFO) | |
332c1271 | 79 | AC_DEFINE_UNQUOTED([LIB_VERSION], ["$LIB_VERSION"], [libalpm version number]) |
a1526a3e | 80 | |
dd926c7a | 81 | # Help line for root directory |
c3ad8bd7 | 82 | AC_ARG_WITH(root-dir, |
eba52191 | 83 | AS_HELP_STRING([--with-root-dir=path], [set the location of the root operating directory]), |
e0afe6e9 | 84 | [ROOTDIR=$withval], [ROOTDIR=/]) |
c3ad8bd7 | 85 | |
dd926c7a | 86 | # Help line for package extension |
c3ad8bd7 | 87 | AC_ARG_WITH(pkg-ext, |
57acfced | 88 | AS_HELP_STRING([--with-pkg-ext=ext], [set the file extension used by packages]), |
e0afe6e9 | 89 | [PKGEXT=$withval], [PKGEXT=.pkg.tar.gz]) |
c3ad8bd7 | 90 | |
e422b71a AF |
91 | # Help line for source package directory |
92 | AC_ARG_WITH(src-ext, | |
57acfced | 93 | AS_HELP_STRING([--with-src-ext=ext], [set the file extension used by source packages]), |
e0afe6e9 | 94 | [SRCEXT=$withval], [SRCEXT=.src.tar.gz]) |
e422b71a | 95 | |
8f26bb90 AM |
96 | # Help line for buildscript filename |
97 | AC_ARG_WITH(buildscript, | |
98 | AS_HELP_STRING([--with-buildscript=name], [set the build script name used by makepkg]), | |
99 | [BUILDSCRIPT=$withval], [BUILDSCRIPT=PKGBUILD]) | |
100 | ||
ce312519 FP |
101 | # Help line for buildscript filename |
102 | AC_ARG_WITH(makepkg-template-dir, | |
103 | AS_HELP_STRING([--with-makepkg-template-dir=name], [set the template dir used by makepkg-template]), | |
104 | [TEMPLATE_DIR=$withval], [TEMPLATE_DIR=/usr/share/makepkg-template]) | |
105 | ||
13667fd4 AM |
106 | # Help line for debug package suffix |
107 | AC_ARG_WITH(debug-suffix, | |
108 | AS_HELP_STRING([--with-debug-suffix=name], [set the suffix for split debugging symbol packages used by makepkg]), | |
109 | [DEBUGSUFFIX=$withval], [DEBUGSUFFIX=debug]) | |
110 | ||
3ba53918 AM |
111 | # Help line for changing shell used to run install scriptlets |
112 | AC_ARG_WITH(scriptlet-shell, | |
113 | AS_HELP_STRING([--with-scriptlet-shell=shell], | |
ad280e1b AM |
114 | [set the full path to the shell used to run install scriptlets]), |
115 | [SCRIPTLET_SHELL=$withval], [SCRIPTLET_SHELL=/bin/sh]) | |
3ba53918 | 116 | |
89ecf8ca AM |
117 | # Help line for ldconfig path |
118 | AC_ARG_WITH(ldconfig, | |
119 | AS_HELP_STRING([--with-ldconfig=path], | |
120 | [set the full path to ldconfig]), | |
121 | [LDCONFIG=$withval], [LDCONFIG=/sbin/ldconfig]) | |
122 | ||
eba52191 DM |
123 | # Help line for using OpenSSL |
124 | AC_ARG_WITH(openssl, | |
125 | AS_HELP_STRING([--with-openssl], [use OpenSSL crypto implementations instead of internal routines]), | |
126 | [], [with_openssl=check]) | |
127 | ||
97be2f0e DM |
128 | # Help line for using gpgme |
129 | AC_ARG_WITH(gpgme, | |
130 | AS_HELP_STRING([--with-gpgme], [use GPGME for PGP signature verification]), | |
131 | [], [with_gpgme=check]) | |
132 | ||
b2226ed1 DR |
133 | # Help line for using libcurl |
134 | AC_ARG_WITH(curl, | |
135 | AS_HELP_STRING([--with-libcurl], [use libcurl for the internal downloader]), | |
136 | [], [with_curl=check]) | |
a708c6ea | 137 | |
26c05b1c DM |
138 | # Help line for documentation |
139 | AC_ARG_ENABLE(doc, | |
7fc50d79 DM |
140 | AS_HELP_STRING([--disable-doc], [prevent make from looking at doc/ dir]), |
141 | [wantdoc=$enableval], [wantdoc=yes]) | |
26c05b1c | 142 | |
dd926c7a | 143 | # Help line for doxygen |
c3ad8bd7 | 144 | AC_ARG_ENABLE(doxygen, |
57acfced | 145 | AS_HELP_STRING([--enable-doxygen], [build your own API docs via Doxygen]), |
103c3ac5 | 146 | [wantdoxygen=$enableval], [wantdoxygen=no]) |
3595201f | 147 | |
dd926c7a | 148 | # Help line for debug |
3595201f | 149 | AC_ARG_ENABLE(debug, |
57acfced | 150 | AS_HELP_STRING([--enable-debug], [enable debugging support]), |
e0afe6e9 | 151 | [debug=$enableval], [debug=no]) |
3595201f | 152 | |
b729ed01 DM |
153 | # Help line for compiler warning flags |
154 | AC_ARG_ENABLE(warningflags, | |
155 | AS_HELP_STRING([--enable-warningflags], [enable extra compiler warning flags]), | |
156 | [warningflags=$enableval], [warningflags=no]) | |
157 | ||
63661043 DM |
158 | # Help line for using git version in pacman version string |
159 | AC_ARG_ENABLE(git-version, | |
160 | AS_HELP_STRING([--enable-git-version], | |
161 | [enable use of git version in version string if available]), | |
162 | [wantgitver=$enableval], [wantgitver=no]) | |
163 | ||
115c0381 NPB |
164 | # Enable large file support if available (must be enabled before |
165 | # testing compilation against gpgme). | |
166 | AC_SYS_LARGEFILE | |
167 | ||
dd926c7a DM |
168 | # Checks for programs. |
169 | AC_PROG_AWK | |
288dd549 | 170 | AC_PROG_CC_C99 |
dd926c7a | 171 | AC_PROG_INSTALL |
283ef651 | 172 | AC_CHECK_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2 python], [false]) |
ea4aa6f1 DR |
173 | AC_PATH_PROGS([BASH_SHELL], [bash bash4], [false]) |
174 | ||
ce312519 FP |
175 | # check for perl 5.10.1 (needed by makepkg-template) |
176 | AC_PATH_PROG([PERL],[perl]) | |
177 | AC_DEFUN([AX_PROG_PERL_VERSION], | |
178 | [AC_CACHE_CHECK([for Perl version $1 or later], [ax_cv_prog_perl_version], | |
179 | [AS_IF(["$PERL" -e 'require v$1;' >/dev/null 2>&1], | |
180 | [ax_cv_prog_perl_version=yes], | |
181 | [ax_cv_prog_perl_version=no])]) | |
182 | AS_IF([test x"$ax_cv_prog_perl_version" = xyes], [$2], [$3])]) | |
183 | AX_PROG_PERL_VERSION([5.10.1], [], [AC_MSG_ERROR([perl is too old])]) | |
184 | ||
ea4aa6f1 DR |
185 | AS_IF([test "x$BASH_SHELL" = "xfalse"], |
186 | AC_MSG_WARN([*** bash >= 4.1.0 is required for pacman scripts]), | |
187 | [bash_version_major=`$BASH_SHELL -c 'echo "${BASH_VERSINFO[[0]]}"'` | |
188 | bash_version_minor=`$BASH_SHELL -c 'echo "${BASH_VERSINFO[[1]]}"'` | |
189 | ok=yes | |
190 | if test "$bash_version_major" -lt 4; then | |
191 | ok=no | |
192 | fi | |
193 | if test "$bash_version_major" -eq 4 && test "$bash_version_minor" -lt 1; then | |
194 | ok=no | |
195 | fi | |
196 | if test "$ok" = "no"; then | |
197 | AC_MSG_ERROR([*** bash >= 4.1.0 is required for pacman scripts]) | |
198 | fi | |
199 | unset bash_version_major bash_version_minor ok]) | |
dd926c7a DM |
200 | |
201 | # find installed gettext | |
fa3aa644 | 202 | AM_GNU_GETTEXT([external], [need-ngettext]) |
dd926c7a DM |
203 | AM_GNU_GETTEXT_VERSION(0.13.1) |
204 | ||
0e03c084 XC |
205 | AC_CHECK_LIB([m], [fabs], , |
206 | AC_MSG_ERROR([libm is needed to compile pacman!])) | |
207 | ||
dd926c7a | 208 | # Check for libarchive |
059c572c DR |
209 | PKG_CHECK_MODULES(LIBARCHIVE, [libarchive >= 2.8.0], , |
210 | AC_MSG_ERROR([*** libarchive >= 2.8.0 is needed to compile pacman!])) | |
dd926c7a | 211 | |
eba52191 | 212 | # Check for OpenSSL |
c5d95184 DR |
213 | have_openssl=no |
214 | if test "x$with_openssl" != "xno"; then | |
1eb6a9cb | 215 | PKG_CHECK_MODULES(LIBSSL, [libcrypto], |
c5d95184 DR |
216 | [AC_DEFINE(HAVE_LIBSSL, 1, [Define if libcrypto is available]) have_openssl=yes], have_openssl=no) |
217 | if test "x$have_openssl" = xno -a "x$with_openssl" = xyes; then | |
218 | AC_MSG_ERROR([*** openssl support requested but libraries not found]) | |
219 | fi | |
220 | fi | |
221 | AM_CONDITIONAL(HAVE_LIBSSL, [test "$have_openssl" = "yes"]) | |
eba52191 | 222 | |
b2226ed1 DR |
223 | # Check for libcurl |
224 | have_libcurl=no | |
225 | if test "x$with_libcurl" != "xno"; then | |
226 | PKG_CHECK_MODULES(LIBCURL, [libcurl >= 7.19.4], | |
227 | [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no) | |
228 | if test "x$have_libcurl" = xno -a "x$with_libcurl" = xyes; then | |
229 | AC_MSG_ERROR([*** libcurl >= 7.19.4 is required for internal downloader support]) | |
230 | fi | |
231 | fi | |
232 | AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"]) | |
233 | ||
39c75c70 | 234 | # Check for gpgme |
97be2f0e DM |
235 | AC_MSG_CHECKING(whether to link with libgpgme) |
236 | AS_IF([test "x$with_gpgme" != "xno"], | |
115c0381 NPB |
237 | [AC_MSG_RESULT([yes])], |
238 | [AC_MSG_RESULT([no])]) | |
239 | ||
cb5b6636 | 240 | have_gpgme=no |
115c0381 | 241 | AS_IF([test "x$with_gpgme" != "xno"], |
cb5b6636 | 242 | [AM_PATH_GPGME([1.3.0], |
115c0381 NPB |
243 | [LIBS_save="$LIBS" |
244 | CPPFLAGS_save="$CPPFLAGS" | |
245 | CFLAGS_save="$CFLAGS" | |
246 | ||
247 | LIBS="$LIBS $GPGME_LIBS" | |
248 | CPPFLAGS="$CPPFLAGS $GPGME_CPPFLAGS" | |
249 | CFLAGS="$CFLAGS $GPGME_CFLAGS" | |
250 | ||
251 | AC_MSG_CHECKING([for sane gpgme]) | |
252 | AC_LINK_IFELSE( | |
253 | [AC_LANG_PROGRAM( | |
254 | [[#include <gpgme.h>]], | |
cb5b6636 | 255 | [[return gpgme_check_version("1.3.0");]])], |
115c0381 | 256 | [AC_MSG_RESULT([yes]) |
cb5b6636 | 257 | have_gpgme=yes |
115c0381 NPB |
258 | AC_DEFINE([HAVE_LIBGPGME], [1], [Define if gpgme should be used to provide GPG signature support.])], |
259 | [AC_MSG_RESULT([no]) | |
cb5b6636 DR |
260 | have_gpgme=no |
261 | unset GPGME_LIBS | |
262 | unset GPGME_CFLAGS] | |
263 | AS_IF([test "x$with_gpgme" = "xyes"], | |
264 | [AC_MSG_FAILURE([*** gpgme >= 1.3.0 is needed for GPG signature support])]) | |
1d0a69c6 AM |
265 | ) |
266 | ||
267 | LIBS="$LIBS_save" | |
cb5b6636 DR |
268 | CPPFLAGS="$CPPFLAGS_save" |
269 | CFLAGS="$CFLAGS_save" | |
270 | unset CPPFLAGS_save | |
1d0a69c6 AM |
271 | unset CFLAGS_save],)]) |
272 | ||
cb5b6636 DR |
273 | AS_IF([test "x$have_gpgme" = xno -a "x$with_gpgme" = xyes], |
274 | [AC_MSG_FAILURE([--with-gpgme was given, but gpgme was not found])]) | |
275 | AM_CONDITIONAL([HAVE_LIBGPGME], [test "x$have_gpgme" = "xyes"]) | |
39c75c70 | 276 | |
dd926c7a | 277 | # Checks for header files. |
1c0c2927 DR |
278 | AC_CHECK_HEADERS([fcntl.h float.h glob.h langinfo.h libintl.h limits.h \ |
279 | locale.h mntent.h netinet/in.h netinet/tcp.h \ | |
44f146f2 | 280 | stddef.h string.h sys/ioctl.h \ |
1eb40c83 | 281 | sys/mnttab.h sys/mount.h \ |
c5c1a134 AM |
282 | sys/param.h sys/statvfs.h sys/time.h sys/types.h \ |
283 | sys/ucred.h syslog.h termios.h wchar.h]) | |
dd926c7a DM |
284 | |
285 | # Checks for typedefs, structures, and compiler characteristics. | |
dd926c7a | 286 | AC_C_INLINE |
c5c1a134 | 287 | AC_TYPE_INT64_T |
dd926c7a DM |
288 | AC_TYPE_MODE_T |
289 | AC_TYPE_OFF_T | |
290 | AC_TYPE_PID_T | |
291 | AC_TYPE_SIZE_T | |
c5c1a134 | 292 | AC_TYPE_SSIZE_T |
dd926c7a DM |
293 | AC_STRUCT_TM |
294 | AC_TYPE_UID_T | |
fc74ef93 | 295 | AC_STRUCT_DIRENT_D_TYPE |
81dd9d3e | 296 | PATH_MAX_DEFINED |
dd926c7a DM |
297 | |
298 | # Checks for library functions. | |
dd926c7a | 299 | AC_FUNC_FORK |
f4e9deb6 | 300 | AC_FUNC_GETMNTENT |
dd926c7a | 301 | AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK |
c5c1a134 | 302 | AC_FUNC_MALLOC |
288dd549 | 303 | AC_FUNC_MKTIME |
c5c1a134 | 304 | AC_FUNC_STRCOLL |
d5a6ce8c | 305 | AC_CHECK_FUNCS([dup2 getcwd getmntinfo gettimeofday memmove memset \ |
c5c1a134 AM |
306 | mkdir realpath regcomp rmdir setenv setlocale strcasecmp \ |
307 | strchr strcspn strdup strerror strndup strrchr strsep strstr \ | |
308 | strtol swprintf tcflush wcwidth uname]) | |
dee8144c | 309 | AC_CHECK_MEMBERS([struct stat.st_blksize],,,[[#include <sys/stat.h>]]) |
c5c1a134 | 310 | |
ec136784 DM |
311 | # For the diskspace code |
312 | FS_STATS_TYPE | |
3afe3b6d DM |
313 | AC_CHECK_MEMBERS([struct statvfs.f_flag],,,[[#include <sys/statvfs.h>]]) |
314 | AC_CHECK_MEMBERS([struct statfs.f_flags],,,[[#include <sys/param.h> | |
315 | #include <sys/mount.h>]]) | |
316 | ||
c26fe63e DM |
317 | # Check if we can use symbol visibility support in GCC |
318 | GCC_VISIBILITY_CC | |
319 | # Check if we have -fgnu89-inline flag | |
320 | GCC_GNU89_INLINE_CC | |
321 | ||
c7a81c0b | 322 | # Host-dependant definitions |
19c23475 | 323 | INODECMD="stat -c '%i %n'" |
cb64fbea | 324 | SIZECMD="stat -c %s" |
8624eddb | 325 | SEDINPLACE="sed --follow-symlinks -i" |
241d6b88 | 326 | DUFLAGS="-sk --apparent-size" |
5fe41df8 CS |
327 | STRIP_BINARIES="--strip-all" |
328 | STRIP_SHARED="--strip-unneeded" | |
329 | STRIP_STATIC="--strip-debug" | |
c7a81c0b | 330 | case "${host_os}" in |
282eeadc | 331 | *bsd*) |
3e0e748b | 332 | INODECMD="stat -f '%i %N'" |
cb64fbea | 333 | SIZECMD="stat -f %z" |
b1a09b93 | 334 | SEDINPLACE="sed -i \"\"" |
241d6b88 | 335 | DUFLAGS="-sk" |
282eeadc | 336 | ;; |
c7a81c0b DM |
337 | darwin*) |
338 | host_os_darwin=yes | |
3e0e748b | 339 | INODECMD="/usr/bin/stat -f '%i %N'" |
cb64fbea | 340 | SIZECMD="/usr/bin/stat -f %z" |
f569c4a0 | 341 | SEDINPLACE="/usr/bin/sed -i ''" |
241d6b88 | 342 | DUFLAGS="-sk" |
5fe41df8 CS |
343 | STRIP_BINARIES="" |
344 | STRIP_SHARED="-S" | |
345 | STRIP_STATIC="-S" | |
c7a81c0b | 346 | ;; |
3595201f DM |
347 | esac |
348 | ||
c7a81c0b | 349 | AM_CONDITIONAL([DARWIN], test "x$host_os_darwin" = "xyes") |
3f1ea8b6 | 350 | AC_PATH_PROGS([DUPATH], [du], [du], [/usr/bin$PATH_SEPARATOR/bin] ) |
19c23475 | 351 | AC_SUBST(INODECMD) |
282eeadc | 352 | AC_SUBST(SIZECMD) |
c2790466 | 353 | AC_SUBST(SEDINPLACE) |
241d6b88 | 354 | AC_SUBST(DUFLAGS) |
5fe41df8 CS |
355 | AC_SUBST(STRIP_BINARIES) |
356 | AC_SUBST(STRIP_SHARED) | |
357 | AC_SUBST(STRIP_STATIC) | |
c7a81c0b | 358 | |
ca414704 DM |
359 | # Variables plugged into makepkg.conf |
360 | CARCH="${host%%-*}" | |
3595201f | 361 | CHOST="${host}" |
94810222 | 362 | AC_SUBST(CARCH) |
94810222 | 363 | AC_SUBST(CHOST) |
a1526a3e | 364 | |
26c05b1c | 365 | # Check for documentation support and status |
d44e5099 | 366 | AC_CHECK_PROGS([ASCIIDOC], [asciidoc]) |
26c05b1c DM |
367 | AC_MSG_CHECKING([for building documentation]) |
368 | if test "x$wantdoc" = "xyes" ; then | |
d44e5099 XC |
369 | if test $ASCIIDOC ; then |
370 | AC_MSG_RESULT([yes, enabled by configure]) | |
371 | else | |
372 | asciidoc="(warning : asciidoc not installed)" | |
373 | AC_MSG_RESULT([yes $asciidoc]) | |
374 | fi | |
26c05b1c DM |
375 | wantdoc=yes |
376 | else | |
7fc50d79 | 377 | AC_MSG_RESULT([no, disabled by configure]) |
26c05b1c DM |
378 | wantdoc=no |
379 | fi | |
380 | AM_CONDITIONAL(WANT_DOC, test "x$wantdoc" = "xyes") | |
381 | ||
d2613b97 | 382 | # Check for doxygen support and status |
63661043 | 383 | AC_CHECK_PROGS([DOXYGEN], [doxygen]) |
dd926c7a | 384 | AC_MSG_CHECKING([for doxygen]) |
3595201f | 385 | if test "x$wantdoxygen" = "xyes" ; then |
e0afe6e9 | 386 | if test $DOXYGEN ; then |
dd926c7a | 387 | AC_MSG_RESULT([yes]) |
332c1271 | 388 | usedoxygen=yes |
e0afe6e9 | 389 | else |
dd926c7a | 390 | AC_MSG_RESULT([no, doxygen missing]) |
332c1271 | 391 | usedoxygen=no |
e0afe6e9 | 392 | fi |
48cc9f3b | 393 | else |
e0afe6e9 | 394 | AC_MSG_RESULT([no, disabled by configure]) |
332c1271 | 395 | usedoxygen=no |
a1526a3e | 396 | fi |
d2613b97 DM |
397 | AM_CONDITIONAL(USE_DOXYGEN, test "x$usedoxygen" = "xyes") |
398 | ||
dd926c7a | 399 | # Enable or disable debug code |
94810222 | 400 | AC_MSG_CHECKING(for debug mode request) |
332c1271 | 401 | if test "x$debug" = "xyes" ; then |
a8731ff2 | 402 | AC_MSG_RESULT(yes) |
332c1271 | 403 | AC_DEFINE([PACMAN_DEBUG], , [Enable debug code]) |
8feccaed DM |
404 | # Check for -fstack-protector availability |
405 | GCC_STACK_PROTECT_LIB | |
406 | GCC_STACK_PROTECT_CC | |
90060591 | 407 | GCC_FORTIFY_SOURCE_CC |
793eff37 | 408 | WARNING_CFLAGS="-g -Wall -Werror" |
94810222 | 409 | else |
e0afe6e9 | 410 | AC_MSG_RESULT(no) |
793eff37 | 411 | WARNING_CFLAGS="-Wall" |
94810222 AG |
412 | fi |
413 | ||
b729ed01 DM |
414 | # Enable or disable compiler warning flags |
415 | AC_MSG_CHECKING(for excessive compiler warning flags) | |
416 | if test "x$warningflags" = "xyes" ; then | |
417 | AC_MSG_RESULT(yes) | |
418 | CFLAGS_ADD([-Wcast-align], [WARNING_CFLAGS]) | |
419 | CFLAGS_ADD([-Wclobbered], [WARNING_CFLAGS]) | |
420 | CFLAGS_ADD([-Wempty-body], [WARNING_CFLAGS]) | |
421 | CFLAGS_ADD([-Wfloat-equal], [WARNING_CFLAGS]) | |
422 | CFLAGS_ADD([-Wformat-nonliteral], [WARNING_CFLAGS]) | |
423 | CFLAGS_ADD([-Wformat-security], [WARNING_CFLAGS]) | |
424 | CFLAGS_ADD([-Wignored-qualifiers], [WARNING_CFLAGS]) | |
425 | CFLAGS_ADD([-Winit-self], [WARNING_CFLAGS]) | |
426 | CFLAGS_ADD([-Wlogical-op], [WARNING_CFLAGS]) | |
427 | CFLAGS_ADD([-Wmissing-declarations], [WARNING_CFLAGS]) | |
8fb1948c | 428 | CFLAGS_ADD([-Wmissing-field-initializers], [WARNING_CFLAGS]) |
b729ed01 DM |
429 | CFLAGS_ADD([-Wmissing-parameter-type], [WARNING_CFLAGS]) |
430 | CFLAGS_ADD([-Wmissing-prototypes], [WARNING_CFLAGS]) | |
431 | CFLAGS_ADD([-Wold-style-declaration], [WARNING_CFLAGS]) | |
432 | CFLAGS_ADD([-Woverride-init], [WARNING_CFLAGS]) | |
433 | CFLAGS_ADD([-Wpointer-arith], [WARNING_CFLAGS]) | |
434 | CFLAGS_ADD([-Wredundant-decls], [WARNING_CFLAGS]) | |
435 | CFLAGS_ADD([-Wshadow], [WARNING_CFLAGS]) | |
436 | CFLAGS_ADD([-Wsign-compare], [WARNING_CFLAGS]) | |
437 | CFLAGS_ADD([-Wstrict-aliasing], [WARNING_CFLAGS]) | |
438 | CFLAGS_ADD([-Wstrict-overflow=5], [WARNING_CFLAGS]) | |
439 | CFLAGS_ADD([-Wstrict-prototypes], [WARNING_CFLAGS]) | |
440 | CFLAGS_ADD([-Wtype-limits], [WARNING_CFLAGS]) | |
441 | CFLAGS_ADD([-Wuninitialized], [WARNING_CFLAGS]) | |
442 | CFLAGS_ADD([-Wunused-but-set-parameter], [WARNING_CFLAGS]) | |
443 | CFLAGS_ADD([-Wunused-parameter], [WARNING_CFLAGS]) | |
444 | CFLAGS_ADD([-Wwrite-strings], [WARNING_CFLAGS]) | |
445 | else | |
446 | AC_MSG_RESULT(no) | |
447 | fi | |
448 | ||
63661043 | 449 | # Enable or disable use of git version in pacman version string |
63661043 DM |
450 | AC_MSG_CHECKING(whether to use git version if available) |
451 | if test "x$wantgitver" = "xyes" ; then | |
bf7c3eb1 ML |
452 | AC_CHECK_PROGS([GIT], [git]) |
453 | AC_CHECK_FILE([.git/], hasgitdir=yes) | |
768c8ba1 | 454 | usegitver=$ac_cv_file__git_ |
63661043 | 455 | if test $GIT -a "x$hasgitdir" = "xyes"; then |
63661043 | 456 | AC_DEFINE([USE_GIT_VERSION], , [Use GIT version in version string]) |
63661043 DM |
457 | fi |
458 | else | |
459 | AC_MSG_RESULT([no, disabled by configure]) | |
460 | usegitver=no | |
461 | fi | |
462 | AM_CONDITIONAL(USE_GIT_VERSION, test "x$usegitver" = "xyes") | |
463 | ||
dd926c7a | 464 | # Set root directory |
139d3c5e | 465 | AC_SUBST(ROOTDIR) |
8741551d | 466 | AC_DEFINE_UNQUOTED([ROOTDIR], "$ROOTDIR", [The location of the root operating directory]) |
dd926c7a | 467 | # Set package file extension |
139d3c5e | 468 | AC_SUBST(PKGEXT) |
7bd2ff68 | 469 | AC_DEFINE_UNQUOTED([PKGEXT], "$PKGEXT", [The file extension used by pacman packages]) |
e422b71a AF |
470 | # Set source package file extension |
471 | AC_SUBST(SRCEXT) | |
472 | AC_DEFINE_UNQUOTED([SRCEXT], "$SRCEXT", [The file extension used by pacman source packages]) | |
8f26bb90 AM |
473 | # Set makepkg build script name |
474 | AC_SUBST(BUILDSCRIPT) | |
475 | AC_DEFINE_UNQUOTED([BUILDSCRIPT], "$BUILDSCRIPT", [The build script name used by makepkg]) | |
ce312519 FP |
476 | # Set makepkg-template template directory |
477 | AC_SUBST(TEMPLATE_DIR) | |
478 | AC_DEFINE_UNQUOTED([TEMPLATE_DIR], "$TEMPLATE_DIR", [The template directory used by makepkg-teplate]) | |
13667fd4 AM |
479 | # Set makepkg split debugging symbol package suffix |
480 | AC_SUBST(DEBUGSUFFIX) | |
481 | AC_DEFINE_UNQUOTED([DEBUGSUFFIX], "$DEBUGSUFFIX", [The suffix for debugging symbol packages used by makepkg]) | |
3ba53918 AM |
482 | # Set shell used by install scriptlets |
483 | AC_SUBST(SCRIPTLET_SHELL) | |
ad280e1b | 484 | AC_DEFINE_UNQUOTED([SCRIPTLET_SHELL], "$SCRIPTLET_SHELL", [The full path of the shell used to run install scriptlets]) |
89ecf8ca AM |
485 | # Set ldconfig path |
486 | AC_SUBST(LDCONFIG) | |
487 | AC_DEFINE_UNQUOTED([LDCONFIG], "$LDCONFIG", [The full path to ldconfig]) | |
488 | ||
c3ad8bd7 | 489 | |
dd926c7a DM |
490 | # Configuration files |
491 | AC_CONFIG_FILES([ | |
a1526a3e | 492 | lib/libalpm/Makefile |
7236dd32 | 493 | lib/libalpm/po/Makefile.in |
82b71225 | 494 | lib/libalpm/libalpm.pc |
27d9c25e | 495 | src/common/Makefile |
a1526a3e | 496 | src/pacman/Makefile |
a4a7006a | 497 | src/pacman/po/Makefile.in |
a1526a3e JV |
498 | src/util/Makefile |
499 | scripts/Makefile | |
a4a7006a | 500 | scripts/po/Makefile.in |
a1526a3e | 501 | doc/Makefile |
94810222 | 502 | etc/Makefile |
844d82fa AM |
503 | test/pacman/Makefile |
504 | test/pacman/tests/Makefile | |
8679cd68 | 505 | test/scripts/Makefile |
2ee18650 | 506 | test/util/Makefile |
c799433e | 507 | contrib/Makefile |
a1526a3e JV |
508 | Makefile |
509 | ]) | |
dd926c7a | 510 | AC_OUTPUT |
a1526a3e JV |
511 | |
512 | echo " | |
63661043 | 513 | ${PACKAGE_NAME}: |
94810222 | 514 | |
7bd2ff68 DM |
515 | Build information: |
516 | source code location : ${srcdir} | |
332c1271 | 517 | prefix : ${prefix} |
b6387b95 | 518 | sysconfdir : $(eval echo ${sysconfdir}) |
7bd2ff68 DM |
519 | conf file : $(eval echo ${sysconfdir})/pacman.conf |
520 | localstatedir : $(eval echo ${localstatedir}) | |
7bd2ff68 DM |
521 | database dir : $(eval echo ${localstatedir})/lib/pacman/ |
522 | cache dir : $(eval echo ${localstatedir})/cache/pacman/pkg/ | |
f0e34be9 | 523 | |
332c1271 | 524 | compiler : ${CC} |
f0e34be9 | 525 | preprocessor flags : ${CPPFLAGS} |
793eff37 | 526 | compiler flags : ${WARNING_CFLAGS} ${CFLAGS} |
cb5b6636 | 527 | library flags : ${LIBS} ${LIBSSL_LIBS} ${LIBARCHIVE_LIBS} ${LIBCURL_LIBS} ${GPGME_LIBS} |
f0e34be9 | 528 | linker flags : ${LDFLAGS} |
94810222 | 529 | |
332c1271 | 530 | Architecture : ${CARCH} |
332c1271 | 531 | Host Type : ${CHOST} |
19c23475 | 532 | File inode command : ${INODECMD} |
282eeadc | 533 | Filesize command : ${SIZECMD} |
c2790466 | 534 | In-place sed command : ${SEDINPLACE} |
48cc9f3b | 535 | |
332c1271 | 536 | libalpm version : ${LIB_VERSION} |
3b464dc8 | 537 | libalpm version info : ${LIB_VERSION_INFO} |
332c1271 | 538 | pacman version : ${PACKAGE_VERSION} |
63661043 | 539 | using git version : ${usegitver} |
94810222 | 540 | |
c3ad8bd7 | 541 | Directory and file information: |
7bd2ff68 | 542 | root working directory : ${ROOTDIR} |
f3836ff8 | 543 | package extension : ${PKGEXT} |
e422b71a | 544 | source pkg extension : ${SRCEXT} |
8f26bb90 | 545 | build script name : ${BUILDSCRIPT} |
ce312519 | 546 | template directory : ${TEMPLATE_DIR} |
c3ad8bd7 DM |
547 | |
548 | Compilation options: | |
b2226ed1 | 549 | Use libcurl : ${have_libcurl} |
cb5b6636 | 550 | Use GPGME : ${have_gpgme} |
c5d95184 | 551 | Use OpenSSL : ${have_openssl} |
d44e5099 | 552 | Run make in doc/ dir : ${wantdoc} ${asciidoc} |
332c1271 | 553 | Doxygen support : ${usedoxygen} |
332c1271 | 554 | debug support : ${debug} |
b729ed01 DM |
555 | extra warning flags : ${warningflags} |
556 | use git version : ${wantgitver} | |
a1526a3e | 557 | " |
e0afe6e9 AF |
558 | |
559 | # vim:set ts=2 sw=2 noet: |