Skip to content
Snippets Groups Projects
configure 1.4 MiB
Newer Older
  • Learn to ignore specific revisions
  • 	{ echo "$as_me:$LINENO: checking for ZT_SET_HWGAIN in zaptel/zaptel.h" >&5
    echo $ECHO_N "checking for ZT_SET_HWGAIN in zaptel/zaptel.h... $ECHO_C" >&6; }
    	saved_cppflags="${CPPFLAGS}"
    	if test "x${ZAPTEL_HWGAIN_DIR}" != "x"; then
    	    ZAPTEL_HWGAIN_INCLUDE="-I${ZAPTEL_HWGAIN_DIR}/include"
    	fi
    	CPPFLAGS="${CPPFLAGS} ${ZAPTEL_HWGAIN_INCLUDE}"
    
    	cat >conftest.$ac_ext <<_ACEOF
     /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    #include <zaptel/zaptel.h>
    int
    main ()
    {
    
      ;
      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 "echo \"\$as_me:$LINENO: $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
      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
    
         { echo "$as_me:$LINENO: result: yes" >&5
    echo "${ECHO_T}yes" >&6; }
    		PBX_ZAPTEL_HWGAIN=1
    
    cat >>confdefs.h <<\_ACEOF
    #define HAVE_ZAPTEL_HWGAIN 1
    _ACEOF
    
    
    cat >>confdefs.h <<\_ACEOF
    #define HAVE_ZAPTEL_HWGAIN_VERSION
    _ACEOF
    
    
    
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    	       { echo "$as_me:$LINENO: result: no" >&5
    echo "${ECHO_T}no" >&6; }
    
    fi
    
    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    	CPPFLAGS="${saved_cppflags}"
        fi
    
    
    # On FreeBSD, try old zaptel (0.80 or so) and pretend we have vldtmf
    case "${host_os}" in
        freebsd*)
    
    if test "x${PBX_ZAPTEL}" != "x1" -a "${USE_ZAPTEL}" != "no"; then
       pbxlibdir=""
    
       # if --with-ZAPTEL=DIR has been specified, use it.
    
       if test "x${ZAPTEL_DIR}" != "x"; then
          if test -d ${ZAPTEL_DIR}/lib; then
          	 pbxlibdir="-L${ZAPTEL_DIR}/lib"
          else
          	 pbxlibdir="-L${ZAPTEL_DIR}"
          fi
       fi
       pbxfuncname=""
       if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
          AST_ZAPTEL_FOUND=yes
       else
          as_ac_Lib=`echo "ac_cv_lib_zaptel_${pbxfuncname}" | $as_tr_sh`
    { echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lzaptel" >&5
    echo $ECHO_N "checking for ${pbxfuncname} in -lzaptel... $ECHO_C" >&6; }
    if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lzaptel ${pbxlibdir}  $LIBS"
    cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    
    /* Override any GCC internal prototype to avoid an error.
       Use char because int might match the return type of a GCC
       builtin and then its argument prototype would still apply.  */
    #ifdef __cplusplus
    extern "C"
    #endif
    char ${pbxfuncname} ();
    int
    main ()
    {
    return ${pbxfuncname} ();
      ;
      return 0;
    }
    _ACEOF
    rm -f conftest.$ac_objext conftest$ac_exeext
    if { (ac_try="$ac_link"
    case "(($ac_try" in
      *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
      *) ac_try_echo=$ac_try;;
    esac
    eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
      (eval "$ac_link") 2>conftest.er1
      ac_status=$?
      grep -v '^ *+' conftest.er1 >conftest.err
      rm -f conftest.er1
      cat conftest.err >&5
      echo "$as_me:$LINENO: \$? = $ac_status" >&5
    
      (exit $ac_status); } && {
    	 test -z "$ac_c_werror_flag" ||
    	 test ! -s conftest.err
           } && test -s conftest$ac_exeext &&
           $as_test_x conftest$ac_exeext; then
    
      eval "$as_ac_Lib=yes"
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    	eval "$as_ac_Lib=no"
    fi
    
    
    rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    
          conftest$ac_exeext conftest.$ac_ext
    LIBS=$ac_check_lib_save_LIBS
    fi
    ac_res=`eval echo '${'$as_ac_Lib'}'`
    	       { echo "$as_me:$LINENO: result: $ac_res" >&5
    echo "${ECHO_T}$ac_res" >&6; }
    if test `eval echo '${'$as_ac_Lib'}'` = yes; then
      AST_ZAPTEL_FOUND=yes
    else
      AST_ZAPTEL_FOUND=no
    fi
    
       fi
    
    
       # now check for the header.
    
       if test "${AST_ZAPTEL_FOUND}" = "yes"; then
    
          ZAPTEL_LIB="${pbxlibdir} -lzaptel "
          # if --with-ZAPTEL=DIR has been specified, use it.
    
          if test "x${ZAPTEL_DIR}" != "x"; then
    	 ZAPTEL_INCLUDE="-I${ZAPTEL_DIR}/include"
    
          fi
          ZAPTEL_INCLUDE="${ZAPTEL_INCLUDE} "
          if test "xzaptel.h" = "x" ; then	# no header, assume found
             ZAPTEL_HEADER_FOUND="1"
          else				# check for the header
             saved_cppflags="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${ZAPTEL_INCLUDE} "
    	 if test "${ac_cv_header_zaptel_h+set}" = set; then
    
      { echo "$as_me:$LINENO: checking for zaptel.h" >&5
    echo $ECHO_N "checking for zaptel.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_zaptel_h+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_h" >&5
    echo "${ECHO_T}$ac_cv_header_zaptel_h" >&6; }
    else
      # Is the header compilable?
    { echo "$as_me:$LINENO: checking zaptel.h usability" >&5
    echo $ECHO_N "checking zaptel.h usability... $ECHO_C" >&6; }
    cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    $ac_includes_default
    #include <zaptel.h>
    _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 "echo \"\$as_me:$LINENO: $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
      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
    
      ac_header_compiler=yes
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    	ac_header_compiler=no
    fi
    
    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    echo "${ECHO_T}$ac_header_compiler" >&6; }
    
    # Is the header present?
    { echo "$as_me:$LINENO: checking zaptel.h presence" >&5
    echo $ECHO_N "checking zaptel.h presence... $ECHO_C" >&6; }
    cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    #include <zaptel.h>
    _ACEOF
    if { (ac_try="$ac_cpp conftest.$ac_ext"
    case "(($ac_try" in
      *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
      *) ac_try_echo=$ac_try;;
    esac
    eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
      (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
      ac_status=$?
      grep -v '^ *+' conftest.er1 >conftest.err
      rm -f conftest.er1
      cat conftest.err >&5
      echo "$as_me:$LINENO: \$? = $ac_status" >&5
    
      (exit $ac_status); } >/dev/null && {
    	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
    	 test ! -s conftest.err
           }; then
    
      ac_header_preproc=yes
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
      ac_header_preproc=no
    fi
    
    rm -f conftest.err conftest.$ac_ext
    { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    echo "${ECHO_T}$ac_header_preproc" >&6; }
    
    # So?  What about this header?
    case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
      yes:no: )
        { echo "$as_me:$LINENO: WARNING: zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&5
    echo "$as_me: WARNING: zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h: proceeding with the compiler's result" >&5
    echo "$as_me: WARNING: zaptel.h: proceeding with the compiler's result" >&2;}
        ac_header_preproc=yes
        ;;
      no:yes:* )
        { echo "$as_me:$LINENO: WARNING: zaptel.h: present but cannot be compiled" >&5
    echo "$as_me: WARNING: zaptel.h: present but cannot be compiled" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h:     check for missing prerequisite headers?" >&5
    echo "$as_me: WARNING: zaptel.h:     check for missing prerequisite headers?" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h: see the Autoconf documentation" >&5
    echo "$as_me: WARNING: zaptel.h: see the Autoconf documentation" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h:     section \"Present But Cannot Be Compiled\"" >&5
    echo "$as_me: WARNING: zaptel.h:     section \"Present But Cannot Be Compiled\"" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h: proceeding with the preprocessor's result" >&5
    echo "$as_me: WARNING: zaptel.h: proceeding with the preprocessor's result" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h: in the future, the compiler will take precedence" >&5
    echo "$as_me: WARNING: zaptel.h: in the future, the compiler will take precedence" >&2;}
    
        ( cat <<\_ASBOX
    ## ------------------------------- ##
    ## Report this to www.asterisk.org ##
    ## ------------------------------- ##
    _ASBOX
         ) | sed "s/^/$as_me: WARNING:     /" >&2
    
        ;;
    esac
    { echo "$as_me:$LINENO: checking for zaptel.h" >&5
    echo $ECHO_N "checking for zaptel.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_zaptel_h+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      ac_cv_header_zaptel_h=$ac_header_preproc
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_h" >&5
    echo "${ECHO_T}$ac_cv_header_zaptel_h" >&6; }
    
    fi
    if test $ac_cv_header_zaptel_h = yes; then
      ZAPTEL_HEADER_FOUND=1
    else
      ZAPTEL_HEADER_FOUND=0
    fi
    
    
    
             CPPFLAGS="${saved_cppflags}"
    
          fi
          if test "x${ZAPTEL_HEADER_FOUND}" = "x0" ; then
             ZAPTEL_LIB=""
             ZAPTEL_INCLUDE=""
          else
             if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
    	    ZAPTEL_LIB=""
    	 fi
             PBX_ZAPTEL=1
             # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
    
    cat >>confdefs.h <<_ACEOF
    #define HAVE_ZAPTEL 1
    _ACEOF
    
    
    cat >>confdefs.h <<_ACEOF
    
    #define HAVE_ZAPTEL_VERSION 80
    
    _ACEOF
    
          fi
       fi
    fi
    
    
    if test "x${PBX_ZAPTEL_VLDTMF}" != "x1" -a "${USE_ZAPTEL_VLDTMF}" != "no"; then
       pbxlibdir=""
    
       # if --with-ZAPTEL_VLDTMF=DIR has been specified, use it.
    
       if test "x${ZAPTEL_VLDTMF_DIR}" != "x"; then
          if test -d ${ZAPTEL_VLDTMF_DIR}/lib; then
          	 pbxlibdir="-L${ZAPTEL_VLDTMF_DIR}/lib"
          else
          	 pbxlibdir="-L${ZAPTEL_VLDTMF_DIR}"
          fi
       fi
       pbxfuncname=""
       if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
          AST_ZAPTEL_VLDTMF_FOUND=yes
       else
          as_ac_Lib=`echo "ac_cv_lib_zaptel_${pbxfuncname}" | $as_tr_sh`
    { echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lzaptel" >&5
    echo $ECHO_N "checking for ${pbxfuncname} in -lzaptel... $ECHO_C" >&6; }
    if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lzaptel ${pbxlibdir}  $LIBS"
    cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    
    /* Override any GCC internal prototype to avoid an error.
       Use char because int might match the return type of a GCC
       builtin and then its argument prototype would still apply.  */
    #ifdef __cplusplus
    extern "C"
    #endif
    char ${pbxfuncname} ();
    int
    main ()
    {
    return ${pbxfuncname} ();
      ;
      return 0;
    }
    _ACEOF
    rm -f conftest.$ac_objext conftest$ac_exeext
    if { (ac_try="$ac_link"
    case "(($ac_try" in
      *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
      *) ac_try_echo=$ac_try;;
    esac
    eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
      (eval "$ac_link") 2>conftest.er1
      ac_status=$?
      grep -v '^ *+' conftest.er1 >conftest.err
      rm -f conftest.er1
      cat conftest.err >&5
      echo "$as_me:$LINENO: \$? = $ac_status" >&5
    
      (exit $ac_status); } && {
    	 test -z "$ac_c_werror_flag" ||
    	 test ! -s conftest.err
           } && test -s conftest$ac_exeext &&
           $as_test_x conftest$ac_exeext; then
    
      eval "$as_ac_Lib=yes"
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    	eval "$as_ac_Lib=no"
    fi
    
    
    rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    
          conftest$ac_exeext conftest.$ac_ext
    LIBS=$ac_check_lib_save_LIBS
    
    ac_res=`eval echo '${'$as_ac_Lib'}'`
    
    	       { echo "$as_me:$LINENO: result: $ac_res" >&5
    echo "${ECHO_T}$ac_res" >&6; }
    
    if test `eval echo '${'$as_ac_Lib'}'` = yes; then
      AST_ZAPTEL_VLDTMF_FOUND=yes
    
      AST_ZAPTEL_VLDTMF_FOUND=no
    
       # now check for the header.
       if test "${AST_ZAPTEL_VLDTMF_FOUND}" = "yes"; then
          ZAPTEL_VLDTMF_LIB="${pbxlibdir} -lzaptel "
          # if --with-ZAPTEL_VLDTMF=DIR has been specified, use it.
          if test "x${ZAPTEL_VLDTMF_DIR}" != "x"; then
    	 ZAPTEL_VLDTMF_INCLUDE="-I${ZAPTEL_VLDTMF_DIR}/include"
          fi
          ZAPTEL_VLDTMF_INCLUDE="${ZAPTEL_VLDTMF_INCLUDE} "
          if test "xzaptel/zaptel.h" = "x" ; then	# no header, assume found
             ZAPTEL_VLDTMF_HEADER_FOUND="1"
          else				# check for the header
             saved_cppflags="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${ZAPTEL_VLDTMF_INCLUDE} "
    	 if test "${ac_cv_header_zaptel_zaptel_h+set}" = set; then
    
      { echo "$as_me:$LINENO: checking for zaptel/zaptel.h" >&5
    echo $ECHO_N "checking for zaptel/zaptel.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_zaptel_zaptel_h+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_zaptel_h" >&5
    echo "${ECHO_T}$ac_cv_header_zaptel_zaptel_h" >&6; }
    else
      # Is the header compilable?
    { echo "$as_me:$LINENO: checking zaptel/zaptel.h usability" >&5
    echo $ECHO_N "checking zaptel/zaptel.h usability... $ECHO_C" >&6; }
    cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    $ac_includes_default
    #include <zaptel/zaptel.h>
    _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 "echo \"\$as_me:$LINENO: $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
      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
    
      ac_header_compiler=yes
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    	ac_header_compiler=no
    fi
    
    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    echo "${ECHO_T}$ac_header_compiler" >&6; }
    
    # Is the header present?
    { echo "$as_me:$LINENO: checking zaptel/zaptel.h presence" >&5
    echo $ECHO_N "checking zaptel/zaptel.h presence... $ECHO_C" >&6; }
    cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    #include <zaptel/zaptel.h>
    _ACEOF
    if { (ac_try="$ac_cpp conftest.$ac_ext"
    case "(($ac_try" in
      *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
      *) ac_try_echo=$ac_try;;
    esac
    eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
      (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
      ac_status=$?
      grep -v '^ *+' conftest.er1 >conftest.err
      rm -f conftest.er1
      cat conftest.err >&5
      echo "$as_me:$LINENO: \$? = $ac_status" >&5
    
      (exit $ac_status); } >/dev/null && {
    	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
    	 test ! -s conftest.err
           }; then
    
      ac_header_preproc=yes
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
      ac_header_preproc=no
    fi
    
    rm -f conftest.err conftest.$ac_ext
    { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    echo "${ECHO_T}$ac_header_preproc" >&6; }
    
    # So?  What about this header?
    case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
      yes:no: )
        { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&5
    echo "$as_me: WARNING: zaptel/zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: proceeding with the compiler's result" >&5
    echo "$as_me: WARNING: zaptel/zaptel.h: proceeding with the compiler's result" >&2;}
        ac_header_preproc=yes
        ;;
      no:yes:* )
        { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: present but cannot be compiled" >&5
    echo "$as_me: WARNING: zaptel/zaptel.h: present but cannot be compiled" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h:     check for missing prerequisite headers?" >&5
    echo "$as_me: WARNING: zaptel/zaptel.h:     check for missing prerequisite headers?" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: see the Autoconf documentation" >&5
    echo "$as_me: WARNING: zaptel/zaptel.h: see the Autoconf documentation" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h:     section \"Present But Cannot Be Compiled\"" >&5
    echo "$as_me: WARNING: zaptel/zaptel.h:     section \"Present But Cannot Be Compiled\"" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: proceeding with the preprocessor's result" >&5
    echo "$as_me: WARNING: zaptel/zaptel.h: proceeding with the preprocessor's result" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: in the future, the compiler will take precedence" >&5
    echo "$as_me: WARNING: zaptel/zaptel.h: in the future, the compiler will take precedence" >&2;}
    
        ( cat <<\_ASBOX
    ## ------------------------------- ##
    ## Report this to www.asterisk.org ##
    ## ------------------------------- ##
    _ASBOX
         ) | sed "s/^/$as_me: WARNING:     /" >&2
    
        ;;
    esac
    { echo "$as_me:$LINENO: checking for zaptel/zaptel.h" >&5
    echo $ECHO_N "checking for zaptel/zaptel.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_zaptel_zaptel_h+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      ac_cv_header_zaptel_zaptel_h=$ac_header_preproc
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_zaptel_h" >&5
    echo "${ECHO_T}$ac_cv_header_zaptel_zaptel_h" >&6; }
    
    fi
    if test $ac_cv_header_zaptel_zaptel_h = yes; then
      ZAPTEL_VLDTMF_HEADER_FOUND=1
    else
      ZAPTEL_VLDTMF_HEADER_FOUND=0
    fi
    
    
    
             CPPFLAGS="${saved_cppflags}"
    
          fi
          if test "x${ZAPTEL_VLDTMF_HEADER_FOUND}" = "x0" ; then
             ZAPTEL_VLDTMF_LIB=""
             ZAPTEL_VLDTMF_INCLUDE=""
          else
             if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
    	    ZAPTEL_VLDTMF_LIB=""
    	 fi
             PBX_ZAPTEL_VLDTMF=1
             # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
    
    cat >>confdefs.h <<_ACEOF
    #define HAVE_ZAPTEL_VLDTMF 1
    _ACEOF
    
    
    cat >>confdefs.h <<_ACEOF
    
    #define HAVE_ZAPTEL_VLDTMF_VERSION 90
    
    _ACEOF
    
          fi
       fi
    fi
    
    
    if test "x${PBX_ZAPTEL_VLDTMF}" != "x1" -a "${USE_ZAPTEL_VLDTMF}" != "no"; then
       pbxlibdir=""
    
       # if --with-ZAPTEL_VLDTMF=DIR has been specified, use it.
    
       if test "x${ZAPTEL_VLDTMF_DIR}" != "x"; then
          if test -d ${ZAPTEL_VLDTMF_DIR}/lib; then
          	 pbxlibdir="-L${ZAPTEL_VLDTMF_DIR}/lib"
          else
          	 pbxlibdir="-L${ZAPTEL_VLDTMF_DIR}"
          fi
       fi
       pbxfuncname=""
       if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
          AST_ZAPTEL_VLDTMF_FOUND=yes
       else
          as_ac_Lib=`echo "ac_cv_lib_zaptel_${pbxfuncname}" | $as_tr_sh`
    { echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lzaptel" >&5
    echo $ECHO_N "checking for ${pbxfuncname} in -lzaptel... $ECHO_C" >&6; }
    if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lzaptel ${pbxlibdir}  $LIBS"
    cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    
    /* Override any GCC internal prototype to avoid an error.
       Use char because int might match the return type of a GCC
       builtin and then its argument prototype would still apply.  */
    #ifdef __cplusplus
    extern "C"
    #endif
    char ${pbxfuncname} ();
    int
    main ()
    {
    return ${pbxfuncname} ();
      ;
      return 0;
    }
    _ACEOF
    rm -f conftest.$ac_objext conftest$ac_exeext
    if { (ac_try="$ac_link"
    case "(($ac_try" in
      *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
      *) ac_try_echo=$ac_try;;
    esac
    eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
      (eval "$ac_link") 2>conftest.er1
      ac_status=$?
      grep -v '^ *+' conftest.er1 >conftest.err
      rm -f conftest.er1
      cat conftest.err >&5
      echo "$as_me:$LINENO: \$? = $ac_status" >&5
    
      (exit $ac_status); } && {
    	 test -z "$ac_c_werror_flag" ||
    	 test ! -s conftest.err
           } && test -s conftest$ac_exeext &&
           $as_test_x conftest$ac_exeext; then
    
      eval "$as_ac_Lib=yes"
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    	eval "$as_ac_Lib=no"
    fi
    
    
    rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    
          conftest$ac_exeext conftest.$ac_ext
    LIBS=$ac_check_lib_save_LIBS
    fi
    ac_res=`eval echo '${'$as_ac_Lib'}'`
    	       { echo "$as_me:$LINENO: result: $ac_res" >&5
    echo "${ECHO_T}$ac_res" >&6; }
    if test `eval echo '${'$as_ac_Lib'}'` = yes; then
      AST_ZAPTEL_VLDTMF_FOUND=yes
    
       # now check for the header.
    
       if test "${AST_ZAPTEL_VLDTMF_FOUND}" = "yes"; then
    
          ZAPTEL_VLDTMF_LIB="${pbxlibdir} -lzaptel "
          # if --with-ZAPTEL_VLDTMF=DIR has been specified, use it.
    
          if test "x${ZAPTEL_VLDTMF_DIR}" != "x"; then
    	 ZAPTEL_VLDTMF_INCLUDE="-I${ZAPTEL_VLDTMF_DIR}/include"
    
          fi
          ZAPTEL_VLDTMF_INCLUDE="${ZAPTEL_VLDTMF_INCLUDE} "
          if test "xzaptel.h" = "x" ; then	# no header, assume found
             ZAPTEL_VLDTMF_HEADER_FOUND="1"
          else				# check for the header
             saved_cppflags="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${ZAPTEL_VLDTMF_INCLUDE} "
    	 if test "${ac_cv_header_zaptel_h+set}" = set; then
    
      { echo "$as_me:$LINENO: checking for zaptel.h" >&5
    echo $ECHO_N "checking for zaptel.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_zaptel_h+set}" = set; then
    
      echo $ECHO_N "(cached) $ECHO_C" >&6
    
    { echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_h" >&5
    echo "${ECHO_T}$ac_cv_header_zaptel_h" >&6; }
    
    { echo "$as_me:$LINENO: checking zaptel.h usability" >&5
    echo $ECHO_N "checking zaptel.h usability... $ECHO_C" >&6; }
    
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    
    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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    
      ac_status=$?
      grep -v '^ *+' conftest.er1 >conftest.err
      rm -f conftest.er1
      cat conftest.err >&5
      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
    
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    
    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    
    { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
    echo "${ECHO_T}$ac_header_compiler" >&6; }
    
    { echo "$as_me:$LINENO: checking zaptel.h presence" >&5
    echo $ECHO_N "checking zaptel.h presence... $ECHO_C" >&6; }
    
    cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    
    case "(($ac_try" in
      *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
      *) ac_try_echo=$ac_try;;
    esac
    eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    
      (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
    
      ac_status=$?
      grep -v '^ *+' conftest.er1 >conftest.err
      rm -f conftest.er1
      cat conftest.err >&5
      echo "$as_me:$LINENO: \$? = $ac_status" >&5
    
      (exit $ac_status); } >/dev/null && {
    	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
    	 test ! -s conftest.err
           }; then
    
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    
    rm -f conftest.err conftest.$ac_ext
    { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
    echo "${ECHO_T}$ac_header_preproc" >&6; }
    
    # So?  What about this header?
    case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
      yes:no: )
    
        { echo "$as_me:$LINENO: WARNING: zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&5
    echo "$as_me: WARNING: zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h: proceeding with the compiler's result" >&5
    echo "$as_me: WARNING: zaptel.h: proceeding with the compiler's result" >&2;}
    
        { echo "$as_me:$LINENO: WARNING: zaptel.h: present but cannot be compiled" >&5
    echo "$as_me: WARNING: zaptel.h: present but cannot be compiled" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h:     check for missing prerequisite headers?" >&5
    echo "$as_me: WARNING: zaptel.h:     check for missing prerequisite headers?" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h: see the Autoconf documentation" >&5
    echo "$as_me: WARNING: zaptel.h: see the Autoconf documentation" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h:     section \"Present But Cannot Be Compiled\"" >&5
    echo "$as_me: WARNING: zaptel.h:     section \"Present But Cannot Be Compiled\"" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h: proceeding with the preprocessor's result" >&5
    echo "$as_me: WARNING: zaptel.h: proceeding with the preprocessor's result" >&2;}
        { echo "$as_me:$LINENO: WARNING: zaptel.h: in the future, the compiler will take precedence" >&5
    echo "$as_me: WARNING: zaptel.h: in the future, the compiler will take precedence" >&2;}
    
        ( cat <<\_ASBOX
    ## ------------------------------- ##
    ## Report this to www.asterisk.org ##
    ## ------------------------------- ##
    _ASBOX
         ) | sed "s/^/$as_me: WARNING:     /" >&2
    
    { echo "$as_me:$LINENO: checking for zaptel.h" >&5
    echo $ECHO_N "checking for zaptel.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_zaptel_h+set}" = set; then
    
      ac_cv_header_zaptel_h=$ac_header_preproc
    
    { echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_h" >&5
    echo "${ECHO_T}$ac_cv_header_zaptel_h" >&6; }
    
    if test $ac_cv_header_zaptel_h = yes; then
      ZAPTEL_VLDTMF_HEADER_FOUND=1
    
             CPPFLAGS="${saved_cppflags}"
    
          if test "x${ZAPTEL_VLDTMF_HEADER_FOUND}" = "x0" ; then
             ZAPTEL_VLDTMF_LIB=""
             ZAPTEL_VLDTMF_INCLUDE=""
    
          else
             if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
    
             # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
    
    cat >>confdefs.h <<_ACEOF
    
    #define HAVE_ZAPTEL_VLDTMF_VERSION 80
    
    	# other case, old tonezone (0.80)
    
    if test "x${PBX_TONEZONE}" != "x1" -a "${USE_TONEZONE}" != "no"; then
    
       # if --with-TONEZONE=DIR has been specified, use it.
    
       if test "x${TONEZONE_DIR}" != "x"; then
          if test -d ${TONEZONE_DIR}/lib; then
          	 pbxlibdir="-L${TONEZONE_DIR}/lib"
    
          	 pbxlibdir="-L${TONEZONE_DIR}"
    
       if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
    
          as_ac_Lib=`echo "ac_cv_lib_tonezone_${pbxfuncname}" | $as_tr_sh`
    { echo "$as_me:$LINENO: checking for ${pbxfuncname} in -ltonezone" >&5
    echo $ECHO_N "checking for ${pbxfuncname} in -ltonezone... $ECHO_C" >&6; }
    
    if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
    
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
    
    LIBS="-ltonezone ${pbxlibdir} ${tonezone_extra} $LIBS"
    
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    
    
    /* Override any GCC internal prototype to avoid an error.
       Use char because int might match the return type of a GCC
       builtin and then its argument prototype would still apply.  */
    #ifdef __cplusplus
    extern "C"
    #endif
    
    rm -f conftest.$ac_objext conftest$ac_exeext
    
    if { (ac_try="$ac_link"
    case "(($ac_try" in
      *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
      *) ac_try_echo=$ac_try;;
    esac
    eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    
      grep -v '^ *+' conftest.er1 >conftest.err
      rm -f conftest.er1
      cat conftest.err >&5
    
      echo "$as_me:$LINENO: \$? = $ac_status" >&5
    
      (exit $ac_status); } && {
    	 test -z "$ac_c_werror_flag" ||
    	 test ! -s conftest.err
           } && test -s conftest$ac_exeext &&
           $as_test_x conftest$ac_exeext; then
    
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    	eval "$as_ac_Lib=no"
    
    rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
    
          conftest$ac_exeext conftest.$ac_ext
    LIBS=$ac_check_lib_save_LIBS
    
    ac_res=`eval echo '${'$as_ac_Lib'}'`
    	       { echo "$as_me:$LINENO: result: $ac_res" >&5
    echo "${ECHO_T}$ac_res" >&6; }
    if test `eval echo '${'$as_ac_Lib'}'` = yes; then
      AST_TONEZONE_FOUND=yes
    
       # now check for the header.
       if test "${AST_TONEZONE_FOUND}" = "yes"; then
          TONEZONE_LIB="${pbxlibdir} -ltonezone ${tonezone_extra}"
          # if --with-TONEZONE=DIR has been specified, use it.
          if test "x${TONEZONE_DIR}" != "x"; then
    	 TONEZONE_INCLUDE="-I${TONEZONE_DIR}/include"
          fi
          TONEZONE_INCLUDE="${TONEZONE_INCLUDE} "
          if test "xzaptel.h" = "x" ; then	# no header, assume found
             TONEZONE_HEADER_FOUND="1"
          else				# check for the header
             saved_cppflags="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${TONEZONE_INCLUDE} "
    	 if test "${ac_cv_header_zaptel_h+set}" = set; then
    
      { echo "$as_me:$LINENO: checking for zaptel.h" >&5
    echo $ECHO_N "checking for zaptel.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_zaptel_h+set}" = set; then
    
    { echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_h" >&5
    echo "${ECHO_T}$ac_cv_header_zaptel_h" >&6; }
    
    { echo "$as_me:$LINENO: checking zaptel.h usability" >&5
    echo $ECHO_N "checking zaptel.h usability... $ECHO_C" >&6; }
    
    cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    $ac_includes_default
    
    _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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    
      ac_status=$?
      grep -v '^ *+' conftest.er1 >conftest.err
      rm -f conftest.er1
      cat conftest.err >&5
      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