index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | configure.ac | 67 |
diff --git a/configure.ac b/configure.ac index 240d1c4c..18726cfb 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,8 @@ AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADERS([config.h]) AC_CANONICAL_HOST -AM_INIT_AUTOMAKE +AM_INIT_AUTOMAKE([1.11]) +AM_SILENT_RULES([yes]) LIB_VERSION=`expr lib_current - lib_age`.lib_age.lib_revision LIB_VERSION_INFO="lib_current:lib_revision:lib_age" @@ -88,6 +89,12 @@ 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 changing shell used to run install scriptlets +AC_ARG_WITH(scriptlet-shell, + AS_HELP_STRING([--with-scriptlet-shell=shell], + [set the full path to the shell used to run install scriptlets]), + [SCRIPTLET_SHELL=$withval], [SCRIPTLET_SHELL=/bin/sh]) + # Help line for using OpenSSL AC_ARG_WITH(openssl, AS_HELP_STRING([--with-openssl], [use OpenSSL crypto implementations instead of internal routines]), @@ -122,6 +129,10 @@ AC_ARG_ENABLE(git-version, [enable use of git version in version string if available]), [wantgitver=$enableval], [wantgitver=no]) +# Enable large file support if available (must be enabled before +# testing compilation against gpgme). +AC_SYS_LARGEFILE + # Checks for programs. AC_PROG_AWK AC_PROG_CC_C99 @@ -161,14 +172,42 @@ AM_CONDITIONAL([HAVE_LIBSSL], [test "x$with_openssl" = "xyes"]) # 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([gpgme], [gpgme_check_version], , - [if test "x$with_gpgme" != "xcheck"; then - AC_MSG_FAILURE([--with-ggpme was given, but -lgpgme was not found]) - fi], - [-lgpgme]) - with_gpgme=$ac_cv_lib_gpgme_gpgme_check_version], - AC_MSG_RESULT(no)) + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + +require_gpgme=no +AS_IF([test "x$with_gpgme" != "xno"], + [AS_IF([test "x$with_gpgme" = "xyes"], + [require_gpgme=yes]) + AM_PATH_GPGME([1.3.0], + [LIBS_save="$LIBS" + CPPFLAGS_save="$CPPFLAGS" + CFLAGS_save="$CFLAGS" + + LIBS="$LIBS $GPGME_LIBS" + CPPFLAGS="$CPPFLAGS $GPGME_CPPFLAGS" + CFLAGS="$CFLAGS $GPGME_CFLAGS" + + AC_MSG_CHECKING([for sane gpgme]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <gpgme.h>]], + [[const char *ver; +ver = gpgme_check_version("1.2.4");]])], + [AC_MSG_RESULT([yes]) + with_gpgme=yes + AC_DEFINE([HAVE_LIBGPGME], [1], [Define if gpgme should be used to provide GPG signature support.])], + [AC_MSG_RESULT([no]) + with_gpgme=no + LIBS="$LIBS_save" + CPPFLAGS="$CPPFLAGS_save" + CFLAGS="$CFLAGS_save"])], + [with_gpgme=no])]) +AS_IF([test "x$with_gpgme" != "xyes"], + [AS_IF([test "x$require_gpgme" = "xyes"], + [AC_MSG_FAILURE([--with-gpgme was given, but gpgme was not found])]) + with_gpgme=no]) + AM_CONDITIONAL([HAVE_LIBGPGME], [test "x$with_gpgme" = "xyes"]) # Checks for header files. @@ -203,6 +242,7 @@ AC_CHECK_FUNCS([dup2 getcwd geteuid getmntinfo gettimeofday memmove memset \ mkdir realpath regcomp rmdir setenv setlocale strcasecmp \ strchr strcspn strdup strerror strndup strrchr strsep strstr \ strtol swprintf tcflush wcwidth uname]) +AC_CHECK_MEMBERS([struct stat.st_blksize],,,[[#include <sys/stat.h>]]) # For the diskspace code FS_STATS_TYPE @@ -210,9 +250,6 @@ AC_CHECK_MEMBERS([struct statvfs.f_flag],,,[[#include <sys/statvfs.h>]]) AC_CHECK_MEMBERS([struct statfs.f_flags],,,[[#include <sys/param.h> #include <sys/mount.h>]]) -# Enable large file support if available -AC_SYS_LARGEFILE - # Check if we can use symbol visibility support in GCC GCC_VISIBILITY_CC # Check if we have -fgnu89-inline flag @@ -297,8 +334,6 @@ AC_MSG_CHECKING(for debug mode request) if test "x$debug" = "xyes" ; then AC_MSG_RESULT(yes) AC_DEFINE([PACMAN_DEBUG], , [Enable debug code]) - # Check for mcheck - AC_CHECK_HEADERS([mcheck.h]) # Check for -fstack-protector availability GCC_STACK_PROTECT_LIB GCC_STACK_PROTECT_CC @@ -330,6 +365,7 @@ AM_CONDITIONAL(USE_GIT_VERSION, test "x$usegitver" = "xyes") # Set root directory AC_SUBST(ROOTDIR) +AC_DEFINE_UNQUOTED([ROOTDIR], "$ROOTDIR", [The location of the root operating directory]) # Set package file extension AC_SUBST(PKGEXT) AC_DEFINE_UNQUOTED([PKGEXT], "$PKGEXT", [The file extension used by pacman packages]) @@ -339,6 +375,9 @@ AC_DEFINE_UNQUOTED([SRCEXT], "$SRCEXT", [The file extension used by pacman sourc # Set makepkg build script name AC_SUBST(BUILDSCRIPT) AC_DEFINE_UNQUOTED([BUILDSCRIPT], "$BUILDSCRIPT", [The build script name used by makepkg]) +# Set shell used by install scriptlets +AC_SUBST(SCRIPTLET_SHELL) +AC_DEFINE_UNQUOTED([SCRIPTLET_SHELL], "$SCRIPTLET_SHELL", [The full path of the shell used to run install scriptlets]) # Configuration files AC_CONFIG_FILES([ |