All pastes #26477 Raw Edit

Something

public text v1 · immutable
#26477 ·published 2005-10-24 13:16 UTC
rendered paste body
Index: configure.ac
===================================================================
--- configure.ac	(revision 646)
+++ configure.ac	(working copy)
@@ -531,6 +531,29 @@
 #
 #
 
+dnl app_rxfax, app_txfax
+AC_ARG_WITH(spandsp,
+	AC_HELP_STRING([--with-spandsp],[Include support for SpanDSP]),[],[with_spandsp="yes"])
+
+if test "$with_spandsp" = "yes"; then
+AC_CHECK_HEADERS([tiffio.h],[HAVE_TIFFIO_H=1])
+AC_CHECK_HEADERS([spandsp.h],[HAVE_SPANDSP_H=1],[],
+[#if HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#if HAVE_TIFFIO_H
+#include <tiffio.h>
+#endif
+])
+AC_CHECK_HEADERS([spandsp/t38.h],[HAVE_SPANDSP_T38_H=1],[AC_MSG_WARN(SpanDSP does not appear to be new enough.  You must have version 0.0.3 or newer.)])
+AC_CHECK_LIB([spandsp],[t38_gateway_init],[HAVE_LIBSPANDSP=1],[AC_MSG_WARN(SpanDSP does not appear to be new enough.  You must have version 0.0.3 or newer.)])
+AC_CHECK_LIB([tiff],[TIFFOpen],[HAVE_LIBTIFF=1])
+fi
+AM_CONDITIONAL([WANT_SPANDSP],[test -n "${HAVE_TIFFIO_H}" -a -n "${HAVE_SPANDSP_H}" -a -n "${HAVE_SPANDSP_T38_H}" -a -n "${HAVE_LIBTIFF}" -a -n "${HAVE_LIBSPANDSP}"])
+
 ##### ressources
 
 dnl res_osp ... open settlement protocol handling
Index: apps/Makefile.am
===================================================================
--- apps/Makefile.am	(revision 646)
+++ apps/Makefile.am	(working copy)
@@ -190,3 +190,12 @@
 	app_visdn_ppp_la_LIBADD			= ${top_srcdir}/corelib/libopenpbx.la
 endif WANT_VISDN
 
+if WANT_SPANDSP
+	opbxmod_LTLIBRARIES			+= app_rxfax.la app_txfax.la
+	app_rxfax_SOURCES			= app_rxfax.c
+	app_rxfax_LIBADD			= -lspandsp -ltiff
+	app_rxfax_LDFLAGS			= -module -avoid-version -no-undefined
+	app_txfax_SOURCES			= app_txfax.c
+	app_txfax_LIBADD			= -lspandsp -ltiff
+	app_txfax_LDFLAGS			= -module -avoid-version -no-undefined
+endif WANT_SPANDSP