1dnl Process this file with autoconf to produce a configure script.
2
3AC_INIT([imagination], [3.0],
4		[http://sourceforge.net/tracker/?group_id=244319&atid=1125540])
5AC_CONFIG_SRCDIR([src/imagination.h])
6AM_INIT_AUTOMAKE
7
8# Enable silent rules if supported
9m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
10
11AM_MAINTAINER_MODE
12
13AC_ISC_POSIX
14AC_PROG_CC
15AM_PROG_CC_STDC
16AC_HEADER_STDC
17
18AC_PROG_INSTALL
19AC_PROG_LN_S
20AC_PROG_INTLTOOL
21
22# for plugins
23AC_DISABLE_STATIC
24AM_PROG_LIBTOOL
25LIBTOOL="$LIBTOOL --silent"
26
27pkg_modules="gtk+-2.0 >= 2.14.0 gthread-2.0"
28PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
29
30sox_modules="sox >= 14.2.0"
31PKG_CHECK_MODULES(SOX, [$sox_modules])
32
33plugins_modules="cairo >= 1.6 glib-2.0 > 2.18.0"
34PKG_CHECK_MODULES(PLUGINS, [$plugins_modules])
35
36# get svn revision
37REVISION="r0"
38if test "x${REVISION}" = "xr0"
39then
40	SVN=`which svn 2>/dev/null`
41	if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}"
42	then
43		REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
44	fi
45fi
46if test "x${REVISION}" != "xr0"
47then
48	# force debug mode for a SVN working copy
49	CFLAGS="-g -Wall"
50else
51	REVISION="-1"
52fi
53AC_DEFINE_UNQUOTED(REVISION, "$REVISION", [subversion revision number])
54
55AC_SUBST(PACKAGE_CFLAGS)
56AC_SUBST(PACKAGE_LIBS)
57
58AC_SUBST(SOX_CFLAGS)
59AC_SUBST(SOX_LIBS)
60
61AC_SUBST(PLUGINS_CFLAGS)
62AC_SUBST(PLUGINS_LIBS)
63
64GETTEXT_PACKAGE=imagination
65AC_SUBST(GETTEXT_PACKAGE)
66AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
67
68AC_PATH_PROG([XSLTPROC], [xsltproc], [yes])
69
70AM_CONDITIONAL([ENABLE_XSLTPROC], [test x"$enable_xsltproc" = x"yes"])
71
72dnl Add the languages which your application supports here.
73ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`"
74AM_GLIB_GNU_GETTEXT
75
76GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
77SOX_VERSION=`$PKG_CONFIG --modversion sox`
78
79AC_OUTPUT([
80Makefile
81src/Makefile
82transitions/Makefile
83doc/Makefile
84doc/en/Makefile
85doc/en/imagination.xml
86doc/en/images/Makefile
87doc/fr/Makefile
88doc/fr/imagination.xml
89doc/fr/images/Makefile
90doc/es/Makefile
91doc/es/imagination.xml
92doc/es/images/Makefile
93doc/pt_BR/Makefile
94doc/pt_BR/imagination.xml
95doc/pt_BR/images/Makefile
96po/Makefile.in
97icons/Makefile
98icons/16x16/Makefile
99icons/24x24/Makefile
100icons/48x48/Makefile
101icons/scalable/Makefile
102])
103
104echo ""
105echo "Imagination configuration:"
106echo "--------------------------"
107echo ""
108echo "Install in  :       ${prefix}/bin"
109echo "GTK version :       ${GTK_VERSION}"
110echo "SOX version :       ${SOX_VERSION}"
111if test "${REVISION}" != "-1"
112then
113	echo "SVN revision:       ${REVISION}"
114fi
115echo ""
116