summaryrefslogtreecommitdiff
path: root/python/configure.in
blob: 356e6d83565524e6b7b860d37c14f4196160f413 (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
AC_PREREQ(2.53)
AC_INIT(libsoup-python, 0.0)
AC_CONFIG_SRCDIR(libsoup.defs)
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)

AM_MAINTAINER_MODE
AC_PROG_MAKE_SET

AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC

AM_PROG_LIBTOOL

AC_ARG_ENABLE(more-warnings,
	      [  --disable-more-warnings  Inhibit compiler warnings],
	      set_more_warnings=no)

if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
	CFLAGS="$CFLAGS \
		-Wall -Wstrict-prototypes -Wmissing-declarations \
		-Wmissing-prototypes -Wnested-externs -Wpointer-arith"
fi

dnl ******
dnl Python
dnl ******

AM_PATH_PYTHON()
AM_CHECK_PYTHON_HEADERS(,AC_MSG_ERROR([install python-devel]))
PKG_CHECK_MODULES(PYGOBJECT, pygobject-2.0 >= 2.15.0)
gio_defsdir=`$PKG_CONFIG --variable=defsdir pygobject-2.0`
if test "$gio_defsdir" = ""; then
    # kludge until we can depend on pygobject 2.15.1
    gio_defsdir=`$PKG_CONFIG --variable=fixxref pygobject-2.0 | sed -e 's|xsl/fixxref.py|2.0/defs|'`
fi
GIO_DEFS="$gio_defsdir/gio.defs"
AC_SUBST(GIO_DEFS)

dnl *******
dnl libsoup
dnl *******

if test -f ../libsoup/libsoup-2.4.la; then
	SOUP_CFLAGS=-I..
	SOUP_LIBS=../libsoup/libsoup-2.4.la
else
	PKG_CHECK_MODULES(SOUP, libsoup-2.4)
fi

AC_OUTPUT([Makefile])