~ubuntu-branches/ubuntu/jaunty/pygoocanvas/jaunty

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-09-10 20:17:39 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060910201739-0bx7brrgtglz1lxa
Tags: 0.4.1-1
* New upstream version:
  - Much better support for subclassing ItemSimple / ItemSimpleView 
  - Don't crash an functions returning NULL CairoMatrix 
  - CairoPattern property convertion bug fixed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_PREREQ(2.52)
 
2
 
 
3
dnl the pygoocanvas version number
 
4
m4_define(pygoocanvas_major_version, 0)
 
5
m4_define(pygoocanvas_minor_version, 4)
 
6
m4_define(pygoocanvas_micro_version, 1)
 
7
m4_define(pygoocanvas_version, pygoocanvas_major_version.pygoocanvas_minor_version.pygoocanvas_micro_version)
 
8
 
 
9
dnl versions of packages we require ...
 
10
m4_define(pygobject_required_version, 2.10.1)
 
11
m4_define(pygtk_required_version, 2.8.4)
 
12
m4_define(goocanvas_required_version, 0.4)
 
13
m4_define(pycairo_required_version,    1.2.0)
 
14
 
 
15
AC_INIT(pygoocanvas, pygoocanvas_version, [http://developer.berlios.de/projects/pygoocanvas/])
 
16
 
 
17
AC_DEFINE(PYGOOCANVAS_MAJOR_VERSION, pygoocanvas_major_version, [PyGoocanvas major version])
 
18
AC_DEFINE(PYGOOCANVAS_MINOR_VERSION, pygoocanvas_minor_version, [PyGoocanvas minor version])
 
19
AC_DEFINE(PYGOOCANVAS_MICRO_VERSION, pygoocanvas_micro_version, [PyGoocanvas macro version])
 
20
 
 
21
AC_CONFIG_SRCDIR([./goocanvasmodule.c])
 
22
AM_CONFIG_HEADER(config.h)
 
23
 
 
24
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
25
 
 
26
dnl put the ACLOCAL flags in the makefile
 
27
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
 
28
 
 
29
AC_CANONICAL_BUILD
 
30
AC_CANONICAL_HOST
 
31
AC_MSG_CHECKING([for some Win32 platform])
 
32
case "$host" in
 
33
  *-*-mingw*|*-*-cygwin*)
 
34
    platform_win32=yes
 
35
    ;;
 
36
  *)
 
37
    platform_win32=no
 
38
    ;;
 
39
esac
 
40
AC_MSG_RESULT([$platform_win32])
 
41
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
 
42
 
 
43
AC_MSG_CHECKING([for native Win32])
 
44
case "$host" in
 
45
  *-*-mingw*)
 
46
    os_win32=yes
 
47
    ;;
 
48
  *)
 
49
    os_win32=no
 
50
    ;;
 
51
esac
 
52
AC_MSG_RESULT([$os_win32])
 
53
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
 
54
 
 
55
AC_DISABLE_STATIC
 
56
AC_LIBTOOL_WIN32_DLL
 
57
AC_PROG_LIBTOOL
 
58
 
 
59
AM_PATH_PYTHON(2.2)
 
60
 
 
61
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
 
62
 
 
63
dnl check pygobject path for docs xsl
 
64
PKG_CHECK_MODULES(PYGOBJECT, [pygobject-2.0 >= pygobject_required_version])
 
65
 
 
66
PYGOBJECT_INCLUDEDIR=`$PKG_CONFIG --variable=pygtkincludedir pygobject-2.0`
 
67
AC_SUBST(PYGOBJECT_INCLUDEDIR)
 
68
 
 
69
PYGOBJECT_DATADIR=`$PKG_CONFIG --variable=datadir pygobject-2.0`
 
70
AC_SUBST(PYGOBJECT_DATADIR)
 
71
 
 
72
PYGOBJECT_FIXXREF="$PYTHON `$PKG_CONFIG --variable=fixxref pygobject-2.0`"
 
73
AC_SUBST(PYGOBJECT_FIXXREF)
 
74
 
 
75
PYGOBJECT_PYGDOCS="`$PKG_CONFIG --variable=pygdocs pygobject-2.0`"
 
76
AC_SUBST(PYGOBJECT_PYGDOCS)
 
77
 
 
78
dnl Building documentation
 
79
AC_ARG_ENABLE(docs,
 
80
  AC_HELP_STRING([--disable-docs], [Disable documentation building]),,
 
81
  enable_docs=yes)
 
82
if test "${enable_docs}" != no; then
 
83
  dnl Check for xsltproc
 
84
  AC_PATH_PROG([XSLTPROC], [xsltproc])
 
85
  if test -z "$XSLTPROC"; then
 
86
    enable_docs=no
 
87
  fi
 
88
fi
 
89
 
 
90
if test x$enable_docs == xyes; then
 
91
   if ! $PKG_CONFIG "pygobject-2.0 >= 2.11.3"; then
 
92
       AC_MSG_WARN([pygobject-2.0 < 2.11.3; disabling generation of docs])
 
93
       enable_docs=no
 
94
   fi
 
95
fi
 
96
 
 
97
AM_CONDITIONAL(ENABLE_DOCS, test x$enable_docs != xno)
 
98
 
 
99
dnl get rid of the -export-dynamic stuff from the configure flags ...
 
100
export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
 
101
 
 
102
dnl pygtk
 
103
PKG_CHECK_MODULES(PYGOOCANVAS, [ dnl
 
104
                         pygtk-2.0 >= pygtk_required_version,
 
105
                         goocanvas >= goocanvas_required_version,
 
106
                         pycairo >= pycairo_required_version
 
107
                         ])
 
108
PYGOOCANVAS_LIBS=`echo $PYGOOCANVAS_LIBS | sed -e "s/$export_dynamic//"`
 
109
PYGTK_DATADIR=`pkg-config --variable=datadir pygtk-2.0`
 
110
 
 
111
AC_SUBST(PYGTK_CFLAGS)
 
112
AC_SUBST(PYGTK_LIBS)
 
113
AC_SUBST(PYGTK_DATADIR)
 
114
 
 
115
 
 
116
dnl codegen
 
117
AC_MSG_CHECKING(for pygtk codegen)
 
118
CODEGENDIR=`pkg-config --variable=codegendir pygtk-2.0`
 
119
if test -f $CODEGENDIR/codegen.py; then
 
120
        CODEGEN=$CODEGENDIR/codegen.py
 
121
        AC_MSG_RESULT(yes)
 
122
else 
 
123
        AC_MSG_RESULT(no)
 
124
        AC_MSG_ERROR([Error: codegen not found (should be shipped with pygtk!)])
 
125
fi
 
126
AC_SUBST(CODEGEN)
 
127
 
 
128
JH_ADD_CFLAG([-Wall])
 
129
JH_ADD_CFLAG([-std=c9x])
 
130
JH_ADD_CFLAG([-fno-strict-aliasing])
 
131
 
 
132
dnl output
 
133
AC_CONFIG_FILES(
 
134
  Makefile
 
135
  demo/Makefile
 
136
  docs/Makefile
 
137
  docs/reference/entities.docbook
 
138
)
 
139
 
 
140
GTK_DOC_CHECK(1.4)
 
141
 
 
142
AC_OUTPUT