summaryrefslogtreecommitdiff
path: root/configure.in
blob: 121908a7e42be3001a39a688547b0f158ff0cbd0 (plain)
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
AC_INIT(gtk/gtkmodule.c)
AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(pygtk, 0.7.1)

dnl put the ACLOCAL flags in the makefile
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

AC_DISABLE_STATIC
AC_PROG_LIBTOOL

AM_PATH_PYTHON(2.0)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])

AC_ARG_ENABLE(thread,
[  --disable-thread           Disable pygtk threading support],,
enable_thread=no)

AM_CHECK_PYMOD(thread,,,enable_thread=no)

AC_MSG_CHECKING(whether to enable threading in pygtk)
if test "x$enable_thread" != xno; then
  extra_mods=gthread
  AC_DEFINE(ENABLE_PYGTK_THREADING)
  AC_MSG_RESULT(yes)
else
  extra_mods=
  AC_MSG_RESULT(no)
fi

AM_PATH_GLIB_2_0(1.3.7,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)],gobject)
PKG_CHECK_MODULES(PANGO, pango >= 0.17,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)])
AM_PATH_GTK_2_0(1.3.7,,[AC_MSG_ERROR(maybe you want the gtk-gnome-1-2 branch?)],$extra_mods)

dnl this is so that automake picks up the SUBSTs.  autoconf already has them
AC_SUBST(PANGO_CFLAGS)
AC_SUBST(PANGO_LIBS)

dnl AM_PATH_GDK_IMLIB(1.8, build_imlib=true, build_imlib=false)
dnl AM_CONDITIONAL(BUILD_IMLIB, $build_imlib)

dnl AM_PATH_GTKGL(build_gtkgl=true, build_gtkgl=false)
dnl AM_CONDITIONAL(BUILD_GTKGL, $build_gtkgl)

dnl what to do about libglade-gnome ?
dnl AM_PATH_LIBGLADE(build_libglade=true, build_libglade=false)
dnl AM_CONDITIONAL(BUILD_LIBGLADE, $build_libglade)


AC_ARG_ENABLE(numpy,
[  --disable-numpy            Disable numeric python features],,
enable_numpy=yes)

dnl checks to see if Numeric Python is installed.
if test "x$enable_numpy" != xno; then
  save_CPPFLAGS="$CPPFLAGS"
  CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
  AC_CHECK_HEADER(arrayobject.h,
    [AC_DEFINE(HAVE_NUMPY)
     AC_DEFINE(HAVE_ARRAYOBJECT_H)],
    [AC_CHECK_HEADER(Extensions/arrayobject.h,
      [AC_DEFINE(HAVE_NUMPY)
       AC_DEFINE(HAVE_EXTENSIONS_ARRAYOBJECT_H)],
      [AC_CHECK_HEADER(Numeric/arrayobject.h,
        [AC_DEFINE(HAVE_NUMPY)
         AC_DEFINE(HAVE_NUMERIC_ARRAYOBJECT_H)])])])
  CPPFLAGS="$save_CPPFLAGS"
fi

AC_OUTPUT(Makefile codegen/Makefile gtk/Makefile codegen/pygtk-codegen-2.0)