],
[have_threads="no"])
EFL_CHECK_SPINLOCK([have_posix_threads_spinlock="yes"], [have_posix_threads_spinlock="no"])
-EFL_CHECK_RWLOCK(
- [EINA_CONFIGURE_RWLOCKS_ENABLED="#define EINA_RWLOCKS_ENABLED"]
- [have_posix_threads_rwlock="yes"],
- [have_posix_threads_rwlock="no"])
-AC_SUBST([EINA_CONFIGURE_RWLOCKS_ENABLED])
### Additional options to configure
echo " Thread Support.......: ${have_threads}"
if test "${have_threads}" = "POSIX" ; then
echo " spinlock...........: ${have_posix_threads_spinlock}"
-echo " rwlock.............: ${have_posix_threads_rwlock}"
fi
echo " Amalgamation.........: ${do_amalgamation}"
echo " Iconv support........: ${have_iconv}"
AS_IF([test "x$_efl_have_posix_threads_spinlock" = "xyes"], [$1], [$2])
])
-
-dnl Usage: EFL_CHECK_RWLOCK(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
-dnl Defines EFL_HAVE_POSIX_THREADS_RWLOCK
-AC_DEFUN([EFL_CHECK_RWLOCK],
-[
-dnl check if the compiler supports pthreads rwlock
-
-_efl_have_posix_threads_rwlock="no"
-
-if test "x${_efl_have_posix_threads}" = "xyes" ; then
-
- SAVE_CFLAGS=${CFLAGS}
- CFLAGS="${CFLAGS} ${EFL_PTHREAD_CFLAGS}"
- SAVE_LIBS=${LIBS}
- LIBS="${LIBS} ${EFL_PTHREAD_LIBS}"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[
-#include <pthread.h>
- ]],
- [[
-pthread_rwlock_t lock = PTHREAD_RWLOCK_INITIALIZER;
-int res;
-res = pthread_rwlock_init(&lock, PTHREAD_PROCESS_PRIVATE);
- ]])],
- [_efl_have_posix_threads_rwlock="yes"],
- [_efl_have_posix_threads_rwlock="no"])
- CFLAGS=${SAVE_CFLAGS}
- LIBS=${SAVE_LIBS}
-
-fi
-
-AC_MSG_CHECKING([whether to build POSIX threads rwlock code])
-AC_MSG_RESULT([${_efl_have_posix_threads_rwlock}])
-if test "x${_efl_enable_posix_threads}" = "xyes" && test "x${_efl_have_posix_threads_rwlock}" = "xno" ; then
- AC_MSG_WARN([POSIX threads support requested but rwlocks are not supported])
-fi
-
-if test "x${_efl_have_posix_threads_rwlock}" = "xyes" ; then
- AC_DEFINE([EFL_HAVE_POSIX_THREADS_RWLOCK], [1], [Define to mention that POSIX threads rwlocks are supported])
-fi
-AS_IF([test "x$_efl_have_posix_threads_rwlock" = "xyes"], [$1], [$2])
-])
#endif
#define EINA_SIZEOF_WCHAR_T @EINA_SIZEOF_WCHAR_T@
-#ifdef EINA_RWLOCKS_ENABLED
-# undef EINA_RWLOCKS_ENABLED
-#endif
-@EINA_CONFIGURE_RWLOCKS_ENABLED@
-
#endif /* EINA_CONFIG_H_ */