forked from enlightenment/efl
244 lines
6.2 KiB
Plaintext
244 lines
6.2 KiB
Plaintext
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
# get rid of that stupid cache mechanism
|
|
rm -f config.cache
|
|
|
|
AC_INIT(configure.in)
|
|
AM_INIT_AUTOMAKE(emotion, 0.0.1.004)
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
AC_C_BIGENDIAN
|
|
AC_ISC_POSIX
|
|
AC_PROG_CC
|
|
AM_PROG_CC_STDC
|
|
AC_HEADER_STDC
|
|
AC_C_CONST
|
|
AM_ENABLE_SHARED
|
|
AM_PROG_LIBTOOL
|
|
|
|
if test "x${bindir}" = 'x${exec_prefix}/bin'; then
|
|
if test "x${exec_prefix}" = "xNONE"; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
bindir="${ac_default_prefix}/bin";
|
|
else
|
|
bindir="${prefix}/bin";
|
|
fi
|
|
else
|
|
if test "x${prefix}" = "xNONE"; then
|
|
bindir="${ac_default_prefix}/bin";
|
|
else
|
|
bindir="${prefix}/bin";
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
if test "x${libdir}" = 'x${exec_prefix}/lib'; then
|
|
if test "x${exec_prefix}" = "xNONE"; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
libdir="${ac_default_prefix}/lib";
|
|
else
|
|
libdir="${prefix}/lib";
|
|
fi
|
|
else
|
|
if test "x${prefix}" = "xNONE"; then
|
|
libdir="${ac_default_prefix}/lib";
|
|
else
|
|
libdir="${prefix}/lib";
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
dnl Set PACKAGE_DATA_DIR in config.h.
|
|
if test "x${datadir}" = 'x${prefix}/share'; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [Package Data Directory])
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", [Package Data Directory])
|
|
fi
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}", [Package Data Directory])
|
|
fi
|
|
|
|
dnl Set PACKAGE_BIN_DIR in config.h.
|
|
if test "x${bindir}" = 'xNONE'; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", [Install Location for Executables])
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", [Install Location for Executables])
|
|
fi
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", [Install Location for Executables])
|
|
fi
|
|
|
|
dnl Set PACKAGE_LIB_DIR in config.h.
|
|
if test "x${libdir}" = 'xNONE'; then
|
|
if test "x${prefix}" = "xNONE"; then
|
|
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", [Install Location for Libraries])
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", [Install Location for Libraries])
|
|
fi
|
|
else
|
|
AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", [Install Location for Libraries])
|
|
fi
|
|
|
|
dnl Set PACKAGE_SOURCE_DIR in config.h.
|
|
packagesrcdir=`cd $srcdir && pwd`
|
|
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source Directory])
|
|
|
|
function vser
|
|
{
|
|
v=$1
|
|
VSTART=`echo $v | awk -F_ '{printf("%s", $1);}'`
|
|
V1=`echo $VSTART | awk -F\. '{printf("%s", $1);}'`
|
|
V2=`echo $VSTART | awk -F\. '{printf("%s", $2);}'`
|
|
V3=`echo $VSTART | awk -F\. '{printf("%s", $3);}'`
|
|
V4="0"
|
|
VEND=`echo $v | awk -F_ '{printf("%s", $2);}'`
|
|
if test -n "$VEND"; then
|
|
V4=`echo $VEND | sed s/pre//`
|
|
fi
|
|
V3=$(( $V3 * 100 ));
|
|
V2=$(( $V2 * 10000 ));
|
|
V1=$(( $V1 * 1000000 ));
|
|
V=$(( $V4 + $V3 + $V2 + $V1 ));
|
|
echo $V
|
|
}
|
|
|
|
AC_PATH_GENERIC(eet, 0.9.10,
|
|
[ ],
|
|
[ AC_MSG_ERROR(Eet isn't installed)]
|
|
)
|
|
|
|
AC_PATH_GENERIC(evas, 0.9.9,
|
|
[ ],
|
|
[ AC_MSG_ERROR(Evas isn't installed)]
|
|
)
|
|
|
|
AC_PATH_GENERIC(edje, 0.5.0,
|
|
[ ],
|
|
[ AC_MSG_ERROR(Edje isn't installed)]
|
|
)
|
|
|
|
AC_PATH_GENERIC(ecore, 0.9.9,
|
|
[ ],
|
|
[ AC_MSG_ERROR(Ecore isn't installed)]
|
|
)
|
|
AC_CHECK_HEADERS(Ecore_X.h Ecore_Fb.h)
|
|
|
|
AC_PATH_GENERIC(embryo, 0.9.1,
|
|
[ ],
|
|
[ AC_MSG_ERROR(Embryo isn't installed)]
|
|
)
|
|
|
|
requirements="eet evas edje ecore embryo"
|
|
|
|
AC_ARG_ENABLE(xine,
|
|
AC_HELP_STRING([--disable-xine],[disable xine support @<:@default=auto@:>@]),
|
|
[enable_xine=$enableval],[enable_xine=auto])
|
|
HAVE_XINE="no"
|
|
if test "$enable_xine" != "no" ; then
|
|
AC_PATH_GENERIC(xine, 1.1.1, [HAVE_XINE="yes"])
|
|
|
|
if test "$HAVE_XINE" = "yes" ; then
|
|
requirements="$requirements libxine"
|
|
xine_plugins=`$XINE_CONFIG --plugindir`
|
|
AC_SUBST(xine_plugins)
|
|
fi
|
|
fi
|
|
if test "$enable_xine$HAVE_XINE" = "yesno" ; then
|
|
AC_MSG_ERROR(xine not found)
|
|
fi
|
|
|
|
AC_ARG_ENABLE(gstreamer,
|
|
AC_HELP_STRING([--disable-gstreamer],[disable gstreamer support @<:@default=auto@:>@]),
|
|
[enable_gstreamer=$enableval],[enable_gstreamer=auto])
|
|
HAVE_GSTREAMER="no"
|
|
HAVE_GSTPLUG="no"
|
|
if test "$enable_gstreamer" != "no" ; then
|
|
|
|
dnl Gstreamer version requirement
|
|
GST_REQS=0.8.10
|
|
GSTPLUG_REQS=0.8.10
|
|
GST_MAJORMINOR=0.8
|
|
|
|
PKG_CHECK_MODULES(GST, \
|
|
gstreamer-$GST_MAJORMINOR >= $GST_REQS,
|
|
HAVE_GSTREAMER="yes", HAVE_GSTREAMER="no")
|
|
AC_MSG_RESULT($HAVE_GSTREAMER)
|
|
|
|
PKG_CHECK_MODULES(GSTPLUG, \
|
|
gstreamer-plugins-$GST_MAJORMINOR >= $GSTPLUG_REQS,
|
|
HAVE_GSTPLUG="yes", HAVE_GSTPLUG="no")
|
|
AC_MSG_RESULT($HAVE_GSTPLUG)
|
|
fi
|
|
if test "$enable_gstreamer$HAVE_GSTREAMER" = "yesno" ; then
|
|
AC_MSG_ERROR(gstreamer not found)
|
|
fi
|
|
if test "$HAVE_GSTPLUG" = "no" ; then
|
|
if test "$HAVE_GSTREAMER" = "no" ; then
|
|
GSTPLUG_MSG="no"
|
|
else
|
|
AC_MSG_WARN([You should install gstreamer plugins and gst-ffmpeg to properly decode your video and audio files])
|
|
GSTPLUG_MSG="no (you should install gst-plugins and gst-ffmpeg)"
|
|
fi
|
|
else
|
|
requirements="$requirements gstreamer"
|
|
GSTPLUG_MSG="yes"
|
|
fi
|
|
|
|
if test "$HAVE_XINE$HAVE_GSTREAMER" = "nono" ; then
|
|
AC_MSG_ERROR([Xine or Gstreamer must be installed to build emotion])
|
|
fi
|
|
|
|
AM_CONDITIONAL([BUILD_XINE_MODULE], [test "$HAVE_XINE" = yes])
|
|
AM_CONDITIONAL([BUILD_GSTREAMER_MODULE], [test "$HAVE_GSTREAMER" = yes])
|
|
|
|
AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
|
|
AC_SUBST(dlopen_libs)
|
|
|
|
AC_SUBST(requirements)
|
|
|
|
AC_OUTPUT([
|
|
Makefile
|
|
emotion.pc
|
|
emotion.spec
|
|
src/Makefile
|
|
src/lib/Makefile
|
|
src/modules/Makefile
|
|
src/bin/Makefile
|
|
data/Makefile
|
|
emotion-config
|
|
debian/changelog
|
|
],[
|
|
chmod +x emotion-config
|
|
])
|
|
|
|
|
|
#####################################################################
|
|
## Info
|
|
|
|
echo
|
|
echo
|
|
echo
|
|
echo "------------------------------------------------------------------------"
|
|
echo "$PACKAGE $VERSION"
|
|
echo "------------------------------------------------------------------------"
|
|
echo
|
|
echo "Configuration Options Summary:"
|
|
echo
|
|
echo " Modules:"
|
|
echo " Xine...............: $HAVE_XINE"
|
|
echo " Gstreamer..........: $HAVE_GSTREAMER"
|
|
echo " Gstreamer plugins..: $GSTPLUG_MSG"
|
|
echo
|
|
echo " Compilation..........: make"
|
|
echo
|
|
echo " Installation.........: make install"
|
|
echo
|
|
echo " prefix.........: $prefix"
|
|
echo " binaries.......: $bindir"
|
|
echo " libraries......: $libdir"
|
|
echo " headers........: $includedir"
|
|
echo
|
|
|