From 0bf1bd0db059b5e2e51e9293cea72cfb557ac567 Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Fri, 23 Jan 2009 09:54:53 +0100 Subject: [PATCH] Fix linking failures on Solaris. Fixes bug #568481. Link libgstreamer with $(LIBM) as it uses math functions. Add a configure check for socket and nsl library and add them to LIBS if they're found. This is needed on Solaris for socket() and gethostbyname(). --- configure.ac | 4 ++++ gst/Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c2409b4788..10709dc96f 100644 --- a/configure.ac +++ b/configure.ac @@ -455,6 +455,10 @@ AC_CHECK_LIB(dl, dladdr, LIBS="$LIBS -ldl") CFLAGS="$save_cflags" +dnl *** checks for socket and nsl libraries *** +AC_CHECK_FUNC(socket,,[AC_CHECK_LIB(socket,socket)]) +AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)]) + dnl check for inet_aton() save_libs="$LIBS" AC_CHECK_FUNC(inet_aton, , diff --git a/gst/Makefile.am b/gst/Makefile.am index 8c4816b09c..83e7fc80e8 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -135,7 +135,7 @@ libgstreamer_@GST_MAJORMINOR@_la_LIBADD = \ $(XML_LIBS) libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = \ - $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) + $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) $(LIBM) libgstreamer_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst