Added detection of tone_zone_sound structure name. Thanx to Janis for this
[lcr.git] / configure
index a924db7..2b2bc0b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for lcr 1.6.
+# Generated by GNU Autoconf 2.63 for lcr 1.7.
 #
 # Report bugs to <andreas@eversberg.eu>.
 #
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='lcr'
 PACKAGE_TARNAME='lcr'
-PACKAGE_VERSION='1.6'
-PACKAGE_STRING='lcr 1.6'
+PACKAGE_VERSION='1.7'
+PACKAGE_STRING='lcr 1.7'
 PACKAGE_BUGREPORT='andreas@eversberg.eu'
 
 ac_unique_file="main.c"
@@ -640,11 +640,18 @@ ac_includes_default="\
 ac_subst_vars='LTLIBOBJS
 POW_LIB
 LIBOBJS
+ENABLE_SS5_FALSE
+ENABLE_SS5_TRUE
 ENABLE_GSM_FALSE
 ENABLE_GSM_TRUE
+ENABLE_GSM_MS_FALSE
+ENABLE_GSM_MS_TRUE
+ENABLE_GSM_BS_FALSE
+ENABLE_GSM_BS_TRUE
 LIBCRYPTO
 ENABLE_ASTERISK_CHANNEL_DRIVER_FALSE
 ENABLE_ASTERISK_CHANNEL_DRIVER_TRUE
+AST_CFLAGS
 am__fastdepCXX_FALSE
 am__fastdepCXX_TRUE
 CXXDEPMODE
@@ -734,7 +741,9 @@ enable_option_checking
 enable_dependency_tracking
 with_asterisk
 with_ssl
