[cairo-commit] configure.ac util/cairo-sphinx

Chris Wilson ickle at kemper.freedesktop.org
Wed Mar 31 08:20:48 PDT 2010


 configure.ac                  |    5 +++++
 util/cairo-sphinx/Makefile.am |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 00101fa71614fb48de436d6618e26353cf44ef95
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Mar 31 16:19:02 2010 +0100

    configure: check -lrt for shm_open()
    
    OS/X includes shm_open() in libc, and fails to link if -lrt is
    specified. So perform the appropriate configure time magic.

diff --git a/configure.ac b/configure.ac
index cd848c1..dc29cc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -718,6 +718,11 @@ AC_SUBST(glib_CFLAGS)
 AC_SUBST(glib_LIBS)
 AM_CONDITIONAL(BUILD_SPHINX, test "x$have_glib" = "xyes")
 
+save_LIBS="$LIBS"
+AC_CHECK_LIB(rt, shm_open, shm_LIBS="-lrt")
+AC_SUBST(shm_LIBS)
+LIBS="$save_LIBS"
+
 dnl ===========================================================================
 
 AC_ARG_ENABLE(some-floating-point,
diff --git a/util/cairo-sphinx/Makefile.am b/util/cairo-sphinx/Makefile.am
index 66a2e3c..2b1abbf 100644
--- a/util/cairo-sphinx/Makefile.am
+++ b/util/cairo-sphinx/Makefile.am
@@ -23,7 +23,7 @@ cairo_sphinx_LDADD = \
 	$(top_builddir)/src/libcairo.la 			\
 	$(glib_LIBS) 						\
 	$(CAIRO_LDADD)						\
-	-lrt							\
+	$(shm_LIBS)						\
 	$(real_pthread_LIBS)
 cairo_sphinx_DEPENDENCIES = \
         $(top_builddir)/util/cairo-script/libcairo-script-interpreter.la \


More information about the cairo-commit mailing list