use Requires.private field in edbus .pc files if pkg-config 0.22 is installed. We...
[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.062], [enlightenment-devel@lists.sourceforge.net])
5 AC_PREREQ([2.52])
6 AC_CONFIG_SRCDIR([configure.ac])
7 AC_CANONICAL_BUILD
8 AC_CANONICAL_HOST
9
10 AM_INIT_AUTOMAKE(1.6 dist-bzip2)
11 AM_CONFIG_HEADER(config.h)
12
13 AC_PROG_CC
14 AC_HEADER_STDC
15 AM_PROG_CC_C_O
16
17 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
18 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
19 AC_PROG_LIBTOOL
20
21 VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
22 VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
23 VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
24 SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
25 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
26 release="ver-pre-svn-04"
27 econnman_release_info="-release $release"
28 edbus_release_info="-release $release"
29 ehal_release_info="-release $release"
30 enm_release_info="-release $release"
31 enotify_release_info="-release $release"
32 AC_SUBST(version_info)
33 AC_SUBST(econnman_release_info)
34 AC_SUBST(edbus_release_info)
35 AC_SUBST(ehal_release_info)
36 AC_SUBST(enm_release_info)
37 AC_SUBST(enotify_release_info)
38
39 dnl Check enabled modules to build
40 AC_ARG_ENABLE(ehal,
41                                   AC_HELP_STRING([--disable-ehal],
42                                                                           [Disable ehal build]),
43                                   [enable_ehal=$enableval],
44                                   [enable_ehal="yes"])
45 AC_ARG_ENABLE(enm,
46                                   AC_HELP_STRING([--enable-enm],
47                                                                           [Enable enm (network manager) build]),
48                                   [enable_enm=$enableval],
49                                   [enable_enm="no"])
50 AC_ARG_ENABLE(econnman,
51                                   AC_HELP_STRING([--enable-econnman],
52                                                                           [Enable econnman build]),
53                                   [enable_econnman=$enableval],
54                                   [enable_econnman="no"])
55 AC_ARG_ENABLE(enotify,
56                                   AC_HELP_STRING([--disable-enotify],
57                                                                           [Disable enotify build]),
58                                   [enable_enotify=$enableval],
59                                   [enable_enotify="yes"])
60
61 # pkg-config
62 PKG_PROG_PKG_CONFIG
63
64 # Check whether pkg-config supports Requires.private
65 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
66    pkgconfig_requires_private="Requires.private"
67 else
68    pkgconfig_requires_private="Requires"
69 fi
70 AC_SUBST(pkgconfig_requires_private)
71
72 PKG_CHECK_MODULES([EINA], [eina-0])
73
74 PKG_CHECK_MODULES([EDBUS], [
75   dbus-1 >= 0.62
76   ecore >= 0.9.9
77 ])
78
79
80 dnl evas
81 if test "x${enable_enotify}" = "xyes"
82 then
83         PKG_CHECK_MODULES(EVAS, [evas >= 0.9.9], [], [enable_enotify="no"])
84 fi
85
86 AC_ARG_ENABLE(build-test-gui,
87   AS_HELP_STRING([--enable-build-test-gui], [Build with gui for testing]),
88   [ PKG_CHECK_MODULES([HAL_TEST_GUI], [
89     ewl
90     efreet
91     ],
92     # temporarily disable until update to newer tree2 api
93     [AC_DEFINE([EWL_GUI], 0, [An ewl gui for e_dbus_hal])],
94     [AC_DEFINE([EWL_GUI], 0, [An ewl gui for e_dbus_hal])]
95     )
96  ]
97 )
98
99 AM_CONDITIONAL([BUILD_EHAL],     [test "x${enable_ehal}"     = "xyes"])
100 AM_CONDITIONAL([BUILD_ENM],      [test "x${enable_enm}"      = "xyes"])
101 AM_CONDITIONAL([BUILD_ENOTIFY],  [test "x${enable_enotify}"  = "xyes"])
102 AM_CONDITIONAL([BUILD_ECONNMAN], [test "x${enable_econnman}" = "xyes"])
103
104 AC_OUTPUT([
105 e_dbus.spec
106 Makefile
107 src/Makefile
108 src/lib/Makefile
109 src/lib/dbus/Makefile
110 src/lib/hal/Makefile
111 src/lib/nm/Makefile
112 src/lib/notification/Makefile
113 src/lib/connman/Makefile
114 src/bin/Makefile
115 edbus.pc
116 ehal.pc
117 enotify.pc
118 enm.pc
119 econnman.pc
120 ])
121
122
123 #####################################################################
124 ## Info
125
126 echo
127 echo
128 echo
129 echo "------------------------------------------------------------------------"
130 echo "$PACKAGE $VERSION"
131 echo "------------------------------------------------------------------------"
132 echo
133 echo "Modules:"
134 echo
135 echo "  EHal.................: $enable_ehal"
136 echo "  ENM..................: $enable_enm"
137 echo "  EConnman.............: $enable_econnman"
138 echo "  ENotify..............: $enable_enotify"
139 echo
140 echo "Configuration Options Summary:"
141 echo
142 echo "  Compilation..........: make"
143 echo
144 echo "  Installation.........: make install"
145 echo
146 echo "    prefix.............: $prefix"
147 echo