summaryrefslogtreecommitdiff
path: root/legacy/evil/m4
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2008-10-05 15:53:22 +0000
committerVincent Torri <vincent.torri@gmail.com>2008-10-05 15:53:22 +0000
commit22d8fefc05e13ecb71ff9fb8cfdb3e5264961b66 (patch)
tree9ad656d772ede9b5cf3a668e25ff98470df45de1 /legacy/evil/m4
parentaee5f5cec673f56a1ed4fe5848feeb0aa3af939b (diff)
* m4:
add m4 macro for doxygen, mpatrol and __attribute__ * doc: move Doxyfile from toplevel dir to doc/ * src/bin/Makefile.am * src/lib/Makefile.am * src/lib/dlfcn/Makefile.am remove _DEPENDENCIES, add flags for mpatrol and put defines for EAPI * src/bin: add memcpy for i686. Need an asm expert to modify it * src/bin/memcpy_glibc_arm.S: formatting * src/bin/suite.c: fix seg fault by increasing the size of the buffers * src/bin/test_memcpy.c: add a test with a bigger size for the memory to copy * configure.ac: reorganise a lot, use m4 macro, add mpatrol support * Makefile.am: add doc rule SVN revision: 36446
Diffstat (limited to 'legacy/evil/m4')
-rwxr-xr-xlegacy/evil/m4/ac_attribute.m414
-rwxr-xr-xlegacy/evil/m4/efl_doxygen.m484
-rwxr-xr-xlegacy/evil/m4/efl_mpatrol.m4128
3 files changed, 226 insertions, 0 deletions
diff --git a/legacy/evil/m4/ac_attribute.m4 b/legacy/evil/m4/ac_attribute.m4
new file mode 100755
index 0000000000..46c1a42291
--- /dev/null
+++ b/legacy/evil/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/evil/m4/efl_doxygen.m4 b/legacy/evil/m4/efl_doxygen.m4
new file mode 100755
index 0000000000..5f02bb4b0a
--- /dev/null
+++ b/legacy/evil/m4/efl_doxygen.m4
@@ -0,0 +1,84 @@
1dnl Configure script for doxygen
2dnl Vincent Torri 2008-08-25
3dnl
4dnl EFL_CHECK_DOXYGEN([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
5dnl Test for the doxygen program, and define DOXYGEN.
6dnl
7AC_DEFUN([EFL_CHECK_DOXYGEN],
8[
9
10DOXYGEN="doxygen"
11
12dnl
13dnl Disable the build of the documentation
14dnl
15AC_ARG_ENABLE([doc],
16 AC_HELP_STRING(
17 [--disable-doc],
18 [Disable the build of the documentation]),
19 [if test "${disable_doc}" = "yes" ; then
20 enable_doc="no"
21 else
22 enable_doc="yes"
23 fi],
24 [enable_doc="yes"]
25)
26
27dnl
28dnl Specify the full file name, with path
29dnl
30AC_ARG_WITH([doxygen],
31 AC_HELP_STRING(
32 [--with-doxygen=FILE],
33 [doxygen program to use @<:@default=doxygen@:>@]),
34 dnl
35 dnl Check the given doxygen program.
36 dnl
37 [DOXYGEN=${withval}
38 AC_CHECK_PROG([BUILD_DOCS],
39 [${DOXYGEN}],
40 [yes],
41 [no])
42 if test "x${BUILD_DOCS}" = "xno" ; then
43 echo "WARNING:"
44 echo "The doxygen program you specified:"
45 echo "$DOXYGEN"
46 echo "was not found. Please check the path and make sure "
47 echo "the program exists and is executable."
48 AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built])
49 fi
50 ],
51 [AC_CHECK_PROG([BUILD_DOCS],
52 [${DOXYGEN}],
53 [yes],
54 [no])
55 if test "x${BUILD_DOCS}" = "xno" ; 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 manual page on setting the \$PATH environment variable), OR"
63 echo "alternatively, specify the program to use with --with-doxygen."
64 AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built])
65 fi
66 ]
67)
68
69dnl
70dnl Substitution
71dnl
72AC_SUBST([DOXYGEN])
73
74AM_CONDITIONAL(EFL_BUILD_DOC, test "x${BUILD_DOCS}" = "xyes")
75
76if test "x${BUILD_DOCS}" = "xyes" ; then
77 ifelse([$1], , :, [$1])
78else
79 ifelse([$2], , :, [$2])
80fi
81
82])
83
84dnl End of doxygen.m4
diff --git a/legacy/evil/m4/efl_mpatrol.m4 b/legacy/evil/m4/efl_mpatrol.m4
new file mode 100755
index 0000000000..16ffc778fb
--- /dev/null
+++ b/legacy/evil/m4/efl_mpatrol.m4
@@ -0,0 +1,128 @@
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 mpatrol is wanted and if yes, if
5dnl it is available.
6
7dnl Usage: EFL_CHECK_MPATROL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
8dnl Defines EFL_MPATROL_CPPFLAGS and EFL_MPATROL_LIBS variables
9
10AC_DEFUN([EFL_CHECK_MPATROL],
11[
12
13dnl configure options
14
15AC_ARG_ENABLE([mpatrol],
16 [AC_HELP_STRING([--enable-mpatrol], [enable mpatrol @<:@default=no@:>@])],
17 [
18 if test "x${enableval}" = "xyes" ; then
19 _efl_enable_mpatrol="yes"
20 else
21 _efl_enable_mpatrol="no"
22 fi
23 ],
24 [_efl_enable_mpatrol="no"]
25)
26AC_MSG_CHECKING([whether mpatrol is used])
27AC_MSG_RESULT([${_efl_enable_mpatrol}])
28
29AC_ARG_WITH([mpatrol-dir],
30 [AC_HELP_STRING([--enable-mpatrol-dir], [specify the directory of mpatrol @<:@default=/usr/local@:>@])],
31 [_efl_with_mpatrol_dir=${withval}],
32 [_efl_with_mpatrol_dir="/usr/local"]
33)
34
35AC_ARG_WITH([mpatrol-bindir],
36 [AC_HELP_STRING([--enable-mpatrol-bindir], [specify the binary directory of mpatrol])],
37 [_efl_with_mpatrol_bindir=${withval}]
38)
39
40AC_ARG_WITH([mpatrol-includedir],
41 [AC_HELP_STRING([--enable-mpatrol-includedir], [specify the include directory of mpatrol])],
42 [_efl_with_mpatrol_includedir=${withval}]
43)
44
45AC_ARG_WITH([mpatrol-libdir],
46 [AC_HELP_STRING([--enable-mpatrol-libdir], [specify the library directory of mpatrol])],
47 [_efl_with_mpatrol_libdir=${withval}]
48)
49
50if test "x${_efl_enable_mpatrol}" = "xyes" ; then
51
52dnl values of the different paths
53
54 if test ! "x${_efl_with_mpatrol_bindir}" = "x" ; then
55 _efl_mpatrol_bindir=${_efl_with_mpatrol_bindir}
56 else
57 _efl_mpatrol_bindir="${_efl_with_mpatrol_dir}/bin"
58 fi
59
60 if test ! "x${_efl_with_mpatrol_includedir}" = "x" ; then
61 _efl_mpatrol_includedir=${_efl_with_mpatrol_includedir}
62 else
63 _efl_mpatrol_includedir="${_efl_with_mpatrol_dir}/include"
64 fi
65
66 if test ! "x${_efl_with_mpatrol_libdir}" = "x" ; then
67 _efl_mpatrol_libdir=${_efl_with_mpatrol_libdir}
68 else
69 _efl_mpatrol_libdir="${_efl_with_mpatrol_dir}/lib"
70 fi
71
72dnl check of mpatrol program
73
74 AC_CHECK_PROG([_efl_have_mpatrol],
75 [mpatrol],
76 ["yes"],
77 ["no"],
78 [$PATH$PATH_SEPARATOR${_efl_mpatrol_bindir}]
79 )
80
81 SAVE_CPPFLAGS=${CPPFLAGS}
82 SAVE_LIBS=${LDFLAGS}
83 CPPFLAGS="-I${_efl_mpatrol_includedir}"
84 LIBS="-L${_efl_mpatrol_libdir} -lmpatrol -lbfd -liberty -limagehlp"
85
86dnl check of mpatrol.h header file
87
88 AC_CHECK_HEADER([mpatrol.h],
89 [],
90 [_efl_have_mpatrol="no"]
91 )
92
93dnl check of mpatrol library and its needed dependencies
94
95 AC_LINK_IFELSE(
96 [AC_LANG_PROGRAM([[
97#include <mpatrol.h>
98 ]],
99 [[
100__mp_clearleaktable();
101 ]])],
102 [],
103 [_efl_have_mpatrol="no"]
104 )
105
106 AC_MSG_CHECKING([whether libmpatrol is usuable])
107 AC_MSG_RESULT([${_efl_have_mpatrol}])
108
109 CPPFLAGS=${SAVE_CPPFLAGS}
110 LIBS=${SAVE_LIBS}
111
112fi
113
114EFL_MPATROL_CPPFLAGS="-include ${_efl_mpatrol_includedir}/mpatrol.h"
115EFL_MPATROL_LIBS="-L${_efl_mpatrol_libdir} -lmpatrol -lbfd -liberty -limagehlp"
116
117AC_SUBST(EFL_MPATROL_CPPFLAGS)
118AC_SUBST(EFL_MPATROL_LIBS)
119
120AM_CONDITIONAL(EFL_HAVE_MPATROL, test "x${_efl_have_mpatrol}" = "xyes")
121
122if test "x${_efl_have_mpatrol}" = "xyes" ; then
123 ifelse([$1], , :, [$1])
124else
125 ifelse([$2], , :, [$2])
126fi
127
128])