1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [7])
5 m4_define([v_mic], [0])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
7 m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
8 ##-- When released, remove the dnl on the below line
10 ##-- When doing snapshots - change soname. remove dnl on below line
11 dnl m4_define([relname], [ver-pre-svn-07])
12 dnl m4_define([v_rel], [-release relname])
13 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
14 m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])],
15 [m4_define([v_ver], [v_maj.v_min.v_mic])])
16 m4_define([lt_cur], m4_eval(v_maj + v_min))
17 m4_define([lt_rev], v_mic)
18 m4_define([lt_age], v_min)
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
22 AC_INIT([e_dbus], [v_ver], [enlightenment-devel@lists.sourceforge.net])
24 AC_CONFIG_SRCDIR([configure.ac])
25 AC_CONFIG_MACRO_DIR([m4])
27 AC_CONFIG_HEADERS([config.h])
29 #ifndef EFL_CONFIG_H__
30 #define EFL_CONFIG_H__
33 #endif /* EFL_CONFIG_H__ */
36 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
37 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
40 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
41 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
44 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
45 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
46 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
47 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
48 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
49 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
50 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
51 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
52 version_info="lt_cur:lt_rev:lt_age"
54 AC_SUBST(version_info)
55 AC_SUBST(release_info)
56 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
57 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
61 ### Needed information
67 want_econnman0_7x="yes"
76 want_econnman0_7x="no"
84 requirement_ebluez="edbus >= 1.6.99"
85 requirement_econnman0_7x="edbus >= 1.6.99"
86 requirement_edbus="ecore >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62"
87 requirement_ehal="edbus >= 1.6.99"
88 requirement_enotify="edbus >= 1.6.99"
89 requirement_eofono="edbus >= 1.6.99"
90 requirement_eukit="edbus >= 1.6.99"
91 requirement_dbus="dbus-1 >= 0.62"
93 ### Additional options to configure
95 dnl Check enabled modules to build
97 AC_ARG_ENABLE([ebluez],
98 [AC_HELP_STRING([--enable-ebluez], [Enable ebluez build])],
99 [enable_ebluez=$enableval],
100 [enable_ebluez="${want_ebluez}"])
102 AC_ARG_ENABLE([econnman0_7x],
103 [AC_HELP_STRING([--enable-econnman0_7x], [Enable econnman 0.7x build])],
104 [enable_econnman0_7x=$enableval],
105 [enable_econnman0_7x="${want_econnman0_7x}"])
107 AC_ARG_ENABLE([ehal],
108 [AC_HELP_STRING([--disable-ehal], [Disable ehal build])],
109 [enable_ehal=$enableval],
110 [enable_ehal="${want_ehal}"])
112 AC_ARG_ENABLE([enotify],
113 [AC_HELP_STRING([--disable-enotify], [Disable enotify build])],
114 [enable_enotify=$enableval],
115 [enable_enotify="${want_enotify}"])
117 AC_ARG_ENABLE([eofono],
118 [AC_HELP_STRING([--enable-eofono], [Enable eofono build])],
119 [enable_eofono=$enableval],
120 [enable_eofono="${want_eofono}"])
122 AC_ARG_ENABLE([eukit],
123 [AC_HELP_STRING([--disable-eukit], [Disable eukit build])],
124 [enable_eukit=$enableval],
125 [enable_eukit="${want_eukit}"])
127 ### Checks for programs
135 # Check whether pkg-config supports Requires.private
136 if $PKG_CONFIG --atleast-pkgconfig-version 0.22 ; then
137 pkgconfig_requires_private="Requires.private"
139 pkgconfig_requires_private="Requires"
141 AC_SUBST(pkgconfig_requires_private)
143 # doxygen program for documentation building
144 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
147 ### Checks for libraries
149 PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.62])
150 dbus_libs="$DBUS_LIBS"
151 dbus_cflags="$DBUS_CFLAGS"
153 AC_SUBST(dbus_cflags)
154 PKG_CHECK_MODULES([EDBUS], [ecore >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62])
156 # Find out the version of DBUS we're using
157 dbus_version=`pkg-config --modversion dbus-1`
158 DBUS_VERSION_MAJOR=`echo $dbus_version | awk -F. '{print $1}'`
159 DBUS_VERSION_MINOR=`echo $dbus_version | awk -F. '{print $2}'`
160 DBUS_VERSION_MICRO=`echo $dbus_version | awk -F. '{print $3}'`
162 if test "z$DBUS_VERSION_MAJOR" = "z" ; then
163 DBUS_VERSION_MAJOR="0"
166 if test "z$DBUS_VERSION_MINOR" = "z" ; then
167 DBUS_VERSION_MINOR="0"
170 if test "z$DBUS_VERSION_MICRO" = "z" ; then
171 DBUS_VERSION_MICRO="0"
174 DBUS_VERSION_CFLAGS="$DBUS_VERSION_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
175 DBUS_VERSION_CFLAGS="$DBUS_VERSION_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
176 DBUS_VERSION_CFLAGS="$DBUS_VERSION_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
177 AC_SUBST(DBUS_VERSION_CFLAGS)
179 # Dependencies for the libraries
180 if test "x${enable_enotify}" = "xyes" ; then
181 PKG_CHECK_MODULES([EVAS],
183 [requirement_enotify="evas >= 1.6.99 ${requirement_enotify}"],
184 [enable_enotify="no"])
187 AM_CONDITIONAL([BUILD_EBLUEZ], [test "x${enable_ebluez}" = "xyes"])
188 AM_CONDITIONAL([BUILD_ECONNMAN0_7X], [test "x${enable_econnman0_7x}" = "xyes"])
189 AM_CONDITIONAL([BUILD_EHAL], [test "x${enable_ehal}" = "xyes"])
190 AM_CONDITIONAL([BUILD_ENOTIFY], [test "x${enable_enotify}" = "xyes"])
191 AM_CONDITIONAL([BUILD_EOFONO], [test "x${enable_eofono}" = "xyes"])
192 AM_CONDITIONAL([BUILD_EUKIT], [test "x${enable_eukit}" = "xyes"])
194 # Dependencies for the binaries
196 EFL_ENABLE_BIN([edbus-test], ["yes"])
197 EFL_ENABLE_BIN([edbus-test-client], ["yes"])
198 EFL_ENABLE_BIN([edbus-bluez-test], [${enable_ebluez}])
199 EFL_ENABLE_BIN([edbus-connman0_7x-test], [${enable_econnman0_7x}])
200 EFL_ENABLE_BIN([edbus-notification-daemon-test], [${enable_enotify}])
201 EFL_ENABLE_BIN([edbus-notify-send], [${enable_enotify}])
202 EFL_ENABLE_BIN([edbus-notify-test], [${enable_enotify}])
203 EFL_ENABLE_BIN([edbus-ofono-test], [${enable_eofono}])
204 EFL_ENABLE_BIN([edbus-ukit-test], [${enable_eukit}])
205 EFL_ENABLE_BIN([edbus-performance-test], ["no"])
206 EFL_ENABLE_BIN([edbus-async-test], ["yes"])
208 if test "x${have_edbus_test}" = "xyes" ; then
209 PKG_CHECK_MODULES([EDBUS_TEST],
210 [ecore >= 1.6.99 dbus-1 >= 0.62],
211 [have_edbus_test="yes"],
212 [have_edbus_test="no"])
215 if test "x${have_edbus_test_client}" = "xyes" ; then
216 PKG_CHECK_MODULES([EDBUS_TEST_CLIENT],
217 [ecore >= 1.6.99 dbus-1 >= 0.62],
218 [have_edbus_test_client="yes"],
219 [have_edbus_test_client="no"])
222 if test "x${have_edbus_bluez_test}" = "xyes" ; then
223 PKG_CHECK_MODULES([EDBUS_BLUEZ_TEST],
224 [ecore >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62],
225 [have_edbus_bluez_test="yes"],
226 [have_edbus_bluez_test="no"])
229 if test "x${have_edbus_connman0_7x_test}" = "xyes" ; then
230 PKG_CHECK_MODULES([EDBUS_CONNMAN0_7X_TEST],
231 [ecore >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62],
232 [have_edbus_connman0_7x_test="yes"],
233 [have_edbus_connman0_7x_test="no"])
236 if test "x${have_edbus_notification_daemon_test}" = "xyes" ; then
237 PKG_CHECK_MODULES([EDBUS_NOTIFICATION_DAEMON_TEST],
238 [ecore >= 1.6.99 evas >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62],
239 [have_edbus_notification_daemon_test="yes"],
240 [have_edbus_notification_daemon_test="no"])
243 if test "x${have_edbus_notify_send}" = "xyes" ; then
244 PKG_CHECK_MODULES([EDBUS_NOTIFY_SEND],
245 [ecore >= 1.6.99 evas >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62],
246 [have_edbus_notify_send="yes"],
247 [have_edbus_notify_send="no"])
250 if test "x${have_edbus_notify_test}" = "xyes" ; then
251 PKG_CHECK_MODULES([EDBUS_NOTIFY_TEST],
252 [ecore >= 1.6.99 ecore-evas >= 1.6.99 evas >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62],
253 [have_edbus_notify_test="yes"],
254 [have_edbus_notify_test="no"])
257 if test "x${have_edbus_ofono_test}" = "xyes" ; then
258 PKG_CHECK_MODULES([EDBUS_OFONO_TEST],
259 [ecore >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62],
260 [have_edbus_ofono_test="yes"],
261 [have_edbus_ofono_test="no"])
264 if test "x${have_edbus_ukit_test}" = "xyes" ; then
265 PKG_CHECK_MODULES([EDBUS_UKIT_TEST],
266 [ecore >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62],
267 [have_edbus_ukit_test="yes"],
268 [have_edbus_ukit_test="no"])
271 if test "x${have_edbus_performance_test}" = "xyes" ; then
272 PKG_CHECK_MODULES([EDBUS_PERFORMANCE_TEST],
273 [ecore >= 1.6.99 eina >= 1.6.99 dbus-1 >= 0.62 ecore-evas >= 1.6.99 elementary >= 1.6.99 evas >= 1.6.99],
274 [have_edbus_performance_test="yes"],
275 [have_edbus_performance_test="no"])
278 AM_CONDITIONAL([BUILD_EDBUS_PERFORMANCE_TEST], [test "x${have_edbus_performance_test}" = "xyes"])
280 if test "x${have_edbus_async_test}" = "xyes" ; then
281 PKG_CHECK_MODULES([EDBUS_ASYNC_TEST],
282 [ecore >= 1.6.99 dbus-1 >= 0.62],
283 [have_edbus_async_test="yes"],
284 [have_edbus_async_test="no"])
287 ### Checks for header files
293 ### Checks for structures
296 ### Checks for compiler characteristics
301 EFL_EDBUS_BUILD="-DEFL_EDBUS_BUILD"
304 AC_SUBST(EFL_EDBUS_BUILD)
309 if ! test "x${VMIC}" = "x" ; then
310 EFL_COMPILER_FLAG([-Wall])
311 EFL_COMPILER_FLAG([-W])
314 EFL_COMPILER_FLAG([-Wshadow])
317 ### Checks for linker characteristics
319 lt_enable_auto_import=""
322 lt_enable_auto_import="-Wl,--enable-auto-import"
325 AC_SUBST(lt_enable_auto_import)
328 ### Checks for library functions
333 AC_SUBST(requirement_ebluez)
334 AC_SUBST(requirement_econnman0_7x)
335 AC_SUBST(requirement_edbus)
336 AC_SUBST(requirement_ehal)
337 AC_SUBST(requirement_enotify)
338 AC_SUBST(requirement_eofono)
339 AC_SUBST(requirement_eukit)
340 AC_SUBST(requirement_dbus)
349 src/lib/bluez/Makefile
350 src/lib/connman0_7x/Makefile
351 src/lib/dbus/Makefile
353 src/lib/notification/Makefile
354 src/lib/ofono/Makefile
355 src/lib/ukit/Makefile
367 #####################################################################
373 echo "------------------------------------------------------------------------"
374 echo "$PACKAGE $VERSION"
375 echo "------------------------------------------------------------------------"
377 echo "Configuration Options Summary:"
381 echo " EBluez.............: $enable_ebluez"
382 echo " EConnman (0.7x)....: $enable_econnman0_7x"
383 echo " EHal...............: $enable_ehal"
384 echo " ENotify............: $enable_enotify"
385 echo " EOfono.............: $enable_eofono"
386 echo " EUkit..............: $enable_eukit"
390 echo " EDbus test.........: $have_edbus_test"
391 echo " EDbus client test..: $have_edbus_test_client"
392 echo " EDbus async test...: $have_edbus_async_test"
393 echo " EDbus performance..: $have_edbus_performance_test"
394 echo " EBluez test........: $have_edbus_bluez_test"
395 echo " EConnman (0.7x)test: $have_edbus_connman0_7x_test"
396 echo " ENotify Daemon test: $have_edbus_notification_daemon_test"
397 echo " ENotify send.......: $have_edbus_notify_send"
398 echo " ENotify test.......: $have_edbus_notify_test"
399 echo " EOfono test........: $have_edbus_ofono_test"
400 echo " EUkit test.........: $have_edbus_ukit_test"
402 echo "Documentation..........: ${build_doc}"
404 echo "Compilation............: make (or gmake)"
405 echo " CPPFLAGS.............: $CPPFLAGS"
406 echo " CFLAGS...............: $CFLAGS"
407 echo " LDFLAGS..............: $LDFLAGS"
409 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
410 echo " prefix...............: $prefix"