summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in20
-rw-r--r--src/libsputext/Makefile.am10
2 files changed, 28 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index ed0f0d051..2cad641a6 100644
--- a/configure.in
+++ b/configure.in
@@ -312,7 +312,27 @@ case "$host_or_hostalias" in
xv_lib="libXv.so"
fi
;;
+ i386-*-freebsd*)
+ AC_CHECK_FILE(/usr/local/include/iconv.h,
+ GICONV_BSD_LIBS="-lgiconv"
+ no_BSDiconv="no",
+ [ no_BSDiconv="yes"
+ echo
+ echo "****************************************************************"
+ echo "* You need to install a recent version of the port 'libiconv' *"
+ echo "* (in /usr/ports/converters/libiconv). *"
+ echo "* The library in this port is needed to successfully compile *"
+ echo "* libsputext plugin. *"
+ echo "****************************************************************"
+ echo
+ ],)
+ ;;
+ *)
+ no_BSDiconv="no"
+ ;;
esac
+AC_SUBST(GICONV_BSD_LIBS)
+AM_CONDITIONAL(HAVE_GICONV, test x$no_BSDiconv != "xyes")
AC_ARG_WITH(xv-path,[ --with-xv-path=path Where $xv_lib is installed],
diff --git a/src/libsputext/Makefile.am b/src/libsputext/Makefile.am
index 528645b46..763684cc4 100644
--- a/src/libsputext/Makefile.am
+++ b/src/libsputext/Makefile.am
@@ -2,10 +2,16 @@ LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
libdir = $(XINE_PLUGINDIR)
-lib_LTLIBRARIES = xineplug_decode_sputext.la
+if HAVE_GICONV
+sputext_decoder = xineplug_decode_sputext.la
+endif
-xineplug_decode_sputext_la_SOURCES = xine_decoder.c
+lib_LTLIBRARIES = $(sputext_decoder)
+
+xineplug_decode_sputext_la_SOURCES = xine_decoder.c
xineplug_decode_sputext_la_LDFLAGS = -avoid-version -module
+## libgiconv is only needed with FreeBSD
+xineplug_decode_sputext_la_LIBADD = $(GICONV_BSD_LIBS)
##
## Install header files (default=$includedir/xine)