Skip to content
Snippets Groups Projects
configure 1.4 MiB
Newer Older
  • Learn to ignore specific revisions
  • 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.  */
    
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.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
    
    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
      TONEZONE_HEADER_FOUND=1
    
             CPPFLAGS="${saved_cppflags}"
    
          if test "x${TONEZONE_HEADER_FOUND}" = "x0" ; then
             TONEZONE_LIB=""
             TONEZONE_INCLUDE=""
    
             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
    
    #define HAVE_TONEZONE_VERSION 80
    
    EDITLINE_LIB=""
    if test "x$TERMCAP_LIB" != "x" ; then
      EDITLINE_LIB="$TERMCAP_LIB"
    elif test "x$TINFO_LIB" != "x" ; then
      EDITLINE_LIB="$TINFO_LIB"
    elif test "x$CURSES_LIB" != "x" ; then
      EDITLINE_LIB="$CURSES_LIB"
    elif test "x$NCURSES_LIB" != "x" ; then
      EDITLINE_LIB="$NCURSES_LIB"
    else
    
      { { echo "$as_me:$LINENO: error: *** termcap support not found" >&5
    echo "$as_me: error: *** termcap support not found" >&2;}
       { (exit 1); exit 1; }; }
    
    fi
    
    
    if test "${ac_cv_header_h323_h+set}" = set; then
      { echo "$as_me:$LINENO: checking for h323.h" >&5
    echo $ECHO_N "checking for h323.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_h323_h+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_h323_h" >&5
    echo "${ECHO_T}$ac_cv_header_h323_h" >&6; }
    else
      # Is the header compilable?
    { echo "$as_me:$LINENO: checking h323.h usability" >&5
    echo $ECHO_N "checking h323.h usability... $ECHO_C" >&6; }
    cat >conftest.$ac_ext <<_ACEOF
    
    Russell Bryant's avatar
    Russell Bryant committed
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    $ac_includes_default
    
    Russell Bryant's avatar
    Russell Bryant committed
    _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
    
    Russell Bryant's avatar
    Russell Bryant committed
    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; }
    
    # Is the header present?
    { echo "$as_me:$LINENO: checking h323.h presence" >&5
    echo $ECHO_N "checking h323.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 <h323.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
    
    Russell Bryant's avatar
    Russell Bryant committed
    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: h323.h: accepted by the compiler, rejected by the preprocessor!" >&5
    echo "$as_me: WARNING: h323.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
        { echo "$as_me:$LINENO: WARNING: h323.h: proceeding with the compiler's result" >&5
    echo "$as_me: WARNING: h323.h: proceeding with the compiler's result" >&2;}
        ac_header_preproc=yes
        ;;
      no:yes:* )
        { echo "$as_me:$LINENO: WARNING: h323.h: present but cannot be compiled" >&5
    echo "$as_me: WARNING: h323.h: present but cannot be compiled" >&2;}
        { echo "$as_me:$LINENO: WARNING: h323.h:     check for missing prerequisite headers?" >&5
    echo "$as_me: WARNING: h323.h:     check for missing prerequisite headers?" >&2;}
        { echo "$as_me:$LINENO: WARNING: h323.h: see the Autoconf documentation" >&5
    echo "$as_me: WARNING: h323.h: see the Autoconf documentation" >&2;}
        { echo "$as_me:$LINENO: WARNING: h323.h:     section \"Present But Cannot Be Compiled\"" >&5
    echo "$as_me: WARNING: h323.h:     section \"Present But Cannot Be Compiled\"" >&2;}
        { echo "$as_me:$LINENO: WARNING: h323.h: proceeding with the preprocessor's result" >&5
    echo "$as_me: WARNING: h323.h: proceeding with the preprocessor's result" >&2;}
        { echo "$as_me:$LINENO: WARNING: h323.h: in the future, the compiler will take precedence" >&5
    echo "$as_me: WARNING: h323.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 h323.h" >&5
    echo $ECHO_N "checking for h323.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_h323_h+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      ac_cv_header_h323_h=$ac_header_preproc
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_h323_h" >&5
    echo "${ECHO_T}$ac_cv_header_h323_h" >&6; }
    
    fi
    if test $ac_cv_header_h323_h = yes; then
      PBX_H323=1
    else
      PBX_H323=0
    fi
    
    
    
    
    if test "${ac_cv_header_linux_compiler_h+set}" = set; then
      { echo "$as_me:$LINENO: checking for linux/compiler.h" >&5
    echo $ECHO_N "checking for linux/compiler.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_linux_compiler_h+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_linux_compiler_h" >&5
    echo "${ECHO_T}$ac_cv_header_linux_compiler_h" >&6; }
    else
      # Is the header compilable?
    { echo "$as_me:$LINENO: checking linux/compiler.h usability" >&5
    echo $ECHO_N "checking linux/compiler.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 <linux/compiler.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 linux/compiler.h presence" >&5
    echo $ECHO_N "checking linux/compiler.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 <linux/compiler.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: linux/compiler.h: accepted by the compiler, rejected by the preprocessor!" >&5
    echo "$as_me: WARNING: linux/compiler.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
        { echo "$as_me:$LINENO: WARNING: linux/compiler.h: proceeding with the compiler's result" >&5
    echo "$as_me: WARNING: linux/compiler.h: proceeding with the compiler's result" >&2;}
        ac_header_preproc=yes
        ;;
      no:yes:* )
        { echo "$as_me:$LINENO: WARNING: linux/compiler.h: present but cannot be compiled" >&5
    echo "$as_me: WARNING: linux/compiler.h: present but cannot be compiled" >&2;}
        { echo "$as_me:$LINENO: WARNING: linux/compiler.h:     check for missing prerequisite headers?" >&5
    echo "$as_me: WARNING: linux/compiler.h:     check for missing prerequisite headers?" >&2;}
        { echo "$as_me:$LINENO: WARNING: linux/compiler.h: see the Autoconf documentation" >&5
    echo "$as_me: WARNING: linux/compiler.h: see the Autoconf documentation" >&2;}
        { echo "$as_me:$LINENO: WARNING: linux/compiler.h:     section \"Present But Cannot Be Compiled\"" >&5
    echo "$as_me: WARNING: linux/compiler.h:     section \"Present But Cannot Be Compiled\"" >&2;}
        { echo "$as_me:$LINENO: WARNING: linux/compiler.h: proceeding with the preprocessor's result" >&5
    echo "$as_me: WARNING: linux/compiler.h: proceeding with the preprocessor's result" >&2;}
        { echo "$as_me:$LINENO: WARNING: linux/compiler.h: in the future, the compiler will take precedence" >&5
    echo "$as_me: WARNING: linux/compiler.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 linux/compiler.h" >&5
    echo $ECHO_N "checking for linux/compiler.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_linux_compiler_h+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      ac_cv_header_linux_compiler_h=$ac_header_preproc
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_linux_compiler_h" >&5
    echo "${ECHO_T}$ac_cv_header_linux_compiler_h" >&6; }
    
    fi
    if test $ac_cv_header_linux_compiler_h = yes; then
    
    cat >>confdefs.h <<_ACEOF
    #define HAVE_LINUX_COMPILER_H 1
    _ACEOF
    
    fi
    
    
    
    { echo "$as_me:$LINENO: checking for linux/ixjuser.h" >&5
    echo $ECHO_N "checking for linux/ixjuser.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_linux_ixjuser_h+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      cat >conftest.$ac_ext <<_ACEOF
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    
    				   #include <linux/version.h>
    				   #ifdef HAVE_LINUX_COMPILER_H
    				   #include <linux/compiler.h>
    				   #endif
    
    
    #include <linux/ixjuser.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_cv_header_linux_ixjuser_h=yes
    else
      echo "$as_me: failed program was:" >&5
    sed 's/^/| /' conftest.$ac_ext >&5
    
    	ac_cv_header_linux_ixjuser_h=no
    fi
    
    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_linux_ixjuser_h" >&5
    echo "${ECHO_T}$ac_cv_header_linux_ixjuser_h" >&6; }
    if test $ac_cv_header_linux_ixjuser_h = yes; then
      PBX_IXJUSER=1
    else
      PBX_IXJUSER=0
    fi
    
    
    
    
    
    
        if test "x${PBX_SDL}" != "x1" -a "${USE_SDL}" != "no"; then
    	PBX_SDL=0
    	if test -n "$ac_tool_prefix"; then
    
      # Extract the first word of "${ac_tool_prefix}sdl-config", so it can be a program name with args.
    set dummy ${ac_tool_prefix}sdl-config; ac_word=$2
    { echo "$as_me:$LINENO: checking for $ac_word" >&5
    echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    if test "${ac_cv_prog_CONFIG_SDL+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      if test -n "$CONFIG_SDL"; then
      ac_cv_prog_CONFIG_SDL="$CONFIG_SDL" # Let the user override the test.
    else
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    for as_dir in $PATH
    do
      IFS=$as_save_IFS
      test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    
      if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    
        ac_cv_prog_CONFIG_SDL="${ac_tool_prefix}sdl-config"
        echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
        break 2
      fi
    done
    done
    IFS=$as_save_IFS
    
    fi
    fi
    CONFIG_SDL=$ac_cv_prog_CONFIG_SDL
    if test -n "$CONFIG_SDL"; then
      { echo "$as_me:$LINENO: result: $CONFIG_SDL" >&5
    echo "${ECHO_T}$CONFIG_SDL" >&6; }
    else
      { echo "$as_me:$LINENO: result: no" >&5
    echo "${ECHO_T}no" >&6; }
    fi
    
    
    fi
    if test -z "$ac_cv_prog_CONFIG_SDL"; then
      ac_ct_CONFIG_SDL=$CONFIG_SDL
      # Extract the first word of "sdl-config", so it can be a program name with args.
    set dummy sdl-config; ac_word=$2
    { echo "$as_me:$LINENO: checking for $ac_word" >&5
    echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
    if test "${ac_cv_prog_ac_ct_CONFIG_SDL+set}" = set; then
      echo $ECHO_N "(cached) $ECHO_C" >&6
    else
      if test -n "$ac_ct_CONFIG_SDL"; then
      ac_cv_prog_ac_ct_CONFIG_SDL="$ac_ct_CONFIG_SDL" # Let the user override the test.
    else
    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    for as_dir in $PATH
    do
      IFS=$as_save_IFS
      test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    
      if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    
        ac_cv_prog_ac_ct_CONFIG_SDL="sdl-config"
        echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
        break 2
      fi
    done
    done
    IFS=$as_save_IFS
    
    fi
    fi
    ac_ct_CONFIG_SDL=$ac_cv_prog_ac_ct_CONFIG_SDL
    if test -n "$ac_ct_CONFIG_SDL"; then
      { echo "$as_me:$LINENO: result: $ac_ct_CONFIG_SDL" >&5
    echo "${ECHO_T}$ac_ct_CONFIG_SDL" >&6; }
    else
      { echo "$as_me:$LINENO: result: no" >&5
    echo "${ECHO_T}no" >&6; }
    fi
    
      if test "x$ac_ct_CONFIG_SDL" = x; then
        CONFIG_SDL="No"
      else
        case $cross_compiling:$ac_tool_warned in
    yes:)
    { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
    whose name does not start with the host triplet.  If you think this
    configuration is useful to you, please write to autoconf@gnu.org." >&5
    echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
    whose name does not start with the host triplet.  If you think this
    configuration is useful to you, please write to autoconf@gnu.org." >&2;}
    ac_tool_warned=yes ;;
    esac
        CONFIG_SDL=$ac_ct_CONFIG_SDL
      fi
    else
      CONFIG_SDL="$ac_cv_prog_CONFIG_SDL"
    fi
    
    
    	if test ! "x${CONFIG_SDL}" = xNo; then
    
    	    if test x"" = x ; then A=--cflags ; else A="" ; fi
    	    SDL_INCLUDE=$(${CONFIG_SDL} $A)
    	    if test x"" = x ; then A=--libs ; else A="" ; fi
    	    SDL_LIB=$(${CONFIG_SDL} $A)
    
    
    
    if test "x${PBX_SDL_IMAGE}" != "x1" -a "${USE_SDL_IMAGE}" != "no"; then
       pbxlibdir=""
    
       # if --with-SDL_IMAGE=DIR has been specified, use it.
    
       if test "x${SDL_IMAGE_DIR}" != "x"; then
          if test -d ${SDL_IMAGE_DIR}/lib; then
          	 pbxlibdir="-L${SDL_IMAGE_DIR}/lib"
          else
          	 pbxlibdir="-L${SDL_IMAGE_DIR}"
          fi
       fi
       pbxfuncname="IMG_Load"
       if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
          AST_SDL_IMAGE_FOUND=yes
       else
          as_ac_Lib=`echo "ac_cv_lib_SDL_image_${pbxfuncname}" | $as_tr_sh`
    { echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lSDL_image" >&5
    echo $ECHO_N "checking for ${pbxfuncname} in -lSDL_image... $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="-lSDL_image ${pbxlibdir} ${SDL_LIB} $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_SDL_IMAGE_FOUND=yes
    else
      AST_SDL_IMAGE_FOUND=no
    fi
    
       fi
    
    
       # now check for the header.
    
       if test "${AST_SDL_IMAGE_FOUND}" = "yes"; then
    
          SDL_IMAGE_LIB="${pbxlibdir} -lSDL_image ${SDL_LIB}"
          # if --with-SDL_IMAGE=DIR has been specified, use it.
    
          if test "x${SDL_IMAGE_DIR}" != "x"; then
    	 SDL_IMAGE_INCLUDE="-I${SDL_IMAGE_DIR}/include"
    
          fi
          SDL_IMAGE_INCLUDE="${SDL_IMAGE_INCLUDE} ${SDL_INCLUDE}"
          if test "xSDL_image.h" = "x" ; then	# no header, assume found
             SDL_IMAGE_HEADER_FOUND="1"
          else				# check for the header
             saved_cppflags="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${SDL_IMAGE_INCLUDE} ${SDL_INCLUDE}"
    	 if test "${ac_cv_header_SDL_image_h+set}" = set; then
      { echo "$as_me:$LINENO: checking for SDL_image.h" >&5
    echo $ECHO_N "checking for SDL_image.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_SDL_image_h+set}" = set; then
    
      echo $ECHO_N "(cached) $ECHO_C" >&6
    fi
    
    { echo "$as_me:$LINENO: result: $ac_cv_header_SDL_image_h" >&5
    echo "${ECHO_T}$ac_cv_header_SDL_image_h" >&6; }
    
    { echo "$as_me:$LINENO: checking SDL_image.h usability" >&5
    echo $ECHO_N "checking SDL_image.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
    
    _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 SDL_image.h presence" >&5
    echo $ECHO_N "checking SDL_image.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.  */
    
    _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: SDL_image.h: accepted by the compiler, rejected by the preprocessor!" >&5
    echo "$as_me: WARNING: SDL_image.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
        { echo "$as_me:$LINENO: WARNING: SDL_image.h: proceeding with the compiler's result" >&5
    echo "$as_me: WARNING: SDL_image.h: proceeding with the compiler's result" >&2;}
    
        { echo "$as_me:$LINENO: WARNING: SDL_image.h: present but cannot be compiled" >&5
    echo "$as_me: WARNING: SDL_image.h: present but cannot be compiled" >&2;}
        { echo "$as_me:$LINENO: WARNING: SDL_image.h:     check for missing prerequisite headers?" >&5
    echo "$as_me: WARNING: SDL_image.h:     check for missing prerequisite headers?" >&2;}
        { echo "$as_me:$LINENO: WARNING: SDL_image.h: see the Autoconf documentation" >&5
    echo "$as_me: WARNING: SDL_image.h: see the Autoconf documentation" >&2;}
        { echo "$as_me:$LINENO: WARNING: SDL_image.h:     section \"Present But Cannot Be Compiled\"" >&5
    echo "$as_me: WARNING: SDL_image.h:     section \"Present But Cannot Be Compiled\"" >&2;}
        { echo "$as_me:$LINENO: WARNING: SDL_image.h: proceeding with the preprocessor's result" >&5
    echo "$as_me: WARNING: SDL_image.h: proceeding with the preprocessor's result" >&2;}
        { echo "$as_me:$LINENO: WARNING: SDL_image.h: in the future, the compiler will take precedence" >&5
    echo "$as_me: WARNING: SDL_image.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 SDL_image.h" >&5
    echo $ECHO_N "checking for SDL_image.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_SDL_image_h+set}" = set; then
    
      ac_cv_header_SDL_image_h=$ac_header_preproc
    
    Russell Bryant's avatar
    Russell Bryant committed
    fi
    
    { echo "$as_me:$LINENO: result: $ac_cv_header_SDL_image_h" >&5
    echo "${ECHO_T}$ac_cv_header_SDL_image_h" >&6; }
    
    Russell Bryant's avatar
    Russell Bryant committed
    
    
    if test $ac_cv_header_SDL_image_h = yes; then
    
             CPPFLAGS="${saved_cppflags}"
    
          fi
          if test "x${SDL_IMAGE_HEADER_FOUND}" = "x0" ; then
             SDL_IMAGE_LIB=""
             SDL_IMAGE_INCLUDE=""
          else
             if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
    	    SDL_IMAGE_LIB=""
    	 fi
             PBX_SDL_IMAGE=1
             # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
    
    cat >>confdefs.h <<_ACEOF
    #define HAVE_SDL_IMAGE 1
    _ACEOF
    
    #define HAVE_SDL_IMAGE_VERSION
    
    _ACEOF
    
          fi
       fi
    fi
    
    
    if test "x${PBX_FFMPEG}" != "x1" -a "${USE_FFMPEG}" != "no"; then
       pbxlibdir=""
    
       # if --with-FFMPEG=DIR has been specified, use it.
    
       if test "x${FFMPEG_DIR}" != "x"; then
          if test -d ${FFMPEG_DIR}/lib; then
          	 pbxlibdir="-L${FFMPEG_DIR}/lib"
          else
          	 pbxlibdir="-L${FFMPEG_DIR}"
          fi
       fi
       pbxfuncname="sws_getContext"
       if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
          AST_FFMPEG_FOUND=yes
       else
          as_ac_Lib=`echo "ac_cv_lib_avcodec_${pbxfuncname}" | $as_tr_sh`
    { echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lavcodec" >&5
    echo $ECHO_N "checking for ${pbxfuncname} in -lavcodec... $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="-lavcodec ${pbxlibdir} -lpthread -lz -lm $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"
    
    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_FFMPEG_FOUND=yes
    else
      AST_FFMPEG_FOUND=no
    fi
    
       fi
    
    
       # now check for the header.
    
       if test "${AST_FFMPEG_FOUND}" = "yes"; then
    
          FFMPEG_LIB="${pbxlibdir} -lavcodec -lpthread -lz -lm"
          # if --with-FFMPEG=DIR has been specified, use it.
    
          if test "x${FFMPEG_DIR}" != "x"; then
    	 FFMPEG_INCLUDE="-I${FFMPEG_DIR}/include"
    
          fi
          FFMPEG_INCLUDE="${FFMPEG_INCLUDE} "
          if test "xffmpeg/avcodec.h" = "x" ; then	# no header, assume found
             FFMPEG_HEADER_FOUND="1"
          else				# check for the header
             saved_cppflags="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${FFMPEG_INCLUDE} "
    	 if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then
    
      { echo "$as_me:$LINENO: checking for ffmpeg/avcodec.h" >&5
    echo $ECHO_N "checking for ffmpeg/avcodec.h... $ECHO_C" >&6; }
    if test "${ac_cv_header_ffmpeg_avcodec_h+set}" = set; then
    
    fi
    { echo "$as_me:$LINENO: result: $ac_cv_header_ffmpeg_avcodec_h" >&5
    echo "${ECHO_T}$ac_cv_header_ffmpeg_avcodec_h" >&6; }
    
      # Is the header compilable?
    { echo "$as_me:$LINENO: checking ffmpeg/avcodec.h usability" >&5
    echo $ECHO_N "checking ffmpeg/avcodec.h usability... $ECHO_C" >&6; }
    cat >conftest.$ac_ext <<_ACEOF
    
    Russell Bryant's avatar
    Russell Bryant committed
    /* confdefs.h.  */
    _ACEOF
    cat confdefs.h >>conftest.$ac_ext
    cat >>conftest.$ac_ext <<_ACEOF
    /* end confdefs.h.  */
    
    $ac_includes_default
    #include <ffmpeg/avcodec.h>
    
    Russell Bryant's avatar
    Russell Bryant committed
    _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
    
    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