1 dnl Process this file with autoconf to produce a configure script.
3 # get rid of that stupid cache mechanism
7 AM_INIT_AUTOMAKE(emotion, 0.0.1.004)
8 AM_CONFIG_HEADER(config.h)
19 if test "x${bindir}" = 'x${exec_prefix}/bin'; then
20 if test "x${exec_prefix}" = "xNONE"; then
21 if test "x${prefix}" = "xNONE"; then
22 bindir="${ac_default_prefix}/bin";
24 bindir="${prefix}/bin";
27 if test "x${prefix}" = "xNONE"; then
28 bindir="${ac_default_prefix}/bin";
30 bindir="${prefix}/bin";
35 if test "x${libdir}" = 'x${exec_prefix}/lib'; then
36 if test "x${exec_prefix}" = "xNONE"; then
37 if test "x${prefix}" = "xNONE"; then
38 libdir="${ac_default_prefix}/lib";
40 libdir="${prefix}/lib";
43 if test "x${prefix}" = "xNONE"; then
44 libdir="${ac_default_prefix}/lib";
46 libdir="${prefix}/lib";
51 dnl Set PACKAGE_DATA_DIR in config.h.
52 if test "x${datadir}" = 'x${prefix}/share'; then
53 if test "x${prefix}" = "xNONE"; then
54 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [Package Data Directory])
56 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", [Package Data Directory])
59 AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", [Package Data Directory])
62 dnl Set PACKAGE_BIN_DIR in config.h.
63 if test "x${bindir}" = 'xNONE'; then
64 if test "x${prefix}" = "xNONE"; then
65 AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", [Install Location for Executables])
67 AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", [Install Location for Executables])
70 AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", [Install Location for Executables])
73 dnl Set PACKAGE_LIB_DIR in config.h.
74 if test "x${libdir}" = 'xNONE'; then
75 if test "x${prefix}" = "xNONE"; then
76 AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", [Install Location for Libraries])
78 AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", [Install Location for Libraries])
81 AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", [Install Location for Libraries])
84 dnl Set PACKAGE_SOURCE_DIR in config.h.
85 packagesrcdir=`cd $srcdir && pwd`
86 AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source Directory])
91 VSTART=`echo $v | awk -F_ '{printf("%s", $1);}'`
92 V1=`echo $VSTART | awk -F\. '{printf("%s", $1);}'`
93 V2=`echo $VSTART | awk -F\. '{printf("%s", $2);}'`
94 V3=`echo $VSTART | awk -F\. '{printf("%s", $3);}'`
96 VEND=`echo $v | awk -F_ '{printf("%s", $2);}'`
97 if test -n "$VEND"; then
98 V4=`echo $VEND | sed s/pre//`
101 V2=$(( $V2 * 10000 ));
102 V1=$(( $V1 * 1000000 ));
103 V=$(( $V4 + $V3 + $V2 + $V1 ));
107 AC_PATH_GENERIC(eet, 0.9.10,
109 [ AC_MSG_ERROR(Eet isn't installed)]
112 AC_PATH_GENERIC(evas, 0.9.9,
114 [ AC_MSG_ERROR(Evas isn't installed)]
117 AC_PATH_GENERIC(edje, 0.5.0,
119 [ AC_MSG_ERROR(Edje isn't installed)]
122 AC_PATH_GENERIC(ecore, 0.9.9,
124 [ AC_MSG_ERROR(Ecore isn't installed)]
126 save_CPPFLAGS=$CPPFLAGS
127 CPPFLAGS="$CPPFLAGS $ECORE_CFLAGS"
128 AC_CHECK_HEADERS(Ecore_X.h Ecore_Fb.h)
129 CPPFLAGS=$save_CPPFLAGS
131 AC_PATH_GENERIC(embryo, 0.9.1,
133 [ AC_MSG_ERROR(Embryo isn't installed)]
136 requirements="eet evas edje ecore embryo"
139 AC_HELP_STRING([--disable-xine],[disable xine support @<:@default=auto@:>@]),
140 [enable_xine=$enableval],[enable_xine=auto])
142 if test "$enable_xine" != "no" ; then
143 AC_PATH_GENERIC(xine, 1.1.1, [HAVE_XINE="yes"])
145 if test "$HAVE_XINE" = "yes" ; then
146 requirements="$requirements libxine"
147 xine_plugins=`$XINE_CONFIG --plugindir`
148 AC_SUBST(xine_plugins)
151 if test "$enable_xine$HAVE_XINE" = "yesno" ; then
152 AC_MSG_RESULT(xine not found)
155 AC_ARG_ENABLE(gstreamer,
156 AC_HELP_STRING([--disable-gstreamer],[disable gstreamer support @<:@default=auto@:>@]),
157 [enable_gstreamer=$enableval],[enable_gstreamer=auto])
160 if test "$enable_gstreamer" != "no" ; then
162 dnl Gstreamer version requirement
167 PKG_CHECK_MODULES(GST, \
168 gstreamer-$GST_MAJORMINOR >= $GST_REQS,
169 HAVE_GSTREAMER="yes", AC_MSG_RESULT(no)
172 PKG_CHECK_MODULES(GSTPLUG, \
173 gstreamer-plugins-base-$GST_MAJORMINOR >= $GSTPLUG_REQS,
174 HAVE_GSTPLUG="yes", AC_MSG_RESULT(no)
177 AM_GST_ELEMENT_CHECK(
179 [HAVE_GSTFFMPEG="yes"],
180 [HAVE_GSTFFMPEG="no"])
182 AM_GST_ELEMENT_CHECK(
184 [HAVE_GSTCDIOCDDASRC="yes"],
185 [HAVE_GSTCDIOCDDASRC="no"])
187 if test "$enable_gstreamer$HAVE_GSTREAMER" = "yesno" ; then
188 AC_MSG_RESULT(gstreamer not found)
190 if test "$HAVE_GSTPLUG" = "no"; then
191 if test "$HAVE_GSTREAMER" = "no" ; then
194 AC_MSG_WARN([You should install gstreamer plugins and gst-ffmpeg to properly decode your video and audio files])
195 GSTPLUG_MSG="no (you should install gst-plugins-base and gst-ffmpeg)"
198 if test "$HAVE_GSTFFMPEG" = "no"; then
199 if test "$HAVE_GSTREAMER" = "no" ; then
202 AC_MSG_WARN([You should install gstreamer plugins and gst-ffmpeg to properly decode your video and audio files])
203 GSTPLUG_MSG="no (you should install gst-plugins-base and gst-ffmpeg)"
205 requirements="$requirements gstreamer"
208 requirements="$requirements gstreamer"
211 if test "$HAVE_GSTCDIOCDDASRC" = "no"; then
212 AC_MSG_WARN([You should install gstreamer-plugins-good and make sure that the cdiocddasrc element is installed])
213 GSTCDDA_MSG="no (you should install gst-plugins-good and the cdiocddasrc element)"
215 requirements="$requirements gstreamer"
219 if test "$HAVE_XINE$HAVE_GSTREAMER" = "nono" ; then
220 AC_MSG_ERROR([Xine or Gstreamer must be installed to build emotion])
223 AM_CONDITIONAL([BUILD_XINE_MODULE], [test "$HAVE_XINE" = yes])
224 AM_CONDITIONAL([BUILD_GSTREAMER_MODULE], [test "$HAVE_GSTREAMER" = yes])
226 AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
227 AC_SUBST(dlopen_libs)
229 AC_SUBST(requirements)
243 chmod +x emotion-config
247 #####################################################################
253 echo "------------------------------------------------------------------------"
254 echo "$PACKAGE $VERSION"
255 echo "------------------------------------------------------------------------"
257 echo "Configuration Options Summary:"
260 echo " Xine...............: $HAVE_XINE"
261 echo " Gstreamer..........: $HAVE_GSTREAMER"
262 echo " Gstreamer plugins..: $GSTPLUG_MSG"
263 echo " Gstreamer FFmpeg...: $HAVE_GSTFFMPEG"
264 echo " Gstreamer CDDA.....: $GSTCDDA_MSG"
266 echo " Compilation..........: make"
268 echo " Installation.........: make install"
270 echo " prefix.........: $prefix"
271 echo " binaries.......: $bindir"
272 echo " libraries......: $libdir"
273 echo " headers........: $includedir"