Newer
Older
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")
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
pkg_failed=no
{ $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
$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
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
$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="$GTK2_CFLAGS"
GTK2_LIB="$GTK2_LIBS"
$as_echo "#define HAVE_GTK2 1" >>confdefs.h
fi
fi
Tilghman Lesher
committed
33687
33688
33689
33690
33691
33692
33693
33694
33695
33696
33697
33698
33699
33700
33701
33702
33703
33704
33705
# 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
33706
33707
33708
33709
33710
33711
33712
33713
33714
33715
33716
33717
33718
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
33734
33735
33736
33737
33738
33739
33740
33741
33742
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753
33754
33755
33756
33757
33758
33759
33760
33761
33762
33763
33764
33765
33766
33767
33768
33769
33770
33771
33772
33773
33774
33775
33776
33777
33778
33779
33780
33781
33782
33783
33784
33785
33786
33787
33788
33789
33790
33791
33792
33793
33794
33795
33796
33797
if test "x${PBX_SYSTEMD}" != "x1" -a "${USE_SYSTEMD}" != "no"; then
pkg_failed=no
{ $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="$SYSTEMD_CFLAGS"
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 ()
{
#if defined(LOG_AUTHPRIV)
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
PBX_SYSLOG_FACILITY_LOG_AUTHPRIV=1
$as_echo "#define HAVE_SYSLOG_FACILITY_LOG_AUTHPRIV 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_CRON}" != "x1"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_CRON in syslog.h" >&5
$as_echo_n "checking for LOG_CRON in syslog.h... " >&6; }
saved_cppflags="${CPPFLAGS}"
if test "x${SYSLOG_FACILITY_LOG_CRON_DIR}" != "x"; then
SYSLOG_FACILITY_LOG_CRON_INCLUDE="-I${SYSLOG_FACILITY_LOG_CRON_DIR}/include"
fi
CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_CRON_INCLUDE}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
#if defined(LOG_CRON)
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
PBX_SYSLOG_FACILITY_LOG_CRON=1
$as_echo "#define HAVE_SYSLOG_FACILITY_LOG_CRON 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_DAEMON}" != "x1"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_DAEMON in syslog.h" >&5
$as_echo_n "checking for LOG_DAEMON in syslog.h... " >&6; }
saved_cppflags="${CPPFLAGS}"
if test "x${SYSLOG_FACILITY_LOG_DAEMON_DIR}" != "x"; then
SYSLOG_FACILITY_LOG_DAEMON_INCLUDE="-I${SYSLOG_FACILITY_LOG_DAEMON_DIR}/include"
fi
CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_DAEMON_INCLUDE}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
#if defined(LOG_DAEMON)
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
PBX_SYSLOG_FACILITY_LOG_DAEMON=1
$as_echo "#define HAVE_SYSLOG_FACILITY_LOG_DAEMON 1" >>confdefs.h
Russell Bryant
committed
Kevin P. Fleming
committed
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Kevin P. Fleming
committed
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="${saved_cppflags}"
fi
if test "x${PBX_SYSLOG_FACILITY_LOG_FTP}" != "x1"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOG_FTP in syslog.h" >&5
$as_echo_n "checking for LOG_FTP in syslog.h... " >&6; }
saved_cppflags="${CPPFLAGS}"
if test "x${SYSLOG_FACILITY_LOG_FTP_DIR}" != "x"; then
SYSLOG_FACILITY_LOG_FTP_INCLUDE="-I${SYSLOG_FACILITY_LOG_FTP_DIR}/include"
fi
CPPFLAGS="${CPPFLAGS} ${SYSLOG_FACILITY_LOG_FTP_INCLUDE}"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()