summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in3
-rwxr-xr-xconfigure130
-rw-r--r--configure.ac43
4 files changed, 176 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index f25280d..fc73514 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -99,7 +99,7 @@ chan_lcr_so_LDFLAGS = -shared
chan_lcr_so_LDADD = chan_lcr.po bchannel.po options.po callerid.po select.po
chan_lcr.po: chan_lcr.c chan_lcr.h
- $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po
+ $(CC) $(INCLUDES) $(AST_CFLAGS) -D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po
bchannel.po: bchannel.c bchannel.h
$(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c bchannel.c -o bchannel.po
diff --git a/Makefile.in b/Makefile.in
index fd8370c..3b7f738 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -166,6 +166,7 @@ ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AST_CFLAGS = @AST_CFLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -882,7 +883,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-info-am \
@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@chan_lcr.po: chan_lcr.c chan_lcr.h
-@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po
+@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(CC) $(INCLUDES) $(AST_CFLAGS) -D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po
@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@bchannel.po: bchannel.c bchannel.h
@ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE@ $(CC) $(INCLUDES) -D_GNU_SOURCE -fPIC -c bchannel.c -o bchannel.po
diff --git a/configure b/configure
index 24e990b..2b2bc0b 100755
--- a/configure
+++ b/configure
@@ -651,6 +651,7 @@ ENABLE_GSM_BS_TRUE
LIBCRYPTO
ENABLE_ASTERISK_CHANNEL_DRIVER_FALSE
ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE
+AST_CFLAGS
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
@@ -6010,6 +6011,135 @@ done
fi
+if test "x$with_asterisk" = "xyes"; then
+ ast_tone_zone_sound=
+
+ { $as_echo "$as_me:$LINENO: checking for struct tone_zone_sound in asterisk/indications.h" >&5
+$as_echo_n "checking for struct tone_zone_sound in asterisk/indications.h... " >&6; }
+ tzs_test_result=no
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <asterisk.h>,
+ #include <asterisk/linkedlists.h>,
+ #include <asterisk/indications.h>
+int
+main ()
+{
+struct tone_zone_sound * ts = NULL; (void) ts->data;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ tzs_test_result=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:$LINENO: result: $tzs_test_result" >&5
+$as_echo "$tzs_test_result" >&6; }
+
+ 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
+ { $as_echo "$as_me:$LINENO: checking for struct ast_tone_zone_sound in asterisk/indications.h" >&5
+$as_echo_n "checking for struct ast_tone_zone_sound in asterisk/indications.h... " >&6; }
+ tzs_test_result=no
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <asterisk.h>,
+ #include <asterisk/linkedlists.h>,
+ #include <asterisk/indications.h>
+int
+main ()
+{
+struct ast_tone_zone_sound * ts = NULL; (void) ts->name;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ tzs_test_result=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:$LINENO: result: $tzs_test_result" >&5
+$as_echo "$tzs_test_result" >&6; }
+
+ 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
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: No ast_tone_zone_sound, confused...
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: No ast_tone_zone_sound, confused...
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+ fi
+
+ AST_CFLAGS="-Dtone_zone_sound=$ast_tone_zone_sound"
+
+fi
+
if test "x$with_asterisk" == "xyes" ; then
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