add -lrt checking to e build

This commit is contained in:
Carsten Haitzler 2014-04-25 09:46:21 +09:00
parent 6f707894a8
commit a444f71db7
2 changed files with 27 additions and 1 deletions

View File

@ -755,6 +755,32 @@ define([CHECK_MODULE_MIXER],
fi
])
SHM_OPEN_LIBS=""
AC_MSG_CHECKING([whether shm_open() is present])
LIBS_save=${LIBS}
LIBS="${LIBS} -lrt"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <sys/stat.h>
#include <sys/mman.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"
])
LIBS=${LIBS_save}
AC_MSG_RESULT([${have_shm_open}])
AC_SUBST(SHM_OPEN_LIBS)
AC_SUBST([SOUND_CFLAGS])
AC_SUBST([SOUND_LIBS])

View File

@ -399,7 +399,7 @@ src/bin/e_main.c \
$(enlightenment_src)
src_bin_enlightenment_LDFLAGS = -export-dynamic
src_bin_enlightenment_LDADD = @e_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @WAYLAND_LIBS@ @WAYLAND_EGL_LIBS@ -lm @ECORE_X_LIBS@
src_bin_enlightenment_LDADD = @e_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@ @WAYLAND_LIBS@ @WAYLAND_EGL_LIBS@ -lm @ECORE_X_LIBS@ @SHM_OPEN_LIBS@
src_bin_enlightenment_imc_SOURCES = \
src/bin/e.h \