~rodrigo-moya/ubuntuone-client/fix-640955

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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)

AC_INIT([ubuntuone-client], [1.4.1])
AC_CONFIG_SRCDIR([config.h.in])

AM_INIT_AUTOMAKE([1.10 foreign])
AM_CONFIG_HEADER([config.h])

AC_ISC_POSIX
AC_PROG_CC
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG([0.19])
IT_PROG_INTLTOOL([0.40.0])

GETTEXT_PACKAGE="${PACKAGE}"
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
	[translation domain of this package])
AC_SUBST(GETTEXT_PACKAGE)
localedir='$(prefix)/$(DATADIRNAME)/locale'
AC_SUBST(localedir)

# Workaround to make aclocal get the right flags
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS} -I m4")

# Need lndir for builddir != srcdir builds, because Python is not sane
AC_PATH_PROG([LNDIR], [lndir], [])
if test "x$LNDIR" = "x"; then
   AC_MSG_ERROR([lndir is required to build ubuntuone-client])
fi

# Icon sizes we want to install
AC_SUBST([render_sizes], ["16x16 24x24 32x32 48x48"])

# Do we want to enable rendering?
AC_ARG_ENABLE([rendering],
	AC_HELP_STRING([--enable-rendering],
			[Enable icon rendering [default=auto]]),
	[enable_rendering=$enableval],
	[enable_rendering=yes])

if test "x$enable_rendering" = "xyes"; then
   AC_PATH_PROG([ICONTOOL_RENDER], [icontool-render], [false])
   if test "x$ICONTOOL_RENDER" = "xfalse"; then
      AC_MSG_WARN([icontool is required to generate icons])
      enable_rendering=no
   fi
fi
AM_CONDITIONAL(ENABLE_RENDERING, test "x$enable_rendering" = "xyes")

# Alter default logging if we're development vs. stable
AC_MSG_CHECKING([development series build])
DEVVERSION="`echo $PACKAGE_VERSION|cut -d. -f2`"
if expr $DEVVERSION % 2 > /dev/null != "0"; then
   debugging=yes
   AC_MSG_RESULT([yes])
else
   debugging=no
   AC_MSG_RESULT([no])
fi

AC_ARG_ENABLE([debug],
   AC_HELP_STRING([--enable-debug],
       [Enable debug logging by default [default=auto]]),
   enable_debug=$enableval,
   enable_debug=$debugging)
if test "x$enable_debug" != "xno"; then
   LOG_LEVEL="DEBUG"
   LOG_FILE_SIZE="10485760"
else
   LOG_LEVEL="INFO"
   LOG_FILE_SIZE="1048576"
fi
AC_SUBST(LOG_LEVEL)
AC_SUBST(LOG_FILE_SIZE)

# Check for python 2.5
AM_PATH_PYTHON([2.5])

# We need to do some magic for the Python path handling
AC_MSG_CHECKING([for pycentral])
AC_ARG_ENABLE([pycentral],
	AC_HELP_STRING([--enable-pycentral],
			[Enable usage of pycentral [default=disabled]]),
	[enable_pycentral=$enableval],
	[enable_pycentral=no])
if test "x$enable_pycentral" = "xyes"; then
   pythondir="\${datadir}/pyshared"
   AC_SUBST(pythondir)
   AC_MSG_RESULT([yes])
else
   AC_MSG_RESULT([no])
fi

# Specify the path for ubuntu-sso-client source
AC_MSG_CHECKING([for ubuntu-sso-client])
AC_ARG_WITH([sso],
	AC_HELP_STRING([--with-sso],
			[Specify path to ubuntu-sso-client [default=auto]]),
	[with_sso=$withval],
	[with_sso=auto])
SSO_PATH=""
if test "x$with_sso" = "xauto"; then
    SSO_PATH=""
    AC_MSG_RESULT([using system path])
else
    SSO_PATH="$with_sso"
	AC_MSG_RESULT([$SSO_PATH])
fi
AC_SUBST(SSO_PATH)

# Specify the path for ubuntuone-storage-protocol source
AC_MSG_CHECKING([for ubuntuone-storage-protocol])
AC_ARG_WITH([protocol],
	AC_HELP_STRING([--with-protocol],
			[Specify path to storage protocol [default=auto]]),
	[with_protocol=$withval],
	[with_protocol=auto])
