Skip to content
Snippets Groups Projects
configure 940 KiB
Newer Older
  • Learn to ignore specific revisions
  •       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       # now check for the header.
    
       if test "${AST_ZLIB_FOUND}" = "yes"; then
          ZLIB_LIB="${pbxlibdir} -lz "
          # if --with-ZLIB=DIR has been specified, use it.
          if test "x${ZLIB_DIR}" != "x"; then
    
             ZLIB_INCLUDE="-I${ZLIB_DIR}/include"
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_zlib_h" = xyes; then :
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${ZLIB_HEADER_FOUND}" = "x0" ; then
             ZLIB_LIB=""
             ZLIB_INCLUDE=""
    
             PBX_ZLIB=1
             cat >>confdefs.h <<_ACEOF
    #define HAVE_ZLIB 1
    _ACEOF
    
    
    if test "x${PBX_UNIXODBC}" = "x1" -o "x${PBX_IODBC}" = "x1"; then
    	# Does ODBC support wide characters?
    	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ODBC has support for Unicode types" >&5
    $as_echo_n "checking whether ODBC has support for Unicode types... " >&6; }
    	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
    /* end confdefs.h.  */
    
    #include <sql.h>
    #include <sqlext.h>
    int
    main ()
    {
    int foo = SQL_WCHAR
      ;
      return 0;
    }
    
    if ac_fn_c_try_link "$LINENO"; then :
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    $as_echo "yes" >&6; }
    
    $as_echo "#define HAVE_ODBC_WCHAR 1" >>confdefs.h
    
    
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    $as_echo "no" >&6; }
    
    fi
    rm -f core conftest.err conftest.$ac_objext \
        conftest$ac_exeext conftest.$ac_ext
    
    ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
    
    # Used in res/res_pktccops
    
        if test "x${PBX_MSG_NOSIGNAL}" != "x1"; then
    
    	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL in sys/socket.h" >&5
    
    $as_echo_n "checking for MSG_NOSIGNAL in sys/socket.h... " >&6; }
    
    	saved_cppflags="${CPPFLAGS}"
    	if test "x${MSG_NOSIGNAL_DIR}" != "x"; then
    	    MSG_NOSIGNAL_INCLUDE="-I${MSG_NOSIGNAL_DIR}/include"
    	fi
    	CPPFLAGS="${CPPFLAGS} ${MSG_NOSIGNAL_INCLUDE}"
    
    
    	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
     #include <sys/socket.h>
    
    if ac_fn_c_try_compile "$LINENO"; then :
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    $as_echo "yes" >&6; }
    
    $as_echo "#define HAVE_MSG_NOSIGNAL 1" >>confdefs.h
    
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    $as_echo "no" >&6; }
    
    
    fi
    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    	CPPFLAGS="${saved_cppflags}"
        fi
    
    
    
        if test "x${PBX_SO_NOSIGPIPE}" != "x1"; then
    
    	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SO_NOSIGPIPE in sys/socket.h" >&5
    
    $as_echo_n "checking for SO_NOSIGPIPE in sys/socket.h... " >&6; }
    
    	saved_cppflags="${CPPFLAGS}"
    	if test "x${SO_NOSIGPIPE_DIR}" != "x"; then
    	    SO_NOSIGPIPE_INCLUDE="-I${SO_NOSIGPIPE_DIR}/include"
    	fi
    	CPPFLAGS="${CPPFLAGS} ${SO_NOSIGPIPE_INCLUDE}"
    
    
    	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
     #include <sys/socket.h>
    
    if ac_fn_c_try_compile "$LINENO"; then :
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    $as_echo "yes" >&6; }
    
    $as_echo "#define HAVE_SO_NOSIGPIPE 1" >>confdefs.h
    
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    $as_echo "no" >&6; }
    
    
    fi
    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    	CPPFLAGS="${saved_cppflags}"
        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
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    
    $as_echo_n "checking for $ac_word... " >&6; }
    
    David M. Lee's avatar
    David M. Lee committed
    if ${ac_cv_path_CONFIG_SDL+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
      case $CONFIG_SDL in
      [\\/]* | ?:[\\/]*)
      ac_cv_path_CONFIG_SDL="$CONFIG_SDL" # Let the user override the test with a path.
      ;;
      *)
      as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    as_dummy="${SDL_DIR}/bin:$PATH"
    for as_dir in $as_dummy
    
    do
      IFS=$as_save_IFS
      test -z "$as_dir" && as_dir=.
    
        for ac_exec_ext in '' $ac_executable_extensions; do
    
    David M. Lee's avatar
    David M. Lee committed
      if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    
        ac_cv_path_CONFIG_SDL="$as_dir/$ac_word$ac_exec_ext"
    
        $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    
    CONFIG_SDL=$ac_cv_path_CONFIG_SDL
    
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_SDL" >&5
    
    $as_echo "$CONFIG_SDL" >&6; }
    
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    $as_echo "no" >&6; }
    
    if test -z "$ac_cv_path_CONFIG_SDL"; then
      ac_pt_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
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
    
    $as_echo_n "checking for $ac_word... " >&6; }
    
    David M. Lee's avatar
    David M. Lee committed
    if ${ac_cv_path_ac_pt_CONFIG_SDL+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
      case $ac_pt_CONFIG_SDL in
      [\\/]* | ?:[\\/]*)
      ac_cv_path_ac_pt_CONFIG_SDL="$ac_pt_CONFIG_SDL" # Let the user override the test with a path.
      ;;
      *)
      as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    as_dummy="${SDL_DIR}/bin:$PATH"
    for as_dir in $as_dummy
    
    do
      IFS=$as_save_IFS
      test -z "$as_dir" && as_dir=.
    
        for ac_exec_ext in '' $ac_executable_extensions; do
    
    David M. Lee's avatar
    David M. Lee committed
      if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    
        ac_cv_path_ac_pt_CONFIG_SDL="$as_dir/$ac_word$ac_exec_ext"
    
        $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    
    ac_pt_CONFIG_SDL=$ac_cv_path_ac_pt_CONFIG_SDL
    if test -n "$ac_pt_CONFIG_SDL"; then
    
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CONFIG_SDL" >&5
    
    $as_echo "$ac_pt_CONFIG_SDL" >&6; }
    
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    $as_echo "no" >&6; }
    
      if test "x$ac_pt_CONFIG_SDL" = x; then
    
        CONFIG_SDL="No"
      else
        case $cross_compiling:$ac_tool_warned in
    yes:)
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
    
    $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
    
        CONFIG_SDL=$ac_pt_CONFIG_SDL
    
      CONFIG_SDL="$ac_cv_path_CONFIG_SDL"
    
    		if test ! "x${CONFIG_SDL}" = xNo; then
    
    			SDL_INCLUDE=$(${CONFIG_SDL} --cflags)
    
    			SDL_INCLUDE=$(echo ${SDL_INCLUDE} | $SED -e "s|-I|-I${SDL_DIR}|g" -e "s|-std=c99||g")
    
    			SDL_LIB=$(${CONFIG_SDL} --libs)
    
    			SDL_LIB=$(echo ${SDL_LIB} | $SED -e "s|-L|-L${SDL_DIR}|g")
    
    $as_echo "#define HAVE_SDL 1" >>confdefs.h
    
    
    
    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"
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} ${SDL_INCLUDE}"
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IMG_Load in -lSDL_image" >&5
    $as_echo_n "checking for IMG_Load in -lSDL_image... " >&6; }
    if ${ac_cv_lib_SDL_image_IMG_Load+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lSDL_image ${pbxlibdir} ${SDL_LIB} $LIBS"
    
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
    /* 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
    
    return IMG_Load ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_SDL_image_IMG_Load=yes
    
      ac_cv_lib_SDL_image_IMG_Load=no
    
    rm -f core conftest.err conftest.$ac_objext \
        conftest$ac_exeext conftest.$ac_ext
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SDL_image_IMG_Load" >&5
    $as_echo "$ac_cv_lib_SDL_image_IMG_Load" >&6; }
    if test "x$ac_cv_lib_SDL_image_IMG_Load" = xyes; then :
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
       # 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}"
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${SDL_IMAGE_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "SDL_image.h" "ac_cv_header_SDL_image_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_SDL_image_h" = xyes; then :
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${SDL_IMAGE_HEADER_FOUND}" = "x0" ; then
             SDL_IMAGE_LIB=""
             SDL_IMAGE_INCLUDE=""
          else
    
             cat >>confdefs.h <<_ACEOF
    
    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
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sws_getContext in -lavcodec" >&5
    $as_echo_n "checking for sws_getContext in -lavcodec... " >&6; }
    if ${ac_cv_lib_avcodec_sws_getContext+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    LIBS="-lavcodec ${pbxlibdir} ${PTHREAD_LIBS} -lz -lm $LIBS"
    
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
    /* 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 sws_getContext ();
    
    return sws_getContext ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_avcodec_sws_getContext=yes
    
      ac_cv_lib_avcodec_sws_getContext=no
    
    rm -f core conftest.err conftest.$ac_objext \
        conftest$ac_exeext conftest.$ac_ext
    
    LIBS=$ac_check_lib_save_LIBS
    fi
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_sws_getContext" >&5
    $as_echo "$ac_cv_lib_avcodec_sws_getContext" >&6; }
    if test "x$ac_cv_lib_avcodec_sws_getContext" = xyes; then :
    
      AST_FFMPEG_FOUND=yes
    else
      AST_FFMPEG_FOUND=no
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_FFMPEG_FOUND}" = "yes"; then
          FFMPEG_LIB="${pbxlibdir} -lavcodec ${PTHREAD_LIBS} -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} ${PTHREAD_CFLAGS}"
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${FFMPEG_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "ffmpeg/avcodec.h" "ac_cv_header_ffmpeg_avcodec_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_ffmpeg_avcodec_h" = xyes; then :
    
      FFMPEG_HEADER_FOUND=1
    else
      FFMPEG_HEADER_FOUND=0
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${FFMPEG_HEADER_FOUND}" = "x0" ; then
             FFMPEG_LIB=""
    
             FFMPEG_INCLUDE=""
          else
    
             PBX_FFMPEG=1
             cat >>confdefs.h <<_ACEOF
    #define HAVE_FFMPEG 1
    _ACEOF
    
    ac_fn_c_check_header_mongrel "$LINENO" "linux/videodev.h" "ac_cv_header_linux_videodev_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_linux_videodev_h" = xyes; then :
    
    Luigi Rizzo's avatar
    Luigi Rizzo committed
    
    cat >>confdefs.h <<_ACEOF
    #define HAVE_VIDEODEV_H 1
    _ACEOF
    
    fi
    
    
    
    
    # possible places for X11
    
    if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then
       pbxlibdir=""
       # if --with-X11=DIR has been specified, use it.
       if test "x${X11_DIR}" != "x"; then
          if test -d ${X11_DIR}/lib; then
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} "
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5
    $as_echo_n "checking for XOpenDisplay in -lX11... " >&6; }
    if ${ac_cv_lib_X11_XOpenDisplay+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lX11 ${pbxlibdir}  $LIBS"
    
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
    /* 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 XOpenDisplay ();
    
    return XOpenDisplay ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_X11_XOpenDisplay=yes
    
      ac_cv_lib_X11_XOpenDisplay=no
    
    rm -f core conftest.err conftest.$ac_objext \
        conftest$ac_exeext conftest.$ac_ext
    
    LIBS=$ac_check_lib_save_LIBS
    fi
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5
    $as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; }
    if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes; then :
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_X11_FOUND}" = "yes"; then
          X11_LIB="${pbxlibdir} -lX11 "
          # if --with-X11=DIR has been specified, use it.
          if test "x${X11_DIR}" != "x"; then
    
             X11_INCLUDE="-I${X11_DIR}/include"
    
          fi
          X11_INCLUDE="${X11_INCLUDE} "
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
    
             CPPFLAGS="${CPPFLAGS} ${X11_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_X11_Xlib_h" = xyes; then :
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${X11_HEADER_FOUND}" = "x0" ; then
             X11_LIB=""
             X11_INCLUDE=""
          else
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_X11 1
    
    #define HAVE_X11_VERSION standard_path
    _ACEOF
    
    if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then
       pbxlibdir=""
       # if --with-X11=DIR has been specified, use it.
       if test "x${X11_DIR}" != "x"; then
          if test -d ${X11_DIR}/lib; then
    
          ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
          CFLAGS="${CFLAGS} -I/usr/X11R6/include"
    
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XOpenDisplay in -lX11" >&5
    $as_echo_n "checking for XOpenDisplay in -lX11... " >&6; }
    if ${ac_cv_lib_X11_XOpenDisplay+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
    else
      ac_check_lib_save_LIBS=$LIBS
    LIBS="-lX11 ${pbxlibdir}  $LIBS"
    
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
    /* 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 XOpenDisplay ();
    
    return XOpenDisplay ();
    
    if ac_fn_c_try_link "$LINENO"; then :
    
      ac_cv_lib_X11_XOpenDisplay=yes
    
      ac_cv_lib_X11_XOpenDisplay=no
    
    rm -f core conftest.err conftest.$ac_objext \
        conftest$ac_exeext conftest.$ac_ext
    
    LIBS=$ac_check_lib_save_LIBS
    fi
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_X11_XOpenDisplay" >&5
    $as_echo "$ac_cv_lib_X11_XOpenDisplay" >&6; }
    if test "x$ac_cv_lib_X11_XOpenDisplay" = xyes; then :
    
      AST_X11_FOUND=no
    fi
    
          CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
    
    
       # now check for the header.
       if test "${AST_X11_FOUND}" = "yes"; then
          X11_LIB="${pbxlibdir} -lX11 "
          # if --with-X11=DIR has been specified, use it.
          if test "x${X11_DIR}" != "x"; then
             X11_INCLUDE="-I${X11_DIR}/include"
          fi
          X11_INCLUDE="${X11_INCLUDE} -I/usr/X11R6/include"
    
             ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
             CPPFLAGS="${CPPFLAGS} ${X11_INCLUDE}"
    
             ac_fn_c_check_header_mongrel "$LINENO" "X11/Xlib.h" "ac_cv_header_X11_Xlib_h" "$ac_includes_default"
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_header_X11_Xlib_h" = xyes; then :
    
             CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
    
          if test "x${X11_HEADER_FOUND}" = "x0" ; then
             X11_LIB=""
             X11_INCLUDE=""
          else
    
             cat >>confdefs.h <<_ACEOF
    
    #define HAVE_X11 1
    
    #define HAVE_X11_VERSION X11R6
    _ACEOF
    
    if test "${cross_compiling}" = "no";
    then
    
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /sbin/launchd" >&5
    
    $as_echo_n "checking for /sbin/launchd... " >&6; }
    
    David M. Lee's avatar
    David M. Lee committed
    if ${ac_cv_file__sbin_launchd+:} false; then :
    
      $as_echo_n "(cached) " >&6
    
      test "$cross_compiling" = yes &&
    
    David M. Lee's avatar
    David M. Lee committed
      as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
    
    if test -r "/sbin/launchd"; then
      ac_cv_file__sbin_launchd=yes
    else
      ac_cv_file__sbin_launchd=no
    fi
    fi
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__sbin_launchd" >&5
    
    $as_echo "$ac_cv_file__sbin_launchd" >&6; }
    
    David M. Lee's avatar
    David M. Lee committed
    if test "x$ac_cv_file__sbin_launchd" = xyes; then :
      PBX_LAUNCHD=1
    
    $as_echo "#define HAVE_SBIN_LAUNCHD 1" >>confdefs.h
    
          if test "x${PBX_GTK2}" != "x1" -a "${USE_GTK2}" != "no"; then
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK2" >&5
    $as_echo_n "checking for GTK2... " >&6; }
    
    David M. Lee's avatar
    David M. Lee committed
    if test -n "$GTK2_CFLAGS"; then
        pkg_cv_GTK2_CFLAGS="$GTK2_CFLAGS"
     elif test -n "$PKG_CONFIG"; then
        if test -n "$PKG_CONFIG" && \
    
        { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
    
      ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
      ac_status=$?
    
      $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
      test $ac_status = 0; }; then
    
      pkg_cv_GTK2_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0" 2>/dev/null`
    
    David M. Lee's avatar
    David M. Lee committed
    		      test "x$?" != "x0" && pkg_failed=yes
    
    David M. Lee's avatar
    David M. Lee committed
     else
        pkg_failed=untried
    
    David M. Lee's avatar
    David M. Lee committed
    if test -n "$GTK2_LIBS"; then
        pkg_cv_GTK2_LIBS="$GTK2_LIBS"
     elif test -n "$PKG_CONFIG"; then
        if test -n "$PKG_CONFIG" && \
    
        { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0\""; } >&5
    
      ($PKG_CONFIG --exists --print-errors "gtk+-2.0") 2>&5
      ac_status=$?
    
      $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
      test $ac_status = 0; }; then
    
      pkg_cv_GTK2_LIBS=`$PKG_CONFIG --libs "gtk+-2.0" 2>/dev/null`
    
    David M. Lee's avatar
    David M. Lee committed
    		      test "x$?" != "x0" && pkg_failed=yes
    
    David M. Lee's avatar
    David M. Lee committed
     else
        pkg_failed=untried
    
    if test $pkg_failed = yes; then
    
       	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    David M. Lee's avatar
    David M. Lee committed
    $as_echo "no" >&6; }
    
    
    if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
            _pkg_short_errors_supported=yes
    else
            _pkg_short_errors_supported=no
    fi
            if test $_pkg_short_errors_supported = yes; then
    
    David M. Lee's avatar
    David M. Lee committed
    	        GTK2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0" 2>&1`
    
    David M. Lee's avatar
    David M. Lee committed
    	        GTK2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gtk+-2.0" 2>&1`
    
            fi
    	# Put the nasty error message in config.log where it belongs
    	echo "$GTK2_PKG_ERRORS" >&5
    
    
                PBX_GTK2=0
    
    
    elif test $pkg_failed = untried; then
    
         	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    David M. Lee's avatar
    David M. Lee committed
    $as_echo "no" >&6; }
    
    
                PBX_GTK2=0
    
    
    else
    	GTK2_CFLAGS=$pkg_cv_GTK2_CFLAGS
    	GTK2_LIBS=$pkg_cv_GTK2_LIBS
    
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    $as_echo "yes" >&6; }
    
                PBX_GTK2=1
    
                GTK2_INCLUDE=$(echo ${GTK2_CFLAGS} | $SED -e "s|-std=c99||g")
    
    $as_echo "#define HAVE_GTK2 1" >>confdefs.h
    
    # build a GENERIC_ODBC result based on the presence of either UnixODBC (preferred)
    # or iODBC
    
    PBX_GENERIC_ODBC=0
    
    if test "${PBX_UNIXODBC}" = 1; then
       PBX_GENERIC_ODBC=1
       GENERIC_ODBC_LIB="${UNIXODBC_LIB}"
       GENERIC_ODBC_INCLUDE="${UNIXODBC_INCLUDE}"
    elif test "${PBX_IODBC}" = 1; then
       PBX_GENERIC_ODBC=1
       GENERIC_ODBC_LIB="${IODBC_LIB}"
       GENERIC_ODBC_INCLUDE="${IODBC_INCLUDE}"
    fi
    
    
    
    
    
    
          if test "x${PBX_SYSTEMD}" != "x1" -a "${USE_SYSTEMD}" != "no"; then
    
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5
    $as_echo_n "checking for SYSTEMD... " >&6; }
    
    
    if test -n "$SYSTEMD_CFLAGS"; then
        pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS"
     elif test -n "$PKG_CONFIG"; then
        if test -n "$PKG_CONFIG" && \
        { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
      ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
      ac_status=$?
      $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
      test $ac_status = 0; }; then
      pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null`
    		      test "x$?" != "x0" && pkg_failed=yes
    else
      pkg_failed=yes
    fi
     else
        pkg_failed=untried
    fi
    if test -n "$SYSTEMD_LIBS"; then
        pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS"
     elif test -n "$PKG_CONFIG"; then
        if test -n "$PKG_CONFIG" && \
        { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5
      ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5
      ac_status=$?
      $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
      test $ac_status = 0; }; then
      pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null`
    		      test "x$?" != "x0" && pkg_failed=yes
    else
      pkg_failed=yes
    fi
     else
        pkg_failed=untried
    fi
    
    
    
    if test $pkg_failed = yes; then
    
       	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    $as_echo "no" >&6; }
    
    if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
            _pkg_short_errors_supported=yes
    else
            _pkg_short_errors_supported=no
    fi
            if test $_pkg_short_errors_supported = yes; then
    	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd" 2>&1`
            else
    	        SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd" 2>&1`
            fi
    	# Put the nasty error message in config.log where it belongs
    	echo "$SYSTEMD_PKG_ERRORS" >&5
    
    
                PBX_SYSTEMD=0
    
    
    elif test $pkg_failed = untried; then
    
         	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    $as_echo "no" >&6; }
    
                PBX_SYSTEMD=0
    
    
    else
    	SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS
    	SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    $as_echo "yes" >&6; }
    
                PBX_SYSTEMD=1
    
                SYSTEMD_INCLUDE=$(echo ${SYSTEMD_CFLAGS} | $SED -e "s|-std=c99||g")
    
                SYSTEMD_LIB="$SYSTEMD_LIBS"
    
    $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h
    
    
    fi
       fi
    
    
    
    if test "${ac_cv_header_syslog_h}" = "yes"; then
       # syslog facilities
    
        if test "x${PBX_SYSLOG_FACILITY_LOG_AUTH}" != "x1"; then
    
    	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_AUTH in syslog.h" >&5
    
    $as_echo_n "checking for LOG_AUTH in syslog.h... " >&6; }
    
    	saved_cppflags="${CPPFLAGS}"
    	if test "x${SYSLOG_FACILITY_LOG_AUTH_DIR}" != "x"; then
    	    SYSLOG_FACILITY_LOG_AUTH_INCLUDE="-I${SYSLOG_FACILITY_LOG_AUTH_DIR}/include"
    	fi
    	CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_AUTH_INCLUDE}"
    
    
    	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
    /* end confdefs.h.  */
    
     #include <syslog.h>
    
    int
    main ()
    {
    #if defined(LOG_AUTH)
    				int foo = 0;
    			        #else
    			        int foo = bar;
    			        #endif
    				0
    
      ;
      return 0;
    }
    
    if ac_fn_c_try_compile "$LINENO"; then :
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    
    $as_echo "yes" >&6; }
    
    		PBX_SYSLOG_FACILITY_LOG_AUTH=1
    
    
    $as_echo "#define HAVE_SYSLOG_FACILITY_LOG_AUTH 1" >>confdefs.h
    
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    
    $as_echo "no" >&6; }
    
    rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    	CPPFLAGS="${saved_cppflags}"
        fi
    
    
    
        if test "x${PBX_SYSLOG_FACILITY_LOG_AUTHPRIV}" != "x1"; then
    
    	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_AUTHPRIV in syslog.h" >&5
    
    $as_echo_n "checking for LOG_AUTHPRIV in syslog.h... " >&6; }
    
    	saved_cppflags="${CPPFLAGS}"
    	if test "x${SYSLOG_FACILITY_LOG_AUTHPRIV_DIR}" != "x"; then
    	    SYSLOG_FACILITY_LOG_AUTHPRIV_INCLUDE="-I${SYSLOG_FACILITY_LOG_AUTHPRIV_DIR}/include"
    	fi
    	CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_AUTHPRIV_INCLUDE}"
    
    
    	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    
     #include <syslog.h>