From ea4aa6f184909db38bacbbf60f22f1674f2853a6 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Wed, 11 Apr 2012 09:29:07 -0400 Subject: configure: require bash >= 4.1 at compile time We've unofficially agreed to raise our minimum supported bash version to 4.1, and since added features that require it. Additionally, an earlier commit adds a syntax check to the builds of scripts/ and contrib/ which could conceivably fail with an earlier shell. Therefore, make this a hard requirement of the build process. Signed-off-by: Dave Reisner --- configure.ac | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index d488bfaf..0e78c238 100644 --- a/configure.ac +++ b/configure.ac @@ -148,7 +148,23 @@ AC_PROG_AWK AC_PROG_CC_C99 AC_PROG_INSTALL AC_CHECK_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2 python], [false]) -AC_PATH_PROGS([BASH_SHELL], [bash bash4 bash3], [false]) +AC_PATH_PROGS([BASH_SHELL], [bash bash4], [false]) + +AS_IF([test "x$BASH_SHELL" = "xfalse"], + AC_MSG_WARN([*** bash >= 4.1.0 is required for pacman scripts]), + [bash_version_major=`$BASH_SHELL -c 'echo "${BASH_VERSINFO[[0]]}"'` + bash_version_minor=`$BASH_SHELL -c 'echo "${BASH_VERSINFO[[1]]}"'` + ok=yes + if test "$bash_version_major" -lt 4; then + ok=no + fi + if test "$bash_version_major" -eq 4 && test "$bash_version_minor" -lt 1; then + ok=no + fi + if test "$ok" = "no"; then + AC_MSG_ERROR([*** bash >= 4.1.0 is required for pacman scripts]) + fi + unset bash_version_major bash_version_minor ok]) # find installed gettext AM_GNU_GETTEXT([external], [need-ngettext]) -- cgit v1.2.3-54-g00ecf From 82b7122542e16354b560bae9c7f6f3608873a8e1 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 19 Mar 2012 23:56:59 -0400 Subject: libalpm: add pkg-config file No one seems to do this "correctly", but for the sake of having an easy method of detecting the presence and version of libalpm on a given system, we provide a straightforward .pc file. Signed-off-by: Dave Reisner --- configure.ac | 1 + lib/libalpm/.gitignore | 1 + lib/libalpm/Makefile.am | 3 +++ lib/libalpm/libalpm.pc.in | 12 ++++++++++++ 4 files changed, 17 insertions(+) create mode 100644 lib/libalpm/libalpm.pc.in (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0e78c238..15e93e71 100644 --- a/configure.ac +++ b/configure.ac @@ -449,6 +449,7 @@ AC_DEFINE_UNQUOTED([SCRIPTLET_SHELL], "$SCRIPTLET_SHELL", [The full path of the AC_CONFIG_FILES([ lib/libalpm/Makefile lib/libalpm/po/Makefile.in +lib/libalpm/libalpm.pc src/pacman/Makefile src/pacman/po/Makefile.in src/util/Makefile diff --git a/lib/libalpm/.gitignore b/lib/libalpm/.gitignore index 36d41441..82318d3f 100644 --- a/lib/libalpm/.gitignore +++ b/lib/libalpm/.gitignore @@ -2,3 +2,4 @@ .libs *.lo *.la +libalpm.pc diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am index 0781d5d8..ef448417 100644 --- a/lib/libalpm/Makefile.am +++ b/lib/libalpm/Makefile.am @@ -23,6 +23,9 @@ if ENABLE_GNU89_INLINE_CC AM_CFLAGS += -fgnu89-inline endif +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libalpm.pc + libalpm_la_SOURCES = \ add.h add.c \ alpm.h alpm.c \ diff --git a/lib/libalpm/libalpm.pc.in b/lib/libalpm/libalpm.pc.in new file mode 100644 index 00000000..fe4e2583 --- /dev/null +++ b/lib/libalpm/libalpm.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libalpm +Description: Arch Linux package management library +URL: http://www.archlinux.org/pacman/ +Version: @VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lalpm +Libs.private: @LIBS@ @LIBARCHIVE_LIBS@ @LIBSSL_LIBS@ @LIBCURL_LIBS@ @GPGME_LIBS@ -- cgit v1.2.3-54-g00ecf