X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=configure.ac;h=7bd5d87080d35d5fce7e12d6deb1e76bef26fef8;hp=f02cec8d2dd3eaf72121beaf4b386fe20c114900;hb=13f107bc240d351b1eb1915eff140efe1b4a95bb;hpb=4da31ce07bd09e87ca1199a7cb060baa15b31d4e 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 ], + [#include ], + [#include ]], + [[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 ], + [#include ], + [#include ]], + [[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