2010-11-12 08:03:34 -08:00
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2012-03-16 21:17:29 -07:00
m4_define([v_maj], [1])
2012-08-10 03:51:17 -07:00
m4_define([v_min], [7])
m4_define([v_mic], [0])
2012-04-29 18:40:00 -07:00
m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
2010-11-12 08:03:34 -08:00
m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
##-- When released, remove the dnl on the below line
2012-08-10 03:37:05 -07:00
m4_undefine([v_rev])
2010-11-12 08:03:34 -08:00
##-- When doing snapshots - change soname. remove dnl on below line
2012-03-16 21:17:29 -07:00
dnl m4_define([relname], [ver-pre-svn-09])
dnl m4_define([v_rel], [-release relname])
2010-11-12 08:03:34 -08:00
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])],
[m4_define([v_ver], [v_maj.v_min.v_mic])])
2012-07-10 14:18:18 -07:00
m4_define([lt_cur], m4_eval(v_maj + v_min))
m4_define([lt_rev], v_mic)
2010-11-12 08:03:34 -08:00
m4_define([lt_age], v_min)
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
2012-08-10 03:37:05 -07:00
AC_INIT([ethumb], [v_ver-alpha], [enlightenment-devel@lists.sourceforge.net])
2009-09-17 05:04:35 -07:00
AC_PREREQ([2.52])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
2009-03-30 14:22:52 -07:00
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
2011-01-06 10:54:39 -08:00
AC_CONFIG_HEADERS([config.h])
AH_TOP([
#ifndef EFL_CONFIG_H__
#define EFL_CONFIG_H__
])
AH_BOTTOM([
#endif /* EFL_CONFIG_H__ */
])
2010-08-12 11:07:23 -07:00
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
2010-03-01 16:36:41 -08:00
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
2009-03-30 14:22:52 -07:00
_XTERM_COLORS
2010-11-12 08:03:34 -08:00
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
m4_ifdef([v_rel], , [m4_define([v_rel], [])])
2012-03-16 21:17:29 -07:00
AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
2012-07-10 14:18:18 -07:00
version_info="lt_cur:lt_rev:lt_age"
2010-11-12 08:03:34 -08:00
release_info="v_rel"
AC_SUBST(version_info)
AC_SUBST(release_info)
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
VMAJ=v_maj
AC_SUBST(VMAJ)
dnl we just have set the version info, then:
AC_SUBST(version_info)
2009-03-30 14:22:52 -07:00
AC_PROG_CC
2011-11-04 13:32:46 -07:00
AC_PROG_CC_STDC
2009-03-30 14:22:52 -07:00
AM_PROG_CC_C_O
AC_HEADER_STDC
2009-07-16 14:49:14 -07:00
AC_C___ATTRIBUTE__
2009-03-30 14:22:52 -07:00
dnl AC_C_CONST is bogus, its tests fails on -Wall -O1 ( uninitialized values)
dnl AC_C_CONST
2009-11-01 13:55:15 -08:00
AC_LIBTOOL_WIN32_DLL
2010-03-01 16:36:41 -08:00
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])
define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])
2009-03-30 14:22:52 -07:00
AC_PROG_LIBTOOL
2009-11-08 21:41:41 -08:00
#themesdir="${datadir}/ethumb/data/frames"
#AC_SUBST(themesdir)
#AS_AC_EXPAND(THEMESDIR, $themesdir)
#AC_DEFINE_UNQUOTED(THEMESDIR, ["$THEMESDIR"], [Where frame theme files are installed.]
#)
#AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
#AC_DEFINE_UNQUOTED(SYSCONFDIR, ["$SYSCONFDIR"], [Where system configuration is stored])
2009-04-17 16:33:45 -07:00
2009-09-16 23:08:10 -07:00
EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
2009-09-17 05:04:35 -07:00
with_max_log_level="<unset>"
AC_ARG_WITH(internal-maximum-log-level,
[AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER],
[limit eina internal log level to the given number, any call to EINA_LOG() with values greater than this will be compiled out, ignoring runtime settings, but saving function calls.])],
[
if test "x${withval}" != "xno"; then
if echo "${withval}" | grep '^[[0-9]]\+$' >/dev/null 2>/dev/null; then
AC_MSG_NOTICE([ignoring any EINA_LOG() with level greater than ${withval}])
AC_DEFINE_UNQUOTED(EINA_LOG_LEVEL_MAXIMUM, ${withval}, [if set, logging is limited to this amount.])
with_max_log_level="${withval}"
else
AC_MSG_ERROR([--with-internal-maximum-log-level takes a decimal number, got "${withval}" instead.])
fi
fi
], [:])
2009-11-01 13:55:15 -08:00
EFL_ETHUMB_BUILD=""
2009-11-06 21:23:47 -08:00
EFL_ETHUMB_CLIENT_BUILD=""
2009-11-01 13:55:15 -08:00
lt_enable_auto_import=""
case "$host_os" in
mingw* | cegcc*)
EFL_ETHUMB_BUILD="-DEFL_ETHUMB_BUILD"
2009-11-06 21:23:47 -08:00
EFL_ETHUMB_CLIENT_BUILD="-DEFL_ETHUMB_CLIENT_BUILD"
2009-11-01 13:55:15 -08:00
lt_enable_auto_import="-Wl,--enable-auto-import"
;;
esac
AC_SUBST(EFL_ETHUMB_BUILD)
2009-11-06 21:23:47 -08:00
AC_SUBST(EFL_ETHUMB_CLIENT_BUILD)
2009-11-01 13:55:15 -08:00
AC_SUBST(lt_enable_auto_import)
2012-07-09 03:20:21 -07:00
PKG_CHECK_MODULES(EINA, [eina >= 1.6.99])
PKG_CHECK_MODULES(EVAS, [evas >= 1.6.99])
PKG_CHECK_MODULES(ECORE, [ecore >= 1.6.99])
PKG_CHECK_MODULES(ECORE_EVAS, [ecore-evas >= 1.6.99])
PKG_CHECK_MODULES(ECORE_FILE, [ecore-file >= 1.6.99 ])
PKG_CHECK_MODULES(EDJE, [edje >= 1.6.99])
PKG_CHECK_MODULES(EET, [eet >= 1.6.99])
2010-10-24 21:10:19 -07:00
EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
2010-08-16 03:29:57 -07:00
2012-07-09 03:20:21 -07:00
requirement_ethumb="eina >= 1.6.99 evas >= 1.6.99 ecore >= 1.6.99 ecore-evas >= 1.6.99 ecore-file >= 1.6.99 edje >= 1.6.99"
2012-03-16 21:17:29 -07:00
requirement_ethumb_client=""
2009-03-30 14:22:52 -07:00
2009-04-17 16:33:45 -07:00
AM_CONDITIONAL(HAVE_EMOTION, false)
define([CHECK_MODULE_EMOTION],
[
AC_ETH_CHECK_PKG(EMOTION, emotion, [], [EMOTION=false])
])
AC_ETH_OPTIONAL_MODULE([emotion], true, [CHECK_MODULE_EMOTION])
if $USE_MODULE_EMOTION ; then
requirement_ethumb="$requirement_ethumb emotion"
fi
2009-04-21 16:03:50 -07:00
AM_CONDITIONAL(HAVE_EPDF, false)
define([CHECK_MODULE_EPDF],
[
AC_ETH_CHECK_PKG(EPDF, epdf, [], [EPDF=false])
])
AC_ETH_OPTIONAL_MODULE([epdf], true, [CHECK_MODULE_EPDF])
if $USE_MODULE_EPDF ; then
requirement_ethumb="$requirement_ethumb epdf"
fi
2009-06-04 14:21:43 -07:00
AM_CONDITIONAL(HAVE_EDBUS, false)
define([CHECK_MODULE_ETHUMBD],
[
AC_ETH_CHECK_PKG(EDBUS, edbus, [], [ETHUMBD=false])
])
AC_ETH_OPTIONAL_MODULE([ethumbd], true, [CHECK_MODULE_ETHUMBD])
if $USE_MODULE_ETHUMBD ; then
2010-09-02 13:12:08 -07:00
dbusservicedir=${datadir}/dbus-1/services
2009-06-04 14:21:43 -07:00
AC_ARG_WITH([dbus-services],
AC_HELP_STRING([--with-dbus-services=DBUS_SERVICES], [specify a directory to store dbus service files.]),
[
dbusservicedir=$withval
]
)
fi
2010-09-19 10:07:35 -07:00
2011-08-02 12:24:53 -07:00
AM_CONDITIONAL(HAVE_LIBEXIF, false)
define([CHECK_MODULE_LIBEXIF],
[
2011-08-02 16:40:12 -07:00
AC_ETH_CHECK_PKG(LIBEXIF, libexif, [], [LIBEXIF=false])
2011-08-02 12:24:53 -07:00
])
AC_ETH_OPTIONAL_MODULE([libexif], true, [CHECK_MODULE_LIBEXIF])
if $USE_MODULE_LIBEXIF ; then
requirement_ethumb="$requirement_ethumb libexif"
fi
2009-06-04 14:21:43 -07:00
2011-04-28 06:25:14 -07:00
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <stdlib.h>
#include <sys/types.h>
#include <sys/xattr.h>
]],
[[
size_t tmp = listxattr("/", NULL, 0);
tmp = getxattr("/", "user.ethumb.md5", NULL, 0);
setxattr("/", "user.ethumb.md5", NULL, 0, 0);
]])],
[
AC_DEFINE(HAVE_XATTR, 1, [Define to 1 if you have 'listxattr', 'setxattr' and 'getxattr'])
have_xattr="yes"
],
[have_xattr="no"])
AC_MSG_CHECKING([for Xattr])
AC_MSG_RESULT([${have_xattr}])
2009-03-30 14:22:52 -07:00
AC_SUBST(requirement_ethumb)
2009-06-04 14:21:43 -07:00
AC_SUBST(requirement_ethumb_client)
AC_SUBST(dbusservicedir)
2009-03-30 14:22:52 -07:00
2011-02-17 23:41:26 -08:00
AC_CONFIG_FILES([
2009-03-30 14:22:52 -07:00
ethumb.pc
2011-02-17 15:05:11 -08:00
ethumb.spec
2009-06-04 14:21:43 -07:00
ethumb_client.pc
org.enlightenment.Ethumb.service
2009-03-30 14:22:52 -07:00
Makefile
src/Makefile
src/bin/Makefile
src/lib/Makefile
2009-06-04 14:21:43 -07:00
src/lib/client/Makefile
2009-04-17 16:33:45 -07:00
src/plugins/Makefile
src/plugins/emotion/Makefile
2009-04-21 16:03:50 -07:00
src/plugins/epdf/Makefile
2011-01-16 11:10:44 -08:00
src/tests/Makefile
2009-03-30 14:22:52 -07:00
data/Makefile
data/frames/Makefile
m4/Makefile
2009-09-16 23:08:10 -07:00
doc/Makefile
2011-08-02 18:21:26 -07:00
doc/Doxyfile
2009-03-30 14:22:52 -07:00
])
2009-09-17 05:04:35 -07:00
2011-02-17 23:41:26 -08:00
AC_OUTPUT
2009-09-17 05:04:35 -07:00
txt_strip() {
echo "[$]@" | sed -e 's/^[[ \t]]*\([[^ \t]]*\)[[ \t]]*$/\1/g'
}
MODS=""
for mod in $OPTIONAL_MODULES; do
MODS="$MODS ${COLOR_HGREEN}+$mod${COLOR_END}"
done
MODS=$(txt_strip $MODS)
UNUSED_MODS=""
for mod in $UNUSED_OPTIONAL_MODULES; do
UNUSED_MODS="$UNUSED_MODS ${COLOR_HRED}-$mod${COLOR_END}"
done
UNUSED_MODS=$(txt_strip $UNUSED_MODS)
cat <<SUMMARY_EOF
Summary:
* project..........: $PACKAGE $VERSION
* prefix...........: $(txt_strip $prefix)
* DBus services dir: $(txt_strip $dbusservicedir)
* CFLAGS...........: $(txt_strip $CFLAGS)
* LDFLAGS..........: $(txt_strip $LDFLAGS)
Configuration Options Summary:
2011-04-28 06:25:14 -07:00
* use xattr........: ${have_xattr}
2009-09-17 05:04:35 -07:00
* maximum log level: ${with_max_log_level}
* documentation....: ${build_doc}
SUMMARY_EOF
if test "x$MODS" != "x"; then
echo -e " * enabled modules..: $MODS"
fi
if test "x$UNUSED_MODS" != "x"; then
echo -e " * disabled modules.: $UNUSED_MODS"
fi
cat << HINT_EOF
now type:
Now type 'make' ('gmake' on some systems) to compile $PACKAGE, and
then afterwards as root (or the user who will install this), type
'make install'. Change users with 'su' or 'sudo' appropriately.
HINT_EOF