-with_gsm
+with_gsm_bs
+with_gsm_ms
+with_ss5
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1300,7 +1309,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures lcr 1.6 to adapt to many kinds of systems.
+\`configure' configures lcr 1.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1366,7 +1375,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of lcr 1.6:";;
+     short | recursive ) echo "Configuration of lcr 1.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1385,7 +1394,11 @@ Optional Packages:
 
   --with-ssl              compile with ssl support (libcrypto) [default=check]
 
-  --with-gsm              compile with OpenBSC support [default=no]
+  --with-gsm-bs           compile with OpenBSC support [default=check]
+
+  --with-gsm-ms           compile with Osmocom-bb support [default=check]
+
+  --with-ss5              compile with CCITT No. 5 support [default=no]
 
 
 Some influential environment variables:
@@ -1466,7 +1479,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-lcr configure 1.6
+lcr configure 1.7
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1480,7 +1493,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by lcr $as_me 1.6, which was
+It was created by lcr $as_me 1.7, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -4038,7 +4051,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=lcr
- VERSION=1.6
+ VERSION=1.7
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5998,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
@@ -6258,17 +6400,17 @@ fi
 fi
 
 
-# check for gsm
+# check for gsm-bs
 
-# Check whether --with-gsm was given.
-if test "${with_gsm+set}" = set; then
-  withval=$with_gsm;
+# Check whether --with-gsm-bs was given.
+if test "${with_gsm_bs+set}" = set; then
+  withval=$with_gsm_bs;
 else
-  with_gsm="check"
+  with_gsm_bs="check"
 fi
 
 
-if test "x$with_gsm" != xno; then
+if test "x$with_gsm_bs" != xno; then
   { $as_echo "$as_me:$LINENO: checking for openbsc/include/openbsc/gsm_data.h" >&5
 $as_echo_n "checking for openbsc/include/openbsc/gsm_data.h... " >&6; }
 if test "${ac_cv_file_openbsc_include_openbsc_gsm_data_h+set}" = set; then
@@ -6287,14 +6429,72 @@ fi
 { $as_echo "$as_me:$LINENO: result: $ac_cv_file_openbsc_include_openbsc_gsm_data_h" >&5
 $as_echo "$ac_cv_file_openbsc_include_openbsc_gsm_data_h" >&6; }
 if test "x$ac_cv_file_openbsc_include_openbsc_gsm_data_h" = x""yes; then
-  with_gsm="yes"
+  with_gsm_bs="yes"
+else
+  if test "x$with_gsm_bs" != xcheck ; 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: --with-gsm-bs was given, but openbsc/include/openbsc/gsm_data.h was not found! Pleas link OpenBSC and libosmocore source directory to LCR source directory: ln -s path_to_openbsc/openbsc/ openbsc ; ln -s patch_to_libosmocore libosmocore
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-gsm-bs was given, but openbsc/include/openbsc/gsm_data.h was not found! Pleas link OpenBSC and libosmocore source directory to LCR source directory: ln -s path_to_openbsc/openbsc/ openbsc ; ln -s patch_to_libosmocore libosmocore
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+                     fi
+
+fi
+
+
+fi
+
+
+
+
+if test "x$with_gsm_bs" == "xyes" ; then
+  ENABLE_GSM_BS_TRUE=
+  ENABLE_GSM_BS_FALSE='#'
+else
+  ENABLE_GSM_BS_TRUE='#'
+  ENABLE_GSM_BS_FALSE=
+fi
+
+
+# check for gsm-ms
+
+# Check whether --with-gsm-ms was given.
+if test "${with_gsm_ms+set}" = set; then
+  withval=$with_gsm_ms;
+else
+  with_gsm_ms="check"
+fi
+
+
+if test "x$with_gsm_ms" != xno; then
+  { $as_echo "$as_me:$LINENO: checking for layer23/include/osmocom/osmocom_data.h" >&5
+$as_echo_n "checking for layer23/include/osmocom/osmocom_data.h... " >&6; }
+if test "${ac_cv_file_layer23_include_osmocom_osmocom_data_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  test "$cross_compiling" = yes &&
+  { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "layer23/include/osmocom/osmocom_data.h"; then
+  ac_cv_file_layer23_include_osmocom_osmocom_data_h=yes
+else
+  ac_cv_file_layer23_include_osmocom_osmocom_data_h=no
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_file_layer23_include_osmocom_osmocom_data_h" >&5
+$as_echo "$ac_cv_file_layer23_include_osmocom_osmocom_data_h" >&6; }
+if test "x$ac_cv_file_layer23_include_osmocom_osmocom_data_h" = x""yes; then
+  with_gsm_ms="yes"
 else
-  if test "x$with_gsm" != xcheck ; then
+  if test "x$with_gsm_ms" != xcheck ; 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: --with-gsm was given, but openbsc/include/openbsc/gsm_data.h was not found! Pleas link OpenBSC source directory to LCR source directory: ln -s path_to_openbsc/openbsc/ .
+{ { $as_echo "$as_me:$LINENO: error: --with-gsm-ms was given, but osmocom-bb/include/osmocom/osmocom_data.h was not found! Pleas link Osmocom-BB and libosmocore source directory to LCR source directory: ln -s path_to_osmocom-bb/src/host/layer23/ layer23 ; ln -s path_to_libosmocore libosmocore
 See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-gsm was given, but openbsc/include/openbsc/gsm_data.h was not found! Pleas link OpenBSC source directory to LCR source directory: ln -s path_to_openbsc/openbsc/ .
+$as_echo "$as_me: error: --with-gsm-ms was given, but osmocom-bb/include/osmocom/osmocom_data.h was not found! Pleas link Osmocom-BB and libosmocore source directory to LCR source directory: ln -s path_to_osmocom-bb/src/host/layer23/ layer23 ; ln -s path_to_libosmocore libosmocore
 See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }; }
                      fi
@@ -6307,7 +6507,18 @@ fi
 
 
 
-if test "x$with_gsm" == "xyes" ; then
+if test "x$with_gsm_ms" == "xyes" ; then
+  ENABLE_GSM_MS_TRUE=
+  ENABLE_GSM_MS_FALSE='#'
+else
+  ENABLE_GSM_MS_TRUE='#'
+  ENABLE_GSM_MS_FALSE=
+fi
+
+
+
+
+if test "x$with_gsm_bs" == "xyes" -o "x$with_gsm_ms" == "xyes"; then
   ENABLE_GSM_TRUE=
   ENABLE_GSM_FALSE='#'
 else
@@ -6316,6 +6527,27 @@ else
 fi
 
 
+# check for ss5
+
+# Check whether --with-ss5 was given.
+if test "${with_ss5+set}" = set; then
+  withval=$with_ss5;
+else
+  with_ss5="check"
+fi
+
+
+
+
+if test "x$with_ss5" == "xyes" ; then
+  ENABLE_SS5_TRUE=
+  ENABLE_SS5_FALSE='#'
+else
+  ENABLE_SS5_TRUE='#'
+  ENABLE_SS5_FALSE=
+fi
+
+
 # Checks for libraries.
 
 { $as_echo "$as_me:$LINENO: checking for main in -lm" >&5
@@ -9819,6 +10051,20 @@ $as_echo "$as_me: error: conditional \"ENABLE_ASTERISK_CHANNEL_DRIVER\" was neve
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${ENABLE_GSM_BS_TRUE}" && test -z "${ENABLE_GSM_BS_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GSM_BS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"ENABLE_GSM_BS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLE_GSM_MS_TRUE}" && test -z "${ENABLE_GSM_MS_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GSM_MS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"ENABLE_GSM_MS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${ENABLE_GSM_TRUE}" && test -z "${ENABLE_GSM_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_GSM\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -9826,6 +10072,13 @@ $as_echo "$as_me: error: conditional \"ENABLE_GSM\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${ENABLE_SS5_TRUE}" && test -z "${ENABLE_SS5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_SS5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"ENABLE_SS5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_write_fail=0
@@ -10148,7 +10401,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by lcr $as_me 1.6, which was
+This file was extended by lcr $as_me 1.7, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -10211,7 +10464,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-lcr config.status 1.6
+lcr config.status 1.7
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"