# ecore_con
-AC_CHECK_HEADERS([arpa/inet.h arpa/nameser.h netinet/tcp.h net/if.h netinet/in.h sys/socket.h sys/un.h ws2tcpip.h netdb.h])
+AC_CHECK_HEADERS([sys/socket.h])
+AC_CHECK_HEADERS([net/if.h], [], [],
+[
+#include <stdio.h>
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+])
+AC_CHECK_HEADERS([sys/un.h arpa/inet.h arpa/nameser.h netinet/tcp.h netinet/in.h ws2tcpip.h netdb.h])
if test "x${ac_cv_header_netdb_h}" = "xyes" ; then
have_addrinfo="yes"
fi
SHM_OPEN_LIBS=""
-AC_COMPILE_IFELSE(
+
+AC_MSG_CHECKING([whether shm_open is in libc])
+AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <sys/mman.h>
[
have_shm_open="yes"
AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call])
- SHM_OPEN_LIBS="-lrt"
],
[have_shm_open="no"])
-AC_SUBST(SHM_OPEN_LIBS)
+LIBS="${LIBS_save}"
+AC_MSG_RESULT([${have_shm_open}])
+
+if ! test "x${have_shm_open}" = "xyes" ; then
+ AC_MSG_CHECKING([whether shm_open is in librt])
+ LIBS_save="${LIBS}"
+ LIBS="${LIBS} -lrt"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+ ]],
+ [[
+int fd;
+fd = shm_open("/", O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
+shm_unlink("/");
+ ]])],
+ [
+ have_shm_open="yes"
+ AC_DEFINE(HAVE_SHM_OPEN, 1, [Have shm_open() call])
+ SHM_OPEN_LIBS="-lrt"
+ ],
+ [have_shm_open="no"])
+ LIBS="${LIBS_save}"
+ AC_MSG_RESULT([${have_shm_open}])
+fi
+
+AC_SUBST([SHM_OPEN_LIBS])
-AC_MSG_CHECKING([shm_open])
+AC_MSG_CHECKING([whether shm_open is available])
AC_MSG_RESULT([${have_shm_open}])
### Checks for optionnal feature
# ecore_evas_software_sdl
-ECORE_EVAS_CHECK_MODULE([software-sdl],
- [${want_ecore_evas_software_sdl}],
- [Software SDL],
- [${have_ecore_sdl}],
- [requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"])
+have_ecore_evas_software_sdl="no"
+if test "x${have_ecore_sdl}" = "xyes"; then
+ requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"
+ have_ecore_evas_software_sdl="yes"
+ AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_SDL, 1, [Support for Software SDL Engine in Ecore_Evas])
+ requirements_ecore_evas="ecore-sdl >= 1.1.99 ${requirements_ecore_evas}"
+fi
# ecore_evas_gl_sdl
ecore_wayland_deps="no"
have_wayland="no"
if test "x${want_ecore_wayland}" = "xyes" ; then
- PKG_CHECK_MODULES([WAYLAND], [wayland-client xkbcommon], [have_wayland="yes"], [have_wayland="no"])
+ PKG_CHECK_MODULES([WAYLAND], [egl wayland-egl wayland-client xkbcommon], [have_wayland="yes"], [have_wayland="no"])
fi
if test "x${have_ecore_input}" = "xyes" -a "x${have_wayland}" = "xyes" ; then
ecore_wayland_deps="yes"
ECORE_CHECK_MODULE([wayland], [${want_ecore_wayland}], [Wayland], [${ecore_wayland_deps}])
if test "x${have_ecore_wayland}" = "xyes" ; then
- requirements_ecore_wayland="ecore-input >= 1.1.0 wayland-client xkbcommon ${requirements_ecore_wayland}"
+ requirements_ecore_wayland="ecore-input >= 1.1.0 egl wayland-egl wayland-client xkbcommon ${requirements_ecore_wayland}"
fi
ECORE_EVAS_CHECK_MODULE_FULL([wayland-shm], [wayland-shm],
[${have_ecore_wayland}],
[requirements_ecore_evas="${requirements_ecore_wayland} ${requirements_ecore_evas}"])
-ECORE_EVAS_CHECK_MODULE_FULL([wayland-egl], [wayland-egl],
+ECORE_EVAS_CHECK_MODULE_FULL([wayland-egl], [wayland-egl egl],
[${want_ecore_evas_wayland_egl}],
[Wayland Egl],
[${have_ecore_wayland}],