summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac81
1 files changed, 48 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac
index ef98dcc9..47d60938 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# Minimum version of autoconf required
-AC_PREREQ(2.60)
+AC_PREREQ(2.62)
# UPDATING VERSION NUMBERS FOR RELEASES
#
@@ -70,7 +70,7 @@ AC_DEFINE_UNQUOTED([LIB_VERSION], ["$LIB_VERSION"], [libalpm version number])
# Help line for root directory
AC_ARG_WITH(root-dir,
- AS_HELP_STRING([--with-root-dir=path], [set the location of pacman's root operating directory]),
+ AS_HELP_STRING([--with-root-dir=path], [set the location of the root operating directory]),
[ROOTDIR=$withval], [ROOTDIR=/])
# Help line for package extension
@@ -83,20 +83,20 @@ AC_ARG_WITH(src-ext,
AS_HELP_STRING([--with-src-ext=ext], [set the file extension used by source packages]),
[SRCEXT=$withval], [SRCEXT=.src.tar.gz])
-# Help line for database extension
-AC_ARG_WITH(db-ext,
- AS_HELP_STRING([--with-db-ext=ext], [set the file extension used by the database]),
- [DBEXT=$withval], [DBEXT=.db.tar.gz])
-
# Help line for buildscript filename
AC_ARG_WITH(buildscript,
AS_HELP_STRING([--with-buildscript=name], [set the build script name used by makepkg]),
[BUILDSCRIPT=$withval], [BUILDSCRIPT=PKGBUILD])
+# Help line for using OpenSSL
+AC_ARG_WITH(openssl,
+ AS_HELP_STRING([--with-openssl], [use OpenSSL crypto implementations instead of internal routines]),
+ [], [with_openssl=check])
+
# Help line for libfetch
-AC_ARG_ENABLE(internal-download,
- AS_HELP_STRING([--disable-internal-download], [do not build with libfetch support]),
- [internaldownload=$enableval], [internaldownload=yes])
+AC_ARG_WITH(fetch,
+ AS_HELP_STRING([--with-fetch], [use libfetch as an internal downloader]),
+ [], [with_fetch=check])
# Help line for documentation
AC_ARG_ENABLE(doc,
@@ -127,6 +127,7 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_CHECK_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2 python], [false])
+AC_PATH_PROGS([BASH_SHELL], [bash bash4 bash3], [false])
# find installed gettext
AM_GNU_GETTEXT([external])
@@ -136,26 +137,41 @@ AM_GNU_GETTEXT_VERSION(0.13.1)
AC_CHECK_LIB([archive], [archive_read_data], ,
AC_MSG_ERROR([libarchive is needed to compile pacman!]))
+# Check for OpenSSL
+AC_MSG_CHECKING(whether to link with libssl)
+AS_IF([test "x$with_openssl" != "xno"],
+ [AC_MSG_RESULT(yes)
+ AC_CHECK_LIB([ssl], [MD5_Final], ,
+ [if test "x$with_openssl" != "xcheck"; then
+ AC_MSG_FAILURE([--with-openssl was given, but -lssl was not found])
+ fi],
+ [-lcrypto])],
+ AC_MSG_RESULT(no))
+AM_CONDITIONAL([HAVE_LIBSSL], [test "x$ac_cv_lib_ssl_MD5_Final" = "xyes"])
+
# Enable or disable usage of libfetch
AC_MSG_CHECKING(whether to link with libfetch)
-if test "x$internaldownload" = "xyes" ; then
- AC_MSG_RESULT(yes)
- AC_DEFINE([INTERNAL_DOWNLOAD], , [Use internal download library])
- # Check for a download library if it was actually requested
+AS_IF([test "x$with_fetch" != "xno"],
+ [AC_MSG_RESULT(yes)
AC_CHECK_LIB([fetch], [fetchParseURL], ,
- AC_MSG_ERROR([libfetch is needed to compile with internal download support]), [-lcrypto -ldl] )
- # Check if libfetch supports conditional GET
- # (version >=2.21, struct url has member last_modified)
- AC_CHECK_MEMBER(struct url.last_modified, ,
- AC_MSG_ERROR([libfetch must be version 2.21 or greater]),
- [#include <fetch.h>] )
-else
- AC_MSG_RESULT(no)
-fi
-AM_CONDITIONAL(INTERNAL_DOWNLOAD, test "x$internaldownload" = "xyes")
+ [if test "x$with_fetch" != "xcheck"; then
+ AC_MSG_FAILURE([--with-fetch was given, but -lfetch was not found])
+ fi],
+ [-lcrypto -ldl])
+ # Check if libfetch supports connnection caching which we use
+ AS_IF([test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"],
+ [AC_CHECK_DECL(fetchConnectionCacheInit, ,
+ AC_MSG_ERROR([libfetch must be version 2.28 or greater]),
+ [#include <fetch.h>])
+ ])
+ ],
+ AC_MSG_RESULT(no))
+AM_CONDITIONAL([HAVE_LIBFETCH], [test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"])
# Checks for header files.
-AC_CHECK_HEADERS([fcntl.h glob.h libintl.h limits.h locale.h string.h strings.h sys/ioctl.h sys/param.h sys/statvfs.h sys/syslimits.h sys/time.h syslog.h wchar.h])
+AC_CHECK_HEADERS([fcntl.h glob.h libintl.h locale.h mntent.h string.h \
+ sys/ioctl.h sys/mount.h sys/param.h sys/statvfs.h \
+ sys/time.h sys/types.h sys/ucred.h syslog.h wchar.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
@@ -165,16 +181,19 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_TYPE_UID_T
+AC_STRUCT_DIRENT_D_TYPE
+PATH_MAX_DEFINED
# Checks for library functions.
AC_FUNC_FORK
+AC_FUNC_GETMNTENT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MKTIME
-AC_TYPE_SIGNAL
-AC_CHECK_FUNCS([geteuid realpath regcomp strcasecmp \
+AC_CHECK_FUNCS([geteuid getmntinfo realpath regcomp strcasecmp \
strndup strrchr strsep swprintf \
wcwidth uname])
-
+# For the diskspace code
+FS_STATS_TYPE
# Enable large file support if available
AC_SYS_LARGEFILE
@@ -305,6 +324,7 @@ if test "x$debug" = "xyes" ; then
# Check for -fstack-protector availability
GCC_STACK_PROTECT_LIB
GCC_STACK_PROTECT_CC
+ GCC_FORTIFY_SOURCE_CC
CFLAGS="$CFLAGS -g -Wall -Werror"
else
AC_MSG_RESULT(no)
@@ -338,9 +358,6 @@ AC_DEFINE_UNQUOTED([PKGEXT], "$PKGEXT", [The file extension used by pacman packa
# Set source package file extension
AC_SUBST(SRCEXT)
AC_DEFINE_UNQUOTED([SRCEXT], "$SRCEXT", [The file extension used by pacman source packages])
-# Set database file extension
-AC_SUBST(DBEXT)
-AC_DEFINE_UNQUOTED([DBEXT], "$DBEXT", [The file extension used by pacman databases])
# Set makepkg build script name
AC_SUBST(BUILDSCRIPT)
AC_DEFINE_UNQUOTED([BUILDSCRIPT], "$BUILDSCRIPT", [The build script name used by makepkg])
@@ -393,12 +410,10 @@ ${PACKAGE_NAME}:
root working directory : ${ROOTDIR}
package extension : ${PKGEXT}
source pkg extension : ${SRCEXT}
- database extension : ${DBEXT}
build script name : ${BUILDSCRIPT}
Compilation options:
Run make in doc/ dir : ${wantdoc} ${asciidoc}
- Use download library : ${internaldownload}
Doxygen support : ${usedoxygen}
debug support : ${debug}
"