Newer
Older
AST_ZLIB_FOUND=no
Kevin P. Fleming
committed
fi
Tilghman Lesher
committed
CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
Kevin P. Fleming
committed
# 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"
ZLIB_INCLUDE="${ZLIB_INCLUDE} "
# check for the header
Tilghman Lesher
committed
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
Kevin P. Fleming
committed
CPPFLAGS="${CPPFLAGS} ${ZLIB_INCLUDE}"
ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
ZLIB_HEADER_FOUND=1
Kevin P. Fleming
committed
else
ZLIB_HEADER_FOUND=0
Kevin P. Fleming
committed
fi
Tilghman Lesher
committed
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${ZLIB_HEADER_FOUND}" = "x0" ; then
ZLIB_LIB=""
ZLIB_INCLUDE=""
Kevin P. Fleming
committed
else
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
#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
Kevin P. Fleming
committed
ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LINUX_COMPILER_H 1
_ACEOF
fi
Tilghman Lesher
committed
# 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; }
Tilghman Lesher
committed
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
Tilghman Lesher
committed
/* end confdefs.h. */
Tilghman Lesher
committed
int
main ()
{
#if defined(MSG_NOSIGNAL)
int foo = 0;
#else
int foo = bar;
#endif
0
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Tilghman Lesher
committed
PBX_MSG_NOSIGNAL=1
$as_echo "#define HAVE_MSG_NOSIGNAL 1" >>confdefs.h
Tilghman Lesher
committed
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Tilghman Lesher
committed
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; }
Tilghman Lesher
committed
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
Tilghman Lesher
committed
/* end confdefs.h. */
Tilghman Lesher
committed
int
main ()
{
#if defined(SO_NOSIGPIPE)
int foo = 0;
#else
int foo = bar;
#endif
0
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Tilghman Lesher
committed
PBX_SO_NOSIGPIPE=1
$as_echo "#define HAVE_SO_NOSIGPIPE 1" >>confdefs.h
Tilghman Lesher
committed
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Tilghman Lesher
committed
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; }
else
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
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
break 2
fi
done
IFS=$as_save_IFS
CONFIG_SDL=$ac_cv_path_CONFIG_SDL
if test -n "$CONFIG_SDL"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONFIG_SDL" >&5
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
fi
fi
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; }
if ${ac_cv_path_ac_pt_CONFIG_SDL+:} false; then :
else
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
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
break 2
fi
done
IFS=$as_save_IFS
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; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
fi
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;}
ac_tool_warned=yes ;;
esac
CONFIG_SDL=$ac_pt_CONFIG_SDL
fi
else
CONFIG_SDL="$ac_cv_path_CONFIG_SDL"
fi
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")
Russell Bryant
committed
PBX_SDL=1
$as_echo "#define HAVE_SDL 1" >>confdefs.h
fi
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
Tilghman Lesher
committed
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 :
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
int
main ()
{
;
return 0;
}
_ACEOF
ac_cv_lib_SDL_image_IMG_Load=yes
else
ac_cv_lib_SDL_image_IMG_Load=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_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 :
AST_SDL_IMAGE_FOUND=yes
else
AST_SDL_IMAGE_FOUND=no
fi
Tilghman Lesher
committed
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}"
# check for the header
Tilghman Lesher
committed
ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
Kevin P. Fleming
committed
CPPFLAGS="${CPPFLAGS} ${SDL_IMAGE_INCLUDE}"
ac_fn_c_check_header_mongrel "$LINENO" "SDL_image.h" "ac_cv_header_SDL_image_h" "$ac_includes_default"
if test "x$ac_cv_header_SDL_image_h" = xyes; then :
SDL_IMAGE_HEADER_FOUND=1
Kevin P. Fleming
committed
else
SDL_IMAGE_HEADER_FOUND=0
Kevin P. Fleming
committed
fi
Tilghman Lesher
committed
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${SDL_IMAGE_HEADER_FOUND}" = "x0" ; then
SDL_IMAGE_LIB=""
SDL_IMAGE_INCLUDE=""
else
PBX_SDL_IMAGE=1
#define HAVE_SDL_IMAGE 1
_ACEOF
Tilghman Lesher
committed
fi
fi
fi
Tilghman Lesher
committed
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
Tilghman Lesher
committed
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 :
else
ac_check_lib_save_LIBS=$LIBS
Tilghman Lesher
committed
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
int
return sws_getContext ();
;
return 0;
}
_ACEOF
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}"
# check for the header
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"
if test "x$ac_cv_header_ffmpeg_avcodec_h" = xyes; then :
FFMPEG_HEADER_FOUND=1
else
FFMPEG_HEADER_FOUND=0
Kevin P. Fleming
committed
fi
Tilghman Lesher
committed
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${FFMPEG_HEADER_FOUND}" = "x0" ; then
FFMPEG_LIB=""
PBX_FFMPEG=1
cat >>confdefs.h <<_ACEOF
#define HAVE_FFMPEG 1
_ACEOF
fi
fi
fi
# possible places for video4linux version 1
ac_fn_c_check_header_mongrel "$LINENO" "linux/videodev.h" "ac_cv_header_linux_videodev_h" "$ac_includes_default"
if test "x$ac_cv_header_linux_videodev_h" = xyes; then :
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
pbxlibdir="-L${X11_DIR}/lib"
pbxlibdir="-L${X11_DIR}"
Tilghman Lesher
committed
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 :
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
;
return 0;
}
_ACEOF
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=yes
else
AST_X11_FOUND=no
fi
Tilghman Lesher
committed
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} "
# check for the header
Tilghman Lesher
committed
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"
if test "x$ac_cv_header_X11_Xlib_h" = xyes; then :
X11_HEADER_FOUND=1
else
X11_HEADER_FOUND=0
fi
Tilghman Lesher
committed
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${X11_HEADER_FOUND}" = "x0" ; then
X11_LIB=""
X11_INCLUDE=""
else
Tilghman Lesher
committed
_ACEOF
cat >>confdefs.h <<_ACEOF
#define HAVE_X11_VERSION standard_path
_ACEOF
Tilghman Lesher
committed
fi
fi
fi
Tilghman Lesher
committed
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
pbxlibdir="-L${X11_DIR}/lib"
pbxlibdir="-L${X11_DIR}"
Tilghman Lesher
committed
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 :
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
int
main ()
{
;
return 0;
}
_ACEOF
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=yes
else
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"
# check for the header
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"
if test "x$ac_cv_header_X11_Xlib_h" = xyes; then :
X11_HEADER_FOUND=1
else
X11_HEADER_FOUND=0
fi
Tilghman Lesher
committed
CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
if test "x${X11_HEADER_FOUND}" = "x0" ; then
X11_LIB=""
X11_INCLUDE=""
else
Tilghman Lesher
committed
_ACEOF
cat >>confdefs.h <<_ACEOF
#define HAVE_X11_VERSION X11R6
_ACEOF
Tilghman Lesher
committed
fi
fi
fi
Tilghman Lesher
committed
PBX_LAUNCHD=0
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; }
test "$cross_compiling" = yes &&
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; }
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; }
Tilghman Lesher
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`
else
pkg_failed=yes
fi
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`
else
pkg_failed=yes
fi
Tilghman Lesher
committed
fi
if test $pkg_failed = yes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
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
GTK2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gtk+-2.0" 2>&1`
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
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")
GTK2_LIB="$GTK2_LIBS"
$as_echo "#define HAVE_GTK2 1" >>confdefs.h
fi
fi
Tilghman Lesher
committed
33824
33825
33826
33827
33828
33829
33830
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
# 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; }
33852
33853
33854
33855
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867
33868
33869
33870
33871
33872
33873
33874
33875
33876
33877
33878
33879
33880
33881
33882
33883
33884
33885
33886
33887
33888
33889
33890
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
33892
33893
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903
33904
33905
33906
33907
33908
33909
33910
33911
$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
PBX_SYSLOG=0
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. */
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
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
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
/* end confdefs.h. */
int
main ()
{