forked from enlightenment/efl
mac os x port of gcc has problems with __attribute__ and thinks that
there are nested functions. -fnested-functions must be passed to the compiler to allow the compilation on that platform. SVN revision: 38544
This commit is contained in:
parent
8e85dc458c
commit
f84454ed08
|
@ -273,6 +273,9 @@ 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,6 +17,14 @@ 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(
|
||||||
[
|
[
|
||||||
|
@ -34,6 +42,12 @@ int foo(int x __attribute__ ((unused)))
|
||||||
)]
|
)]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
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