summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorcaro <caro>2012-09-04 07:03:02 +0000
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>2012-09-04 07:03:02 +0000
commitf64e85353bd3ae6796ba7b2e4e5f72ca6dfda391 (patch)
tree61957d7510ba0e66407cf90f6ed36c200f9761bf /m4
parent697bc9d8b649e9707acc82eb41820fa8aaeb3d44 (diff)
downloadeobj-f64e85353bd3ae6796ba7b2e4e5f72ca6dfda391.tar.gz
eobj-f64e85353bd3ae6796ba7b2e4e5f72ca6dfda391.tar.bz2
eobj-f64e85353bd3ae6796ba7b2e4e5f72ca6dfda391.zip
Eo: autotools + minor fixes so that it compiles on Windows (mainly reordering the header files inclusion
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/PROTO/eobj@76109 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
Diffstat (limited to 'm4')
-rw-r--r--m4/efl_benchmark.m433
-rw-r--r--m4/efl_doxygen.m494
-rw-r--r--m4/efl_examples.m463
-rw-r--r--m4/efl_tests.m465
4 files changed, 255 insertions, 0 deletions
diff --git a/m4/efl_benchmark.m4 b/m4/efl_benchmark.m4
new file mode 100644
index 0000000..1d1e22e
--- /dev/null
+++ b/m4/efl_benchmark.m4
@@ -0,0 +1,33 @@
+dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+dnl That code is public domain and can be freely used or copied.
+
+dnl Macro that check if benchmark support is wanted.
+
+dnl Usage: EFL_CHECK_BENCHMARK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Defines the automake conditionnal EFL_ENABLE_BENCHMARK
+
+AC_DEFUN([EFL_CHECK_BENCHMARK],
+[
+
+dnl configure option
+
+AC_ARG_ENABLE([benchmark],
+ [AC_HELP_STRING([--enable-benchmark], [enable benchmarking @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ _efl_enable_benchmark="yes"
+ else
+ _efl_enable_benchmark="no"
+ fi
+ ],
+ [_efl_enable_benchmark="no"])
+
+AC_MSG_CHECKING([whether benchmark are built])
+AC_MSG_RESULT([${_efl_enable_benchmark}])
+
+AM_CONDITIONAL(EFL_ENABLE_BENCHMARK, test "x${_efl_enable_benchmark}" = "xyes")
+
+AS_IF([test "x$_efl_enable_benchmark" = "xyes"], [$1], [$2])
+])
+
+dnl End of efl_benchmark.m4
diff --git a/m4/efl_doxygen.m4 b/m4/efl_doxygen.m4
new file mode 100644
index 0000000..7324af3
--- /dev/null
+++ b/m4/efl_doxygen.m4
@@ -0,0 +1,94 @@
+dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+dnl That code is public domain and can be freely used or copied.
+
+dnl Macro that check if doxygen is available or not.
+
+dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Test for the doxygen program
+dnl Defines efl_doxygen
+dnl Defines the automake conditionnal EFL_BUILD_DOC
+dnl
+AC_DEFUN([EFL_CHECK_DOXYGEN],
+[
+
+dnl
+dnl Disable the build of the documentation
+dnl
+AC_ARG_ENABLE([doc],
+ [AC_HELP_STRING(
+ [--disable-doc],
+ [Disable documentation build @<:@default=enabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ efl_enable_doc="yes"
+ else
+ efl_enable_doc="no"
+ fi
+ ],
+ [efl_enable_doc="yes"])
+
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([${efl_enable_doc}])
+
+if test "x${efl_enable_doc}" = "xyes" ; then
+
+dnl Specify the file name, without path
+
+ efl_doxygen="doxygen"
+
+ AC_ARG_WITH([doxygen],
+ [AC_HELP_STRING(
+ [--with-doxygen=FILE],
+ [doxygen program to use @<:@default=doxygen@:>@])],
+
+dnl Check the given doxygen program.
+
+ [efl_doxygen=${withval}
+ AC_CHECK_PROG([efl_have_doxygen],
+ [${efl_doxygen}],
+ [yes],
+ [no])
+ if test "x${efl_have_doxygen}" = "xno" ; then
+ echo "WARNING:"
+ echo "The doxygen program you specified:"
+ echo "${efl_doxygen}"
+ echo "was not found. Please check the path and make sure "
+ echo "the program exists and is executable."
+ AC_MSG_WARN([no doxygen detected. Documentation will not be built])
+ fi
+ ],
+ [AC_CHECK_PROG([efl_have_doxygen],
+ [${efl_doxygen}],
+ [yes],
+ [no])
+ if test "x${efl_have_doxygen}" = "xno" ; then
+ echo "WARNING:"
+ echo "The doxygen program was not found in your execute path."
+ echo "You may have doxygen installed somewhere not covered by your path."
+ echo ""
+ echo "If this is the case make sure you have the packages installed, AND"
+ echo "that the doxygen program is in your execute path (see your"
+ echo "shell manual page on setting the \$PATH environment variable), OR"
+ echo "alternatively, specify the program to use with --with-doxygen."
+ AC_MSG_WARN([no doxygen detected. Documentation will not be built])
+ fi
+ ])
+else
+ efl_have_doxygen="no"
+fi
+
+dnl
+dnl Substitution
+dnl
+AC_SUBST([efl_doxygen])
+
+if ! test "x${efl_have_doxygen}" = "xyes" ; then
+ efl_enable_doc="no"
+fi
+
+AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_have_doxygen}" = "xyes")
+
+AS_IF([test "x$efl_have_doxygen" = "xyes"], [$1], [$2])
+])
+
+dnl End of efl_doxygen.m4
diff --git a/m4/efl_examples.m4 b/m4/efl_examples.m4
new file mode 100644
index 0000000..2a809ad
--- /dev/null
+++ b/m4/efl_examples.m4
@@ -0,0 +1,63 @@
+dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
+dnl That code is public domain and can be freely used or copied.
+
+dnl Macro that check if building examples is wanted.
+
+dnl Usage: EFL_CHECK_BUILD_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Defines the automake conditionnal EFL_ENABLE_BUILD_EXAMPLES
+
+AC_DEFUN([EFL_CHECK_BUILD_EXAMPLES],
+[
+
+dnl configure option
+
+AC_ARG_ENABLE([build-examples],
+ [AC_HELP_STRING([--enable-build-examples], [enable building examples @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ _efl_enable_build_examples="yes"
+ else
+ _efl_enable_build_examples="no"
+ fi
+ ],
+ [_efl_enable_build_examples="no"])
+
+AC_MSG_CHECKING([whether examples are built])
+AC_MSG_RESULT([${_efl_enable_build_examples}])
+
+AM_CONDITIONAL(EFL_BUILD_EXAMPLES, test "x${_efl_enable_build_examples}" = "xyes")
+
+AS_IF([test "x$_efl_enable_build_examples" = "xyes"], [$1], [$2])
+])
+
+
+dnl Macro that check if installing examples is wanted.
+
+dnl Usage: EFL_CHECK_INSTALL_EXAMPLES([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Defines the automake conditionnal EFL_ENABLE_INSTALL_EXAMPLES
+
+AC_DEFUN([EFL_CHECK_INSTALL_EXAMPLES],
+[
+
+dnl configure option
+
+AC_ARG_ENABLE([install-examples],
+ [AC_HELP_STRING([--enable-install-examples], [enable installing example source files @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ _efl_enable_install_examples="yes"
+ else
+ _efl_enable_install_examples="no"
+ fi
+ ],
+ [_efl_enable_install_examples="no"])
+
+AC_MSG_CHECKING([whether examples are installed])
+AC_MSG_RESULT([${_efl_enable_install_examples}])
+
+AM_CONDITIONAL(EFL_INSTALL_EXAMPLES, test "x${_efl_enable_install_examples}" = "xyes")
+
+AS_IF([test "x$_efl_enable_install_examples" = "xyes"], [$1], [$2])
+])
+
+dnl End of efl_examples.m4
diff --git a/m4/efl_tests.m4 b/m4/efl_tests.m4
new file mode 100644
index 0000000..d8554e1
--- /dev/null
+++ b/m4/efl_tests.m4
@@ -0,0 +1,65 @@
+dnl Copyright (C) 2008-2012 Vincent Torri <vtorri at univ-evry dot fr>
+dnl That code is public domain and can be freely used or copied.
+
+dnl Macro that check if tests programs are wanted and if yes, if
+dnl the Check library is available.
+dnl the lcov program is available.
+
+dnl Usage: EFL_CHECK_TESTS(EFL[, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Define the automake conditionnal EFL_ENABLE_TESTS
+
+AC_DEFUN([EFL_CHECK_TESTS],
+[
+m4_pushdef([UPEFL], m4_translit([$1], [-a-z], [_A-Z]))dnl
+
+dnl configure option
+
+AC_ARG_ENABLE([tests],
+ [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=disabled@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ _efl_enable_tests="yes"
+ else
+ _efl_enable_tests="no"
+ fi
+ ],
+ [_efl_enable_tests="no"])
+
+AC_MSG_CHECKING([whether tests are built])
+AC_MSG_RESULT([${_efl_enable_tests}])
+
+AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+
+if test "x${_efl_enable_tests}" = "xyes" ; then
+ PKG_CHECK_MODULES([CHECK],
+ [check >= 0.9.5],
+ [dummy="yes"],
+ [_efl_enable_tests="no"])
+fi
+
+efl_enable_coverage="no"
+if test "x${_efl_enable_tests}" = "xyes" ; then
+ AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
+ if test "x$have_lcov" = "xyes" ; then
+ m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -fprofile-arcs -ftest-coverage"
+ m4_defn([UPEFL])[]_LIBS="${m4_defn([UPEFL])[]_LIBS} -lgcov"
+# remove any optimisation flag and force debug symbols
+ if test "x${prefer_assert}" = "xno"; then
+ m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -DNDEBUG"
+ else
+ m4_defn([UPEFL])[]_CFLAGS="${m4_defn([UPEFL])[]_CFLAGS} -g -O0 -DDEBUG"
+ fi
+ efl_enable_coverage="yes"
+ else
+ AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
+ fi
+fi
+
+AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
+
+AS_IF([test "x$_efl_enable_tests" = "xyes"], [$2], [$3])
+
+m4_popdef([UPEFL])
+])
+
+dnl End of efl_tests.m4