18704
18672
have_xcomposite="yes"
18707
# If we're building with support for Unity, we'll need a few additional
18709
if test "$enable_unity" != "no"; then
18710
# Unity needs the X11 Screen Saver extension library. It should be
18711
# in the same place as the X11 libraries, so no need for any fancy
18715
if test -n "X11/extensions/scrnsaver.h"; then
18716
ac_fn_c_check_header_mongrel "$LINENO" "X11/extensions/scrnsaver.h" "ac_cv_header_X11_extensions_scrnsaver_h" "$ac_includes_default"
18717
if test "x$ac_cv_header_X11_extensions_scrnsaver_h" = x""yes; then :
18722
as_fn_error $? "libXss or headers not found. Please configure without Unity (using --disable-unity) or install the libXss devel package." "$LINENO" 5
18729
if test $have_header = 1; then
18730
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverQueryExtension in -lXss" >&5
18731
$as_echo_n "checking for XScreenSaverQueryExtension in -lXss... " >&6; }
18732
if test "${ac_cv_lib_Xss_XScreenSaverQueryExtension+set}" = set; then :
18733
$as_echo_n "(cached) " >&6
18735
ac_check_lib_save_LIBS=$LIBS
18736
LIBS="-lXss $COMMON_XLIBS $LIBS"
18737
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18738
/* end confdefs.h. */
18740
/* Override any GCC internal prototype to avoid an error.
18741
Use char because int might match the return type of a GCC
18742
builtin and then its argument prototype would still apply. */
18746
char XScreenSaverQueryExtension ();
18750
return XScreenSaverQueryExtension ();
18755
if ac_fn_c_try_link "$LINENO"; then :
18756
ac_cv_lib_Xss_XScreenSaverQueryExtension=yes
18758
ac_cv_lib_Xss_XScreenSaverQueryExtension=no
18760
rm -f core conftest.err conftest.$ac_objext \
18761
conftest$ac_exeext conftest.$ac_ext
18762
LIBS=$ac_check_lib_save_LIBS
18764
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xss_XScreenSaverQueryExtension" >&5
18765
$as_echo "$ac_cv_lib_Xss_XScreenSaverQueryExtension" >&6; }
18766
if test "x$ac_cv_lib_Xss_XScreenSaverQueryExtension" = x""yes; then :
18767
COMMON_XLIBS="-lXss $COMMON_XLIBS"
18769
as_fn_error $? "libXss or headers not found. Please configure without Unity (using --disable-unity) or install the libXss devel package." "$LINENO" 5
18775
# Check for the uriparser library and headers. The upstream uriparser
18776
# doesn't appear to ship with either a pkg-config file or a
18777
# uriparser-config binary, so we'll look for it the old-fashioned
18780
# Note that we look for uriFreeQueryListA because it's a relatively
18781
# new symbol that our code needs (it isn't present in the uriparser
18782
# that shipped with Ubuntu Hardy).
18784
if test -z "$CUSTOM_URIPARSER_CPPFLAGS"; then
18785
if test "$os" = freebsd; then
18786
CUSTOM_URIPARSER_CPPFLAGS="-I/usr/local/include"
18788
CUSTOM_URIPARSER_CPPFLAGS="-I/usr/include"
18790
if test -n "uriparser"; then
18791
CUSTOM_URIPARSER_CPPFLAGS="${CUSTOM_URIPARSER_CPPFLAGS}/uriparser"
18797
if test -z "uriparser"; then
18798
as_fn_error $? "'library' parameter is required.'" "$LINENO" 5
18800
if test -z "URIPARSER"; then
18801
as_fn_error $? "'lvar' parameter is required.'" "$LINENO" 5
18805
ac_vmw_have_lib_func=0
18806
ac_vmw_have_lib_header=0
18807
ac_vmw_custom_libs=
18810
# First, try any user-defined CUSTOM_* flags.
18812
if test -n "${CUSTOM_URIPARSER_CPPFLAGS}" || test -n "${CUSTOM_URIPARSER_LIBS}"; then
18813
ac_vmw_custom_libs="${CUSTOM_URIPARSER_LIBS} -luriparser"
18814
if test -n "Uri.h"; then
18815
ORIGINAL_CPPFLAGS="$CPPFLAGS"
18816
CPPFLAGS="${CUSTOM_URIPARSER_CPPFLAGS} $CPPFLAGS"
18818
ac_fn_c_check_header_mongrel "$LINENO" "Uri.h" "ac_cv_header_Uri_h" "$ac_includes_default"
18819
if test "x$ac_cv_header_Uri_h" = x""yes; then :
18820
ac_vmw_have_lib_header=1
18825
CPPFLAGS="$ORIGINAL_CPPFLAGS"
18827
ac_vmw_have_lib_header=1
18830
# Check a specific function in the library if requested.
18831
# If it hasn't, just pick a random function from libc, just to make
18832
# sure the linker can find the library being tested.
18833
if test $ac_vmw_have_lib_header -eq 1; then
18834
if test -n "uriFreeQueryListA"; then
18835
ac_vmw_function=uriFreeQueryListA
18837
ac_vmw_function=strlen
18839
as_ac_Lib=`$as_echo "ac_cv_lib_uriparser_$ac_vmw_function" | $as_tr_sh`
18840
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_vmw_function in -luriparser" >&5
18841
$as_echo_n "checking for $ac_vmw_function in -luriparser... " >&6; }
18842
if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
18843
$as_echo_n "(cached) " >&6
18845
ac_check_lib_save_LIBS=$LIBS
18846
LIBS="-luriparser $ac_vmw_custom_libs $LIBS"
18847
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18848
/* end confdefs.h. */
18850
/* Override any GCC internal prototype to avoid an error.
18851
Use char because int might match the return type of a GCC
18852
builtin and then its argument prototype would still apply. */
18856
char $ac_vmw_function ();
18860
return $ac_vmw_function ();
18865
if ac_fn_c_try_link "$LINENO"; then :
18866
eval "$as_ac_Lib=yes"
18868
eval "$as_ac_Lib=no"
18870
rm -f core conftest.err conftest.$ac_objext \
18871
conftest$ac_exeext conftest.$ac_ext
18872
LIBS=$ac_check_lib_save_LIBS
18874
eval ac_res=\$$as_ac_Lib
18875
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18876
$as_echo "$ac_res" >&6; }
18877
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
18878
ac_vmw_have_lib_func=1
18883
if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then
18884
URIPARSER_CPPFLAGS="${CUSTOM_URIPARSER_CPPFLAGS}"
18885
URIPARSER_LIBS="$ac_vmw_custom_libs"
18890
# If that didn't work, try with pkg-config.
18891
if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then
18892
if test -n ""; then
18893
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for >= (via pkg-config)" >&5
18894
$as_echo_n "checking for >= (via pkg-config)... " >&6; }
18895
if pkg-config --exists ' >= '; then
18899
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for (via pkg-config)" >&5
18900
$as_echo_n "checking for (via pkg-config)... " >&6; }
18901
if pkg-config --exists ''; then
18906
if test $ac_vmw_have_lib -eq 1; then
18907
# Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags"
18908
# fails on OpenSolaris B71. So be pessimistic.
18909
ac_vmw_cppflags="`pkg-config --cflags `"
18911
ac_vmw_libs="`pkg-config --libs `"
18913
if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then
18914
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18915
$as_echo "yes" >&6; }
18916
URIPARSER_CPPFLAGS="$ac_vmw_cppflags"
18917
URIPARSER_LIBS="$ac_vmw_libs"
18919
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18920
$as_echo "no" >&6; }
18923
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18924
$as_echo "no" >&6; }
18928
# If we still haven't found the lib, try with the library's custom "config" script.
18929
# Before checking, flush the AC_PATH_PROG cached variable.
18930
unset ac_cv_path_ac_vmw_lib_cfg
18931
unset ac_vmw_lib_cfg
18932
if test $ac_vmw_have_lib -eq 0 && test -n ""; then
18933
# Extract the first word of "", so it can be a program name with args.
18934
set dummy ; ac_word=$2
18935
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18936
$as_echo_n "checking for $ac_word... " >&6; }
18937
if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then :
18938
$as_echo_n "(cached) " >&6
18940
case $ac_vmw_lib_cfg in
18942
ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path.
18945
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18946
for as_dir in $PATH
18949
test -z "$as_dir" && as_dir=.
18950
for ac_exec_ext in '' $ac_executable_extensions; do
18951
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18952
ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext"
18953
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18960
test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no"
18964
ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg
18965
if test -n "$ac_vmw_lib_cfg"; then
18966
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_vmw_lib_cfg" >&5
18967
$as_echo "$ac_vmw_lib_cfg" >&6; }
18969
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18970
$as_echo "no" >&6; }
18974
if test "$ac_vmw_lib_cfg" != "no"; then
18975
# XXX: icu-config does not follow the "--cflags" and "--libs" convention,
18976
# so single it out here to avoid having to replicate all the rest of the
18978
if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then
18979
URIPARSER_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`"
18980
URIPARSER_LIBS="`$ac_vmw_lib_cfg --ldflags`"
18982
URIPARSER_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`"
18983
URIPARSER_LIBS="`$ac_vmw_lib_cfg --libs`"
18989
# Finish by executing the user provided action. The call to "true" is needed
18990
# because the actions are optional, and we need something inside the block.
18991
if test $ac_vmw_have_lib -eq 1; then
18998
as_fn_error $? "uriparser library not found or is too old. Please configure without Unity (using --disable-unity) or install the liburiparser devel package." "$LINENO" 5
19002
# Check for libpng.
19005
if test -z "png12"; then
19006
as_fn_error $? "'library' parameter is required.'" "$LINENO" 5
19008
if test -z "LIBPNG"; then
19009
as_fn_error $? "'lvar' parameter is required.'" "$LINENO" 5
19013
ac_vmw_have_lib_func=0
19014
ac_vmw_have_lib_header=0
19015
ac_vmw_custom_libs=
19018
# First, try any user-defined CUSTOM_* flags.
19020
if test -n "${CUSTOM_LIBPNG_CPPFLAGS}" || test -n "${CUSTOM_LIBPNG_LIBS}"; then
19021
ac_vmw_custom_libs="${CUSTOM_LIBPNG_LIBS} -lpng12"
19022
if test -n "png.h"; then
19023
ORIGINAL_CPPFLAGS="$CPPFLAGS"
19024
CPPFLAGS="${CUSTOM_LIBPNG_CPPFLAGS} $CPPFLAGS"
19026
ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
19027
if test "x$ac_cv_header_png_h" = x""yes; then :
19028
ac_vmw_have_lib_header=1
19033
CPPFLAGS="$ORIGINAL_CPPFLAGS"
19035
ac_vmw_have_lib_header=1
19038
# Check a specific function in the library if requested.
19039
# If it hasn't, just pick a random function from libc, just to make
19040
# sure the linker can find the library being tested.
19041
if test $ac_vmw_have_lib_header -eq 1; then
19042
if test -n "png_access_version_number"; then
19043
ac_vmw_function=png_access_version_number
19045
ac_vmw_function=strlen
19047
as_ac_Lib=`$as_echo "ac_cv_lib_png12_$ac_vmw_function" | $as_tr_sh`
19048
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_vmw_function in -lpng12" >&5
19049
$as_echo_n "checking for $ac_vmw_function in -lpng12... " >&6; }
19050
if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
19051
$as_echo_n "(cached) " >&6
19053
ac_check_lib_save_LIBS=$LIBS
19054
LIBS="-lpng12 $ac_vmw_custom_libs $LIBS"
19055
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19056
/* end confdefs.h. */
19058
/* Override any GCC internal prototype to avoid an error.
19059
Use char because int might match the return type of a GCC
19060
builtin and then its argument prototype would still apply. */
19064
char $ac_vmw_function ();
19068
return $ac_vmw_function ();
19073
if ac_fn_c_try_link "$LINENO"; then :
19074
eval "$as_ac_Lib=yes"
19076
eval "$as_ac_Lib=no"
19078
rm -f core conftest.err conftest.$ac_objext \
19079
conftest$ac_exeext conftest.$ac_ext
19080
LIBS=$ac_check_lib_save_LIBS
19082
eval ac_res=\$$as_ac_Lib
19083
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19084
$as_echo "$ac_res" >&6; }
19085
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
19086
ac_vmw_have_lib_func=1
19091
if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then
19092
LIBPNG_CPPFLAGS="${CUSTOM_LIBPNG_CPPFLAGS}"
19093
LIBPNG_LIBS="$ac_vmw_custom_libs"
19098
# If that didn't work, try with pkg-config.
19099
if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "libpng12"; then
19100
if test -n ""; then
19101
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng12 >= (via pkg-config)" >&5
19102
$as_echo_n "checking for libpng12 >= (via pkg-config)... " >&6; }
19103
if pkg-config --exists 'libpng12 >= '; then
19107
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng12 (via pkg-config)" >&5
19108
$as_echo_n "checking for libpng12 (via pkg-config)... " >&6; }
19109
if pkg-config --exists 'libpng12'; then
19114
if test $ac_vmw_have_lib -eq 1; then
19115
# Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags"
19116
# fails on OpenSolaris B71. So be pessimistic.
19117
ac_vmw_cppflags="`pkg-config --cflags libpng12`"
19119
ac_vmw_libs="`pkg-config --libs libpng12`"
19121
if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then
19122
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19123
$as_echo "yes" >&6; }
19124
LIBPNG_CPPFLAGS="$ac_vmw_cppflags"
19125
LIBPNG_LIBS="$ac_vmw_libs"
19127
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19128
$as_echo "no" >&6; }
19131
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19132
$as_echo "no" >&6; }
19136
# If we still haven't found the lib, try with the library's custom "config" script.
19137
# Before checking, flush the AC_PATH_PROG cached variable.
19138
unset ac_cv_path_ac_vmw_lib_cfg
19139
unset ac_vmw_lib_cfg
19140
if test $ac_vmw_have_lib -eq 0 && test -n "libpng-config"; then
19141
# Extract the first word of "libpng-config", so it can be a program name with args.
19142
set dummy libpng-config; ac_word=$2
19143
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19144
$as_echo_n "checking for $ac_word... " >&6; }
19145
if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then :
19146
$as_echo_n "(cached) " >&6
19148
case $ac_vmw_lib_cfg in
19150
ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path.
19153
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19154
for as_dir in $PATH
19157
test -z "$as_dir" && as_dir=.
19158
for ac_exec_ext in '' $ac_executable_extensions; do
19159
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19160
ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext"
19161
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19168
test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no"
19172
ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg
19173
if test -n "$ac_vmw_lib_cfg"; then
19174
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_vmw_lib_cfg" >&5
19175
$as_echo "$ac_vmw_lib_cfg" >&6; }
19177
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19178
$as_echo "no" >&6; }
19182
if test "$ac_vmw_lib_cfg" != "no"; then
19183
# XXX: icu-config does not follow the "--cflags" and "--libs" convention,
19184
# so single it out here to avoid having to replicate all the rest of the
19186
if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then
19187
LIBPNG_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`"
19188
LIBPNG_LIBS="`$ac_vmw_lib_cfg --ldflags`"
19190
LIBPNG_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`"
19191
LIBPNG_LIBS="`$ac_vmw_lib_cfg --libs`"
19197
# Finish by executing the user provided action. The call to "true" is needed
19198
# because the actions are optional, and we need something inside the block.
19199
if test $ac_vmw_have_lib -eq 1; then
19206
as_fn_error $? "libpng not found. Please configure without Unity (using --disable-unity) or install the libpng devel package" "$LINENO" 5
19210
# Check for the zlib library and headers. Like uriparser, there
19211
# isn't a pkg-config or zlib-config file.
19213
if test -z "$CUSTOM_ZLIB_CPPFLAGS"; then
19214
if test "$os" = freebsd; then
19215
CUSTOM_ZLIB_CPPFLAGS="-I/usr/local/include"
19217
CUSTOM_ZLIB_CPPFLAGS="-I/usr/include"
19219
if test -n ""; then
19220
CUSTOM_ZLIB_CPPFLAGS="${CUSTOM_ZLIB_CPPFLAGS}/"
19226
if test -z "z"; then
19227
as_fn_error $? "'library' parameter is required.'" "$LINENO" 5
19229
if test -z "ZLIB"; then
19230
as_fn_error $? "'lvar' parameter is required.'" "$LINENO" 5
19234
ac_vmw_have_lib_func=0
19235
ac_vmw_have_lib_header=0
19236
ac_vmw_custom_libs=
19239
# First, try any user-defined CUSTOM_* flags.
19241
if test -n "${CUSTOM_ZLIB_CPPFLAGS}" || test -n "${CUSTOM_ZLIB_LIBS}"; then
19242
ac_vmw_custom_libs="${CUSTOM_ZLIB_LIBS} -lz"
19243
if test -n "zlib.h"; then
19244
ORIGINAL_CPPFLAGS="$CPPFLAGS"
19245
CPPFLAGS="${CUSTOM_ZLIB_CPPFLAGS} $CPPFLAGS"
19247
ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
19248
if test "x$ac_cv_header_zlib_h" = x""yes; then :
19249
ac_vmw_have_lib_header=1
19254
CPPFLAGS="$ORIGINAL_CPPFLAGS"
19256
ac_vmw_have_lib_header=1
19259
# Check a specific function in the library if requested.
19260
# If it hasn't, just pick a random function from libc, just to make
19261
# sure the linker can find the library being tested.
19262
if test $ac_vmw_have_lib_header -eq 1; then
19263
if test -n "zlibVersion"; then
19264
ac_vmw_function=zlibVersion
19266
ac_vmw_function=strlen
19268
as_ac_Lib=`$as_echo "ac_cv_lib_z_$ac_vmw_function" | $as_tr_sh`
19269
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_vmw_function in -lz" >&5
19270
$as_echo_n "checking for $ac_vmw_function in -lz... " >&6; }
19271
if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
19272
$as_echo_n "(cached) " >&6
19274
ac_check_lib_save_LIBS=$LIBS
19275
LIBS="-lz $ac_vmw_custom_libs $LIBS"
19276
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19277
/* end confdefs.h. */
19279
/* Override any GCC internal prototype to avoid an error.
19280
Use char because int might match the return type of a GCC
19281
builtin and then its argument prototype would still apply. */
19285
char $ac_vmw_function ();
19289
return $ac_vmw_function ();
19294
if ac_fn_c_try_link "$LINENO"; then :
19295
eval "$as_ac_Lib=yes"
19297
eval "$as_ac_Lib=no"
19299
rm -f core conftest.err conftest.$ac_objext \
19300
conftest$ac_exeext conftest.$ac_ext
19301
LIBS=$ac_check_lib_save_LIBS
19303
eval ac_res=\$$as_ac_Lib
19304
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19305
$as_echo "$ac_res" >&6; }
19306
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
19307
ac_vmw_have_lib_func=1
19312
if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then
19313
ZLIB_CPPFLAGS="${CUSTOM_ZLIB_CPPFLAGS}"
19314
ZLIB_LIBS="$ac_vmw_custom_libs"
19319
# If that didn't work, try with pkg-config.
19320
if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n ""; then
19321
if test -n ""; then
19322
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for >= (via pkg-config)" >&5
19323
$as_echo_n "checking for >= (via pkg-config)... " >&6; }
19324
if pkg-config --exists ' >= '; then
19328
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for (via pkg-config)" >&5
19329
$as_echo_n "checking for (via pkg-config)... " >&6; }
19330
if pkg-config --exists ''; then
19335
if test $ac_vmw_have_lib -eq 1; then
19336
# Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags"
19337
# fails on OpenSolaris B71. So be pessimistic.
19338
ac_vmw_cppflags="`pkg-config --cflags `"
19340
ac_vmw_libs="`pkg-config --libs `"
19342
if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then
19343
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19344
$as_echo "yes" >&6; }
19345
ZLIB_CPPFLAGS="$ac_vmw_cppflags"
19346
ZLIB_LIBS="$ac_vmw_libs"
19348
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19349
$as_echo "no" >&6; }
19352
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19353
$as_echo "no" >&6; }
19357
# If we still haven't found the lib, try with the library's custom "config" script.
19358
# Before checking, flush the AC_PATH_PROG cached variable.
19359
unset ac_cv_path_ac_vmw_lib_cfg
19360
unset ac_vmw_lib_cfg
19361
if test $ac_vmw_have_lib -eq 0 && test -n ""; then
19362
# Extract the first word of "", so it can be a program name with args.
19363
set dummy ; ac_word=$2
19364
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19365
$as_echo_n "checking for $ac_word... " >&6; }
19366
if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then :
19367
$as_echo_n "(cached) " >&6
19369
case $ac_vmw_lib_cfg in
19371
ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path.
19374
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19375
for as_dir in $PATH
19378
test -z "$as_dir" && as_dir=.
19379
for ac_exec_ext in '' $ac_executable_extensions; do
19380
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19381
ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext"
19382
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19389
test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no"
19393
ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg
19394
if test -n "$ac_vmw_lib_cfg"; then
19395
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_vmw_lib_cfg" >&5
19396
$as_echo "$ac_vmw_lib_cfg" >&6; }
19398
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19399
$as_echo "no" >&6; }
19403
if test "$ac_vmw_lib_cfg" != "no"; then
19404
# XXX: icu-config does not follow the "--cflags" and "--libs" convention,
19405
# so single it out here to avoid having to replicate all the rest of the
19407
if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then
19408
ZLIB_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`"
19409
ZLIB_LIBS="`$ac_vmw_lib_cfg --ldflags`"
19411
ZLIB_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`"
19412
ZLIB_LIBS="`$ac_vmw_lib_cfg --libs`"
19418
# Finish by executing the user provided action. The call to "true" is needed
19419
# because the actions are optional, and we need something inside the block.
19420
if test $ac_vmw_have_lib -eq 1; then
19427
as_fn_error $? "zlib library not found. Please configure without Unity (using --disable-unity) or install the zlib devel package." "$LINENO" 5
19431
# Check for gio 2.24.
19434
if test -z "gio-2.0"; then
19435
as_fn_error $? "'library' parameter is required.'" "$LINENO" 5
19437
if test -z "GIO"; then
19438
as_fn_error $? "'lvar' parameter is required.'" "$LINENO" 5
19442
ac_vmw_have_lib_func=0
19443
ac_vmw_have_lib_header=0
19444
ac_vmw_custom_libs=
19447
# First, try any user-defined CUSTOM_* flags.
19449
if test -n "${CUSTOM_GIO_CPPFLAGS}" || test -n "${CUSTOM_GIO_LIBS}"; then
19450
ac_vmw_custom_libs="${CUSTOM_GIO_LIBS} -lgio-2.0"
19451
if test -n "gio/gio.h"; then
19452
ORIGINAL_CPPFLAGS="$CPPFLAGS"
19453
CPPFLAGS="${CUSTOM_GIO_CPPFLAGS} $CPPFLAGS"
19455
ac_fn_c_check_header_mongrel "$LINENO" "gio/gio.h" "ac_cv_header_gio_gio_h" "$ac_includes_default"
19456
if test "x$ac_cv_header_gio_gio_h" = x""yes; then :
19457
ac_vmw_have_lib_header=1
19462
CPPFLAGS="$ORIGINAL_CPPFLAGS"
19464
ac_vmw_have_lib_header=1
19467
# Check a specific function in the library if requested.
19468
# If it hasn't, just pick a random function from libc, just to make
19469
# sure the linker can find the library being tested.
19470
if test $ac_vmw_have_lib_header -eq 1; then
19471
if test -n "g_desktop_app_info_get_filename"; then
19472
ac_vmw_function=g_desktop_app_info_get_filename
19474
ac_vmw_function=strlen
19476
as_ac_Lib=`$as_echo "ac_cv_lib_gio-2.0_$ac_vmw_function" | $as_tr_sh`
19477
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_vmw_function in -lgio-2.0" >&5
19478
$as_echo_n "checking for $ac_vmw_function in -lgio-2.0... " >&6; }
19479
if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
19480
$as_echo_n "(cached) " >&6
19482
ac_check_lib_save_LIBS=$LIBS
19483
LIBS="-lgio-2.0 $ac_vmw_custom_libs $LIBS"
19484
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19485
/* end confdefs.h. */
19487
/* Override any GCC internal prototype to avoid an error.
19488
Use char because int might match the return type of a GCC
19489
builtin and then its argument prototype would still apply. */
19493
char $ac_vmw_function ();
19497
return $ac_vmw_function ();
19502
if ac_fn_c_try_link "$LINENO"; then :
19503
eval "$as_ac_Lib=yes"
19505
eval "$as_ac_Lib=no"
19507
rm -f core conftest.err conftest.$ac_objext \
19508
conftest$ac_exeext conftest.$ac_ext
19509
LIBS=$ac_check_lib_save_LIBS
19511
eval ac_res=\$$as_ac_Lib
19512
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19513
$as_echo "$ac_res" >&6; }
19514
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
19515
ac_vmw_have_lib_func=1
19520
if test $ac_vmw_have_lib_func -eq 1 && test $ac_vmw_have_lib_header -eq 1; then
19521
GIO_CPPFLAGS="${CUSTOM_GIO_CPPFLAGS}"
19522
GIO_LIBS="$ac_vmw_custom_libs"
19527
# If that didn't work, try with pkg-config.
19528
if test $ac_vmw_have_lib -eq 0 && test "$HAVE_PKG_CONFIG" = "yes" && test -n "gio-unix-2.0"; then
19529
if test -n "2.24.0"; then
19530
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-unix-2.0 >= 2.24.0 (via pkg-config)" >&5
19531
$as_echo_n "checking for gio-unix-2.0 >= 2.24.0 (via pkg-config)... " >&6; }
19532
if pkg-config --exists 'gio-unix-2.0 >= 2.24.0'; then
19536
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-unix-2.0 (via pkg-config)" >&5
19537
$as_echo_n "checking for gio-unix-2.0 (via pkg-config)... " >&6; }
19538
if pkg-config --exists 'gio-unix-2.0'; then
19543
if test $ac_vmw_have_lib -eq 1; then
19544
# Sometimes pkg-config might fail; for example, "pkg-config gtk+-2.0 --cflags"
19545
# fails on OpenSolaris B71. So be pessimistic.
19546
ac_vmw_cppflags="`pkg-config --cflags gio-unix-2.0`"
19548
ac_vmw_libs="`pkg-config --libs gio-unix-2.0`"
19550
if test $ac_vmw_ret1 -eq 0 && test $ac_vmw_ret2 -eq 0; then
19551
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19552
$as_echo "yes" >&6; }
19553
GIO_CPPFLAGS="$ac_vmw_cppflags"
19554
GIO_LIBS="$ac_vmw_libs"
19556
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19557
$as_echo "no" >&6; }
19560
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19561
$as_echo "no" >&6; }
19565
# If we still haven't found the lib, try with the library's custom "config" script.
19566
# Before checking, flush the AC_PATH_PROG cached variable.
19567
unset ac_cv_path_ac_vmw_lib_cfg
19568
unset ac_vmw_lib_cfg
19569
if test $ac_vmw_have_lib -eq 0 && test -n ""; then
19570
# Extract the first word of "", so it can be a program name with args.
19571
set dummy ; ac_word=$2
19572
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19573
$as_echo_n "checking for $ac_word... " >&6; }
19574
if test "${ac_cv_path_ac_vmw_lib_cfg+set}" = set; then :
19575
$as_echo_n "(cached) " >&6
19577
case $ac_vmw_lib_cfg in
19579
ac_cv_path_ac_vmw_lib_cfg="$ac_vmw_lib_cfg" # Let the user override the test with a path.
19582
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19583
for as_dir in $PATH
19586
test -z "$as_dir" && as_dir=.
19587
for ac_exec_ext in '' $ac_executable_extensions; do
19588
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19589
ac_cv_path_ac_vmw_lib_cfg="$as_dir/$ac_word$ac_exec_ext"
19590
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19597
test -z "$ac_cv_path_ac_vmw_lib_cfg" && ac_cv_path_ac_vmw_lib_cfg="no"
19601
ac_vmw_lib_cfg=$ac_cv_path_ac_vmw_lib_cfg
19602
if test -n "$ac_vmw_lib_cfg"; then
19603
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_vmw_lib_cfg" >&5
19604
$as_echo "$ac_vmw_lib_cfg" >&6; }
19606
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19607
$as_echo "no" >&6; }
19611
if test "$ac_vmw_lib_cfg" != "no"; then
19612
# XXX: icu-config does not follow the "--cflags" and "--libs" convention,
19613
# so single it out here to avoid having to replicate all the rest of the
19615
if test `basename "$ac_vmw_lib_cfg"` = "icu-config"; then
19616
GIO_CPPFLAGS="`$ac_vmw_lib_cfg --cppflags`"
19617
GIO_LIBS="`$ac_vmw_lib_cfg --ldflags`"
19619
GIO_CPPFLAGS="`$ac_vmw_lib_cfg --cflags`"
19620
GIO_LIBS="`$ac_vmw_lib_cfg --libs`"
19626
# Finish by executing the user provided action. The call to "true" is needed
19627
# because the actions are optional, and we need something inside the block.
19628
if test $ac_vmw_have_lib -eq 1; then
19635
as_fn_error $? "GLib/GIO 2.24+ not found. Please configure without Unity (using --disable-unity) or upgrade the Glib devel package." "$LINENO" 5
19638
fi # End of library checks for Unity.
19640
18675
# Check whether we have gtk+ 2.0.
19641
18676
if test "$with_gtk2" != "no"; then
19642
18677
# gdk_display_get_default_group (added in gtk+ 2.4.0) is function currently