2010-05-31 02:33:54 -07:00
|
|
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
|
|
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
2010-08-16 02:59:13 -07:00
|
|
|
m4_define([v_maj], [1])
|
|
|
|
m4_define([v_min], [0])
|
2011-03-17 06:12:50 -07:00
|
|
|
m4_define([v_mic], [99])
|
2010-08-09 12:28:16 -07:00
|
|
|
m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
|
2010-06-03 18:04:24 -07: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']))])
|
2010-05-31 02:33:54 -07:00
|
|
|
##-- When released, remove the dnl on the below line
|
2011-01-28 19:34:44 -08:00
|
|
|
dnl m4_undefine([v_rev])
|
2010-05-31 02:33:54 -07: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])])
|
|
|
|
m4_define([lt_rev], m4_eval(v_maj + v_min))
|
|
|
|
m4_define([lt_cur], v_mic)
|
|
|
|
m4_define([lt_age], v_min)
|
|
|
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
|
|
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
|
|
|
|
2011-01-28 19:05:22 -08:00
|
|
|
AC_INIT([eeze], [v_ver], [enlightenment-devel@lists.sourceforge.net])
|
2010-05-13 03:49:17 -07:00
|
|
|
AC_PREREQ([2.52])
|
|
|
|
AC_CONFIG_SRCDIR([configure.ac])
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2011-01-06 10:52:58 -08:00
|
|
|
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
AH_TOP([
|
|
|
|
#ifndef EFL_CONFIG_H__
|
|
|
|
#define EFL_CONFIG_H__
|
|
|
|
])
|
|
|
|
AH_BOTTOM([
|
|
|
|
#endif /* EFL_CONFIG_H__ */
|
|
|
|
])
|
2010-05-13 03:49:17 -07:00
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE([1.6 dist-bzip2])
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
|
|
|
define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
|
2010-05-22 11:50:27 -07:00
|
|
|
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
|
2010-05-13 03:49:17 -07:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2010-05-31 02:33:54 -07:00
|
|
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
|
|
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
|
|
|
m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
|
|
|
|
m4_ifdef([v_rel], , [m4_define([v_rel], [])])
|
|
|
|
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])
|
|
|
|
version_info="lt_rev:lt_cur:lt_age"
|
|
|
|
release_info="v_rel"
|
2010-05-13 03:49:17 -07:00
|
|
|
AC_SUBST(version_info)
|
2010-05-31 02:33:54 -07:00
|
|
|
AC_SUBST(release_info)
|
|
|
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
|
|
|
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
|
2010-07-08 23:41:31 -07:00
|
|
|
VMAJ=v_maj
|
|
|
|
AC_SUBST(VMAJ)
|
2010-05-22 11:50:27 -07:00
|
|
|
|
|
|
|
### Needed information
|
|
|
|
|
2011-01-06 10:52:58 -08:00
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
2010-12-11 09:04:34 -08:00
|
|
|
requirement_eeze="ecore >= 1.0.0 eina >= 1.0.0 libudev"
|
2010-05-22 11:50:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
### Checks for programs
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_C_O
|
2011-01-28 20:21:53 -08:00
|
|
|
AC_C___ATTRIBUTE__
|
2010-05-22 11:50:27 -07:00
|
|
|
|
|
|
|
# pkg-config
|
2010-05-13 03:49:17 -07:00
|
|
|
PKG_PROG_PKG_CONFIG
|
|
|
|
|
|
|
|
# Check whether pkg-config supports Requires.private
|
|
|
|
AS_IF(
|
|
|
|
[$PKG_CONFIG --atleast-pkgconfig-version 0.22],
|
|
|
|
[pkgconfig_requires_private="Requires.private"],
|
|
|
|
[pkgconfig_requires_private="Requires"]
|
|
|
|
)
|
|
|
|
AC_SUBST(pkgconfig_requires_private)
|
|
|
|
|
2010-05-22 11:50:27 -07:00
|
|
|
# doxygen program for documentation building
|
|
|
|
|
|
|
|
EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
|
|
|
|
|
|
|
|
|
|
|
|
### Checks for libraries
|
|
|
|
|
2010-12-11 09:04:34 -08:00
|
|
|
PKG_CHECK_MODULES([EEZE], [${requirement_eeze}])
|
2010-05-13 03:49:17 -07:00
|
|
|
|
2010-05-20 21:11:58 -07:00
|
|
|
udev_version=$(pkg-config libudev --modversion)
|
|
|
|
|
2010-09-04 04:59:19 -07:00
|
|
|
if test $udev_version -lt 143;then
|
|
|
|
AC_MSG_ERROR([udev version is too old!])
|
|
|
|
elif test $udev_version -lt 148;then
|
2010-05-20 21:11:58 -07:00
|
|
|
AC_MSG_WARN([Old udev version detected, enabling compat code])
|
2010-05-22 12:36:13 -07:00
|
|
|
AC_DEFINE([OLD_UDEV_RRRRRRRRRRRRRR],[1],[compat functionality for udev < 148])
|
2010-05-13 22:45:09 -07:00
|
|
|
fi
|
|
|
|
|
2011-01-28 20:21:53 -08:00
|
|
|
eeze_mount=
|
2011-02-10 19:14:00 -08:00
|
|
|
PKG_CHECK_EXISTS([mount >= 2.18.0],
|
2011-01-28 20:21:53 -08:00
|
|
|
[
|
|
|
|
AC_DEFINE([HAVE_EEZE_MOUNT], [1], [Eeze is mount-capable])
|
|
|
|
AM_CONDITIONAL([HAVE_EEZE_MOUNT], [true])
|
|
|
|
eeze_mount="yes"
|
|
|
|
],
|
|
|
|
AM_CONDITIONAL([HAVE_EEZE_MOUNT], [false])
|
|
|
|
)
|
|
|
|
if test "x$eeze_mount" = "xyes";then
|
|
|
|
with_mount="/bin/mount"
|
|
|
|
with_umount="/bin/umount"
|
|
|
|
AC_ARG_WITH([mount], AS_HELP_STRING([--with-mount], [specify mount bin @<:@default=detect@:>@]))
|
|
|
|
AC_ARG_WITH([umount], AS_HELP_STRING([--with-umount], [specify umount bin @<:@default=detect@:>@]))
|
|
|
|
PKG_CHECK_MODULES([LIBMOUNT], [mount >= 2.18.0])
|
2011-02-10 19:14:00 -08:00
|
|
|
mount_v=$(pkg-config --modversion mount)
|
2011-01-28 20:21:53 -08:00
|
|
|
PKG_CHECK_MODULES([ECORE_FILE], [ecore-file >= 1.0.0])
|
|
|
|
|
|
|
|
if test "x$with_mount" = "xdetect";then
|
|
|
|
AC_PATH_PROG([with_mount], [mount], AC_MSG_ERROR([mount could not be found in PATH]))
|
|
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED([EEZE_MOUNT_BIN], ["$with_mount"], [mount bin to use])
|
|
|
|
|
|
|
|
if test "x$with_umount" = "xdetect";then
|
|
|
|
AC_PATH_PROG([with_umount], [umount], AC_MSG_ERROR([umount could not be found in PATH]))
|
|
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED([EEZE_UNMOUNT_BIN], ["$with_umount"], [umount bin to use])
|
|
|
|
fi
|
2011-02-10 19:14:00 -08:00
|
|
|
AM_CONDITIONAL([OLD_LIBMOUNT], [test -n $mount_v -a $(echo $mount_v | cut -d'.' -f2) -lt 19])
|
|
|
|
if test -z "$OLD_LIBMOUNT_TRUE" ; then
|
|
|
|
AC_DEFINE_UNQUOTED([OLD_LIBMOUNT], [1], [using first version of libmount])
|
|
|
|
fi
|
2010-05-22 11:50:27 -07:00
|
|
|
### Checks for header files
|
|
|
|
|
|
|
|
|
|
|
|
### Checks for types
|
|
|
|
|
|
|
|
|
|
|
|
### Checks for structures
|
|
|
|
|
|
|
|
|
|
|
|
### Checks for compiler characteristics
|
|
|
|
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
|
|
|
if ! test "x${VMIC}" = "x" ; then
|
|
|
|
EFL_COMPILER_FLAG([-Wall])
|
|
|
|
EFL_COMPILER_FLAG([-W])
|
|
|
|
fi
|
|
|
|
|
|
|
|
EFL_COMPILER_FLAG([-Wshadow])
|
|
|
|
|
|
|
|
|
2010-12-11 09:04:34 -08:00
|
|
|
### Binary
|
|
|
|
|
|
|
|
EFL_ENABLE_BIN([eeze-udev-test], ["yes"])
|
|
|
|
|
2010-05-22 11:50:27 -07:00
|
|
|
AC_SUBST(requirement_eeze)
|
|
|
|
|
2010-05-13 03:49:17 -07:00
|
|
|
|
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
doc/eeze.dox
|
|
|
|
doc/Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/lib/Makefile
|
|
|
|
src/bin/Makefile
|
2010-05-22 00:04:00 -07:00
|
|
|
eeze.pc
|
2011-02-01 19:12:08 -08:00
|
|
|
eeze.spec
|
2010-05-13 03:49:17 -07:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
## Info
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo
|
|
|
|
echo "------------------------------------------------------------------------"
|
|
|
|
echo "$PACKAGE $VERSION"
|
|
|
|
echo "------------------------------------------------------------------------"
|
|
|
|
echo
|
|
|
|
echo "Configuration Options Summary:"
|
2011-01-28 20:21:53 -08:00
|
|
|
if test "x$eeze_mount" = "xyes";then
|
|
|
|
echo
|
|
|
|
echo "Mount..................: ${with_mount}"
|
|
|
|
echo "Umount.................: ${with_umount}"
|
|
|
|
echo
|
|
|
|
fi
|
2010-12-11 09:04:34 -08:00
|
|
|
echo "Test...................: ${have_eeze_udev_test}"
|
|
|
|
echo
|
2010-05-22 11:50:27 -07:00
|
|
|
echo "Documentation..........: ${build_doc}"
|
2010-05-13 03:49:17 -07:00
|
|
|
echo
|
|
|
|
echo "Compilation............: make (or gmake)"
|
|
|
|
echo " CPPFLAGS.............: $CPPFLAGS"
|
|
|
|
echo " CFLAGS...............: $CFLAGS"
|
|
|
|
echo " LDFLAGS..............: $LDFLAGS"
|
|
|
|
echo
|
|
|
|
echo "Installation...........: make install (as root if needed, with 'su' or 'sudo')"
|
|
|
|
echo " prefix...............: $prefix"
|
|
|
|
echo
|
2011-01-28 20:21:53 -08:00
|
|
|
|