The problem of the detection of __attribute__ on mac os x comes
from the fact that we put a definition of a function in the body of main(). Moving it outside fixes it. In addition, the extra flag i added in configure.ac is useless. SVN revision: 38565
This commit is contained in:
parent
c8c9bf3062
commit
cc7b4554cb
|
@ -273,9 +273,6 @@ case "${host_os}" in
|
||||||
mingw*)
|
mingw*)
|
||||||
EINA_CFLAGS="${EINA_CFLAGS} ${EVIL_CFLAGS}"
|
EINA_CFLAGS="${EINA_CFLAGS} ${EVIL_CFLAGS}"
|
||||||
;;
|
;;
|
||||||
darwin*)
|
|
||||||
EINA_CFLAGS="${EINA_CFLAGS} -fnested-functions"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test "x$enable_coverage" = "xyes" ; then
|
if test "x$enable_coverage" = "xyes" ; then
|
||||||
|
|
|
@ -17,37 +17,23 @@ AC_DEFUN([AC_C___ATTRIBUTE__],
|
||||||
|
|
||||||
AC_MSG_CHECKING([for __attribute__])
|
AC_MSG_CHECKING([for __attribute__])
|
||||||
|
|
||||||
dnl On mac os x, error of compilation without -fnested-functions
|
|
||||||
case "${host_os}" in
|
|
||||||
darwin*)
|
|
||||||
CFLAGS_SAVE=${CFLAGS}
|
|
||||||
CFLAGS="${CFLAGS} -fnested-functions"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_CACHE_VAL([ac_cv___attribute__],
|
AC_CACHE_VAL([ac_cv___attribute__],
|
||||||
[AC_TRY_COMPILE(
|
[AC_TRY_COMPILE(
|
||||||
[
|
[
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
],
|
|
||||||
[
|
|
||||||
int func(int x);
|
int func(int x);
|
||||||
int foo(int x __attribute__ ((unused)))
|
int foo(int x __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
[],
|
||||||
[ac_cv___attribute__="yes"],
|
[ac_cv___attribute__="yes"],
|
||||||
[ac_cv___attribute__="no"]
|
[ac_cv___attribute__="no"]
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
|
|
||||||
case "${host_os}" in
|
|
||||||
darwin*)
|
|
||||||
CFLAGS=${CFLAGS_SAVE}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_MSG_RESULT($ac_cv___attribute__)
|
AC_MSG_RESULT($ac_cv___attribute__)
|
||||||
|
|
||||||
if test "x${ac_cv___attribute__}" = "xyes" ; then
|
if test "x${ac_cv___attribute__}" = "xyes" ; then
|
||||||
|
|
Loading…
Reference in New Issue