~alecu/ubuntuone-client/proxy-tunnel-auth

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
220
221
222
223
224
225
226
227
228
229
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)

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

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

m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

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"
   CFLAGS="${CFLAGS} -Wall -Werror"
   AC_SUBST(CFLAGS)
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])

# 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)

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

##################################################
# Check for gtk-doc.
##################################################
GTK_DOC_CHECK(1.0)
DISTCHECK_CONFIGURE_FLAGS="--enable-gtk-doc --disable-gtk-doc-html --disable-rendering --enable-debug"
AC_SUBST(DISTCHECK_CONFIGURE_FLAGS)

##################################################
# Check for introspection
##################################################
GOBJECT_INTROSPECTION_CHECK([0.6.4])
AC_MSG_CHECKING([if gobject-introspection requires new options])
$PKG_CONFIG --atleast-version=0.9.4 gobject-introspection-1.0
new_introspection=$?
if test "x$new_introspection" = "x0"; then
   AC_MSG_RESULT([yes])
else
   AC_MSG_RESULT([no])
fi
AM_CONDITIONAL([HAVE_NEW_INTROSPECTION], [test "x$new_introspection" = "x0"])

# 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

##################################################
# Check for Vala's vapigen
##################################################
VAPIGEN=""
AC_MSG_CHECKING([whether to enable vapi generation])
AC_ARG_ENABLE([vapigen],
	AC_HELP_STRING([--disable-vapigen],
	               [Build the vapi for libsyncdaemon [default=enabled]]),
	[enable_vapigen=$enableval],
	[enable_vapigen=yes])
if test "x$enable_vapigen" = "xyes"; then
   if test "x$found_introspection" = "xyes"; then
      AC_MSG_RESULT([yes])
      AC_PATH_PROG([VAPIGEN], [vapigen], [])
      AM_PROG_VALAC()
   else
      AC_MSG_RESULT([no])
      AC_MSG_RESULT([gobject-introspection is required to generate a vapi])
   fi
else
   AC_MSG_RESULT([no])
fi
AC_SUBST(VAPIGEN)
AM_CONDITIONAL([HAVE_VAPIGEN], [test "x$VAPIGEN" != "x" -a "x$enable_vapigen" = "xyes"])

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)

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_PING_URL="https://one.ubuntu.com/oauth/sso-finished-so-get-tokens/"
AC_SUBST(SSO_APP_NAME)
AC_SUBST(SSO_TC_URL)
AC_SUBST(SSO_PING_URL)
AC_DEFINE_UNQUOTED([SSO_APP_NAME], ["$SSO_APP_NAME"], ["The Ubuntu One app name."])
AC_DEFINE_UNQUOTED([SSO_TC_URL], ["$SSO_TC_URL"], ["The Ubuntu One terms and conditions URL."])
AC_DEFINE_UNQUOTED([SSO_PING_URL], ["$SSO_PING_URL"], ["The Ubuntu One url to ping to when new tokens are stored."])

AC_CONFIG_FILES([
Makefile
data/Makefile
libsyncdaemon/Makefile
libsyncdaemon/libsyncdaemon-1.0.pc
po/Makefile.in
docs/Makefile
docs/reference/Makefile
])

if [[ -n "$(lsb_release -r | grep -v '1[2-9].[0-9][0-9]')" ]]; then 
    REACTOR="glib"; 
else
    REACTOR="gi"
fi
AC_SUBST(REACTOR)

AC_OUTPUT