* reorganize configure.ac * remove eina dependency, use the new ac_attribute m4 macro * fix Libs.private field and add Requires field in embryo.pc * rename embryo.c.in to embryo.dox.in * add doc rule to build the documentation. The doc will completely be fixed in the next commit SVN revision: 37116devs/devilhorns/wayland_egl
parent
852046b7cd
commit
9be35d243b
15 changed files with 271 additions and 68 deletions
@ -1,10 +0,0 @@ |
||||
#!/bin/sh |
||||
rm -rf ./doc/html ./doc/latex ./doc/man |
||||
mkdir -p ./doc/html ./doc/latex ./doc/man |
||||
doxygen |
||||
cp doc/img/*.png doc/html/ |
||||
cp doc/img/*.gif doc/html/ |
||||
rm -f embryo_docs.tar embryo_docs.tar.gz |
||||
tar -cvf embryo_docs.tar doc/html doc/man doc/latex |
||||
gzip -9 embryo_docs.tar |
||||
exit 0 |
@ -1,14 +1,44 @@ |
||||
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 the compiler supports __atribute__ |
||||
|
||||
dnl Usage: AC_C___ATTRIBUTE__ |
||||
dnl call AC_DEFINE for HAVE___ATTRIBUTE__ and __UNUSED__ |
||||
dnl if the compiler supports __attribute__, HAVE___ATTRIBUTE__ is |
||||
dnl defined to 1 and __UNUSED__ is defined to __attribute__((unused)) |
||||
dnl otherwise, HAVE___ATTRIBUTE__ is not defined and __UNUSED__ is |
||||
dnl defined to nothing. |
||||
|
||||
AC_DEFUN([AC_C___ATTRIBUTE__], |
||||
[ |
||||
AC_MSG_CHECKING(for __attribute__) |
||||
AC_CACHE_VAL(ac_cv___attribute__, [ |
||||
AC_TRY_COMPILE([#include <stdlib.h>], |
||||
[int func(int x); int foo(int x __attribute__ ((unused))) { exit(1); }], |
||||
ac_cv___attribute__=yes, ac_cv___attribute__=no)]) |
||||
if test "$ac_cv___attribute__" = "yes"; then |
||||
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [Define to 1 if your compiler has __attribute__]) |
||||
fi |
||||
AC_MSG_RESULT($ac_cv___attribute__) |
||||
]) |
||||
|
||||
AC_MSG_CHECKING([for __attribute__]) |
||||
|
||||
AC_CACHE_VAL([ac_cv___attribute__], |
||||
[AC_TRY_COMPILE( |
||||
[ |
||||
#include <stdlib.h> |
||||
], |
||||
[ |
||||
int func(int x); |
||||
int foo(int x __attribute__ ((unused))) |
||||
{ |
||||
exit(1); |
||||
} |
||||
], |
||||
[ac_cv___attribute__="yes"], |
||||
[ac_cv___attribute__="no"] |
||||
)] |
||||
) |
||||
|
||||
AC_MSG_RESULT($ac_cv___attribute__) |
||||
|
||||
if test "x${ac_cv___attribute__}" = "xyes" ; then |
||||
AC_DEFINE([HAVE___ATTRIBUTE__], [1], [Define to 1 if your compiler has __attribute__]) |
||||
AC_DEFINE([__UNUSED__], [__attribute__((unused))], [Define to __attribute__((unused)) if your compiler has __attribute__]) |
||||
else |
||||
AC_DEFINE([__UNUSED__], [], [Define to nothing if your compiler does not support __attribute__]) |
||||
fi |
||||
|
||||
]) |
||||
|
@ -0,0 +1,88 @@ |
||||
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 DOXYGEN |
||||
dnl Defines the automake conditionnal EFL_BUILD_DOC |
||||
dnl |
||||
AC_DEFUN([EFL_CHECK_DOXYGEN], |
||||
[ |
||||
|
||||
DOXYGEN="doxygen" |
||||
|
||||
dnl |
||||
dnl Disable the build of the documentation |
||||
dnl |
||||
AC_ARG_ENABLE([doc], |
||||
AC_HELP_STRING( |
||||
[--disable-doc], |
||||
[Disable the build of the documentation]), |
||||
[if test "${disable_doc}" = "yes" ; then |
||||
enable_doc="no" |
||||
else |
||||
enable_doc="yes" |
||||
fi], |
||||
[enable_doc="yes"] |
||||
) |
||||
|
||||
dnl |
||||
dnl Specify the full file name, with path |
||||
dnl |
||||
AC_ARG_WITH([doxygen], |
||||
AC_HELP_STRING( |
||||
[--with-doxygen=FILE], |
||||
[doxygen program to use @<:@default=doxygen@:>@]), |
||||
dnl |
||||
dnl Check the given doxygen program. |
||||
dnl |
||||
[DOXYGEN=${withval} |
||||
AC_CHECK_PROG([BUILD_DOCS], |
||||
[${DOXYGEN}], |
||||
[yes], |
||||
[no]) |
||||
if test "x${BUILD_DOCS}" = "xno" ; then |
||||
echo "WARNING:" |
||||
echo "The doxygen program you specified:" |
||||
echo "$DOXYGEN" |
||||
echo "was not found. Please check the path and make sure " |
||||
echo "the program exists and is executable." |
||||
AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built]) |
||||
fi |
||||
], |
||||
[AC_CHECK_PROG([BUILD_DOCS], |
||||
[${DOXYGEN}], |
||||
[yes], |
||||
[no]) |
||||
if test "x${BUILD_DOCS}" = "xno" ; then |
||||
echo "WARNING:" |
||||
echo "The doxygen program was not found in your execute" |
||||
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([Warning: no doxygen detected. Documentation will not be built]) |
||||
fi |
||||
] |
||||
) |
||||
|
||||
dnl |
||||
dnl Substitution |
||||
dnl |
||||
AC_SUBST([DOXYGEN]) |
||||
|
||||
AM_CONDITIONAL(EFL_BUILD_DOC, test "x${BUILD_DOCS}" = "xyes") |
||||
|
||||
if test "x${BUILD_DOCS}" = "xyes" ; then |
||||
ifelse([$1], , :, [$1]) |
||||
else |
||||
ifelse([$2], , :, [$2]) |
||||
fi |
||||
|
||||
]) |
||||
|
||||
dnl End of doxygen.m4 |
Loading…
Reference in new issue