File: configure.ac

package info (click to toggle)
pygtksourceview 2.2.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,824 kB
  • ctags: 54
  • sloc: sh: 9,128; xml: 4,454; python: 299; makefile: 171; ansic: 26
file content (141 lines) | stat: -rw-r--r-- 3,973 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
AC_PREREQ(2.52)

dnl the pygtksourceview version number
m4_define(pygtksourceview_major_version, 2)
m4_define(pygtksourceview_minor_version, 2)
m4_define(pygtksourceview_micro_version, 0)
m4_define(pygtksourceview_version, pygtksourceview_major_version.pygtksourceview_minor_version.pygtksourceview_micro_version)

dnl versions of packages we require ...
m4_define(pygobject_required_version, 2.8.0)
m4_define(pygtk_required_version, 2.8.0)
m4_define(gtksourceview_required_version, 2.2.0)

AC_INIT(pygtksourceview, pygtksourceview_version, [http://bugzilla.gnome.org/browse.cgi?product=gtksourceview/])

AC_DEFINE(PYGTKSOURCEVIEW_MAJOR_VERSION, pygtksourceview_major_version, [PyGtksourceview major version])
AC_DEFINE(PYGTKSOURCEVIEW_MINOR_VERSION, pygtksourceview_minor_version, [PyGtksourceview minor version])
AC_DEFINE(PYGTKSOURCEVIEW_MICRO_VERSION, pygtksourceview_micro_version, [PyGtksourceview macro version])

AC_CONFIG_SRCDIR([./gtksourceview2module.c])
AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)

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

AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_MSG_CHECKING([for some Win32 platform])
case "$host" in
  *-*-mingw*|*-*-cygwin*)
    platform_win32=yes
    ;;
  *)
    platform_win32=no
    ;;
esac
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")

AC_MSG_CHECKING([for native Win32])
case "$host" in
  *-*-mingw*)
    os_win32=yes
    ;;
  *)
    os_win32=no
    ;;
esac
AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")

AC_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL

if test "x$os_win32" = xyes -a "x$cross_compiling" = xyes; then
MOO_AM_PYTHON_DEVEL_CROSS_MINGW(,[AC_MSG_ERROR(could not find Python headers)])
else
AM_PATH_PYTHON(2.2)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
fi

dnl check pygobject path for docs xsl
PKG_CHECK_MODULES(PYGOBJECT, [pygobject-2.0 >= pygobject_required_version])

PYGOBJECT_INCLUDEDIR=`$PKG_CONFIG --variable=pygtkincludedir pygobject-2.0`
AC_SUBST(PYGOBJECT_INCLUDEDIR)

PYGOBJECT_DATADIR=`$PKG_CONFIG --variable=datadir pygobject-2.0`
AC_SUBST(PYGOBJECT_DATADIR)

PYGOBJECT_FIXXREF="$PYTHON `$PKG_CONFIG --variable=fixxref pygobject-2.0`"
AC_SUBST(PYGOBJECT_FIXXREF)

PYGOBJECT_PYGDOCS="`$PKG_CONFIG --variable=pygdocs pygobject-2.0`"
AC_SUBST(PYGOBJECT_PYGDOCS)

dnl Building documentation
AC_ARG_ENABLE(docs,
  AC_HELP_STRING([--disable-docs], [Disable documentation building]),,
  enable_docs=yes)
if test "${enable_docs}" != no; then
  dnl Check for xsltproc
  AC_PATH_PROG([XSLTPROC], [xsltproc])
  if test -z "$XSLTPROC"; then
    enable_docs=no
  fi
fi

if test x$enable_docs == xyes; then
   if ! $PKG_CONFIG "pygobject-2.0 >= 2.11.3"; then
       AC_MSG_WARN([pygobject-2.0 < 2.11.3; disabling generation of docs])
       enable_docs=no
   fi
fi

AM_CONDITIONAL(ENABLE_DOCS, test x$enable_docs != xno)

dnl get rid of the -export-dynamic stuff from the configure flags ...
export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`

dnl pygtk
PKG_CHECK_MODULES(PYGTKSOURCEVIEW, [
                  pygtk-2.0 >= pygtk_required_version
                  gtksourceview-2.0 >= gtksourceview_required_version
                  ])
PYGTK_DATADIR=`$PKG_CONFIG --variable=datadir pygtk-2.0`

AC_SUBST(PYGTK_DATADIR)


dnl codegen
AC_MSG_CHECKING(for pygtk codegen)
CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygtk-2.0`
echo $CODEGENDIR
if test -f $CODEGENDIR/codegen.py; then
	CODEGEN=$CODEGENDIR/codegen.py
	AC_MSG_RESULT(yes)
else 
	AC_MSG_RESULT(no)
	AC_MSG_ERROR([Error: codegen not found (should be shipped with pygtk!)])
fi
AC_SUBST(CODEGEN)

JH_ADD_CFLAG([-Wall])
JH_ADD_CFLAG([-fno-strict-aliasing])

dnl output
AC_CONFIG_FILES(
  Makefile
  pygtksourceview-2.0.pc
  test/Makefile
  docs/Makefile
  docs/reference/entities.docbook
)

GTK_DOC_CHECK(1.4)

AC_OUTPUT