From e81e1786839009a3d5c297fc32219be8bf5a2ffe Mon Sep 17 00:00:00 2001
From: David Pirotte
Date: Wed, 17 Aug 2016 23:13:52 -0300
Subject: [PATCH 09/11] Fixing configure.ac
* configure.ac: (a) bumping prereq, automake and cairo deps; (b) bumping
guile-cairo version to 1.10.0; (c) use m4 macros subdir; (d) use
automake init options '1.14 gnu -Wno-portability -Wno-syntax
color-tests serial-tests foreign'; (e) display a copyright notice;
(f) use LT_INIT, not AC_PROG_LIBTOOL; (g) use guile's m4 macro to search
for guile development fles, flags, site directory; (h) let's handle
env.in here, not in the Makefile.am
---
configure.ac | 57 +++++++++++++++++++++++++++++++--------------------------
1 file changed, 31 insertions(+), 26 deletions(-)
diff --git a/configure.ac b/configure.ac
index df7a306..40ce637 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,7 @@
define(GUILE_CAIRO_CONFIGURE_COPYRIGHT,[[
Copyright (C) 2007, 2011 Andy Wingo
+Copyright (C) 2016 David Pirotte
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,21 +19,25 @@ License along with this program. If not, see
]])
-AC_PREREQ(2.52)
-AC_INIT(HACKING)
+AC_PREREQ(2.69)
+AC_INIT([guile-cairo], [1.10.0])
+
AC_CONFIG_AUX_DIR([build-aux])
-AC_COPYRIGHT(GUILE_CAIRO_CONFIGURE_COPYRIGHT)
+AC_CONFIG_MACRO_DIR([m4])
+
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(guile-cairo, 1.9.91)
-AC_SUBST(VERSION,1.9.91)
+AM_INIT_AUTOMAKE([1.14 gnu -Wno-portability -Wno-syntax \
+ color-tests serial-tests foreign])
+AM_MAINTAINER_MODE([enable])
+AM_SILENT_RULES([yes])
-AC_DISABLE_STATIC
+AC_COPYRIGHT(GUILE_CAIRO_CONFIGURE_COPYRIGHT)
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
-AC_PROG_LIBTOOL
+LT_INIT([disable-static])
if test "x$prefix" = xNONE; then
AC_MSG_ERROR([No explicit prefix given.
@@ -51,8 +56,11 @@ you run guile. (Which is a pain.)])
fi
WARN_CFLAGS=-Wall
-AC_ARG_ENABLE([Werror], AC_HELP_STRING([--disable-Werror],[Don't stop the build on errors]),
- [], WARN_CFLAGS="-Wall -Werror")
+AC_ARG_ENABLE(
+ [Werror],
+ AC_HELP_STRING([--disable-Werror],[Don't stop the build on errors]),
+ [],
+ [WARN_CFLAGS="-Wall -Werror"])
AC_SUBST(WARN_CFLAGS)
# Optimize the DSO symbol hash table -- see ulrich drepper's paper,
@@ -65,27 +73,24 @@ AC_SUBST(AM_LDFLAGS)
#
# Check for Guile
#
-GUILE_EFFECTIVE_VERSION=no
-all_versions="2.2 2.0 1.8"
-for v in $all_versions; do
- if test $GUILE_EFFECTIVE_VERSION = no; then
- AC_MSG_NOTICE([checking for Guile $v.x])
- PKG_CHECK_MODULES(GUILE, guile-$v, [GUILE_EFFECTIVE_VERSION=$v], [true])
- fi
-done
-
-AC_SUBST(GUILE_EFFECTIVE_VERSION)
-
-if test $GUILE_EFFECTIVE_VERSION = no; then
- AC_MSG_ERROR([Failed to find Guile. Is it installed?])
-else
- AC_MSG_NOTICE([found Guile $GUILE_EFFECTIVE_VERSION.x])
-fi
-PKG_CHECK_MODULES(CAIRO, cairo >= 1.2.0)
+GUILE_PKG([2.2 2.0])
+GUILE_PROGS([2.0.11])
+GUILE_FLAGS
+GUILE_SITE_DIR
+GUILE_GLOBAL_SITE_DIR
+GUILE_SITE_CCACHE_DIR
+
+
+#
+# Check for Cairo
+#
+
+PKG_CHECK_MODULES(CAIRO, cairo >= 1.10.0)
AC_SUBST(CAIRO_LIBS)
AC_SUBST(CAIRO_CFLAGS)
+AC_CONFIG_FILES([env], [chmod +x env])
AC_CONFIG_FILES(
Makefile
guile-cairo.pc
--
2.8.1