summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorAndreas Eversberg2010-06-03 11:20:48 +0200
committerAndreas Eversberg2010-06-03 11:20:48 +0200
commit13f107bc240d351b1eb1915eff140efe1b4a95bb (patch)
treef234e7d2a47619c175c6db6379c48432a2504744 /configure.ac
parentTested and fixed the new OpenBSC API. (diff)
downloadlcr-13f107bc240d351b1eb1915eff140efe1b4a95bb.tar.gz
lcr-13f107bc240d351b1eb1915eff140efe1b4a95bb.tar.xz
lcr-13f107bc240d351b1eb1915eff140efe1b4a95bb.zip
Added detection of tone_zone_sound structure name. Thanx to Janis for this
patch. modified: Makefile.am modified: Makefile.in modified: configure modified: configure.ac
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac43
1 files changed, 43 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f02cec8..7bd5d87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,49 @@ AS_IF([test "x$with_asterisk" != xno],
])
])
+if test "x$with_asterisk" = "xyes"; then
+ ast_tone_zone_sound=
+
+ AC_MSG_CHECKING([for struct tone_zone_sound in asterisk/indications.h])
+ tzs_test_result=no
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [[#include <asterisk.h>],
+ [#include <asterisk/linkedlists.h>],
+ [#include <asterisk/indications.h>]],
+ [[struct tone_zone_sound * ts = NULL; (void) ts->data;]])],
+ [tzs_test_result=yes])
+ AC_MSG_RESULT([$tzs_test_result])
+
+ if test "x$tzs_test_result" = "xyes"; then
+ ast_tone_zone_sound=tone_zone_sound
+ fi
+
+ if test "x$ast_tone_zone_sound" = "x"; then
+ AC_MSG_CHECKING([for struct ast_tone_zone_sound in asterisk/indications.h])
+ tzs_test_result=no
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [[#include <asterisk.h>],
+ [#include <asterisk/linkedlists.h>],
+ [#include <asterisk/indications.h>]],
+ [[struct ast_tone_zone_sound * ts = NULL; (void) ts->name;]])],
+ [tzs_test_result=yes])
+ AC_MSG_RESULT([$tzs_test_result])
+
+ if test "x$tzs_test_result" = "xyes"; then
+ ast_tone_zone_sound=ast_tone_zone_sound
+ fi
+ fi
+
+ if test "x$ast_tone_zone_sound" = "x"; then
+ AC_MSG_FAILURE([No ast_tone_zone_sound, confused...])
+ fi
+
+ AST_CFLAGS="-Dtone_zone_sound=$ast_tone_zone_sound"
+ AC_SUBST([AST_CFLAGS])
+fi
+
AM_CONDITIONAL(ENABLE_ASTERISK_CHANNEL_DRIVER, test "x$with_asterisk" == "xyes" )
# check for crypto