File: configure.ac

package info (click to toggle)
guile-cairo 1.10.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,980 kB
  • sloc: sh: 4,167; ansic: 4,040; makefile: 138; lisp: 76
file content (113 lines) | stat: -rw-r--r-- 3,154 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
define(GUILE_CAIRO_CONFIGURE_COPYRIGHT,[[

Copyright (C) 2007, 2011-2012, 2014, 2017 Andy Wingo <wingo@pobox.com>
Copyright (C) 2011 Patrick Bernaud <patrickb@chez.com>
Copyright (C) 2018 Daniel Llorens <daniel.llorens@bluewin.ch>
Copyright (C) 2018 David Pirotte <david@altosw.be>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this program.  If not, see
<http://www.gnu.org/licenses/>.

]])

AC_PREREQ(2.52)

AC_INIT([guile-cairo],
        [1.10.0],
        [bug-guile@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_COPYRIGHT(GUILE_CAIRO_CONFIGURE_COPYRIGHT)

AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE([1.14 gnu -Wno-portability -Wno-syntax \
  color-tests serial-tests foreign])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])

AC_SUBST(VERSION, 1.10.0)

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
LT_INIT([disable-static])


if test "x$prefix" = xNONE; then
   AC_MSG_ERROR([No explicit prefix given.

Guile-Cairo requires you to explicitly enter in a prefix when
configuring. This is because the default prefix, /usr/local, is not in
the default guile load path. What you probably want to do is to run

  $0 --prefix=/usr

so that guile can find the guile-cairo modules when they are installed.

If you choose to install to a prefix that is not in guile's load path,
you will need to modify GUILE_LOAD_PATH and LD_LIBRARY_PATH every time
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_SUBST(WARN_CFLAGS)

# Optimize the DSO symbol hash table -- see ulrich drepper's paper,
# "how to write shared libraries"
GNULD_LDFLAGS=-Wl,-O1
AC_SUBST(GNULD_LDFLAGS)
AM_LDFLAGS='$(GNULD_LDFLAGS)'
AC_SUBST(AM_LDFLAGS)

#
# Check for Guile
#
GUILE_EFFECTIVE_VERSION=no
all_versions="3.0 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.10.0)
AC_SUBST(CAIRO_LIBS)
AC_SUBST(CAIRO_CFLAGS)

AC_ARG_VAR(CAIRO_XML_DIR, [path to Cairo *.xml documentation])

AC_CONFIG_FILES([env], [chmod +x env])
AC_CONFIG_FILES(
Makefile
guile-cairo.pc
guile-cairo/Makefile
cairo/Makefile
examples/Makefile
tests/Makefile
tests/unit-tests/Makefile
doc/Makefile
)
AC_OUTPUT