summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac98
1 files changed, 34 insertions, 64 deletions
diff --git a/configure.ac b/configure.ac
index 16993807..247c5318 100644
--- a/configure.ac
+++ b/configure.ac
@@ -93,10 +93,13 @@ 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_WITH(fetch,
- AS_HELP_STRING([--with-fetch], [use libfetch as an internal downloader]),
- [], [with_fetch=check])
+# Help line for using gpgme
+AC_ARG_WITH(gpgme,
+ AS_HELP_STRING([--with-gpgme], [use GPGME for PGP signature verification]),
+ [], [with_gpgme=check])
+
+# Check for useable libcurl
+LIBCURL_CHECK_CONFIG([yes], [7.19.4], [with_libcurl=yes], [with_libcurl=no])
# Help line for documentation
AC_ARG_ENABLE(doc,
@@ -130,9 +133,12 @@ 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])
+AM_GNU_GETTEXT([external], [need-ngettext])
AM_GNU_GETTEXT_VERSION(0.13.1)
+AC_CHECK_LIB([m], [fabs], ,
+ AC_MSG_ERROR([libm is needed to compile pacman!]))
+
# Check for libarchive
AC_CHECK_LIB([archive], [archive_read_data], ,
AC_MSG_ERROR([libarchive is needed to compile pacman!]))
@@ -145,28 +151,23 @@ AS_IF([test "x$with_openssl" != "xno"],
[if test "x$with_openssl" != "xcheck"; then
AC_MSG_FAILURE([--with-openssl was given, but -lssl was not found])
fi],
- [-lcrypto])],
+ [-lcrypto])
+ with_openssl=$ac_cv_lib_ssl_MD5_Final],
AC_MSG_RESULT(no))
-AM_CONDITIONAL([HAVE_LIBSSL], [test "x$ac_cv_lib_ssl_MD5_Final" = "xyes"])
+AM_CONDITIONAL([HAVE_LIBSSL], [test "x$with_openssl" = "xyes"])
-# Enable or disable usage of libfetch
-AC_MSG_CHECKING(whether to link with libfetch)
-AS_IF([test "x$with_fetch" != "xno"],
+# Check for gpgme
+AC_MSG_CHECKING(whether to link with libgpgme)
+AS_IF([test "x$with_gpgme" != "xno"],
[AC_MSG_RESULT(yes)
- AC_CHECK_LIB([fetch], [fetchParseURL], ,
- [if test "x$with_fetch" != "xcheck"; then
- AC_MSG_FAILURE([--with-fetch was given, but -lfetch was not found])
+ AC_CHECK_LIB([gpgme], [gpgme_check_version], ,
+ [if test "x$with_gpgme" != "xcheck"; then
+ AC_MSG_FAILURE([--with-ggpme was given, but -lgpgme 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>])
- ])
- ],
+ [-lgpgme])
+ with_gpgme=$ac_cv_lib_gpgme_gpgme_check_version],
AC_MSG_RESULT(no))
-AM_CONDITIONAL([HAVE_LIBFETCH], [test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"])
+AM_CONDITIONAL([HAVE_LIBGPGME], [test "x$with_gpgme" = "xyes"])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h glob.h libintl.h locale.h mntent.h string.h \
@@ -241,48 +242,10 @@ AC_SUBST(STRIP_BINARIES)
AC_SUBST(STRIP_SHARED)
AC_SUBST(STRIP_STATIC)
-# Check for architecture, used in default makepkg.conf
-# (Note single space left after CARCHFLAGS)
-case "${host}" in
- i686-*)
- CARCH="i686"
- CARCHFLAGS="-march=i686 "
- ;;
- x86_64-*)
- CARCH="x86_64"
- CARCHFLAGS="-march=x86-64 "
- ;;
- ia64-*)
- CARCH="ia64"
- CARCHFLAGS="-march=ia64 "
- ;;
- sparc-*)
- CARCH="sparc"
- CARCHFLAGS="-mcpu=v9 "
- ;;
- ppc-* | powerpc-*)
- CARCH="ppc"
- CARCHFLAGS="-mcpu=750 "
- ;;
- i386-*)
- CARCH="i386"
- CARCHFLAGS="-march=i386 "
- ;;
- arm-*)
- CARCH="arm"
- CARCHFLAGS="-march=armv4 "
- ;;
- *)
- AC_MSG_WARN([[Your architecture is unknown for makepkg.conf, consider adding it to configure.ac]])
- CARCH="unknown"
- CARCHFLAGS=""
- ;;
-esac
-
-# Now do some things common to all architectures
+# Variables plugged into makepkg.conf
+CARCH="${host%%-*}"
CHOST="${host}"
AC_SUBST(CARCH)
-AC_SUBST(CARCHFLAGS)
AC_SUBST(CHOST)
# Check for documentation support and status
@@ -372,11 +335,12 @@ AC_CONFIG_FILES([
lib/libalpm/Makefile
lib/libalpm/po/Makefile.in
src/pacman/Makefile
+src/pacman/po/Makefile.in
src/util/Makefile
scripts/Makefile
+scripts/po/Makefile.in
doc/Makefile
etc/Makefile
-po/Makefile.in
test/pacman/Makefile
test/pacman/tests/Makefile
test/util/Makefile
@@ -396,12 +360,15 @@ ${PACKAGE_NAME}:
localstatedir : $(eval echo ${localstatedir})
database dir : $(eval echo ${localstatedir})/lib/pacman/
cache dir : $(eval echo ${localstatedir})/cache/pacman/pkg/
+
compiler : ${CC}
+ preprocessor flags : ${CPPFLAGS}
compiler flags : ${CFLAGS}
defines : ${DEFS}
+ library flags : ${LIBS}
+ linker flags : ${LDFLAGS}
Architecture : ${CARCH}
- Architecture flags : ${CARCHFLAGS}
Host Type : ${CHOST}
Filesize command : ${SIZECMD}
In-place sed command : ${SEDINPLACE}
@@ -418,6 +385,9 @@ ${PACKAGE_NAME}:
build script name : ${BUILDSCRIPT}
Compilation options:
+ Use libcurl : ${with_libcurl}
+ Use GPGME : ${with_gpgme}
+ Use OpenSSL : ${with_openssl}
Run make in doc/ dir : ${wantdoc} ${asciidoc}
Doxygen support : ${usedoxygen}
debug support : ${debug}