e_dbus/bluez: Initial support to get and set individual properties
[framework/uifw/edbus.git] / configure.ac
1 # get rid of that stupid cache mechanism
2 rm -f config.cache
3
4 AC_INIT([e_dbus], [0.5.0.063], [enlightenment-devel@lists.sourceforge.net])
5 release="ver-pre-svn-05"
6 AC_PREREQ([2.52])
7 AC_CONFIG_SRCDIR([configure.ac])
8 AC_CONFIG_MACRO_DIR([m4])
9 AC_CANONICAL_BUILD
10 AC_CANONICAL_HOST
11
12 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
13 AM_CONFIG_HEADER([config.h])
14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
15
16 AC_PROG_CC
17 AC_HEADER_STDC
18 AM_PROG_CC_C_O
19 AC_C___ATTRIBUTE__
20
21 AC_LIBTOOL_WIN32_DLL
22 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
23 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
24 AC_PROG_LIBTOOL
25
26 VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
27 VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
28 VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
29 SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
30 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
31 econnman_release_info="-release $release"
32 ebluez_release_info="-release $release"
33 edbus_release_info="-release $release"
34 ehal_release_info="-release $release"
35 enm_release_info="-release $release"
36 enotify_release_info="-release $release"
37 AC_SUBST(version_info)
38 AC_SUBST(econnman_release_info)
39 AC_SUBST(ebluez_release_info)
40 AC_SUBST(edbus_release_info)
41 AC_SUBST(ehal_release_info)
42 AC_SUBST(enm_release_info)
43 AC_SUBST(enotify_release_info)
44
45 dnl Check enabled modules to build
46 AC_ARG_ENABLE([ehal],
47    [AC_HELP_STRING([--disable-ehal], [Disable ehal build])],
48    [enable_ehal=$enableval],
49    [enable_ehal="yes"])
50
51 AC_ARG_ENABLE([enm],
52    [AC_HELP_STRING([--enable-enm], [Enable enm (network manager) build])],
53    [enable_enm=$enableval],
54    [enable_enm="no"])
55
56 AC_ARG_ENABLE([econnman],
57    [AC_HELP_STRING([--enable-econnman], [Enable econnman build])],
58    [enable_econnman=$enableval],
59    [enable_econnman="yes"])
60
61 AC_ARG_ENABLE([ebluez],
62    [AC_HELP_STRING([--enable-ebluez], [Enable ebluez build])],
63    [enable_ebluez=$enableval],
64    [enable_ebluez="yes"])
65
66 AC_ARG_ENABLE([enotify],
67    [AC_HELP_STRING([--disable-enotify], [Disable enotify build])],
68    [enable_enotify=$enableval],
69    [enable_enotify="yes"])
70
71 # pkg-config
72 PKG_PROG_PKG_CONFIG
73
74 # Check whether pkg-config supports Requires.private
75 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
76    pkgconfig_requires_private="Requires.private"
77 else
78    pkgconfig_requires_private="Requires"
79 fi
80 AC_SUBST(pkgconfig_requires_private)
81
82 PKG_CHECK_MODULES([EINA], [eina-0])
83
84 PKG_CHECK_MODULES([EDBUS], [
85   dbus-1 >= 0.62
86   ecore >= 0.9.9
87 ])
88
89 ##### Find out the version of DBUS we're using
90 dbus_version=`pkg-config --modversion dbus-1`
91 DBUS_VERSION_MAJOR=`echo $dbus_version | awk -F. '{print $1}'`
92 DBUS_VERSION_MINOR=`echo $dbus_version | awk -F. '{print $2}'`
93 DBUS_VERSION_MICRO=`echo $dbus_version | awk -F. '{print $3}'`
94 if test "z$DBUS_VERSION_MAJOR" = "z"; then
95   DBUS_VERSION_MAJOR="0"
96 fi
97 if test "z$DBUS_VERSION_MINOR" = "z"; then
98   DBUS_VERSION_MINOR="0"
99 fi
100 if test "z$DBUS_VERSION_MICRO" = "z"; then
101   DBUS_VERSION_MICRO="0"
102 fi
103 DBUS_VERSION_CFLAGS="$DBUS_VERSION_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
104 DBUS_VERSION_CFLAGS="$DBUS_VERSION_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
105 DBUS_VERSION_CFLAGS="$DBUS_VERSION_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
106 AC_SUBST(DBUS_VERSION_CFLAGS)
107
108 AC_FUNC_ALLOCA
109
110 dnl evas
111 if test "x${enable_enotify}" = "xyes" ; then
112    PKG_CHECK_MODULES(EVAS, [evas >= 0.9.9], [], [enable_enotify="no"])
113 fi
114
115 AC_ARG_ENABLE([build-test-gui],
116    [AS_HELP_STRING([--enable-build-test-gui], [Build with gui for testing])],
117    [PKG_CHECK_MODULES([HAL_TEST_GUI],
118        [ewl efreet],
119     # temporarily disable until update to newer tree2 api
120     [AC_DEFINE([EWL_GUI], 0, [An ewl gui for e_dbus_hal])],
121     [AC_DEFINE([EWL_GUI], 0, [An ewl gui for e_dbus_hal])])
122    ])
123
124 AM_CONDITIONAL([BUILD_EHAL],     [test "x${enable_ehal}"     = "xyes"])
125 AM_CONDITIONAL([BUILD_ENM],      [test "x${enable_enm}"      = "xyes"])
126 AM_CONDITIONAL([BUILD_ENOTIFY],  [test "x${enable_enotify}"  = "xyes"])
127 AM_CONDITIONAL([BUILD_ECONNMAN], [test "x${enable_econnman}" = "xyes"])
128 AM_CONDITIONAL([BUILD_EBLUEZ], [test "x${enable_ebluez}" = "xyes"])
129
130 EFL_EDBUS_BUILD=""
131 lt_enable_auto_import=""
132 case "$host_os" in
133    mingw* | cegcc*)
134       EFL_EDBUS_BUILD="-DEFL_EDBUS_BUILD"
135       lt_enable_auto_import="-Wl,--enable-auto-import"
136    ;;
137 esac
138 AC_SUBST(EFL_EDBUS_BUILD)
139 AC_SUBST(lt_enable_auto_import)
140
141 AC_OUTPUT([
142 e_dbus.spec
143 Makefile
144 src/Makefile
145 src/lib/Makefile
146 src/lib/dbus/Makefile
147 src/lib/hal/Makefile
148 src/lib/nm/Makefile
149 src/lib/notification/Makefile
150 src/lib/connman/Makefile
151 src/lib/bluez/Makefile
152 src/bin/Makefile
153 edbus.pc
154 ehal.pc
155 enotify.pc
156 enm.pc
157 econnman.pc
158 ebluez.pc
159 ])
160
161
162 #####################################################################
163 ## Info
164
165 echo
166 echo
167 echo
168 echo "------------------------------------------------------------------------"
169 echo "$PACKAGE $VERSION"
170 echo "------------------------------------------------------------------------"
171 echo
172 echo "Configuration Options Summary:"
173 echo
174 echo "  Modules:"
175 echo
176 echo "    EHal...............: $enable_ehal"
177 echo "    ENM................: $enable_enm"
178 echo "    EConnman...........: $enable_econnman"
179 echo "    EBluez.............: $enable_ebluez"
180 echo "    ENotify............: $enable_enotify"
181 echo
182 echo "Compilation............: make (or gmake)"
183 echo "  CPPFLAGS.............: $CPPFLAGS"
184 echo "  CFLAGS...............: $CFLAGS"
185 echo "  LDFLAGS..............: $LDFLAGS"
186 echo
187 echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
188 echo "  prefix...............: $prefix"
189 echo