summaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: cea1cb2f725da642ab43ecd545c960125b7335c6 (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
AC_PREREQ(2.59)

AC_INIT([json-dbus-examples], 0.0.0, [bugs@pengutronix.de])
AC_CONFIG_SRCDIR([services/python/hello-world.py])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST

AM_MAINTAINER_MODE
AM_SILENT_RULES([yes])

CFLAGS="${CFLAGS} -W -Wall"

#
# Checks for programs.
#
AC_CHECK_PROG([HAVE_PYTHON],[python],[yes],[no])
if test "x$HAVE_PYTHON" != "xyes"; then
	AC_MSG_ERROR([Python not found.])
fi

AC_PATH_PROGS([LIGHTTPD],[lighttpd],,)
if test -z "$LIGHTTPD"; then
	AC_MSG_ERROR([lighttpd not found. Define LIGHTTPD=/path/to/lighttpd or make sure lighttpd is in \$PATH])
fi
AC_SUBST(LIGHTTPD)

AC_PATH_PROGS([JSON_DBUS_BRIDGE],[json-dbus-bridge],,)
if test -z "$JSON_DBUS_BRIDGE"; then
	AC_MSG_ERROR([json-dbus-bridge not found. Set JSON_DBUS_BRIDGE=/path/to/json-dbus-bridge or make sure json-dbus-bridge is in \$PATH])
fi
AC_SUBST(JSON_DBUS_BRIDGE)

AC_ARG_WITH([qooxdoo-sdk],AS_HELP_STRING([--with-qooxdoo-sdk=PATH], [Path to qooxdoo sdk]),
	if test -x "$withval/tool/bin/generator.py"; then
		QOOXDOO_SDK="$withval"
	else
		AC_MSG_ERROR(["$withval" contains no valid qooxdoo sdk.])
	fi,
	AC_MSG_ERROR([qooxdoo sdk not found. Please use --with-qooxdoo-sdk=PATH])
)
AC_SUBST(QOOXDOO_SDK)

AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])

AC_CONFIG_FILES([
	Makefile
	web-gui/Makefile
	web-gui/hello-world/Makefile
	lighttpd/lighttpd.conf
	web-gui/hello-world/config.json
])
AC_CONFIG_FILES([run.sh],[chmod +x run.sh])

AC_OUTPUT