USP_PATH=""
if test "x$with_protocol" = "xauto"; then
   USP_PATH=""
   AC_MSG_RESULT([using system path])
else
   USP_PATH="$with_protocol"
   AC_MSG_RESULT([$USP_PATH])
fi
AC_SUBST(USP_PATH)

# Stuff we need to build the extension shlib
PKG_CHECK_MODULES(NAUTILUS, [libnautilus-extension >= 2.6.0 libebook-1.2 gconf-2.0])
AC_SUBST(NAUTILUS_CFLAGS)
AC_SUBST(NAUTILUS_LIBS)

PKG_CHECK_MODULES(DBUS, [dbus-glib-1 >= 0.70])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)

AC_MSG_CHECKING([whether to build contacts grid or list view])
AC_ARG_ENABLE([grid-view],
	AC_HELP_STRING([--enable-grid-view],
	               [Build the contacts grid view [default=disabled]]),
	[enable_grid_view=$enableval],
	[enable_grid_view=no])
if test "x$enable_grid_view" = "xyes"; then
   AC_DEFINE(BUILD_GRID_VIEW, TRUE, [Build grid view for contacts picker])
   AC_MSG_RESULT([grid])
else
   AC_MSG_RESULT([list])
fi

##################################################
# Check for introspection
##################################################
GOBJECT_INTROSPECTION_CHECK([0.6.4])

# Fix up some junk from GIR
if test "x$found_introspection" = "xyes"; then
   INTROSPECTION_GIRDIR_NAME="`basename ${INTROSPECTION_GIRDIR}`"
   INTROSPECTION_TYPELIBDIR_NAME="`basename ${INTROSPECTION_TYPELIBDIR}`"
   AC_SUBST(INTROSPECTION_GIRDIR_NAME)
   AC_SUBST(INTROSPECTION_TYPELIBDIR_NAME)
fi

dnl glib-genmarshal
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)

LIBSYNCDAEMON_CURRENT=1
LIBSYNCDAEMON_REVISION=0
LIBSYNCDAEMON_AGE=0
AC_SUBST(LIBSYNCDAEMON_CURRENT)
AC_SUBST(LIBSYNCDAEMON_REVISION)
AC_SUBST(LIBSYNCDAEMON_AGE)

# Dependencies for the gnome-settings-daemon plugin
PKG_CHECK_MODULES(SETTINGS_PLUGIN,
        gtk+-2.0
        gnome-settings-daemon
)

AC_SUBST(SETTINGS_PLUGIN_CFLAGS)
AC_SUBST(SETTINGS_PLUGIN_LIBS)

GSD_INTLTOOL_PLUGIN_RULE='%.gnome-settings-plugin:   %.gnome-settings-plugin.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
AC_SUBST([GSD_INTLTOOL_PLUGIN_RULE])

dnl ---------------------------------------------------------------------------
dnl - Are we specifying a different dbus root ?
dnl ---------------------------------------------------------------------------
AC_ARG_WITH(dbus-services,
              [AC_HELP_STRING([--with-dbus-services=<dir>],
              [where D-BUS services directory is])])
if ! test -z "$with_dbus_services" ; then
	DBUS_SERVICES_DIR="$with_dbus_services"
else
	# D-BUS 0.23 and higher use $prefix/share/dbus-1/services
	DBUS_SERVICES_DIR="\${datadir}/dbus-1/services"
fi
AC_SUBST(DBUS_SERVICES_DIR)

dnl Strings to pass to SSO data
SSO_APP_NAME="Ubuntu One"
SSO_TC_URL="https://one.ubuntu.com/terms"
SSO_DESCRIPTION="Ubuntu One uses a Ubuntu Single Sign-On (SSO) account, and if you don't yet have one, this process will create one for you"
AC_SUBST(SSO_APP_NAME)
AC_SUBST(SSO_TC_URL)
AC_SUBST(SSO_DESCRIPTION)

AC_CONFIG_FILES([
Makefile
data/Makefile
libsyncdaemon/Makefile
libsyncdaemon/libsyncdaemon-1.0.pc
nautilus/Makefile
po/Makefile.in
gsd-plugin/Makefile
])

AC_OUTPUT