summaryrefslogtreecommitdiff
path: root/legacy/eet/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2008-10-16 08:41:40 +0000
committerVincent Torri <vincent.torri@gmail.com>2008-10-16 08:41:40 +0000
commit3e4465c4fac433a17bd93da7df2a6b4d5e4b26df (patch)
tree375048807db7bed4ddf33e55604c3c70226d7527 /legacy/eet/m4
parenta3f8f5f27b34f658950da3be95aea9bf93a59d8b (diff)
* add m4 macro for documentation, unit tests and coverage
* put documentation related files in doc, remove gendoc and add a doc rule to create the documentation and a doc tarball named eet-doc-$(version).tar.bz2 * minor cleanup in the autotools SVN revision: 36706
Diffstat (limited to 'legacy/eet/m4')
-rw-r--r--legacy/eet/m4/ac_attribute.m414
-rw-r--r--legacy/eet/m4/doxygen.m473
-rw-r--r--legacy/eet/m4/efl_coverage.m464
-rw-r--r--legacy/eet/m4/efl_doxygen.m488
-rw-r--r--legacy/eet/m4/efl_tests.m444
5 files changed, 210 insertions, 73 deletions
diff --git a/legacy/eet/m4/ac_attribute.m4 b/legacy/eet/m4/ac_attribute.m4
new file mode 100644
index 0000000000..46c1a42291
--- /dev/null
+++ b/legacy/eet/m4/ac_attribute.m4
@@ -0,0 +1,14 @@
1
2AC_DEFUN([AC_C___ATTRIBUTE__],
3[
4 AC_MSG_CHECKING(for __attribute__)
5 AC_CACHE_VAL(ac_cv___attribute__, [
6 AC_TRY_COMPILE([#include <stdlib.h>],
7 [int func(int x); int foo(int x __attribute__ ((unused))) { exit(1); }],
8 ac_cv___attribute__=yes, ac_cv___attribute__=no)])
9 if test "$ac_cv___attribute__" = "yes"; then
10 AC_DEFINE(HAVE___ATTRIBUTE__, 1, [Define to 1 if your compiler has __attribute__])
11 fi
12 AC_MSG_RESULT($ac_cv___attribute__)
13])
14
diff --git a/legacy/eet/m4/doxygen.m4 b/legacy/eet/m4/doxygen.m4
deleted file mode 100644
index 32c134936a..0000000000
--- a/legacy/eet/m4/doxygen.m4
+++ /dev/null
@@ -1,73 +0,0 @@
1dnl Configure script for doxygen
2dnl Vincent Torri 2005-22-09
3dnl
4dnl AM_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
5dnl Test for the doxygen program, and define BUILD_DOCS and DOXYGEN.
6dnl
7AC_DEFUN([AM_CHECK_DOXYGEN],
8 [
9 DOXYGEN="doxygen"
10 dnl
11 dnl Disable the build of the documentation
12 dnl
13 AC_ARG_ENABLE(
14 [build_docs],
15 AC_HELP_STRING(
16 [--disable-build-docs],
17 [Disable the build of the documentation]),
18 [if test "${disable_build_docs}" = "yes" ; then
19 enable_build_docs="no"
20 else
21 enable_build_docs="yes"
22 fi],
23 [enable_build_docs="yes"])
24 dnl
25 dnl Get the prefix where doxygen is installed.
26 dnl
27 AC_ARG_WITH(
28 [doxygen],
29 AC_HELP_STRING(
30 [--with-doxygen=FILE],
31 [doxygen program to use (eg /usr/bin/doxygen)]),
32 dnl
33 dnl Check the given doxygen program.
34 dnl
35 [DOXYGEN=${withval}
36 AC_CHECK_PROG(
37 [BUILD_DOCS],
38 [${DOXYGEN}],
39 [yes],
40 [no])
41 if test $BUILD_DOCS = no; then
42 echo "WARNING:"
43 echo "The doxygen program you specified:"
44 echo "$DOXYGEN"
45 echo "was not found. Please check the path and make sure "
46 echo "the program exists and is executable."
47 AC_MSG_WARN(
48 [Warning: no doxygen detected. Documentation will not be built])
49 fi],
50 [AC_CHECK_PROG(
51 [BUILD_DOCS],
52 [${DOXYGEN}],
53 [yes],
54 [no])
55 if test ${BUILD_DOCS} = no; then
56 echo "WARNING:"
57 echo "The doxygen program was not found in your execute"
58 echo "You may have doxygen installed somewhere not covered by your path."
59 echo ""
60 echo "If this is the case make sure you have the packages installed, AND"
61 echo "that the doxygen program is in your execute path (see your"
62 echo "shell's manual page on setting the \$PATH environment variable), OR"
63 echo "alternatively, specify the program to use with --with-doxygen."
64 AC_MSG_WARN(
65 [Warning: no doxygen detected. Documentation will not be built])
66 fi])
67 dnl
68 dnl Substitution
69 dnl
70 AC_SUBST([DOXYGEN])
71 AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
72 ])
73dnl End of doxygen.m4
diff --git a/legacy/eet/m4/efl_coverage.m4 b/legacy/eet/m4/efl_coverage.m4
new file mode 100644
index 0000000000..1618f76fee
--- /dev/null
+++ b/legacy/eet/m4/efl_coverage.m4
@@ -0,0 +1,64 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if coverage support is wanted and, if yes, if
5dnl lcov is available.
6
7dnl Usage: EFL_CHECK_COVERAGE(tests [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl The parameter 'tests' is used if a dependency is needed. If set to "yes",
9dnl the dependency is available.
10dnl Defines EFL_COVERAGE_CFLAGS and EFL_COVERAGE_LIBS variables
11dnl Defines the automake conditionnal EFL_ENABLE_COVERAGE
12
13AC_DEFUN([EFL_CHECK_COVERAGE],
14[
15
16dnl configure option
17
18AC_ARG_ENABLE([coverage],
19 [AC_HELP_STRING([--enable-coverage], [compile with coverage profiling instrumentation @<:@default=no@:>@])],
20 [
21 if test "x${enableval}" = "xyes" ; then
22 _efl_enable_coverage="yes"
23 else
24 _efl_enable_coverage="no"
25 fi
26 ],
27 [_efl_enable_coverage="no"]
28)
29AC_MSG_CHECKING([whether to use profiling instrumentation])
30AC_MSG_RESULT([$_efl_enable_coverage])
31
32dnl lcov check
33
34if test ! "x$1" = "xyes" -a "x$_efl_enable_coverage" = "xyes" ; then
35 AC_MSG_WARN([Coverage report requested but tests not being built, disable profiling instrumentation.])
36 AC_MSG_WARN([Run configure with --enable-tests])
37 _efl_enable_coverage="no"
38fi
39
40if test "x$_efl_enable_coverage" = "xyes" ; then
41 AC_CHECK_PROG(have_lcov, [lcov], [yes], [no])
42 if test "x$have_lcov" = "xyes" ; then
43 EFL_COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
44 EFL_COVERAGE_LIBS="-lgcov"
45# remove any optimisation flag and force debug symbols
46 EFL_DEBUG_CFLAGS="-g -O0 -DDEBUG"
47 else
48 AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
49 _efl_enable_coverage="no"
50 fi
51fi
52
53dnl Substitution
54AC_SUBST(EFL_COVERAGE_CFLAGS)
55AC_SUBST(EFL_COVERAGE_LIBS)
56
57AM_CONDITIONAL(EFL_ENABLE_COVERAGE, test "x${_efl_enable_coverage}" = "xyes")
58
59if test "x${_efl_enable_coverage}" = "xyes" ; then
60 ifelse([$2], , :, [$2])
61else
62 ifelse([$3], , :, [$3])
63fi
64])
diff --git a/legacy/eet/m4/efl_doxygen.m4 b/legacy/eet/m4/efl_doxygen.m4
new file mode 100644
index 0000000000..49a3dfa0c4
--- /dev/null
+++ b/legacy/eet/m4/efl_doxygen.m4
@@ -0,0 +1,88 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if doxygen is available or not.
5
6dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
7dnl Test for the doxygen program
8dnl Defines DOXYGEN
9dnl Defines the automake conditionnal EFL_BUILD_DOC
10dnl
11AC_DEFUN([EFL_CHECK_DOXYGEN],
12[
13
14DOXYGEN="doxygen"
15
16dnl
17dnl Disable the build of the documentation
18dnl
19AC_ARG_ENABLE([doc],
20 AC_HELP_STRING(
21 [--disable-doc],
22 [Disable the build of the documentation]),
23 [if test "${disable_doc}" = "yes" ; then
24 enable_doc="no"
25 else
26 enable_doc="yes"
27 fi],
28 [enable_doc="yes"]
29)
30
31dnl
32dnl Specify the full file name, with path
33dnl
34AC_ARG_WITH([doxygen],
35 AC_HELP_STRING(
36 [--with-doxygen=FILE],
37 [doxygen program to use @<:@default=doxygen@:>@]),
38 dnl
39 dnl Check the given doxygen program.
40 dnl
41 [DOXYGEN=${withval}
42 AC_CHECK_PROG([BUILD_DOCS],
43 [${DOXYGEN}],
44 [yes],
45 [no])
46 if test "x${BUILD_DOCS}" = "xno" ; then
47 echo "WARNING:"
48 echo "The doxygen program you specified:"
49 echo "$DOXYGEN"
50 echo "was not found. Please check the path and make sure "
51 echo "the program exists and is executable."
52 AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built])
53 fi
54 ],
55 [AC_CHECK_PROG([BUILD_DOCS],
56 [${DOXYGEN}],
57 [yes],
58 [no])
59 if test "x${BUILD_DOCS}" = "xno" ; then
60 echo "WARNING:"
61 echo "The doxygen program was not found in your execute"
62 echo "You may have doxygen installed somewhere not covered by your path."
63 echo ""
64 echo "If this is the case make sure you have the packages installed, AND"
65 echo "that the doxygen program is in your execute path (see your"
66 echo "shell manual page on setting the \$PATH environment variable), OR"
67 echo "alternatively, specify the program to use with --with-doxygen."
68 AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built])
69 fi
70 ]
71)
72
73dnl
74dnl Substitution
75dnl
76AC_SUBST([DOXYGEN])
77
78AM_CONDITIONAL(EFL_BUILD_DOC, test "x${BUILD_DOCS}" = "xyes")
79
80if test "x${BUILD_DOCS}" = "xyes" ; then
81 ifelse([$1], , :, [$1])
82else
83 ifelse([$2], , :, [$2])
84fi
85
86])
87
88dnl End of doxygen.m4
diff --git a/legacy/eet/m4/efl_tests.m4 b/legacy/eet/m4/efl_tests.m4
new file mode 100644
index 0000000000..3478b54a16
--- /dev/null
+++ b/legacy/eet/m4/efl_tests.m4
@@ -0,0 +1,44 @@
1dnl Copyright (C) 2008 Vincent Torri <vtorri at univ-evry dot fr>
2dnl That code is public domain and can be freely used or copied.
3
4dnl Macro that check if tests programs are wanted and if yes, if
5dnl the Check library is available.
6
7dnl Usage: EFL_CHECK_TESTS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl Define the automake conditionnal EFL_ENABLE_TESTS
9
10AC_DEFUN([EFL_CHECK_TESTS],
11[
12
13dnl configure option
14
15AC_ARG_ENABLE([tests],
16 [AC_HELP_STRING([--enable-tests], [enable tests @<:@default=no@:>@])],
17 [
18 if test "x${enableval}" = "xyes" ; then
19 _efl_enable_tests="yes"
20 else
21 _efl_enable_tests="no"
22 fi
23 ],
24 [_efl_enable_tests="no"]
25)
26AC_MSG_CHECKING([whether tests are built])
27AC_MSG_RESULT([${_efl_enable_tests}])
28
29if test "x${_efl_enable_tests}" = "xyes" ; then
30 PKG_CHECK_MODULES([CHECK],
31 [check >= 0.9.5],
32 [dummy="yes"],
33 [_efl_enable_tests="no"]
34 )
35fi
36
37AM_CONDITIONAL(EFL_ENABLE_TESTS, test "x${_efl_enable_tests}" = "xyes")
38
39if test "x${_efl_enable_tests}" = "xyes" ; then
40 ifelse([$1], , :, [$1])
41else
42 ifelse([$2], , :, [$2])
43fi
44])