Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: abc04f7ab3aa3d8d5bb5d2b5c385616ce4629299 (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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
AC_INIT([Sugar],[0.63],[],[sugar])

AC_PREREQ([2.59])

GNOME_COMMON_INIT
GNOME_COMPILE_WARNINGS

AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([configure.ac])

AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip])

AM_MAINTAINER_MODE

AC_DISABLE_STATIC
AC_PROG_LIBTOOL

AC_ARG_ENABLE(ns-web-browser,
              AC_HELP_STRING([--enable-ns-web-browser],
                             [Enable features which requires access to nsIWebBrowser]),
	      [have_ns_web_browser=yes],
              [have_ns_web_browser=no])

if test "x$have_ns_web_browser" != "xno"; then
	AC_DEFINE([HAVE_NS_WEB_BROWSER], [1], ["Have nsIWebBrowser"])
fi

AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])

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

AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)

PKG_CHECK_MODULES(PYGTK, pygtk-2.0)

PKG_CHECK_MODULES(PYCAIRO, pycairo)

PKG_CHECK_MODULES(LIB, gtk+-2.0 gstreamer-0.10 gstreamer-plugins-base-0.10)

PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
AC_SUBST(PYGTK_DEFSDIR)

#
# Mozilla
#

AC_ARG_WITH(libxul_sdk,
	AC_HELP_STRING([--with-libxul-sdk=DIR], [Path to libxul SDK]))

if test -d "$with_libxul_sdk"; then

# xulrunner 1.9

GECKO_CFLAGS="-I$with_libxul_sdk/sdk/include -DXPCOM_GLUE"
XPCOMGLUE_LIBS="-L$with_libxul_sdk/sdk/lib -lxpcomglue"
MOZILLA_INCLUDE_DIR="$with_libxul_sdk/include"

AC_SUBST(XPCOMGLUE_LIBS)
AC_SUBST(GECKO_CFLAGS)

AC_DEFINE([HAVE_GECKO_1_9],[1],[Define if we have gecko 1.9])

PKG_CHECK_MODULES(NSPR, [nspr],
  [have_nspr=true],
  [
PKG_CHECK_MODULES(NSPR, [mozilla-nspr],
  [have_nspr=true],
  [
PKG_CHECK_MODULES(NSPR, [xulrunner-nspr],
  [have_nspr=true],
  have_nspr=false)
  ])
  ])

if test "x$have_nspr" = xfalse; then
  AC_MSG_ERROR([Could not find nspr])
fi

else

# xulrunner 1.8

PKG_CHECK_MODULES(GECKO, [xulrunner-gtkmozembed >= 1.8],
  [have_gecko=true; mozpackage=xulrunner],
  [
PKG_CHECK_MODULES(GECKO, [firefox-gtkmozembed >= 1.5],
  [have_gecko=true; mozpackage=firefox],
  have_gecko=false)
  ])

if test "x$have_gecko" = xfalse; then
  AC_MSG_ERROR([Could not find xulrunner, mozilla or firefox $mozilla_required_version])
fi

GECKO_LDFLAGS="-R`$PKG_CONFIG --variable=libdir $mozpackage-gtkmozembed`"
AC_SUBST(GECKO_LDFLAGS)

MOZILLA_INCLUDE_DIR="`$PKG_CONFIG --variable=includedir $mozpackage-gtkmozembed`"
AC_SUBST(MOZILLA_INCLUDE_DIR)

fi

#
# Setup GETTEXT
#
ALL_LINGUAS="it ha ig yo"
GETTEXT_PACKAGE=sugar
AC_PROG_INTLTOOL([0.33])
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT

AC_OUTPUT([
Makefile
lib/Makefile
lib/data/Makefile
lib/src/Makefile
lib/python/Makefile
lib/threadframe/Makefile
services/Makefile
services/presence/Makefile
services/presence2/Makefile
services/clipboard/Makefile
services/datastore/Makefile
shell/Makefile
shell/intro/Makefile
shell/hardware/Makefile
shell/view/Makefile
shell/view/devices/Makefile
shell/view/devices/network/Makefile
shell/view/frame/Makefile
shell/view/home/Makefile
shell/model/Makefile
shell/model/devices/Makefile
shell/model/devices/network/Makefile
services/console/lib/Makefile
services/console/lib/procmem/Makefile
services/console/Makefile
services/console/interface/Makefile
services/console/interface/xo/Makefile
services/console/interface/memphis/plugins/clean_size/Makefile
services/console/interface/memphis/plugins/dirty_size/Makefile
services/console/interface/memphis/plugins/Makefile
services/console/interface/memphis/plugins/memphis_init/Makefile
services/console/interface/memphis/plugins/cpu/Makefile
services/console/interface/memphis/Makefile
services/console/interface/logviewer/Makefile
services/console/interface/terminal/Makefile
sugar/Makefile
sugar/activity/Makefile
sugar/chat/Makefile
sugar/chat/sketchpad/Makefile
sugar/clipboard/Makefile
sugar/graphics/Makefile
sugar/p2p/Makefile
sugar/presence/Makefile
sugar/datastore/Makefile
po/Makefile.in
tools/Makefile
tools/sugar-setup-activity
])