this is how you spell daemon
[framework/uifw/edbus.git] / configure.ac
1 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
3 m4_define([v_maj], [1])
4 m4_define([v_min], [0])
5 m4_define([v_mic], [0])
6 m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v exported || 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
9 m4_undefine([v_rev])
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_rev], m4_eval(v_maj + v_min))
17 m4_define([lt_cur], v_mic)
18 m4_define([lt_age], v_min)
19 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
20 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
21
22 AC_INIT([e_dbus], [v_ver.beta3], [enlightenment-devel@lists.sourceforge.net])
23 AC_PREREQ([2.52])
24 AC_CONFIG_SRCDIR([configure.ac])
25 AC_CONFIG_MACRO_DIR([m4])
26 AC_CANONICAL_BUILD
27 AC_CANONICAL_HOST
28
29 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
30 AM_CONFIG_HEADER([config.h])
31 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
32
33 AC_LIBTOOL_WIN32_DLL
34 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
35 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
36 AC_PROG_LIBTOOL
37
38 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
39 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
40 m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
41 m4_ifdef([v_rel], , [m4_define([v_rel], [])])
42 AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
43 AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
44 AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
45 AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
46 version_info="lt_rev:lt_cur:lt_age"
47 release_info="v_rel"
48 AC_SUBST(version_info)
49 AC_SUBST(release_info)
50 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
51 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
52 VMAJ=v_maj
53 AC_SUBST(VMAJ)
54
55 ### Needed information
56
57 want_ebluez="yes"
58 want_econnman="yes"
59 want_ehal="yes"
60 want_enotify="yes"
61 want_eofono="yes"
62 want_eukit="yes"
63
64 case "$host_os" in
65    mingw*)
66       want_ebluez="no"
67       want_econnman="no"
68       want_ehal="no"
69       want_enotify="no"
70       want_eofono="no"
71       want_eukit="no"
72       ;;
73 esac
74
75 requirement_ebluez="edbus >= 1.0.0"
76 requirement_econnman="edbus >= 1.0.0"
77 requirement_edbus="ecore >= 1.0.0 eina >= 1.0.0 dbus-1 >= 0.62"
78 requirement_ehal="edbus >= 1.0.0"
79 requirement_enotify="edbus >= 1.0.0"
80 requirement_eofono="edbus >= 1.0.0"
81 requirement_eukit="edbus >= 1.0.0"
82 requirement_dbus="dbus-1 >= 0.62"
83
84 ### Additional options to configure
85
86 dnl Check enabled modules to build
87
88 AC_ARG_ENABLE([ebluez],
89    [AC_HELP_STRING([--enable-ebluez], [Enable ebluez build])],
90    [enable_ebluez=$enableval],
91    [enable_ebluez="${want_ebluez}"])
92
93 AC_ARG_ENABLE([econnman],
94    [AC_HELP_STRING([--enable-econnman], [Enable econnman build])],
95    [enable_econnman=$enableval],
96    [enable_econnman="${want_econnman}"])
97
98 AC_ARG_ENABLE([ehal],
99    [AC_HELP_STRING([--disable-ehal], [Disable ehal build])],
100    [enable_ehal=$enableval],
101    [enable_ehal="${want_ehal}"])
102
103 AC_ARG_ENABLE([enotify],
104    [AC_HELP_STRING([--disable-enotify], [Disable enotify build])],
105    [enable_enotify=$enableval],
106    [enable_enotify="${want_enotify}"])
107
108 AC_ARG_ENABLE([eofono],
109    [AC_HELP_STRING([--enable-eofono], [Enable eofono build])],
110    [enable_eofono=$enableval],
111    [enable_eofono="${want_eofono}"])
112
113 AC_ARG_ENABLE([eukit],
114    [AC_HELP_STRING([--disable-eukit], [Disable eukit build])],
115    [enable_eukit=$enableval],
116    [enable_eukit="${want_eukit}"])
117
118
119 ### Checks for programs
120
121 AC_PROG_CC
122 AM_PROG_CC_C_O
123
124 # pkg-config
125 PKG_PROG_PKG_CONFIG
126
127 # Check whether pkg-config supports Requires.private
128 if $PKG_CONFIG --atleast-pkgconfig-version 0.22 ; then
129    pkgconfig_requires_private="Requires.private"
130 else
131    pkgconfig_requires_private="Requires"
132 fi
133 AC_SUBST(pkgconfig_requires_private)
134
135 # doxygen program for documentation building
136 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
137
138
139 ### Checks for libraries
140
141 PKG_CHECK_MODULES([EDBUS], [ecore >= 1.0.0 eina >= 1.0.0 dbus-1 >= 0.62])
142
143 # Find out the version of DBUS we're using
144 dbus_version=`pkg-config --modversion dbus-1`
145 DBUS_VERSION_MAJOR=`echo $dbus_version | awk -F. '{print $1}'`
146 DBUS_VERSION_MINOR=`echo $dbus_version | awk -F. '{print $2}'`
147 DBUS_VERSION_MICRO=`echo $dbus_version | awk -F. '{print $3}'`
148
149 if test "z$DBUS_VERSION_MAJOR" = "z" ; then
150    DBUS_VERSION_MAJOR="0"
151 fi
152
153 if test "z$DBUS_VERSION_MINOR" = "z" ; then
154    DBUS_VERSION_MINOR="0"
155 fi
156
157 if test "z$DBUS_VERSION_MICRO" = "z" ; then
158    DBUS_VERSION_MICRO="0"
159 fi
160
161 DBUS_VERSION_CFLAGS="$DBUS_VERSION_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
162 DBUS_VERSION_CFLAGS="$DBUS_VERSION_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
163 DBUS_VERSION_CFLAGS="$DBUS_VERSION_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
164 AC_SUBST(DBUS_VERSION_CFLAGS)
165
166 # Dependencies for the libraries
167 if test "x${enable_enotify}" = "xyes" ; then
168    PKG_CHECK_MODULES([EVAS],
169       [evas >= 1.0.0],
170       [requirement_enotify="evas >= 1.0.0 ${requirement_enotify}"],
171       [enable_enotify="no"])
172 fi
173
174 AM_CONDITIONAL([BUILD_EBLUEZ],   [test "x${enable_ebluez}"   = "xyes"])
175 AM_CONDITIONAL([BUILD_ECONNMAN], [test "x${enable_econnman}" = "xyes"])
176 AM_CONDITIONAL([BUILD_EHAL],     [test "x${enable_ehal}"     = "xyes"])
177 AM_CONDITIONAL([BUILD_ENOTIFY],  [test "x${enable_enotify}"  = "xyes"])
178 AM_CONDITIONAL([BUILD_EOFONO],   [test "x${enable_eofono}"   = "xyes"])
179 AM_CONDITIONAL([BUILD_EUKIT],    [test "x${enable_eukit}"    = "xyes"])
180
181 # Dependencies for the binaries
182
183 EFL_ENABLE_BIN([edbus-test], ["yes"])
184 EFL_ENABLE_BIN([edbus-test-client], ["yes"])
185 EFL_ENABLE_BIN([edbus-bluez-test], [${enable_ebluez}])
186 EFL_ENABLE_BIN([edbus-connman-test], [${enable_econnman}])
187 EFL_ENABLE_BIN([edbus-notification-daemon-test], [${enable_enotify}])
188 EFL_ENABLE_BIN([edbus-notify-send], [${enable_enotify}])
189 EFL_ENABLE_BIN([edbus-notify-test], [${enable_enotify}])
190 EFL_ENABLE_BIN([edbus-ofono-test], [${enable_eofono}])
191 EFL_ENABLE_BIN([edbus-ukit-test], [${enable_eukit}])
192
193 if test "x${have_edbus_test}" = "xyes" ; then
194    PKG_CHECK_MODULES([EDBUS_TEST],
195       [ecore >= 1.0.0 dbus-1 >= 0.62],
196       [have_edbus_test="yes"],
197       [have_edbus_test="no"])
198 fi
199
200 if test "x${have_edbus_test_client}" = "xyes" ; then
201    PKG_CHECK_MODULES([EDBUS_TEST_CLIENT],
202       [ecore >= 1.0.0 dbus-1 >= 0.62],
203       [have_edbus_test_client="yes"],
204       [have_edbus_test_client="no"])
205 fi
206
207 if test "x${have_edbus_bluez_test}" = "xyes" ; then
208    PKG_CHECK_MODULES([EDBUS_BLUEZ_TEST],
209       [ecore >= 1.0.0 eina >= 1.0.0 dbus-1 >= 0.62],
210       [have_edbus_bluez_test="yes"],
211       [have_edbus_bluez_test="no"])
212 fi
213
214 if test "x${have_edbus_connman_test}" = "xyes" ; then
215    PKG_CHECK_MODULES([EDBUS_CONNMAN_TEST],
216       [ecore >= 1.0.0 eina >= 1.0.0 dbus-1 >= 0.62],
217       [have_edbus_connman_test="yes"],
218       [have_edbus_connman_test="no"])
219 fi
220
221 if test "x${have_edbus_notification_daemon_test}" = "xyes" ; then
222    PKG_CHECK_MODULES([EDBUS_NOTIFICATION_DEAMON_TEST],
223       [ecore >= 1.0.0 evas >= 1.0.0 eina >= 1.0.0 dbus-1 >= 0.62],
224       [have_edbus_notification_daemon_test="yes"],
225       [have_edbus_notification_daemon_test="no"])
226 fi
227
228 if test "x${have_edbus_notify_send}" = "xyes" ; then
229    PKG_CHECK_MODULES([EDBUS_NOTIFY_SEND],
230       [ecore >= 1.0.0 evas >= 1.0.0 dbus-1 >= 0.62],
231       [have_edbus_notify_send="yes"],
232       [have_edbus_notify_send="no"])
233 fi
234
235 if test "x${have_edbus_notify_test}" = "xyes" ; then
236    PKG_CHECK_MODULES([EDBUS_NOTIFY_TEST],
237       [ecore >= 1.0.0 evas >= 1.0.0 dbus-1 >= 0.62],
238       [have_edbus_notify_test="yes"],
239       [have_edbus_notify_test="no"])
240 fi
241
242 if test "x${have_edbus_ofono_test}" = "xyes" ; then
243    PKG_CHECK_MODULES([EDBUS_OFONO_TEST],
244       [ecore >= 1.0.0 eina >= 1.0.0 dbus-1 >= 0.62],
245       [have_edbus_ofono_test="yes"],
246       [have_edbus_ofono_test="no"])
247 fi
248
249 if test "x${have_edbus_ukit_test}" = "xyes" ; then
250    PKG_CHECK_MODULES([EDBUS_UKIT_TEST],
251       [ecore >= 1.0.0 eina >= 1.0.0 dbus-1 >= 0.62],
252       [have_edbus_ukit_test="yes"],
253       [have_edbus_ukit_test="no"])
254 fi
255
256
257 ### Checks for header files
258
259
260 ### Checks for types
261
262
263 ### Checks for structures
264
265
266 ### Checks for compiler characteristics
267
268 EFL_EDBUS_BUILD=""
269 case "$host_os" in
270    mingw*)
271       EFL_EDBUS_BUILD="-DEFL_EDBUS_BUILD"
272    ;;
273 esac
274 AC_SUBST(EFL_EDBUS_BUILD)
275
276 AC_HEADER_STDC
277 AC_C___ATTRIBUTE__
278
279 if ! test "x${VMIC}" = "x" ; then
280    EFL_COMPILER_FLAG([-Wall])
281    EFL_COMPILER_FLAG([-W])
282 fi
283
284 EFL_COMPILER_FLAG([-Wshadow])
285
286
287 ### Checks for linker characteristics
288
289 lt_enable_auto_import=""
290 case "$host_os" in
291    mingw*)
292       lt_enable_auto_import="-Wl,--enable-auto-import"
293    ;;
294 esac
295 AC_SUBST(lt_enable_auto_import)
296
297
298 ### Checks for library functions
299
300 AC_FUNC_ALLOCA
301
302
303 AC_SUBST(requirement_ebluez)
304 AC_SUBST(requirement_econnman)
305 AC_SUBST(requirement_edbus)
306 AC_SUBST(requirement_ehal)
307 AC_SUBST(requirement_enotify)
308 AC_SUBST(requirement_eofono)
309 AC_SUBST(requirement_eukit)
310 AC_SUBST(requirement_dbus)
311
312 AC_OUTPUT([
313 e_dbus.spec
314 Makefile
315 doc/Makefile
316 src/Makefile
317 src/lib/Makefile
318 src/lib/bluez/Makefile
319 src/lib/connman/Makefile
320 src/lib/dbus/Makefile
321 src/lib/hal/Makefile
322 src/lib/notification/Makefile
323 src/lib/ofono/Makefile
324 src/lib/ukit/Makefile
325 src/bin/Makefile
326 ebluez.pc
327 econnman.pc
328 edbus.pc
329 ehal.pc
330 enotify.pc
331 eofono.pc
332 eukit.pc
333 ])
334
335
336 #####################################################################
337 ## Info
338
339 echo
340 echo
341 echo
342 echo "------------------------------------------------------------------------"
343 echo "$PACKAGE $VERSION"
344 echo "------------------------------------------------------------------------"
345 echo
346 echo "Configuration Options Summary:"
347 echo
348 echo "  Modules:"
349 echo
350 echo "    EBluez.............: $enable_ebluez"
351 echo "    EConnman...........: $enable_econnman"
352 echo "    EHal...............: $enable_ehal"
353 echo "    ENotify............: $enable_enotify"
354 echo "    EOfono.............: $enable_eofono"
355 echo "    EUkit..............: $enable_eukit"
356 echo
357 echo "  Binaries:"
358 echo
359 echo "    EDbus test.........: $have_edbus_test"
360 echo "    EDbus client test..: $have_edbus_test_client"
361 echo "    EBluez test........: $have_edbus_bluez_test"
362 echo "    EConnman test......: $have_edbus_connman_test"
363 echo "    ENotify Deamon test: $have_edbus_notification_daemon_test"
364 echo "    ENotify send.......: $have_edbus_notify_send"
365 echo "    ENotify test.......: $have_edbus_notify_test"
366 echo "    EOfono test........: $have_edbus_ofono_test"
367 echo "    EUkit test.........: $have_edbus_ukit_test"
368 echo
369 echo "Documentation..........: ${build_doc}"
370 echo
371 echo "Compilation............: make (or gmake)"
372 echo "  CPPFLAGS.............: $CPPFLAGS"
373 echo "  CFLAGS...............: $CFLAGS"
374 echo "  LDFLAGS..............: $LDFLAGS"
375 echo
376 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
377 echo "  prefix...............: $prefix"
378 echo