3445
if test "x$CC" != xcc; then
3446
{ $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
3447
$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
3449
{ $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
3450
$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
3452
set dummy $CC; ac_cc=`$as_echo "$2" |
3453
sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3454
if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
3455
$as_echo_n "(cached) " >&6
3457
cat >conftest.$ac_ext <<_ACEOF
3460
cat confdefs.h >>conftest.$ac_ext
3461
cat >>conftest.$ac_ext <<_ACEOF
3462
/* end confdefs.h. */
3564
# Find a good install program. We prefer a C program (faster),
3565
# so one script is as good as another. But avoid the broken or
3566
# incompatible versions:
3567
# SysV /etc/install, /usr/sbin/install
3568
# SunOS /usr/etc/install
3569
# IRIX /sbin/install
3571
# AmigaOS /C/install, which installs bootblocks on floppy discs
3572
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3573
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3574
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3575
# OS/2's system install, which has a completely different semantic
3576
# ./install, which can be erroneously created by make from ./install.sh.
3577
# Reject install programs that cannot install multiple files.
3578
{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3579
$as_echo_n "checking for a BSD-compatible install... " >&6; }
3580
if test -z "$INSTALL"; then
3581
if test "${ac_cv_path_install+set}" = set; then
3582
$as_echo_n "(cached) " >&6
3584
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3588
test -z "$as_dir" && as_dir=.
3589
# Account for people who put trailing slashes in PATH elements.
3591
./ | .// | /cC/* | \
3592
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3593
?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3596
# OSF1 and SCO ODT 3.0 have their own names for install.
3597
# Don't use installbsd from OSF since it installs stuff as root
3599
for ac_prog in ginstall scoinst install; do
3600
for ac_exec_ext in '' $ac_executable_extensions; do
3601
if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3602
if test $ac_prog = install &&
3603
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3604
# AIX install. It has an incompatible calling convention.
3606
elif test $ac_prog = install &&
3607
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3608
# program-specific install script used by HP pwplus--don't use.
3611
rm -rf conftest.one conftest.two conftest.dir
3612
echo one > conftest.one
3613
echo two > conftest.two
3615
if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3616
test -s conftest.one && test -s conftest.two &&
3617
test -s conftest.dir/conftest.one &&
3618
test -s conftest.dir/conftest.two
3620
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3633
rm -rf conftest.one conftest.two conftest.dir
3636
if test "${ac_cv_path_install+set}" = set; then
3637
INSTALL=$ac_cv_path_install
3639
# As a last resort, use the slow shell script. Don't cache a
3640
# value for INSTALL within a source directory, because that will
3641
# break other packages using the cache if that directory is
3642
# removed, or if the value is a relative name.
3643
INSTALL=$ac_install_sh
3646
{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
3647
$as_echo "$INSTALL" >&6; }
3649
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3650
# It thinks the first close brace ends the variable substitution.
3651
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3653
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3655
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3660
ac_cpp='$CPP $CPPFLAGS'
3661
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3662
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3663
ac_compiler_gnu=$ac_cv_c_compiler_gnu
3664
{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3665
$as_echo_n "checking how to run the C preprocessor... " >&6; }
3666
# On Suns, sometimes $CPP names a directory.
3667
if test -n "$CPP" && test -d "$CPP"; then
3670
if test -z "$CPP"; then
3671
if test "${ac_cv_prog_CPP+set}" = set; then
3672
$as_echo_n "(cached) " >&6
3674
# Double quotes because CPP needs to be expanded
3675
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3678
for ac_c_preproc_warn_flag in '' yes
3680
# Use a header file that comes with gcc, so configuring glibc
3681
# with a fresh cross-compiler works.
3682
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3683
# <limits.h> exists even on freestanding compilers.
3684
# On the NeXT, cc -E runs the code through the compiler's parser,
3685
# not just through cpp. "Syntax error" is here to catch this case.
3686
cat >conftest.$ac_ext <<_ACEOF
3689
cat confdefs.h >>conftest.$ac_ext
3690
cat >>conftest.$ac_ext <<_ACEOF
3691
/* end confdefs.h. */
3693
# include <limits.h>
3695
# include <assert.h>
3699
if { (ac_try="$ac_cpp conftest.$ac_ext"
3701
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3702
*) ac_try_echo=$ac_try;;
3704
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3705
$as_echo "$ac_try_echo") >&5
3706
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3708
grep -v '^ *+' conftest.er1 >conftest.err
3710
cat conftest.err >&5
3711
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3712
(exit $ac_status); } >/dev/null && {
3713
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3714
test ! -s conftest.err
3718
$as_echo "$as_me: failed program was:" >&5
3719
sed 's/^/| /' conftest.$ac_ext >&5
3721
# Broken: fails on valid input.
3725
rm -f conftest.err conftest.$ac_ext
3727
# OK, works on sane cases. Now check whether nonexistent headers
3728
# can be detected and how.
3729
cat >conftest.$ac_ext <<_ACEOF
3732
cat confdefs.h >>conftest.$ac_ext
3733
cat >>conftest.$ac_ext <<_ACEOF
3734
/* end confdefs.h. */
3735
#include <ac_nonexistent.h>
3737
if { (ac_try="$ac_cpp conftest.$ac_ext"
3739
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3740
*) ac_try_echo=$ac_try;;
3742
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3743
$as_echo "$ac_try_echo") >&5
3744
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3746
grep -v '^ *+' conftest.er1 >conftest.err
3748
cat conftest.err >&5
3749
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3750
(exit $ac_status); } >/dev/null && {
3751
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3752
test ! -s conftest.err
3754
# Broken: success on invalid input.
3757
$as_echo "$as_me: failed program was:" >&5
3758
sed 's/^/| /' conftest.$ac_ext >&5
3760
# Passes both tests.
3765
rm -f conftest.err conftest.$ac_ext
3768
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3769
rm -f conftest.err conftest.$ac_ext
3770
if $ac_preproc_ok; then
3782
{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
3783
$as_echo "$CPP" >&6; }
3785
for ac_c_preproc_warn_flag in '' yes
3787
# Use a header file that comes with gcc, so configuring glibc
3788
# with a fresh cross-compiler works.
3789
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3790
# <limits.h> exists even on freestanding compilers.
3791
# On the NeXT, cc -E runs the code through the compiler's parser,
3792
# not just through cpp. "Syntax error" is here to catch this case.
3793
cat >conftest.$ac_ext <<_ACEOF
3796
cat confdefs.h >>conftest.$ac_ext
3797
cat >>conftest.$ac_ext <<_ACEOF
3798
/* end confdefs.h. */
3800
# include <limits.h>
3802
# include <assert.h>
3806
if { (ac_try="$ac_cpp conftest.$ac_ext"
3808
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3809
*) ac_try_echo=$ac_try;;
3811
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3812
$as_echo "$ac_try_echo") >&5
3813
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3815
grep -v '^ *+' conftest.er1 >conftest.err
3817
cat conftest.err >&5
3818
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3819
(exit $ac_status); } >/dev/null && {
3820
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3821
test ! -s conftest.err
3825
$as_echo "$as_me: failed program was:" >&5
3826
sed 's/^/| /' conftest.$ac_ext >&5
3828
# Broken: fails on valid input.
3832
rm -f conftest.err conftest.$ac_ext
3834
# OK, works on sane cases. Now check whether nonexistent headers
3835
# can be detected and how.
3836
cat >conftest.$ac_ext <<_ACEOF
3839
cat confdefs.h >>conftest.$ac_ext
3840
cat >>conftest.$ac_ext <<_ACEOF
3841
/* end confdefs.h. */
3842
#include <ac_nonexistent.h>
3844
if { (ac_try="$ac_cpp conftest.$ac_ext"
3846
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3847
*) ac_try_echo=$ac_try;;
3849
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3850
$as_echo "$ac_try_echo") >&5
3851
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3853
grep -v '^ *+' conftest.er1 >conftest.err
3855
cat conftest.err >&5
3856
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3857
(exit $ac_status); } >/dev/null && {
3858
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3859
test ! -s conftest.err
3861
# Broken: success on invalid input.
3864
$as_echo "$as_me: failed program was:" >&5
3865
sed 's/^/| /' conftest.$ac_ext >&5
3867
# Passes both tests.
3872
rm -f conftest.err conftest.$ac_ext
3875
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3876
rm -f conftest.err conftest.$ac_ext
3877
if $ac_preproc_ok; then
3880
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3881
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3882
{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3883
See \`config.log' for more details." >&5
3884
$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3885
See \`config.log' for more details." >&2;}
3886
{ (exit 1); exit 1; }; }; }
3890
ac_cpp='$CPP $CPPFLAGS'
3891
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3892
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3893
ac_compiler_gnu=$ac_cv_c_compiler_gnu
3896
{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3897
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3898
if test "${ac_cv_path_GREP+set}" = set; then
3899
$as_echo_n "(cached) " >&6
3901
if test -z "$GREP"; then
3902
ac_path_GREP_found=false
3903
# Loop through the user's path and test for each of PROGNAME-LIST
3904
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3905
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3908
test -z "$as_dir" && as_dir=.
3909
for ac_prog in grep ggrep; do
3910
for ac_exec_ext in '' $ac_executable_extensions; do
3911
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3912
{ test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3913
# Check for GNU ac_path_GREP and select it if it is found.
3914
# Check for GNU $ac_path_GREP
3915
case `"$ac_path_GREP" --version 2>&1` in
3917
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3920
$as_echo_n 0123456789 >"conftest.in"
3923
cat "conftest.in" "conftest.in" >"conftest.tmp"
3924
mv "conftest.tmp" "conftest.in"
3925
cp "conftest.in" "conftest.nl"
3926
$as_echo 'GREP' >> "conftest.nl"
3927
"$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3928
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3929
ac_count=`expr $ac_count + 1`
3930
if test $ac_count -gt ${ac_path_GREP_max-0}; then
3931
# Best one so far, save it but keep looking for a better one
3932
ac_cv_path_GREP="$ac_path_GREP"
3933
ac_path_GREP_max=$ac_count
3935
# 10*(2^10) chars as input seems more than enough
3936
test $ac_count -gt 10 && break
3938
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3941
$ac_path_GREP_found && break 3
3946
if test -z "$ac_cv_path_GREP"; then
3947
{ { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3948
$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3949
{ (exit 1); exit 1; }; }
3952
ac_cv_path_GREP=$GREP
3956
{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3957
$as_echo "$ac_cv_path_GREP" >&6; }
3958
GREP="$ac_cv_path_GREP"
3961
{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
3962
$as_echo_n "checking for egrep... " >&6; }
3963
if test "${ac_cv_path_EGREP+set}" = set; then
3964
$as_echo_n "(cached) " >&6
3966
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3967
then ac_cv_path_EGREP="$GREP -E"
3969
if test -z "$EGREP"; then
3970
ac_path_EGREP_found=false
3971
# Loop through the user's path and test for each of PROGNAME-LIST
3972
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973
for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3976
test -z "$as_dir" && as_dir=.
3977
for ac_prog in egrep; do
3978
for ac_exec_ext in '' $ac_executable_extensions; do
3979
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3980
{ test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3981
# Check for GNU ac_path_EGREP and select it if it is found.
3982
# Check for GNU $ac_path_EGREP
3983
case `"$ac_path_EGREP" --version 2>&1` in
3985
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3988
$as_echo_n 0123456789 >"conftest.in"
3991
cat "conftest.in" "conftest.in" >"conftest.tmp"
3992
mv "conftest.tmp" "conftest.in"
3993
cp "conftest.in" "conftest.nl"
3994
$as_echo 'EGREP' >> "conftest.nl"
3995
"$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3996
diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3997
ac_count=`expr $ac_count + 1`
3998
if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3999
# Best one so far, save it but keep looking for a better one
4000
ac_cv_path_EGREP="$ac_path_EGREP"
4001
ac_path_EGREP_max=$ac_count
4003
# 10*(2^10) chars as input seems more than enough
4004
test $ac_count -gt 10 && break
4006
rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4009
$ac_path_EGREP_found && break 3
4014
if test -z "$ac_cv_path_EGREP"; then
4015
{ { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4016
$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4017
{ (exit 1); exit 1; }; }
4020
ac_cv_path_EGREP=$EGREP
4025
{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4026
$as_echo "$ac_cv_path_EGREP" >&6; }
4027
EGREP="$ac_cv_path_EGREP"
4030
{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4031
$as_echo_n "checking for ANSI C header files... " >&6; }
4032
if test "${ac_cv_header_stdc+set}" = set; then
4033
$as_echo_n "(cached) " >&6
4035
cat >conftest.$ac_ext <<_ACEOF
4038
cat confdefs.h >>conftest.$ac_ext
4039
cat >>conftest.$ac_ext <<_ACEOF
4040
/* end confdefs.h. */
3472
# Make sure it works both with $CC and with simple cc.
3473
# We do the test twice because some compilers refuse to overwrite an
3474
# existing .o file with -o, though they will create one.
3475
ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3477
if { (case "(($ac_try" in
3478
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3479
*) ac_try_echo=$ac_try;;
3481
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3482
$as_echo "$ac_try_echo") >&5
3483
(eval "$ac_try") 2>&5
3485
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3486
(exit $ac_status); } &&
3487
test -f conftest2.$ac_objext && { (case "(($ac_try" in
3488
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3489
*) ac_try_echo=$ac_try;;
3491
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3492
$as_echo "$ac_try_echo") >&5
3493
(eval "$ac_try") 2>&5
3495
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3496
(exit $ac_status); };
3498
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
3499
if test "x$CC" != xcc; then
3500
# Test first that cc exists at all.
3501
if { ac_try='cc -c conftest.$ac_ext >&5'
4054
rm -f conftest.$ac_objext
4055
if { (ac_try="$ac_compile"
4057
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4058
*) ac_try_echo=$ac_try;;
4060
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4061
$as_echo "$ac_try_echo") >&5
4062
(eval "$ac_compile") 2>conftest.er1
4064
grep -v '^ *+' conftest.er1 >conftest.err
4066
cat conftest.err >&5
4067
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4068
(exit $ac_status); } && {
4069
test -z "$ac_c_werror_flag" ||
4070
test ! -s conftest.err
4071
} && test -s conftest.$ac_objext; then
4072
ac_cv_header_stdc=yes
4074
$as_echo "$as_me: failed program was:" >&5
4075
sed 's/^/| /' conftest.$ac_ext >&5
4077
ac_cv_header_stdc=no
4080
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4082
if test $ac_cv_header_stdc = yes; then
4083
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4084
cat >conftest.$ac_ext <<_ACEOF
4087
cat confdefs.h >>conftest.$ac_ext
4088
cat >>conftest.$ac_ext <<_ACEOF
4089
/* end confdefs.h. */
4093
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4094
$EGREP "memchr" >/dev/null 2>&1; then
4097
ac_cv_header_stdc=no
4103
if test $ac_cv_header_stdc = yes; then
4104
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4105
cat >conftest.$ac_ext <<_ACEOF
4108
cat confdefs.h >>conftest.$ac_ext
4109
cat >>conftest.$ac_ext <<_ACEOF
4110
/* end confdefs.h. */
4114
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4115
$EGREP "free" >/dev/null 2>&1; then
4118
ac_cv_header_stdc=no
4124
if test $ac_cv_header_stdc = yes; then
4125
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4126
if test "$cross_compiling" = yes; then
4129
cat >conftest.$ac_ext <<_ACEOF
4132
cat confdefs.h >>conftest.$ac_ext
4133
cat >>conftest.$ac_ext <<_ACEOF
4134
/* end confdefs.h. */
4137
#if ((' ' & 0x0FF) == 0x020)
4138
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4139
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4141
# define ISLOWER(c) \
4142
(('a' <= (c) && (c) <= 'i') \
4143
|| ('j' <= (c) && (c) <= 'r') \
4144
|| ('s' <= (c) && (c) <= 'z'))
4145
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4148
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4153
for (i = 0; i < 256; i++)
4154
if (XOR (islower (i), ISLOWER (i))
4155
|| toupper (i) != TOUPPER (i))
4160
rm -f conftest$ac_exeext
4161
if { (ac_try="$ac_link"
4163
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4164
*) ac_try_echo=$ac_try;;
4166
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4167
$as_echo "$ac_try_echo") >&5
4168
(eval "$ac_link") 2>&5
4170
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4171
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3502
4172
{ (case "(($ac_try" in
3503
4173
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3504
4174
*) ac_try_echo=$ac_try;;
3510
4180
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3511
4181
(exit $ac_status); }; }; then
3512
ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3514
if { (case "(($ac_try" in
3515
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3516
*) ac_try_echo=$ac_try;;
3518
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3519
$as_echo "$ac_try_echo") >&5
3520
(eval "$ac_try") 2>&5
3522
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3523
(exit $ac_status); } &&
3524
test -f conftest2.$ac_objext && { (case "(($ac_try" in
3525
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3526
*) ac_try_echo=$ac_try;;
3528
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3529
$as_echo "$ac_try_echo") >&5
3530
(eval "$ac_try") 2>&5
3532
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3533
(exit $ac_status); };
3538
# cc exists but doesn't like -o.
3539
eval ac_cv_prog_cc_${ac_cc}_c_o=no
3544
eval ac_cv_prog_cc_${ac_cc}_c_o=no
3546
rm -f core conftest*
3549
if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
3550
{ $as_echo "$as_me:$LINENO: result: yes" >&5
3551
$as_echo "yes" >&6; }
3553
{ $as_echo "$as_me:$LINENO: result: no" >&5
3554
$as_echo "no" >&6; }
4184
$as_echo "$as_me: program exited with status $ac_status" >&5
4185
$as_echo "$as_me: failed program was:" >&5
4186
sed 's/^/| /' conftest.$ac_ext >&5
4189
ac_cv_header_stdc=no
4191
rm -rf conftest.dSYM
4192
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4198
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4199
$as_echo "$ac_cv_header_stdc" >&6; }
4200
if test $ac_cv_header_stdc = yes; then
3556
4202
cat >>confdefs.h <<\_ACEOF
3557
#define NO_MINUS_C_MINUS_O 1
3562
# FIXME: we rely on the cache variable name because
3563
# there is no other way.
3565
ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
3566
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
3567
# Losing compiler, so override with the script.
3568
# FIXME: It is wrong to rewrite CC.
3569
# But if we don't then we get into trouble of one sort or another.
3570
# A longer-term fix would be to have automake use am__CC in this case,
3571
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3572
CC="$am_aux_dir/compile $CC"
3576
# Find a good install program. We prefer a C program (faster),
3577
# so one script is as good as another. But avoid the broken or
3578
# incompatible versions:
3579
# SysV /etc/install, /usr/sbin/install
3580
# SunOS /usr/etc/install
3581
# IRIX /sbin/install
3583
# AmigaOS /C/install, which installs bootblocks on floppy discs
3584
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3585
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3586
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3587
# OS/2's system install, which has a completely different semantic
3588
# ./install, which can be erroneously created by make from ./install.sh.
3589
# Reject install programs that cannot install multiple files.
3590
{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3591
$as_echo_n "checking for a BSD-compatible install... " >&6; }
3592
if test -z "$INSTALL"; then
3593
if test "${ac_cv_path_install+set}" = set; then
3594
$as_echo_n "(cached) " >&6
3596
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600
test -z "$as_dir" && as_dir=.
3601
# Account for people who put trailing slashes in PATH elements.
3603
./ | .// | /cC/* | \
3604
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3605
?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3608
# OSF1 and SCO ODT 3.0 have their own names for install.
3609
# Don't use installbsd from OSF since it installs stuff as root
3611
for ac_prog in ginstall scoinst install; do
3612
for ac_exec_ext in '' $ac_executable_extensions; do
3613
if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3614
if test $ac_prog = install &&
3615
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3616
# AIX install. It has an incompatible calling convention.
3618
elif test $ac_prog = install &&
3619
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3620
# program-specific install script used by HP pwplus--don't use.
3623
rm -rf conftest.one conftest.two conftest.dir
3624
echo one > conftest.one
3625
echo two > conftest.two
3627
if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3628
test -s conftest.one && test -s conftest.two &&
3629
test -s conftest.dir/conftest.one &&
3630
test -s conftest.dir/conftest.two
3632
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3645
rm -rf conftest.one conftest.two conftest.dir
3648
if test "${ac_cv_path_install+set}" = set; then
3649
INSTALL=$ac_cv_path_install
3651
# As a last resort, use the slow shell script. Don't cache a
3652
# value for INSTALL within a source directory, because that will
3653
# break other packages using the cache if that directory is
3654
# removed, or if the value is a relative name.
3655
INSTALL=$ac_install_sh
3658
{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
3659
$as_echo "$INSTALL" >&6; }
3661
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3662
# It thinks the first close brace ends the variable substitution.
3663
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3665
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3667
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3670
# Checks for pkg-config packages
3673
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
3674
if test -n "$ac_tool_prefix"; then
3675
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3676
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3677
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3678
$as_echo_n "checking for $ac_word... " >&6; }
3679
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3680
$as_echo_n "(cached) " >&6
3684
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3687
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3691
test -z "$as_dir" && as_dir=.
3692
for ac_exec_ext in '' $ac_executable_extensions; do
3693
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3694
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3695
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3705
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3706
if test -n "$PKG_CONFIG"; then
3707
{ $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
3708
$as_echo "$PKG_CONFIG" >&6; }
3710
{ $as_echo "$as_me:$LINENO: result: no" >&5
3711
$as_echo "no" >&6; }
3716
if test -z "$ac_cv_path_PKG_CONFIG"; then
3717
ac_pt_PKG_CONFIG=$PKG_CONFIG
3718
# Extract the first word of "pkg-config", so it can be a program name with args.
3719
set dummy pkg-config; ac_word=$2
3720
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3721
$as_echo_n "checking for $ac_word... " >&6; }
3722
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3723
$as_echo_n "(cached) " >&6
3725
case $ac_pt_PKG_CONFIG in
3727
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3730
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734
test -z "$as_dir" && as_dir=.
3735
for ac_exec_ext in '' $ac_executable_extensions; do
3736
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3737
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
3738
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3748
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3749
if test -n "$ac_pt_PKG_CONFIG"; then
3750
{ $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
3751
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
3753
{ $as_echo "$as_me:$LINENO: result: no" >&5
3754
$as_echo "no" >&6; }
3757
if test "x$ac_pt_PKG_CONFIG" = x; then
3760
case $cross_compiling:$ac_tool_warned in
3762
{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3763
whose name does not start with the host triplet. If you think this
3764
configuration is useful to you, please write to autoconf@gnu.org." >&5
3765
$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3766
whose name does not start with the host triplet. If you think this
3767
configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3768
ac_tool_warned=yes ;;
3770
PKG_CONFIG=$ac_pt_PKG_CONFIG
3773
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3777
if test -n "$PKG_CONFIG"; then
3778
_pkg_min_version=0.9.0
3779
{ $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
3780
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
3781
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
3782
{ $as_echo "$as_me:$LINENO: result: yes" >&5
3783
$as_echo "yes" >&6; }
3785
{ $as_echo "$as_me:$LINENO: result: no" >&5
3786
$as_echo "no" >&6; }
3793
{ $as_echo "$as_me:$LINENO: checking for XWD" >&5
3794
$as_echo_n "checking for XWD... " >&6; }
3796
if test -n "$XWD_CFLAGS"; then
3797
pkg_cv_XWD_CFLAGS="$XWD_CFLAGS"
3798
elif test -n "$PKG_CONFIG"; then
3799
if test -n "$PKG_CONFIG" && \
3800
{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5
3801
($PKG_CONFIG --exists --print-errors "x11") 2>&5
3803
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3804
(exit $ac_status); }; then
3805
pkg_cv_XWD_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
3812
if test -n "$XWD_LIBS"; then
3813
pkg_cv_XWD_LIBS="$XWD_LIBS"
3814
elif test -n "$PKG_CONFIG"; then
3815
if test -n "$PKG_CONFIG" && \
3816
{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5
3817
($PKG_CONFIG --exists --print-errors "x11") 2>&5
3819
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3820
(exit $ac_status); }; then
3821
pkg_cv_XWD_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
3831
if test $pkg_failed = yes; then
3833
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
3834
_pkg_short_errors_supported=yes
3836
_pkg_short_errors_supported=no
3838
if test $_pkg_short_errors_supported = yes; then
3839
XWD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1`
3841
XWD_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11" 2>&1`
3843
# Put the nasty error message in config.log where it belongs
3844
echo "$XWD_PKG_ERRORS" >&5
3846
{ { $as_echo "$as_me:$LINENO: error: Package requirements (x11) were not met:
3850
Consider adjusting the PKG_CONFIG_PATH environment variable if you
3851
installed software in a non-standard prefix.
3853
Alternatively, you may set the environment variables XWD_CFLAGS
3854
and XWD_LIBS to avoid the need to call pkg-config.
3855
See the pkg-config man page for more details.
3857
$as_echo "$as_me: error: Package requirements (x11) were not met:
3861
Consider adjusting the PKG_CONFIG_PATH environment variable if you
3862
installed software in a non-standard prefix.
3864
Alternatively, you may set the environment variables XWD_CFLAGS
3865
and XWD_LIBS to avoid the need to call pkg-config.
3866
See the pkg-config man page for more details.
3868
{ (exit 1); exit 1; }; }
3869
elif test $pkg_failed = untried; then
3870
{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
3871
is in your PATH or set the PKG_CONFIG environment variable to the full
3874
Alternatively, you may set the environment variables XWD_CFLAGS
3875
and XWD_LIBS to avoid the need to call pkg-config.
3876
See the pkg-config man page for more details.
3878
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
3879
See \`config.log' for more details." >&5
3880
$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
3881
is in your PATH or set the PKG_CONFIG environment variable to the full
3884
Alternatively, you may set the environment variables XWD_CFLAGS
3885
and XWD_LIBS to avoid the need to call pkg-config.
3886
See the pkg-config man page for more details.
3888
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
3889
See \`config.log' for more details." >&2;}
3890
{ (exit 1); exit 1; }; }
3892
XWD_CFLAGS=$pkg_cv_XWD_CFLAGS
3893
XWD_LIBS=$pkg_cv_XWD_LIBS
3894
{ $as_echo "$as_me:$LINENO: result: yes" >&5
3895
$as_echo "yes" >&6; }
4203
#define STDC_HEADERS 1
4208
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4218
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4219
inttypes.h stdint.h unistd.h
4221
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4222
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4223
$as_echo_n "checking for $ac_header... " >&6; }
4224
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4225
$as_echo_n "(cached) " >&6
4227
cat >conftest.$ac_ext <<_ACEOF
4230
cat confdefs.h >>conftest.$ac_ext
4231
cat >>conftest.$ac_ext <<_ACEOF
4232
/* end confdefs.h. */
4233
$ac_includes_default
4235
#include <$ac_header>
4237
rm -f conftest.$ac_objext
4238
if { (ac_try="$ac_compile"
4240
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4241
*) ac_try_echo=$ac_try;;
4243
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4244
$as_echo "$ac_try_echo") >&5
4245
(eval "$ac_compile") 2>conftest.er1
4247
grep -v '^ *+' conftest.er1 >conftest.err
4249
cat conftest.err >&5
4250
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4251
(exit $ac_status); } && {
4252
test -z "$ac_c_werror_flag" ||
4253
test ! -s conftest.err
4254
} && test -s conftest.$ac_objext; then
4255
eval "$as_ac_Header=yes"
4257
$as_echo "$as_me: failed program was:" >&5
4258
sed 's/^/| /' conftest.$ac_ext >&5
4260
eval "$as_ac_Header=no"
4263
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4265
ac_res=`eval 'as_val=${'$as_ac_Header'}
4266
$as_echo "$as_val"'`
4267
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4268
$as_echo "$ac_res" >&6; }
4269
as_val=`eval 'as_val=${'$as_ac_Header'}
4270
$as_echo "$as_val"'`
4271
if test "x$as_val" = x""yes; then
4272
cat >>confdefs.h <<_ACEOF
4273
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4281
{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5
4282
$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4283
if test "${ac_cv_prog_cc_c99+set}" = set; then
4284
$as_echo_n "(cached) " >&6
4286
ac_cv_prog_cc_c99=no
4288
cat >conftest.$ac_ext <<_ACEOF
4291
cat confdefs.h >>conftest.$ac_ext
4292
cat >>conftest.$ac_ext <<_ACEOF
4293
/* end confdefs.h. */
4295
#include <stdbool.h>
4300
// Check varargs macros. These examples are taken from C99 6.10.3.5.
4301
#define debug(...) fprintf (stderr, __VA_ARGS__)
4302
#define showlist(...) puts (#__VA_ARGS__)
4303
#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4305
test_varargs_macros (void)
4310
debug ("X = %d\n", x);
4311
showlist (The first, second, and third items.);
4312
report (x>y, "x is %d but y is %d", x, y);
4315
// Check long long types.
4316
#define BIG64 18446744073709551615ull
4317
#define BIG32 4294967295ul
4318
#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4320
your preprocessor is broken;
4324
your preprocessor is broken;
4326
static long long int bignum = -9223372036854775807LL;
4327
static unsigned long long int ubignum = BIG64;
4329
struct incomplete_array
4337
const wchar_t *name;
4341
typedef const char *ccp;
4344
test_restrict (ccp restrict text)
4346
// See if C++-style comments work.
4347
// Iterate through items via the restricted pointer.
4348
// Also check for declarations in for loops.
4349
for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4354
// Check varargs and va_copy.
4356
test_varargs (const char *format, ...)
4359
va_start (args, format);
4361
va_copy (args_copy, args);
4372
str = va_arg (args_copy, const char *);
4375
number = va_arg (args_copy, int);
4378
fnumber = va_arg (args_copy, double);
4393
_Bool success = false;
4396
if (test_restrict ("String literal") == 0)
4398
char *restrict newvar = "Another string";
4401
test_varargs ("s, d' f .", "string", 65, 34.234);
4402
test_varargs_macros ();
4404
// Check flexible array members.
4405
struct incomplete_array *ia =
4406
malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4408
for (int i = 0; i < ia->datasize; ++i)
4409
ia->data[i] = i * 1.234;
4411
// Check named initializers.
4412
struct named_init ni = {
4414
.name = L"Test wide string",
4415
.average = 543.34343,
4420
int dynamic_array[ni.number];
4421
dynamic_array[ni.number - 1] = 543;
4423
// work around unused variable warnings
4424
return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4425
|| dynamic_array[ni.number - 1] != 543);
4431
for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
4433
CC="$ac_save_CC $ac_arg"
4434
rm -f conftest.$ac_objext
4435
if { (ac_try="$ac_compile"
4437
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4438
*) ac_try_echo=$ac_try;;
4440
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4441
$as_echo "$ac_try_echo") >&5
4442
(eval "$ac_compile") 2>conftest.er1
4444
grep -v '^ *+' conftest.er1 >conftest.err
4446
cat conftest.err >&5
4447
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4448
(exit $ac_status); } && {
4449
test -z "$ac_c_werror_flag" ||
4450
test ! -s conftest.err
4451
} && test -s conftest.$ac_objext; then
4452
ac_cv_prog_cc_c99=$ac_arg
4454
$as_echo "$as_me: failed program was:" >&5
4455
sed 's/^/| /' conftest.$ac_ext >&5
4460
rm -f core conftest.err conftest.$ac_objext
4461
test "x$ac_cv_prog_cc_c99" != "xno" && break
4463
rm -f conftest.$ac_ext
4468
case "x$ac_cv_prog_cc_c99" in
4470
{ $as_echo "$as_me:$LINENO: result: none needed" >&5
4471
$as_echo "none needed" >&6; } ;;
4473
{ $as_echo "$as_me:$LINENO: result: unsupported" >&5
4474
$as_echo "unsupported" >&6; } ;;
4476
CC="$CC $ac_cv_prog_cc_c99"
4477
{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5
4478
$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4569
if test "x$GCC" = xyes ; then
4570
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
4571
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
4572
-Wbad-function-cast"
4573
case `$CC -dumpversion` in
4575
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
4579
{ $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
4580
$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
4581
if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
4582
$as_echo_n "(cached) " >&6
4584
cat >conftest.$ac_ext <<_ACEOF
4587
cat confdefs.h >>conftest.$ac_ext
4588
cat >>conftest.$ac_ext <<_ACEOF
4589
/* end confdefs.h. */
4590
$ac_includes_default
4602
rm -f conftest.$ac_objext
4603
if { (ac_try="$ac_compile"
4605
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4606
*) ac_try_echo=$ac_try;;
4608
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4609
$as_echo "$ac_try_echo") >&5
4610
(eval "$ac_compile") 2>conftest.er1
4612
grep -v '^ *+' conftest.er1 >conftest.err
4614
cat conftest.err >&5
4615
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4616
(exit $ac_status); } && {
4617
test -z "$ac_c_werror_flag" ||
4618
test ! -s conftest.err
4619
} && test -s conftest.$ac_objext; then
4620
ac_cv_have_decl___SUNPRO_C=yes
4622
$as_echo "$as_me: failed program was:" >&5
4623
sed 's/^/| /' conftest.$ac_ext >&5
4625
ac_cv_have_decl___SUNPRO_C=no
4628
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4630
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
4631
$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
4632
if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then
4638
if test "x$SUNCC" = "xyes"; then
4643
# Check whether --enable-silent-rules was given.
4644
if test "${enable_silent_rules+set}" = set; then
4645
enableval=$enable_silent_rules;
4648
case $enable_silent_rules in
4649
yes) AM_DEFAULT_VERBOSITY=0;;
4650
no) AM_DEFAULT_VERBOSITY=1;;
4651
*) AM_DEFAULT_VERBOSITY=0;;
4661
# Check whether --enable-strict-compilation was given.
4662
if test "${enable_strict_compilation+set}" = set; then
4663
enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval
4668
if test "x$STRICT_COMPILE" = "xyes"; then
4669
{ $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5
4670
$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; }
4671
if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then
4672
$as_echo_n "(cached) " >&6
4674
cat >conftest.$ac_ext <<_ACEOF
4677
cat confdefs.h >>conftest.$ac_ext
4678
cat >>conftest.$ac_ext <<_ACEOF
4679
/* end confdefs.h. */
4680
$ac_includes_default
4692
rm -f conftest.$ac_objext
4693
if { (ac_try="$ac_compile"
4695
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4696
*) ac_try_echo=$ac_try;;
4698
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4699
$as_echo "$ac_try_echo") >&5
4700
(eval "$ac_compile") 2>conftest.er1
4702
grep -v '^ *+' conftest.er1 >conftest.err
4704
cat conftest.err >&5
4705
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4706
(exit $ac_status); } && {
4707
test -z "$ac_c_werror_flag" ||
4708
test ! -s conftest.err
4709
} && test -s conftest.$ac_objext; then
4710
ac_cv_have_decl___SUNPRO_C=yes
4712
$as_echo "$as_me: failed program was:" >&5
4713
sed 's/^/| /' conftest.$ac_ext >&5
4715
ac_cv_have_decl___SUNPRO_C=no
4718
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4720
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5
4721
$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; }
4722
if test "x$ac_cv_have_decl___SUNPRO_C" = x""yes; then
4728
{ $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5
4729
$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; }
4730
if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then
4731
$as_echo_n "(cached) " >&6
4733
cat >conftest.$ac_ext <<_ACEOF
4736
cat confdefs.h >>conftest.$ac_ext
4737
cat >>conftest.$ac_ext <<_ACEOF
4738
/* end confdefs.h. */
4739
$ac_includes_default
4743
#ifndef __INTEL_COMPILER
4744
(void) __INTEL_COMPILER;
4751
rm -f conftest.$ac_objext
4752
if { (ac_try="$ac_compile"
4754
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4755
*) ac_try_echo=$ac_try;;
4757
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4758
$as_echo "$ac_try_echo") >&5
4759
(eval "$ac_compile") 2>conftest.er1
4761
grep -v '^ *+' conftest.er1 >conftest.err
4763
cat conftest.err >&5
4764
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4765
(exit $ac_status); } && {
4766
test -z "$ac_c_werror_flag" ||
4767
test ! -s conftest.err
4768
} && test -s conftest.$ac_objext; then
4769
ac_cv_have_decl___INTEL_COMPILER=yes
4771
$as_echo "$as_me: failed program was:" >&5
4772
sed 's/^/| /' conftest.$ac_ext >&5
4774
ac_cv_have_decl___INTEL_COMPILER=no
4777
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4779
{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5
4780
$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; }
4781
if test "x$ac_cv_have_decl___INTEL_COMPILER" = x""yes; then
4787
if test "x$GCC" = xyes ; then
4788
STRICT_CFLAGS="-pedantic -Werror"
4789
elif test "x$SUNCC" = "xyes"; then
4790
STRICT_CFLAGS="-errwarn"
4791
elif test "x$INTELCC" = "xyes"; then
4792
STRICT_CFLAGS="-Werror"
4795
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
4800
# Check whether --with-release-version was given.
4801
if test "${with_release_version+set}" = set; then
4802
withval=$with_release_version; RELEASE_VERSION="$withval"
4807
if test "x$RELEASE_VERSION" != "x"; then
4808
PACKAGE="$PACKAGE-$RELEASE_VERSION"
4809
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
4810
{ $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
4811
$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
4814
cat >>confdefs.h <<_ACEOF
4815
#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
4818
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
4819
if test "x$PVM" = "x"; then
4823
cat >>confdefs.h <<_ACEOF
4824
#define PACKAGE_VERSION_MINOR $PVM
4827
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
4828
if test "x$PVP" = "x"; then
4832
cat >>confdefs.h <<_ACEOF
4833
#define PACKAGE_VERSION_PATCHLEVEL $PVP
4838
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
4839
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
4840
echo 'git directory not found: installing possibly empty changelog.' >&2)"
4842
distcleancheck_listfiles='find . -type f ! -name ChangeLog -print'
3987
4848
if test x$APP_MAN_SUFFIX = x ; then
3988
4849
APP_MAN_SUFFIX=1
4058
# Check whether --with-release-version was given.
4059
if test "${with_release_version+set}" = set; then
4060
withval=$with_release_version; RELEASE_VERSION="$withval"
4065
if test "x$RELEASE_VERSION" != "x"; then
4066
PACKAGE="$PACKAGE-$RELEASE_VERSION"
4067
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
4068
{ $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5
4069
$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;}
4072
cat >>confdefs.h <<_ACEOF
4073
#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
4076
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
4077
if test "x$PVM" = "x"; then
4081
cat >>confdefs.h <<_ACEOF
4082
#define PACKAGE_VERSION_MINOR $PVM
4085
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
4086
if test "x$PVP" = "x"; then
4090
cat >>confdefs.h <<_ACEOF
4091
#define PACKAGE_VERSION_PATCHLEVEL $PVP
4918
# Checks for pkg-config packages
4921
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
4922
if test -n "$ac_tool_prefix"; then
4923
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4924
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4925
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4926
$as_echo_n "checking for $ac_word... " >&6; }
4927
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4928
$as_echo_n "(cached) " >&6
4932
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4935
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939
test -z "$as_dir" && as_dir=.
4940
for ac_exec_ext in '' $ac_executable_extensions; do
4941
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4942
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4943
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4953
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4954
if test -n "$PKG_CONFIG"; then
4955
{ $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
4956
$as_echo "$PKG_CONFIG" >&6; }
4958
{ $as_echo "$as_me:$LINENO: result: no" >&5
4959
$as_echo "no" >&6; }
4964
if test -z "$ac_cv_path_PKG_CONFIG"; then
4965
ac_pt_PKG_CONFIG=$PKG_CONFIG
4966
# Extract the first word of "pkg-config", so it can be a program name with args.
4967
set dummy pkg-config; ac_word=$2
4968
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4969
$as_echo_n "checking for $ac_word... " >&6; }
4970
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4971
$as_echo_n "(cached) " >&6
4973
case $ac_pt_PKG_CONFIG in
4975
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4978
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982
test -z "$as_dir" && as_dir=.
4983
for ac_exec_ext in '' $ac_executable_extensions; do
4984
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4985
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4986
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4996
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4997
if test -n "$ac_pt_PKG_CONFIG"; then
4998
{ $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
4999
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
5001
{ $as_echo "$as_me:$LINENO: result: no" >&5
5002
$as_echo "no" >&6; }
5005
if test "x$ac_pt_PKG_CONFIG" = x; then
5008
case $cross_compiling:$ac_tool_warned in
5010
{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
5011
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5012
ac_tool_warned=yes ;;
5014
PKG_CONFIG=$ac_pt_PKG_CONFIG
5017
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5021
if test -n "$PKG_CONFIG"; then
5022
_pkg_min_version=0.9.0
5023
{ $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
5024
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
5025
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
5026
{ $as_echo "$as_me:$LINENO: result: yes" >&5
5027
$as_echo "yes" >&6; }
5029
{ $as_echo "$as_me:$LINENO: result: no" >&5
5030
$as_echo "no" >&6; }
5037
{ $as_echo "$as_me:$LINENO: checking for XWD" >&5
5038
$as_echo_n "checking for XWD... " >&6; }
5040
if test -n "$XWD_CFLAGS"; then
5041
pkg_cv_XWD_CFLAGS="$XWD_CFLAGS"
5042
elif test -n "$PKG_CONFIG"; then
5043
if test -n "$PKG_CONFIG" && \
5044
{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5
5045
($PKG_CONFIG --exists --print-errors "x11") 2>&5
5047
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5048
(exit $ac_status); }; then
5049
pkg_cv_XWD_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
5056
if test -n "$XWD_LIBS"; then
5057
pkg_cv_XWD_LIBS="$XWD_LIBS"
5058
elif test -n "$PKG_CONFIG"; then
5059
if test -n "$PKG_CONFIG" && \
5060
{ ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5
5061
($PKG_CONFIG --exists --print-errors "x11") 2>&5
5063
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064
(exit $ac_status); }; then
5065
pkg_cv_XWD_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
5075
if test $pkg_failed = yes; then
5077
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
5078
_pkg_short_errors_supported=yes
5080
_pkg_short_errors_supported=no
5082
if test $_pkg_short_errors_supported = yes; then
5083
XWD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1`
5085
XWD_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11" 2>&1`
5087
# Put the nasty error message in config.log where it belongs
5088
echo "$XWD_PKG_ERRORS" >&5
5090
{ { $as_echo "$as_me:$LINENO: error: Package requirements (x11) were not met:
5094
Consider adjusting the PKG_CONFIG_PATH environment variable if you
5095
installed software in a non-standard prefix.
5097
Alternatively, you may set the environment variables XWD_CFLAGS
5098
and XWD_LIBS to avoid the need to call pkg-config.
5099
See the pkg-config man page for more details.
5101
$as_echo "$as_me: error: Package requirements (x11) were not met:
5105
Consider adjusting the PKG_CONFIG_PATH environment variable if you
5106
installed software in a non-standard prefix.
5108
Alternatively, you may set the environment variables XWD_CFLAGS
5109
and XWD_LIBS to avoid the need to call pkg-config.
5110
See the pkg-config man page for more details.
5112
{ (exit 1); exit 1; }; }
5113
elif test $pkg_failed = untried; then
5114
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
5115
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5116
{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
5117
is in your PATH or set the PKG_CONFIG environment variable to the full
5120
Alternatively, you may set the environment variables XWD_CFLAGS
5121
and XWD_LIBS to avoid the need to call pkg-config.
5122
See the pkg-config man page for more details.
5124
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
5125
See \`config.log' for more details." >&5
5126
$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
5127
is in your PATH or set the PKG_CONFIG environment variable to the full
5130
Alternatively, you may set the environment variables XWD_CFLAGS
5131
and XWD_LIBS to avoid the need to call pkg-config.
5132
See the pkg-config man page for more details.
5134
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
5135
See \`config.log' for more details." >&2;}
5136
{ (exit 1); exit 1; }; }; }
5138
XWD_CFLAGS=$pkg_cv_XWD_CFLAGS
5139
XWD_LIBS=$pkg_cv_XWD_LIBS
5140
{ $as_echo "$as_me:$LINENO: result: yes" >&5
5141
$as_echo "yes" >&6; }