2008-12-06 10:51:04 -08:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
# get rid of that stupid cache mechanism
|
|
|
|
rm -f config.cache
|
|
|
|
|
2015-01-10 04:04:19 -08:00
|
|
|
AC_INIT(places, 0.20, dave@gurumeditation.it)
|
2008-12-06 10:51:04 -08:00
|
|
|
AC_PREREQ(2.52)
|
|
|
|
AC_CONFIG_SRCDIR(configure.ac)
|
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_ISC_POSIX
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE(1.8)
|
2011-08-27 20:22:49 -07:00
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
2013-01-03 16:55:00 -08:00
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2008-12-06 10:51:04 -08:00
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C___ATTRIBUTE__
|
|
|
|
|
|
|
|
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
|
|
|
|
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2011-06-06 09:40:14 -07:00
|
|
|
m4_ifdef([AM_GNU_GETTEXT_VERSION], [
|
|
|
|
AM_GNU_GETTEXT_VERSION([0.14])
|
|
|
|
])
|
|
|
|
|
|
|
|
m4_ifdef([AM_GNU_GETTEXT], [
|
2008-12-06 10:51:04 -08:00
|
|
|
AM_GNU_GETTEXT([external])
|
2011-06-06 09:40:14 -07:00
|
|
|
po_makefile_in=po/Makefile.in
|
|
|
|
AM_CONDITIONAL([HAVE_PO], [true])
|
|
|
|
],[
|
|
|
|
AM_CONDITIONAL([HAVE_PO], [false])
|
|
|
|
])
|
|
|
|
AC_SUBST(LTLIBINTL)
|
2008-12-06 10:51:04 -08:00
|
|
|
|
2012-01-22 13:14:47 -08:00
|
|
|
# check for Enlightenment
|
2015-01-10 04:04:19 -08:00
|
|
|
PKG_CHECK_MODULES(E, [enlightenment >= 0.19.99])
|
2009-04-21 07:17:42 -07:00
|
|
|
release=$(pkg-config --variable=release enlightenment)
|
|
|
|
MODULE_ARCH="$host_os-$host_cpu-$release"
|
2008-12-06 10:51:04 -08:00
|
|
|
AC_SUBST(MODULE_ARCH)
|
|
|
|
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
|
|
|
|
|
|
|
|
# Find edje_cc
|
2014-01-17 13:10:53 -08:00
|
|
|
PKG_CHECK_MODULES(EDJE, [edje >= 1.8])
|
2008-12-06 10:51:04 -08:00
|
|
|
AC_ARG_WITH(edje-cc,
|
|
|
|
AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]),
|
|
|
|
[
|
|
|
|
v=$withval;
|
|
|
|
EDJE_CC=$v
|
|
|
|
],[
|
|
|
|
EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc
|
|
|
|
]
|
|
|
|
)
|
|
|
|
AC_SUBST(EDJE_CC)
|
|
|
|
AC_MSG_CHECKING([Which edje_cc to use])
|
|
|
|
AC_MSG_RESULT(${EDJE_CC})
|
|
|
|
|
2014-01-17 13:22:59 -08:00
|
|
|
# check for eldbus (default enabled)
|
|
|
|
PKG_CHECK_MODULES([ELDBUS], [eldbus >= 1.8],
|
2013-05-01 14:43:11 -07:00
|
|
|
[have_eldbus="yes"], [have_eldbus="no"])
|
|
|
|
want_eldbus=yes
|
|
|
|
AC_ARG_ENABLE([eldbus],
|
|
|
|
AS_HELP_STRING([--enable-eldbus],[enable UDisks with eldbus support @<:@default=enabled@:>@]),
|
|
|
|
[want_eldbus=$enableval])
|
|
|
|
if test "x$want_eldbus" = "xno";then
|
|
|
|
have_eldbus=no
|
2013-04-18 14:26:06 -07:00
|
|
|
fi
|
|
|
|
|
2015-01-11 11:12:32 -08:00
|
|
|
# check for mount (default enabled)
|
|
|
|
#TODO here check if /etc/fstab and /proc/mounts exists
|
|
|
|
have_mount=yes
|
|
|
|
want_mount=yes
|
|
|
|
AC_ARG_ENABLE([mount],
|
|
|
|
AS_HELP_STRING([--enable-mount],[enable mount fstab/mtab support @<:@default=enabled@:>@]),
|
|
|
|
[want_mount=$enableval])
|
|
|
|
if test "x$want_mount" = "xno";then
|
|
|
|
have_mount=no
|
|
|
|
fi
|
|
|
|
|
2012-01-24 12:59:11 -08:00
|
|
|
# check for eeze (default disabled)
|
|
|
|
PKG_CHECK_MODULES([EEZE], [eeze >= 1.1.99],
|
|
|
|
[have_eeze="yes"], [have_eeze="no"])
|
|
|
|
want_eeze=no
|
|
|
|
AC_ARG_ENABLE([eeze],
|
|
|
|
AS_HELP_STRING([--enable-eeze],[enable eeze support @<:@default=disabled@:>@]),
|
|
|
|
[want_eeze=$enableval])
|
|
|
|
if test "x$want_eeze" != "xyes";then
|
|
|
|
have_eeze=no
|
|
|
|
fi
|
|
|
|
|
2013-04-24 14:02:44 -07:00
|
|
|
|
2013-05-01 14:43:11 -07:00
|
|
|
AM_CONDITIONAL([HAVE_ELDBUS], [test "x$have_eldbus" = "xyes"])
|
|
|
|
test "x$have_eldbus" = "xyes" && AC_DEFINE_UNQUOTED([HAVE_ELDBUS], [1], [enable eldbus support])
|
2013-04-24 14:02:44 -07:00
|
|
|
|
2012-01-24 12:59:11 -08:00
|
|
|
AM_CONDITIONAL([HAVE_EEZE], [test "x$have_eeze" = "xyes"])
|
|
|
|
test "x$have_eeze" = "xyes" && AC_DEFINE_UNQUOTED([HAVE_EEZE], [1], [enable eeze support])
|
|
|
|
|
2015-01-11 11:12:32 -08:00
|
|
|
AM_CONDITIONAL([HAVE_MOUNT], [test "x$have_mount" = "xyes"])
|
|
|
|
test "x$have_mount" = "xyes" && AC_DEFINE_UNQUOTED([HAVE_MOUNT], [1], [enable mount support])
|
|
|
|
|
2012-01-22 13:14:47 -08:00
|
|
|
|
|
|
|
# homedir install
|
2008-12-06 10:51:04 -08:00
|
|
|
datadir=$(pkg-config --variable=modules enlightenment)/${PACKAGE}
|
|
|
|
AC_ARG_ENABLE(homedir-install,
|
|
|
|
AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]),
|
|
|
|
[ datadir="${HOME}/.e/e/modules/${PACKAGE}" ]
|
|
|
|
)
|
|
|
|
|
2012-01-22 13:14:47 -08:00
|
|
|
|
2008-12-06 10:51:04 -08:00
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
src/Makefile
|
|
|
|
module.desktop
|
2009-08-03 07:49:56 -07:00
|
|
|
e_modules-places.spec
|
2011-06-06 09:40:14 -07:00
|
|
|
$po_makefile_in
|
2008-12-06 10:51:04 -08:00
|
|
|
], [
|
|
|
|
])
|
2012-01-22 13:14:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
# report
|
|
|
|
txt_strip() {
|
|
|
|
echo "[$]@" | sed -e 's/^[[ \t]]*\([[^ \t]]*\)[[ \t]]*$/\1/g'
|
|
|
|
}
|
|
|
|
|
|
|
|
echo
|
|
|
|
cat << SUMMARY_EOF
|
|
|
|
Summary:
|
|
|
|
* project.........: $PACKAGE $VERSION
|
|
|
|
* prefix..........: $(txt_strip $prefix)
|
|
|
|
* CFLAGS..........: $(txt_strip $CFLAGS)
|
|
|
|
* LDFLAGS.........: $(txt_strip $LDFLAGS)
|
|
|
|
SUMMARY_EOF
|
|
|
|
echo
|
|
|
|
cat << DEVICE_EOF
|
|
|
|
Device Backends:
|
2014-01-17 13:22:59 -08:00
|
|
|
* build udisks (eldbus)....: $have_eldbus (default)
|
2015-01-11 11:12:32 -08:00
|
|
|
* build mount (fstab/mtab).: $have_mount (default)
|
2013-05-01 14:43:11 -07:00
|
|
|
* build eeze...............: $have_eeze (experimental)
|
2012-01-22 13:14:47 -08:00
|
|
|
DEVICE_EOF
|
|
|
|
echo
|