[gnome-builder] build: check for shm_open() instead of forced -lrt
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build: check for shm_open() instead of forced -lrt
- Date: Tue, 12 May 2015 17:37:23 +0000 (UTC)
commit 0b04fe6d8302179659970850d4e46e39118144ae
Author: Christian Hergert <christian hergert me>
Date: Tue May 12 10:37:13 2015 -0700
build: check for shm_open() instead of forced -lrt
Not all systems require rt for shm_open(), nor is it guaranteed to be the
library containing it.
configure.ac | 8 ++++++++
contrib/egg/Makefile.am | 5 ++++-
libide/Makefile.am | 1 +
tools/Makefile.am | 2 +-
4 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 211249b..ffa0b75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -317,6 +317,14 @@ AC_SUBST(OPTIMIZE_LDFLAGS)
dnl ***********************************************************************
+dnl Check if shm_open Requires a Library
+dnl ***********************************************************************
+AC_CHECK_FUNCS([shm_open], [SHM_LIB=],
+ [AC_CHECK_LIB([rt], [shm_open], [SHM_LIB=-lrt], [SHM_LIB=])])
+AC_SUBST(SHM_LIB)
+
+
+dnl ***********************************************************************
dnl Process .in Files
dnl ***********************************************************************
AC_CONFIG_FILES([
diff --git a/contrib/egg/Makefile.am b/contrib/egg/Makefile.am
index 598dbca..a9839d5 100644
--- a/contrib/egg/Makefile.am
+++ b/contrib/egg/Makefile.am
@@ -18,6 +18,9 @@ libegg_la_SOURCES = \
$(NULL)
libegg_la_CFLAGS = $(EGG_CFLAGS)
-libegg_la_LIBADD = $(EGG_LIBS)
+libegg_la_LIBADD = \
+ $(EGG_LIBS) \
+ $(SHM_LIB) \
+ $(NULL)
-include $(top_srcdir)/git.mk
diff --git a/libide/Makefile.am b/libide/Makefile.am
index 642f542..d634de2 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -383,6 +383,7 @@ libide_1_0_la_LDFLAGS = \
libide_1_0_la_LIBADD = \
$(CLANG_LDFLAGS) \
$(LIBIDE_LIBS) \
+ $(SHM_LIB) \
-lclang \
-lm \
$(top_builddir)/contrib/egg/libegg.la \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 012c164..8d0cdb2 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -60,7 +60,7 @@ ide_list_counters_CFLAGS = \
ide_list_counters_LDADD = \
$(EGG_LIBS) \
$(top_builddir)/contrib/egg/libegg.la \
- -lrt \
+ $(SHM_LIB) \
$(NULL)
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]