733 |
fi |
fi |
734 |
|
|
735 |
|
|
|
# FIXME: We temporarily define our own version of AC_PROG_CC. This is |
|
|
# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We |
|
|
# are probably using a cross compiler, which will not be able to fully |
|
|
# link an executable. This should really be fixed in autoconf |
|
|
# itself. |
|
|
|
|
|
|
|
|
|
|
736 |
|
|
737 |
# Extract the first word of "gcc", so it can be a program name with args. |
# Extract the first word of "gcc", so it can be a program name with args. |
738 |
set dummy gcc; ac_word=$2 |
set dummy gcc; ac_word=$2 |
739 |
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
740 |
echo "configure:749: checking for $ac_word" >&5 |
echo "configure:741: checking for $ac_word" >&5 |
741 |
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
742 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
743 |
else |
else |
767 |
# Extract the first word of "cc", so it can be a program name with args. |
# Extract the first word of "cc", so it can be a program name with args. |
768 |
set dummy cc; ac_word=$2 |
set dummy cc; ac_word=$2 |
769 |
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 |
770 |
echo "configure:779: checking for $ac_word" >&5 |
echo "configure:771: checking for $ac_word" >&5 |
771 |
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
772 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
773 |
else |
else |
816 |
fi |
fi |
817 |
|
|
818 |
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 |
819 |
echo "configure:828: checking whether we are using GNU C" >&5 |
echo "configure:820: checking whether we are using GNU C" >&5 |
820 |
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
821 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
822 |
else |
else |
825 |
yes; |
yes; |
826 |
#endif |
#endif |
827 |
EOF |
EOF |
828 |
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
829 |
ac_cv_prog_gcc=yes |
ac_cv_prog_gcc=yes |
830 |
else |
else |
831 |
ac_cv_prog_gcc=no |
ac_cv_prog_gcc=no |
836 |
|
|
837 |
if test $ac_cv_prog_gcc = yes; then |
if test $ac_cv_prog_gcc = yes; then |
838 |
GCC=yes |
GCC=yes |
839 |
|
ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic' |
840 |
ac_test_CFLAGS="${CFLAGS+set}" |
ac_test_CFLAGS="${CFLAGS+set}" |
841 |
ac_save_CFLAGS="$CFLAGS" |
ac_save_CFLAGS="$CFLAGS" |
842 |
CFLAGS= |
CFLAGS= |
843 |
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 |
844 |
echo "configure:852: checking whether ${CC-cc} accepts -g" >&5 |
echo "configure:845: checking whether ${CC-cc} accepts -g" >&5 |
845 |
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
846 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
847 |
else |
else |
865 |
fi |
fi |
866 |
else |
else |
867 |
GCC= |
GCC= |
868 |
|
ac_libiberty_warn_cflags= |
869 |
test "${CFLAGS+set}" = set || CFLAGS="-g" |
test "${CFLAGS+set}" = set || CFLAGS="-g" |
870 |
fi |
fi |
871 |
|
|
872 |
|
|
873 |
|
|
874 |
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 |
875 |
echo "configure:881: checking for POSIXized ISC" >&5 |
echo "configure:876: checking for POSIXized ISC" >&5 |
876 |
if test -d /etc/conf/kconfig.d && |
if test -d /etc/conf/kconfig.d && |
877 |
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 |
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 |
878 |
then |
then |
892 |
ISC= |
ISC= |
893 |
fi |
fi |
894 |
|
|
895 |
|
echo $ac_n "checking for working const""... $ac_c" 1>&6 |
896 |
|
echo "configure:897: checking for working const" >&5 |
897 |
|
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
898 |
|
echo $ac_n "(cached) $ac_c" 1>&6 |
899 |
|
else |
900 |
|
cat > conftest.$ac_ext <<EOF |
901 |
|
#line 902 "configure" |
902 |
|
#include "confdefs.h" |
903 |
|
|
904 |
|
int main() { |
905 |
|
|
906 |
|
/* Ultrix mips cc rejects this. */ |
907 |
|
typedef int charset[2]; const charset x; |
908 |
|
/* SunOS 4.1.1 cc rejects this. */ |
909 |
|
char const *const *ccp; |
910 |
|
char **p; |
911 |
|
/* NEC SVR4.0.2 mips cc rejects this. */ |
912 |
|
struct point {int x, y;}; |
913 |
|
static struct point const zero = {0,0}; |
914 |
|
/* AIX XL C 1.02.0.0 rejects this. |
915 |
|
It does not let you subtract one const X* pointer from another in an arm |
916 |
|
of an if-expression whose if-part is not a constant expression */ |
917 |
|
const char *g = "string"; |
918 |
|
ccp = &g + (g ? g-g : 0); |
919 |
|
/* HPUX 7.0 cc rejects these. */ |
920 |
|
++ccp; |
921 |
|
p = (char**) ccp; |
922 |
|
ccp = (char const *const *) p; |
923 |
|
{ /* SCO 3.2v4 cc rejects this. */ |
924 |
|
char *t; |
925 |
|
char const *s = 0 ? (char *) 0 : (char const *) 0; |
926 |
|
|
927 |
|
*t++ = 0; |
928 |
|
} |
929 |
|
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
930 |
|
int x[] = {25, 17}; |
931 |
|
const int *foo = &x[0]; |
932 |
|
++foo; |
933 |
|
} |
934 |
|
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
935 |
|
typedef const int *iptr; |
936 |
|
iptr p = 0; |
937 |
|
++p; |
938 |
|
} |
939 |
|
{ /* AIX XL C 1.02.0.0 rejects this saying |
940 |
|
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
941 |
|
struct s { int j; const int *ap[3]; }; |
942 |
|
struct s *b; b->j = 5; |
943 |
|
} |
944 |
|
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
945 |
|
const int foo = 10; |
946 |
|
} |
947 |
|
|
948 |
|
; return 0; } |
949 |
|
EOF |
950 |
|
if { (eval echo configure:951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
951 |
|
rm -rf conftest* |
952 |
|
ac_cv_c_const=yes |
953 |
|
else |
954 |
|
echo "configure: failed program was:" >&5 |
955 |
|
cat conftest.$ac_ext >&5 |
956 |
|
rm -rf conftest* |
957 |
|
ac_cv_c_const=no |
958 |
|
fi |
959 |
|
rm -f conftest* |
960 |
|
fi |
961 |
|
|
962 |
|
echo "$ac_t""$ac_cv_c_const" 1>&6 |
963 |
|
if test $ac_cv_c_const = no; then |
964 |
|
cat >> confdefs.h <<\EOF |
965 |
|
#define const |
966 |
|
EOF |
967 |
|
|
968 |
|
fi |
969 |
|
|
970 |
|
echo $ac_n "checking for inline""... $ac_c" 1>&6 |
971 |
|
echo "configure:972: checking for inline" >&5 |
972 |
|
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
973 |
|
echo $ac_n "(cached) $ac_c" 1>&6 |
974 |
|
else |
975 |
|
ac_cv_c_inline=no |
976 |
|
for ac_kw in inline __inline__ __inline; do |
977 |
|
cat > conftest.$ac_ext <<EOF |
978 |
|
#line 979 "configure" |
979 |
|
#include "confdefs.h" |
980 |
|
|
981 |
|
int main() { |
982 |
|
} $ac_kw foo() { |
983 |
|
; return 0; } |
984 |
|
EOF |
985 |
|
if { (eval echo configure:986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
986 |
|
rm -rf conftest* |
987 |
|
ac_cv_c_inline=$ac_kw; break |
988 |
|
else |
989 |
|
echo "configure: failed program was:" >&5 |
990 |
|
cat conftest.$ac_ext >&5 |
991 |
|
fi |
992 |
|
rm -f conftest* |
993 |
|
done |
994 |
|
|
995 |
|
fi |
996 |
|
|
997 |
|
echo "$ac_t""$ac_cv_c_inline" 1>&6 |
998 |
|
case "$ac_cv_c_inline" in |
999 |
|
inline | yes) ;; |
1000 |
|
no) cat >> confdefs.h <<\EOF |
1001 |
|
#define inline |
1002 |
|
EOF |
1003 |
|
;; |
1004 |
|
*) cat >> confdefs.h <<EOF |
1005 |
|
#define inline $ac_cv_c_inline |
1006 |
|
EOF |
1007 |
|
;; |
1008 |
|
esac |
1009 |
|
|
1010 |
|
|
1011 |
|
|
1012 |
|
|
1025 |
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
1026 |
# ./install, which can be erroneously created by make from ./install.sh. |
# ./install, which can be erroneously created by make from ./install.sh. |
1027 |
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 |
1028 |
echo "configure:919: checking for a BSD compatible install" >&5 |
echo "configure:1029: checking for a BSD compatible install" >&5 |
1029 |
if test -z "$INSTALL"; then |
if test -z "$INSTALL"; then |
1030 |
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
1031 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1086 |
# able to link anything, it had better be able to at least compile |
# able to link anything, it had better be able to at least compile |
1087 |
# something. |
# something. |
1088 |
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 |
1089 |
echo "configure:980: checking how to run the C preprocessor" >&5 |
echo "configure:1090: checking how to run the C preprocessor" >&5 |
1090 |
# On Suns, sometimes $CPP names a directory. |
# On Suns, sometimes $CPP names a directory. |
1091 |
if test -n "$CPP" && test -d "$CPP"; then |
if test -n "$CPP" && test -d "$CPP"; then |
1092 |
CPP= |
CPP= |
1101 |
# On the NeXT, cc -E runs the code through the compiler's parser, |
# On the NeXT, cc -E runs the code through the compiler's parser, |
1102 |
# not just through cpp. |
# not just through cpp. |
1103 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1104 |
#line 995 "configure" |
#line 1105 "configure" |
1105 |
#include "confdefs.h" |
#include "confdefs.h" |
1106 |
#include <assert.h> |
#include <assert.h> |
1107 |
Syntax Error |
Syntax Error |
1108 |
EOF |
EOF |
1109 |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
1110 |
{ (eval echo configure:1001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1111 |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1112 |
if test -z "$ac_err"; then |
if test -z "$ac_err"; then |
1113 |
: |
: |
1118 |
rm -rf conftest* |
rm -rf conftest* |
1119 |
CPP="${CC-cc} -E -traditional-cpp" |
CPP="${CC-cc} -E -traditional-cpp" |
1120 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1121 |
#line 1012 "configure" |
#line 1122 "configure" |
1122 |
#include "confdefs.h" |
#include "confdefs.h" |
1123 |
#include <assert.h> |
#include <assert.h> |
1124 |
Syntax Error |
Syntax Error |
1125 |
EOF |
EOF |
1126 |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
1127 |
{ (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
{ (eval echo configure:1128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1128 |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1129 |
if test -z "$ac_err"; then |
if test -z "$ac_err"; then |
1130 |
: |
: |
1135 |
rm -rf conftest* |
rm -rf conftest* |
1136 |
CPP="${CC-cc} -nologo -E" |
CPP="${CC-cc} -nologo -E" |
1137 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1138 |
#line 1029 "configure" |
#line 1139 "configure" |
1139 |
#include "confdefs.h" |
#include "confdefs.h" |
1140 |
#include <assert.h> |
#include <assert.h> |
1141 |
Syntax Error |
Syntax Error |
1142 |
EOF |
EOF |
1143 |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
1144 |
{ (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
{ (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1145 |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1146 |
if test -z "$ac_err"; then |
if test -z "$ac_err"; then |
1147 |
: |
: |
1165 |
fi |
fi |
1166 |
echo "$ac_t""$CPP" 1>&6 |
echo "$ac_t""$CPP" 1>&6 |
1167 |
|
|
1168 |
for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h sys/resource.h |
for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h |
1169 |
do |
do |
1170 |
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
1171 |
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
1172 |
echo "configure:1063: checking for $ac_hdr" >&5 |
echo "configure:1173: checking for $ac_hdr" >&5 |
1173 |
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
1174 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1175 |
else |
else |
1176 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1177 |
#line 1068 "configure" |
#line 1178 "configure" |
1178 |
#include "confdefs.h" |
#include "confdefs.h" |
1179 |
#include <$ac_hdr> |
#include <$ac_hdr> |
1180 |
EOF |
EOF |
1181 |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
1182 |
{ (eval echo configure:1073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
{ (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
1183 |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
1184 |
if test -z "$ac_err"; then |
if test -z "$ac_err"; then |
1185 |
rm -rf conftest* |
rm -rf conftest* |
1206 |
done |
done |
1207 |
|
|
1208 |
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 |
1209 |
echo "configure:1100: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
echo "configure:1210: checking for sys/wait.h that is POSIX.1 compatible" >&5 |
1210 |
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then |
1211 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1212 |
else |
else |
1213 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1214 |
#line 1105 "configure" |
#line 1215 "configure" |
1215 |
#include "confdefs.h" |
#include "confdefs.h" |
1216 |
#include <sys/types.h> |
#include <sys/types.h> |
1217 |
#include <sys/wait.h> |
#include <sys/wait.h> |
1227 |
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; |
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; |
1228 |
; return 0; } |
; return 0; } |
1229 |
EOF |
EOF |
1230 |
if { (eval echo configure:1121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
if { (eval echo configure:1231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1231 |
rm -rf conftest* |
rm -rf conftest* |
1232 |
ac_cv_header_sys_wait_h=yes |
ac_cv_header_sys_wait_h=yes |
1233 |
else |
else |
1247 |
|
|
1248 |
fi |
fi |
1249 |
|
|
1250 |
|
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 |
1251 |
|
echo "configure:1252: checking whether time.h and sys/time.h may both be included" >&5 |
1252 |
|
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then |
1253 |
|
echo $ac_n "(cached) $ac_c" 1>&6 |
1254 |
|
else |
1255 |
|
cat > conftest.$ac_ext <<EOF |
1256 |
|
#line 1257 "configure" |
1257 |
|
#include "confdefs.h" |
1258 |
|
#include <sys/types.h> |
1259 |
|
#include <sys/time.h> |
1260 |
|
#include <time.h> |
1261 |
|
int main() { |
1262 |
|
struct tm *tp; |
1263 |
|
; return 0; } |
1264 |
|
EOF |
1265 |
|
if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1266 |
|
rm -rf conftest* |
1267 |
|
ac_cv_header_time=yes |
1268 |
|
else |
1269 |
|
echo "configure: failed program was:" >&5 |
1270 |
|
cat conftest.$ac_ext >&5 |
1271 |
|
rm -rf conftest* |
1272 |
|
ac_cv_header_time=no |
1273 |
|
fi |
1274 |
|
rm -f conftest* |
1275 |
|
fi |
1276 |
|
|
1277 |
|
echo "$ac_t""$ac_cv_header_time" 1>&6 |
1278 |
|
if test $ac_cv_header_time = yes; then |
1279 |
|
cat >> confdefs.h <<\EOF |
1280 |
|
#define TIME_WITH_SYS_TIME 1 |
1281 |
|
EOF |
1282 |
|
|
1283 |
|
fi |
1284 |
|
|
1285 |
|
|
1286 |
|
echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6 |
1287 |
|
echo "configure:1288: checking whether errno must be declared" >&5 |
1288 |
|
if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then |
1289 |
|
echo $ac_n "(cached) $ac_c" 1>&6 |
1290 |
|
else |
1291 |
|
cat > conftest.$ac_ext <<EOF |
1292 |
|
#line 1293 "configure" |
1293 |
|
#include "confdefs.h" |
1294 |
|
#include <errno.h> |
1295 |
|
int main() { |
1296 |
|
int x = errno; |
1297 |
|
; return 0; } |
1298 |
|
EOF |
1299 |
|
if { (eval echo configure:1300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
1300 |
|
rm -rf conftest* |
1301 |
|
libiberty_cv_declare_errno=no |
1302 |
|
else |
1303 |
|
echo "configure: failed program was:" >&5 |
1304 |
|
cat conftest.$ac_ext >&5 |
1305 |
|
rm -rf conftest* |
1306 |
|
libiberty_cv_declare_errno=yes |
1307 |
|
fi |
1308 |
|
rm -f conftest* |
1309 |
|
fi |
1310 |
|
|
1311 |
|
echo "$ac_t""$libiberty_cv_declare_errno" 1>&6 |
1312 |
|
if test $libiberty_cv_declare_errno = yes |
1313 |
|
then cat >> confdefs.h <<\EOF |
1314 |
|
#define NEED_DECLARATION_ERRNO 1 |
1315 |
|
EOF |
1316 |
|
|
1317 |
|
fi |
1318 |
|
|
1319 |
|
|
1320 |
# This is the list of functions which libiberty will provide if they |
# This is the list of functions which libiberty will provide if they |
1321 |
# are not available on the host. |
# are not available on the host. |
1325 |
funcs="$funcs basename" |
funcs="$funcs basename" |
1326 |
funcs="$funcs bcmp" |
funcs="$funcs bcmp" |
1327 |
funcs="$funcs bcopy" |
funcs="$funcs bcopy" |
1328 |
|
funcs="$funcs bsearch" |
1329 |
funcs="$funcs bzero" |
funcs="$funcs bzero" |
1330 |
funcs="$funcs calloc" |
funcs="$funcs calloc" |
1331 |
funcs="$funcs clock" |
funcs="$funcs clock" |
1370 |
# These are neither executed nor required, but they help keep |
# These are neither executed nor required, but they help keep |
1371 |
# autoheader happy without adding a bunch of text to acconfig.h. |
# autoheader happy without adding a bunch of text to acconfig.h. |
1372 |
if test "x" = "y"; then |
if test "x" = "y"; then |
1373 |
for ac_func in asprintf atexit basename bcmp bcopy bzero calloc clock getcwd |
for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock |
1374 |
do |
do |
1375 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1376 |
echo "configure:1197: checking for $ac_func" >&5 |
echo "configure:1377: checking for $ac_func" >&5 |
1377 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1378 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1379 |
else |
else |
1380 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1381 |
#line 1202 "configure" |
#line 1382 "configure" |
1382 |
#include "confdefs.h" |
#include "confdefs.h" |
1383 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
1384 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
1401 |
|
|
1402 |
; return 0; } |
; return 0; } |
1403 |
EOF |
EOF |
1404 |
if { (eval echo configure:1225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1405 |
rm -rf conftest* |
rm -rf conftest* |
1406 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
1407 |
else |
else |
1425 |
fi |
fi |
1426 |
done |
done |
1427 |
|
|
1428 |
for ac_func in getpagesize index insque mkstemps memchr memcmp memcpy memmove |
for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy |
1429 |
do |
do |
1430 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1431 |
echo "configure:1252: checking for $ac_func" >&5 |
echo "configure:1432: checking for $ac_func" >&5 |
1432 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1433 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1434 |
else |
else |
1435 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1436 |
#line 1257 "configure" |
#line 1437 "configure" |
1437 |
#include "confdefs.h" |
#include "confdefs.h" |
1438 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
1439 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
1456 |
|
|
1457 |
; return 0; } |
; return 0; } |
1458 |
EOF |
EOF |
1459 |
if { (eval echo configure:1280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1460 |
rm -rf conftest* |
rm -rf conftest* |
1461 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
1462 |
else |
else |
1480 |
fi |
fi |
1481 |
done |
done |
1482 |
|
|
1483 |
for ac_func in memset putenv random rename rindex sigsetmask strcasecmp |
for ac_func in memmove memset putenv random rename rindex sigsetmask |
1484 |
do |
do |
1485 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1486 |
echo "configure:1307: checking for $ac_func" >&5 |
echo "configure:1487: checking for $ac_func" >&5 |
1487 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1488 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1489 |
else |
else |
1490 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1491 |
#line 1312 "configure" |
#line 1492 "configure" |
1492 |
#include "confdefs.h" |
#include "confdefs.h" |
1493 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
1494 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
1511 |
|
|
1512 |
; return 0; } |
; return 0; } |
1513 |
EOF |
EOF |
1514 |
if { (eval echo configure:1335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:1515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1515 |
rm -rf conftest* |
rm -rf conftest* |
1516 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
1517 |
else |
else |
1535 |
fi |
fi |
1536 |
done |
done |
1537 |
|
|
1538 |
for ac_func in setenv strchr strdup strncasecmp strrchr strstr strtod strtol |
for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr |
1539 |
do |
do |
1540 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1541 |
echo "configure:1362: checking for $ac_func" >&5 |
echo "configure:1542: checking for $ac_func" >&5 |
1542 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1543 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1544 |
else |
else |
1545 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1546 |
#line 1367 "configure" |
#line 1547 "configure" |
1547 |
#include "confdefs.h" |
#include "confdefs.h" |
1548 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
1549 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
1566 |
|
|
1567 |
; return 0; } |
; return 0; } |
1568 |
EOF |
EOF |
1569 |
if { (eval echo configure:1390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1570 |
rm -rf conftest* |
rm -rf conftest* |
1571 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
1572 |
else |
else |
1590 |
fi |
fi |
1591 |
done |
done |
1592 |
|
|
1593 |
for ac_func in strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid |
for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf |
1594 |
do |
do |
1595 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1596 |
echo "configure:1417: checking for $ac_func" >&5 |
echo "configure:1597: checking for $ac_func" >&5 |
1597 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1598 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1599 |
else |
else |
1600 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1601 |
#line 1422 "configure" |
#line 1602 "configure" |
1602 |
#include "confdefs.h" |
#include "confdefs.h" |
1603 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
1604 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
1621 |
|
|
1622 |
; return 0; } |
; return 0; } |
1623 |
EOF |
EOF |
1624 |
if { (eval echo configure:1445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1625 |
rm -rf conftest* |
rm -rf conftest* |
1626 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
1627 |
else |
else |
1645 |
fi |
fi |
1646 |
done |
done |
1647 |
|
|
1648 |
cat >> confdefs.h <<\EOF |
for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal |
|
#define HAVE_SYS_ERRLIST 1 |
|
|
EOF |
|
|
|
|
|
cat >> confdefs.h <<\EOF |
|
|
#define HAVE_SYS_NERR 1 |
|
|
EOF |
|
|
|
|
|
cat >> confdefs.h <<\EOF |
|
|
#define HAVE_SYS_SIGLIST 1 |
|
|
EOF |
|
|
|
|
|
for ac_func in getrusage on_exit psignal strerror strsignal sysconf times |
|
1649 |
do |
do |
1650 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1651 |
echo "configure:1484: checking for $ac_func" >&5 |
echo "configure:1652: checking for $ac_func" >&5 |
1652 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1653 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1654 |
else |
else |
1655 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1656 |
#line 1489 "configure" |
#line 1657 "configure" |
1657 |
#include "confdefs.h" |
#include "confdefs.h" |
1658 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
1659 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
1676 |
|
|
1677 |
; return 0; } |
; return 0; } |
1678 |
EOF |
EOF |
1679 |
if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1680 |
rm -rf conftest* |
rm -rf conftest* |
1681 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
1682 |
else |
else |
1700 |
fi |
fi |
1701 |
done |
done |
1702 |
|
|
1703 |
for ac_func in sbrk gettimeofday |
for ac_func in sysconf times sbrk gettimeofday |
1704 |
do |
do |
1705 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1706 |
echo "configure:1539: checking for $ac_func" >&5 |
echo "configure:1707: checking for $ac_func" >&5 |
1707 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1708 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1709 |
else |
else |
1710 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1711 |
#line 1544 "configure" |
#line 1712 "configure" |
1712 |
#include "confdefs.h" |
#include "confdefs.h" |
1713 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
1714 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
1731 |
|
|
1732 |
; return 0; } |
; return 0; } |
1733 |
EOF |
EOF |
1734 |
if { (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1735 |
rm -rf conftest* |
rm -rf conftest* |
1736 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
1737 |
else |
else |
1755 |
fi |
fi |
1756 |
done |
done |
1757 |
|
|
1758 |
|
cat >> confdefs.h <<\EOF |
1759 |
|
#define HAVE_SYS_ERRLIST 1 |
1760 |
|
EOF |
1761 |
|
|
1762 |
|
cat >> confdefs.h <<\EOF |
1763 |
|
#define HAVE_SYS_NERR 1 |
1764 |
|
EOF |
1765 |
|
|
1766 |
|
cat >> confdefs.h <<\EOF |
1767 |
|
#define HAVE_SYS_SIGLIST 1 |
1768 |
|
EOF |
1769 |
|
|
1770 |
fi |
fi |
1771 |
|
|
1772 |
# For each of these functions, if the host does not provide the |
# For each of these functions, if the host does not provide the |
1826 |
|
|
1827 |
|
|
1828 |
|
|
1829 |
|
case "${host}" in |
1830 |
|
*-*-cygwin*) |
1831 |
|
cat >> confdefs.h <<\EOF |
1832 |
|
#define HAVE_SYS_ERRLIST 1 |
1833 |
|
EOF |
1834 |
|
|
1835 |
|
cat >> confdefs.h <<\EOF |
1836 |
|
#define HAVE_SYS_NERR 1 |
1837 |
|
EOF |
1838 |
|
|
1839 |
|
;; |
1840 |
|
esac |
1841 |
|
|
1842 |
if test -z "${setobjs}"; then |
if test -z "${setobjs}"; then |
1843 |
case "${host}" in |
case "${host}" in |
1844 |
|
|
1895 |
# provides from our shell variables, so that they appear to be |
# provides from our shell variables, so that they appear to be |
1896 |
# missing. |
# missing. |
1897 |
|
|
1898 |
funcs="`echo $funcs | sed -e 's/random//'`" |
# DJ - only if we're *building* cygwin, not just building *with* cygwin |
1899 |
LIBOBJS="$LIBOBJS random.o" |
|
1900 |
vars="`echo $vars | sed -e 's/sys_siglist//'`" |
if test -n "${with_target_subdir}" |
1901 |
checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`" |
then |
1902 |
|
funcs="`echo $funcs | sed -e 's/random//'`" |
1903 |
|
LIBOBJS="$LIBOBJS random.o" |
1904 |
|
vars="`echo $vars | sed -e 's/sys_siglist//'`" |
1905 |
|
checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`" |
1906 |
|
fi |
1907 |
;; |
;; |
1908 |
|
|
1909 |
*-*-mingw32*) |
*-*-mingw32*) |
1910 |
# Under mingw32, sys_nerr and sys_errlist exist, but they are |
# Under mingw32, sys_nerr and sys_errlist exist, but they are |
1911 |
# macros, so the test below won't find them. |
# macros, so the test below won't find them. |
1912 |
vars="`echo $vars | sed -e 's/sys_nerr//' -e 's/sys_errlist//'`" |
libiberty_cv_var_sys_nerr=yes |
1913 |
cat >> confdefs.h <<\EOF |
libiberty_cv_var_sys_errlist=yes |
|
#define HAVE_SYS_NERR 1 |
|
|
EOF |
|
|
|
|
|
cat >> confdefs.h <<\EOF |
|
|
#define HAVE_SYS_ERRLIST 1 |
|
|
EOF |
|
|
|
|
1914 |
;; |
;; |
1915 |
|
|
1916 |
*-*-uwin*) |
*-*-uwin*) |
1921 |
# Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are |
# Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are |
1922 |
# macros (actually, these are imported from a DLL, but the end effect |
# macros (actually, these are imported from a DLL, but the end effect |
1923 |
# is the same), so the test below won't find them. |
# is the same), so the test below won't find them. |
1924 |
cat >> confdefs.h <<\EOF |
libiberty_cv_var_sys_nerr=yes |
1925 |
#define HAVE_SYS_NERR 1 |
libiberty_cv_var_sys_errlist=yes |
|
EOF |
|
|
|
|
|
cat >> confdefs.h <<\EOF |
|
|
#define HAVE_SYS_ERRLIST 1 |
|
|
EOF |
|
|
|
|
1926 |
;; |
;; |
1927 |
|
|
1928 |
esac |
esac |
1930 |
# We haven't set the list of objects yet. Use the standard autoconf |
# We haven't set the list of objects yet. Use the standard autoconf |
1931 |
# tests. This will only work if the compiler works. |
# tests. This will only work if the compiler works. |
1932 |
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
1933 |
echo "configure:1749: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
echo "configure:1934: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
1934 |
|
|
1935 |
ac_ext=c |
ac_ext=c |
1936 |
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
1941 |
|
|
1942 |
cat > conftest.$ac_ext << EOF |
cat > conftest.$ac_ext << EOF |
1943 |
|
|
1944 |
#line 1760 "configure" |
#line 1945 "configure" |
1945 |
#include "confdefs.h" |
#include "confdefs.h" |
1946 |
|
|
1947 |
main(){return(0);} |
main(){return(0);} |
1948 |
EOF |
EOF |
1949 |
if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
1950 |
ac_cv_prog_cc_works=yes |
ac_cv_prog_cc_works=yes |
1951 |
# If we can't run a trivial program, we are probably using a cross compiler. |
# If we can't run a trivial program, we are probably using a cross compiler. |
1952 |
if (./conftest; exit) 2>/dev/null; then |
if (./conftest; exit) 2>/dev/null; then |
1972 |
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } |
1973 |
fi |
fi |
1974 |
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
1975 |
echo "configure:1791: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
echo "configure:1976: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
1976 |
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1977 |
cross_compiling=$ac_cv_prog_cc_cross |
cross_compiling=$ac_cv_prog_cc_cross |
1978 |
|
|
1979 |
for ac_func in $funcs |
for ac_func in $funcs |
1980 |
do |
do |
1981 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
1982 |
echo "configure:1798: checking for $ac_func" >&5 |
echo "configure:1983: checking for $ac_func" >&5 |
1983 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
1984 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
1985 |
else |
else |
1986 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
1987 |
#line 1803 "configure" |
#line 1988 "configure" |
1988 |
#include "confdefs.h" |
#include "confdefs.h" |
1989 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
1990 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
2007 |
|
|
2008 |
; return 0; } |
; return 0; } |
2009 |
EOF |
EOF |
2010 |
if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2011 |
rm -rf conftest* |
rm -rf conftest* |
2012 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
2013 |
else |
else |
2054 |
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
2055 |
# for constant arguments. Useless! |
# for constant arguments. Useless! |
2056 |
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 |
2057 |
echo "configure:1873: checking for working alloca.h" >&5 |
echo "configure:2058: checking for working alloca.h" >&5 |
2058 |
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
2059 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2060 |
else |
else |
2061 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2062 |
#line 1878 "configure" |
#line 2063 "configure" |
2063 |
#include "confdefs.h" |
#include "confdefs.h" |
2064 |
#include <alloca.h> |
#include <alloca.h> |
2065 |
int main() { |
int main() { |
2066 |
char *p = alloca(2 * sizeof(int)); |
char *p = alloca(2 * sizeof(int)); |
2067 |
; return 0; } |
; return 0; } |
2068 |
EOF |
EOF |
2069 |
if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2070 |
rm -rf conftest* |
rm -rf conftest* |
2071 |
ac_cv_header_alloca_h=yes |
ac_cv_header_alloca_h=yes |
2072 |
else |
else |
2087 |
fi |
fi |
2088 |
|
|
2089 |
echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
echo $ac_n "checking for alloca""... $ac_c" 1>&6 |
2090 |
echo "configure:1906: checking for alloca" >&5 |
echo "configure:2091: checking for alloca" >&5 |
2091 |
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
2092 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2093 |
else |
else |
2094 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2095 |
#line 1911 "configure" |
#line 2096 "configure" |
2096 |
#include "confdefs.h" |
#include "confdefs.h" |
2097 |
|
|
2098 |
#ifdef __GNUC__ |
#ifdef __GNUC__ |
2120 |
char *p = (char *) alloca(1); |
char *p = (char *) alloca(1); |
2121 |
; return 0; } |
; return 0; } |
2122 |
EOF |
EOF |
2123 |
if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2124 |
rm -rf conftest* |
rm -rf conftest* |
2125 |
ac_cv_func_alloca_works=yes |
ac_cv_func_alloca_works=yes |
2126 |
else |
else |
2152 |
|
|
2153 |
|
|
2154 |
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 |
2155 |
echo "configure:1971: checking whether alloca needs Cray hooks" >&5 |
echo "configure:2156: checking whether alloca needs Cray hooks" >&5 |
2156 |
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
2157 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2158 |
else |
else |
2159 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2160 |
#line 1976 "configure" |
#line 2161 "configure" |
2161 |
#include "confdefs.h" |
#include "confdefs.h" |
2162 |
#if defined(CRAY) && ! defined(CRAY2) |
#if defined(CRAY) && ! defined(CRAY2) |
2163 |
webecray |
webecray |
2182 |
if test $ac_cv_os_cray = yes; then |
if test $ac_cv_os_cray = yes; then |
2183 |
for ac_func in _getb67 GETB67 getb67; do |
for ac_func in _getb67 GETB67 getb67; do |
2184 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
2185 |
echo "configure:2001: checking for $ac_func" >&5 |
echo "configure:2186: checking for $ac_func" >&5 |
2186 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2187 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2188 |
else |
else |
2189 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2190 |
#line 2006 "configure" |
#line 2191 "configure" |
2191 |
#include "confdefs.h" |
#include "confdefs.h" |
2192 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
2193 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
2210 |
|
|
2211 |
; return 0; } |
; return 0; } |
2212 |
EOF |
EOF |
2213 |
if { (eval echo configure:2029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:2214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2214 |
rm -rf conftest* |
rm -rf conftest* |
2215 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
2216 |
else |
else |
2237 |
fi |
fi |
2238 |
|
|
2239 |
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 |
2240 |
echo "configure:2056: checking stack direction for C alloca" >&5 |
echo "configure:2241: checking stack direction for C alloca" >&5 |
2241 |
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
2242 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2243 |
else |
else |
2245 |
ac_cv_c_stack_direction=0 |
ac_cv_c_stack_direction=0 |
2246 |
else |
else |
2247 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2248 |
#line 2064 "configure" |
#line 2249 "configure" |
2249 |
#include "confdefs.h" |
#include "confdefs.h" |
2250 |
find_stack_direction () |
find_stack_direction () |
2251 |
{ |
{ |
2264 |
exit (find_stack_direction() < 0); |
exit (find_stack_direction() < 0); |
2265 |
} |
} |
2266 |
EOF |
EOF |
2267 |
if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
if { (eval echo configure:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
2268 |
then |
then |
2269 |
ac_cv_c_stack_direction=1 |
ac_cv_c_stack_direction=1 |
2270 |
else |
else |
2289 |
esac |
esac |
2290 |
|
|
2291 |
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 |
2292 |
echo "configure:2108: checking for ANSI C header files" >&5 |
echo "configure:2293: checking for ANSI C header files" >&5 |
2293 |
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
2294 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2295 |
else |
else |
2296 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2297 |
#line 2113 "configure" |
#line 2298 "configure" |
2298 |
#include "confdefs.h" |
#include "confdefs.h" |
2299 |
#include <stdlib.h> |
#include <stdlib.h> |
2300 |
#include <stdarg.h> |
#include <stdarg.h> |
2302 |
#include <float.h> |
#include <float.h> |
2303 |
EOF |
EOF |
2304 |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
2305 |
{ (eval echo configure:2121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
{ (eval echo configure:2306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2306 |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2307 |
if test -z "$ac_err"; then |
if test -z "$ac_err"; then |
2308 |
rm -rf conftest* |
rm -rf conftest* |
2319 |
if test $ac_cv_header_stdc = yes; then |
if test $ac_cv_header_stdc = yes; then |
2320 |
# SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
# SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
2321 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2322 |
#line 2138 "configure" |
#line 2323 "configure" |
2323 |
#include "confdefs.h" |
#include "confdefs.h" |
2324 |
#include <string.h> |
#include <string.h> |
2325 |
EOF |
EOF |
2337 |
if test $ac_cv_header_stdc = yes; then |
if test $ac_cv_header_stdc = yes; then |
2338 |
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
2339 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2340 |
#line 2156 "configure" |
#line 2341 "configure" |
2341 |
#include "confdefs.h" |
#include "confdefs.h" |
2342 |
#include <stdlib.h> |
#include <stdlib.h> |
2343 |
EOF |
EOF |
2358 |
: |
: |
2359 |
else |
else |
2360 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2361 |
#line 2177 "configure" |
#line 2362 "configure" |
2362 |
#include "confdefs.h" |
#include "confdefs.h" |
2363 |
#include <ctype.h> |
#include <ctype.h> |
2364 |
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
2369 |
exit (0); } |
exit (0); } |
2370 |
|
|
2371 |
EOF |
EOF |
2372 |
if { (eval echo configure:2188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
2373 |
then |
then |
2374 |
: |
: |
2375 |
else |
else |
2393 |
fi |
fi |
2394 |
|
|
2395 |
echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
echo $ac_n "checking for pid_t""... $ac_c" 1>&6 |
2396 |
echo "configure:2212: checking for pid_t" >&5 |
echo "configure:2397: checking for pid_t" >&5 |
2397 |
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then |
2398 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2399 |
else |
else |
2400 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2401 |
#line 2217 "configure" |
#line 2402 "configure" |
2402 |
#include "confdefs.h" |
#include "confdefs.h" |
2403 |
#include <sys/types.h> |
#include <sys/types.h> |
2404 |
#if STDC_HEADERS |
#if STDC_HEADERS |
2427 |
|
|
2428 |
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` |
2429 |
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 |
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 |
2430 |
echo "configure:2246: checking for vfork.h" >&5 |
echo "configure:2431: checking for vfork.h" >&5 |
2431 |
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2432 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2433 |
else |
else |
2434 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2435 |
#line 2251 "configure" |
#line 2436 "configure" |
2436 |
#include "confdefs.h" |
#include "confdefs.h" |
2437 |
#include <vfork.h> |
#include <vfork.h> |
2438 |
EOF |
EOF |
2439 |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
2440 |
{ (eval echo configure:2256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
{ (eval echo configure:2441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2441 |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2442 |
if test -z "$ac_err"; then |
if test -z "$ac_err"; then |
2443 |
rm -rf conftest* |
rm -rf conftest* |
2462 |
fi |
fi |
2463 |
|
|
2464 |
echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
echo $ac_n "checking for working vfork""... $ac_c" 1>&6 |
2465 |
echo "configure:2281: checking for working vfork" >&5 |
echo "configure:2466: checking for working vfork" >&5 |
2466 |
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then |
2467 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2468 |
else |
else |
2469 |
if test "$cross_compiling" = yes; then |
if test "$cross_compiling" = yes; then |
2470 |
echo $ac_n "checking for vfork""... $ac_c" 1>&6 |
echo $ac_n "checking for vfork""... $ac_c" 1>&6 |
2471 |
echo "configure:2287: checking for vfork" >&5 |
echo "configure:2472: checking for vfork" >&5 |
2472 |
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then |
2473 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2474 |
else |
else |
2475 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2476 |
#line 2292 "configure" |
#line 2477 "configure" |
2477 |
#include "confdefs.h" |
#include "confdefs.h" |
2478 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
2479 |
which can conflict with char vfork(); below. */ |
which can conflict with char vfork(); below. */ |
2496 |
|
|
2497 |
; return 0; } |
; return 0; } |
2498 |
EOF |
EOF |
2499 |
if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2500 |
rm -rf conftest* |
rm -rf conftest* |
2501 |
eval "ac_cv_func_vfork=yes" |
eval "ac_cv_func_vfork=yes" |
2502 |
else |
else |
2518 |
ac_cv_func_vfork_works=$ac_cv_func_vfork |
ac_cv_func_vfork_works=$ac_cv_func_vfork |
2519 |
else |
else |
2520 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2521 |
#line 2337 "configure" |
#line 2522 "configure" |
2522 |
#include "confdefs.h" |
#include "confdefs.h" |
2523 |
/* Thanks to Paul Eggert for this test. */ |
/* Thanks to Paul Eggert for this test. */ |
2524 |
#include <stdio.h> |
#include <stdio.h> |
2613 |
} |
} |
2614 |
} |
} |
2615 |
EOF |
EOF |
2616 |
if { (eval echo configure:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
2617 |
then |
then |
2618 |
ac_cv_func_vfork_works=yes |
ac_cv_func_vfork_works=yes |
2619 |
else |
else |
2640 |
fi |
fi |
2641 |
for v in $vars; do |
for v in $vars; do |
2642 |
echo $ac_n "checking for $v""... $ac_c" 1>&6 |
echo $ac_n "checking for $v""... $ac_c" 1>&6 |
2643 |
echo "configure:2459: checking for $v" >&5 |
echo "configure:2644: checking for $v" >&5 |
2644 |
if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then |
2645 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2646 |
else |
else |
2647 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2648 |
#line 2464 "configure" |
#line 2649 "configure" |
2649 |
#include "confdefs.h" |
#include "confdefs.h" |
2650 |
int *p; |
int *p; |
2651 |
int main() { |
int main() { |
2652 |
extern int $v; p = &$v; |
extern int $v; p = &$v; |
2653 |
; return 0; } |
; return 0; } |
2654 |
EOF |
EOF |
2655 |
if { (eval echo configure:2471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2656 |
rm -rf conftest* |
rm -rf conftest* |
2657 |
eval "libiberty_cv_var_$v=yes" |
eval "libiberty_cv_var_$v=yes" |
2658 |
else |
else |
2678 |
for ac_func in $checkfuncs |
for ac_func in $checkfuncs |
2679 |
do |
do |
2680 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
2681 |
echo "configure:2497: checking for $ac_func" >&5 |
echo "configure:2682: checking for $ac_func" >&5 |
2682 |
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2683 |
|
echo $ac_n "(cached) $ac_c" 1>&6 |
2684 |
|
else |
2685 |
|
cat > conftest.$ac_ext <<EOF |
2686 |
|
#line 2687 "configure" |
2687 |
|
#include "confdefs.h" |
2688 |
|
/* System header to define __stub macros and hopefully few prototypes, |
2689 |
|
which can conflict with char $ac_func(); below. */ |
2690 |
|
#include <assert.h> |
2691 |
|
/* Override any gcc2 internal prototype to avoid an error. */ |
2692 |
|
/* We use char because int might match the return type of a gcc2 |
2693 |
|
builtin and then its argument prototype would still apply. */ |
2694 |
|
char $ac_func(); |
2695 |
|
|
2696 |
|
int main() { |
2697 |
|
|
2698 |
|
/* The GNU C library defines this for functions which it implements |
2699 |
|
to always fail with ENOSYS. Some functions are actually named |
2700 |
|
something starting with __ and the normal name is an alias. */ |
2701 |
|
#if defined (__stub_$ac_func) || defined (__stub___$ac_func) |
2702 |
|
choke me |
2703 |
|
#else |
2704 |
|
$ac_func(); |
2705 |
|
#endif |
2706 |
|
|
2707 |
|
; return 0; } |
2708 |
|
EOF |
2709 |
|
if { (eval echo configure:2710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2710 |
|
rm -rf conftest* |
2711 |
|
eval "ac_cv_func_$ac_func=yes" |
2712 |
|
else |
2713 |
|
echo "configure: failed program was:" >&5 |
2714 |
|
cat conftest.$ac_ext >&5 |
2715 |
|
rm -rf conftest* |
2716 |
|
eval "ac_cv_func_$ac_func=no" |
2717 |
|
fi |
2718 |
|
rm -f conftest* |
2719 |
|
fi |
2720 |
|
|
2721 |
|
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then |
2722 |
|
echo "$ac_t""yes" 1>&6 |
2723 |
|
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` |
2724 |
|
cat >> confdefs.h <<EOF |
2725 |
|
#define $ac_tr_func 1 |
2726 |
|
EOF |
2727 |
|
|
2728 |
|
else |
2729 |
|
echo "$ac_t""no" 1>&6 |
2730 |
|
fi |
2731 |
|
done |
2732 |
|
|
2733 |
|
fi |
2734 |
|
|
2735 |
|
for ac_hdr in unistd.h |
2736 |
|
do |
2737 |
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` |
2738 |
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 |
2739 |
|
echo "configure:2740: checking for $ac_hdr" >&5 |
2740 |
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
2741 |
|
echo $ac_n "(cached) $ac_c" 1>&6 |
2742 |
|
else |
2743 |
|
cat > conftest.$ac_ext <<EOF |
2744 |
|
#line 2745 "configure" |
2745 |
|
#include "confdefs.h" |
2746 |
|
#include <$ac_hdr> |
2747 |
|
EOF |
2748 |
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" |
2749 |
|
{ (eval echo configure:2750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
2750 |
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2751 |
|
if test -z "$ac_err"; then |
2752 |
|
rm -rf conftest* |
2753 |
|
eval "ac_cv_header_$ac_safe=yes" |
2754 |
|
else |
2755 |
|
echo "$ac_err" >&5 |
2756 |
|
echo "configure: failed program was:" >&5 |
2757 |
|
cat conftest.$ac_ext >&5 |
2758 |
|
rm -rf conftest* |
2759 |
|
eval "ac_cv_header_$ac_safe=no" |
2760 |
|
fi |
2761 |
|
rm -f conftest* |
2762 |
|
fi |
2763 |
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then |
2764 |
|
echo "$ac_t""yes" 1>&6 |
2765 |
|
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` |
2766 |
|
cat >> confdefs.h <<EOF |
2767 |
|
#define $ac_tr_hdr 1 |
2768 |
|
EOF |
2769 |
|
|
2770 |
|
else |
2771 |
|
echo "$ac_t""no" 1>&6 |
2772 |
|
fi |
2773 |
|
done |
2774 |
|
|
2775 |
|
for ac_func in getpagesize |
2776 |
|
do |
2777 |
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 |
2778 |
|
echo "configure:2779: checking for $ac_func" >&5 |
2779 |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
2780 |
echo $ac_n "(cached) $ac_c" 1>&6 |
echo $ac_n "(cached) $ac_c" 1>&6 |
2781 |
else |
else |
2782 |
cat > conftest.$ac_ext <<EOF |
cat > conftest.$ac_ext <<EOF |
2783 |
#line 2502 "configure" |
#line 2784 "configure" |
2784 |
#include "confdefs.h" |
#include "confdefs.h" |
2785 |
/* System header to define __stub macros and hopefully few prototypes, |
/* System header to define __stub macros and hopefully few prototypes, |
2786 |
which can conflict with char $ac_func(); below. */ |
which can conflict with char $ac_func(); below. */ |
2803 |
|
|
2804 |
; return 0; } |
; return 0; } |
2805 |
EOF |
EOF |
2806 |
if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
2807 |
rm -rf conftest* |
rm -rf conftest* |
2808 |
eval "ac_cv_func_$ac_func=yes" |
eval "ac_cv_func_$ac_func=yes" |
2809 |
else |
else |
2827 |
fi |
fi |
2828 |
done |
done |
2829 |
|
|
2830 |
|
echo $ac_n "checking for working mmap""... $ac_c" 1>&6 |
2831 |
|
echo "configure:2832: checking for working mmap" >&5 |
2832 |
|
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
2833 |
|
echo $ac_n "(cached) $ac_c" 1>&6 |
2834 |
|
else |
2835 |
|
if test "$cross_compiling" = yes; then |
2836 |
|
ac_cv_func_mmap_fixed_mapped=no |
2837 |
|
else |
2838 |
|
cat > conftest.$ac_ext <<EOF |
2839 |
|
#line 2840 "configure" |
2840 |
|
#include "confdefs.h" |
2841 |
|
|
2842 |
|
/* Thanks to Mike Haertel and Jim Avera for this test. |
2843 |
|
Here is a matrix of mmap possibilities: |
2844 |
|
mmap private not fixed |
2845 |
|
mmap private fixed at somewhere currently unmapped |
2846 |
|
mmap private fixed at somewhere already mapped |
2847 |
|
mmap shared not fixed |
2848 |
|
mmap shared fixed at somewhere currently unmapped |
2849 |
|
mmap shared fixed at somewhere already mapped |
2850 |
|
For private mappings, we should verify that changes cannot be read() |
2851 |
|
back from the file, nor mmap's back from the file at a different |
2852 |
|
address. (There have been systems where private was not correctly |
2853 |
|
implemented like the infamous i386 svr4.0, and systems where the |
2854 |
|
VM page cache was not coherent with the filesystem buffer cache |
2855 |
|
like early versions of FreeBSD and possibly contemporary NetBSD.) |
2856 |
|
For shared mappings, we should conversely verify that changes get |
2857 |
|
propogated back to all the places they're supposed to be. |
2858 |
|
|
2859 |
|
Grep wants private fixed already mapped. |
2860 |
|
The main things grep needs to know about mmap are: |
2861 |
|
* does it exist and is it safe to write into the mmap'd area |
2862 |
|
* how to use it (BSD variants) */ |
2863 |
|
#include <sys/types.h> |
2864 |
|
#include <fcntl.h> |
2865 |
|
#include <sys/mman.h> |
2866 |
|
|
2867 |
|
/* This mess was copied from the GNU getpagesize.h. */ |
2868 |
|
#ifndef HAVE_GETPAGESIZE |
2869 |
|
# ifdef HAVE_UNISTD_H |
2870 |
|
# include <unistd.h> |
2871 |
|
# endif |
2872 |
|
|
2873 |
|
/* Assume that all systems that can run configure have sys/param.h. */ |
2874 |
|
# ifndef HAVE_SYS_PARAM_H |
2875 |
|
# define HAVE_SYS_PARAM_H 1 |
2876 |
|
# endif |
2877 |
|
|
2878 |
|
# ifdef _SC_PAGESIZE |
2879 |
|
# define getpagesize() sysconf(_SC_PAGESIZE) |
2880 |
|
# else /* no _SC_PAGESIZE */ |
2881 |
|
# ifdef HAVE_SYS_PARAM_H |
2882 |
|
# include <sys/param.h> |
2883 |
|
# ifdef EXEC_PAGESIZE |
2884 |
|
# define getpagesize() EXEC_PAGESIZE |
2885 |
|
# else /* no EXEC_PAGESIZE */ |
2886 |
|
# ifdef NBPG |
2887 |
|
# define getpagesize() NBPG * CLSIZE |
2888 |
|
# ifndef CLSIZE |
2889 |
|
# define CLSIZE 1 |
2890 |
|
# endif /* no CLSIZE */ |
2891 |
|
# else /* no NBPG */ |
2892 |
|
# ifdef NBPC |
2893 |
|
# define getpagesize() NBPC |
2894 |
|
# else /* no NBPC */ |
2895 |
|
# ifdef PAGESIZE |
2896 |
|
# define getpagesize() PAGESIZE |
2897 |
|
# endif /* PAGESIZE */ |
2898 |
|
# endif /* no NBPC */ |
2899 |
|
# endif /* no NBPG */ |
2900 |
|
# endif /* no EXEC_PAGESIZE */ |
2901 |
|
# else /* no HAVE_SYS_PARAM_H */ |
2902 |
|
# define getpagesize() 8192 /* punt totally */ |
2903 |
|
# endif /* no HAVE_SYS_PARAM_H */ |
2904 |
|
# endif /* no _SC_PAGESIZE */ |
2905 |
|
|
2906 |
|
#endif /* no HAVE_GETPAGESIZE */ |
2907 |
|
|
2908 |
|
#ifdef __cplusplus |
2909 |
|
extern "C" { void *malloc(unsigned); } |
2910 |
|
#else |
2911 |
|
char *malloc(); |
2912 |
|
#endif |
2913 |
|
|
2914 |
|
int |
2915 |
|
main() |
2916 |
|
{ |
2917 |
|
char *data, *data2, *data3; |
2918 |
|
int i, pagesize; |
2919 |
|
int fd; |
2920 |
|
|
2921 |
|
pagesize = getpagesize(); |
2922 |
|
|
2923 |
|
/* |
2924 |
|
* First, make a file with some known garbage in it. |
2925 |
|
*/ |
2926 |
|
data = malloc(pagesize); |
2927 |
|
if (!data) |
2928 |
|
exit(1); |
2929 |
|
for (i = 0; i < pagesize; ++i) |
2930 |
|
*(data + i) = rand(); |
2931 |
|
umask(0); |
2932 |
|
fd = creat("conftestmmap", 0600); |
2933 |
|
if (fd < 0) |
2934 |
|
exit(1); |
2935 |
|
if (write(fd, data, pagesize) != pagesize) |
2936 |
|
exit(1); |
2937 |
|
close(fd); |
2938 |
|
|
2939 |
|
/* |
2940 |
|
* Next, try to mmap the file at a fixed address which |
2941 |
|
* already has something else allocated at it. If we can, |
2942 |
|
* also make sure that we see the same garbage. |
2943 |
|
*/ |
2944 |
|
fd = open("conftestmmap", O_RDWR); |
2945 |
|
if (fd < 0) |
2946 |
|
exit(1); |
2947 |
|
data2 = malloc(2 * pagesize); |
2948 |
|
if (!data2) |
2949 |
|
exit(1); |
2950 |
|
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); |
2951 |
|
if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, |
2952 |
|
MAP_PRIVATE | MAP_FIXED, fd, 0L)) |
2953 |
|
exit(1); |
2954 |
|
for (i = 0; i < pagesize; ++i) |
2955 |
|
if (*(data + i) != *(data2 + i)) |
2956 |
|
exit(1); |
2957 |
|
|
2958 |
|
/* |
2959 |
|
* Finally, make sure that changes to the mapped area |
2960 |
|
* do not percolate back to the file as seen by read(). |
2961 |
|
* (This is a bug on some variants of i386 svr4.0.) |
2962 |
|
*/ |
2963 |
|
for (i = 0; i < pagesize; ++i) |
2964 |
|
*(data2 + i) = *(data2 + i) + 1; |
2965 |
|
data3 = malloc(pagesize); |
2966 |
|
if (!data3) |
2967 |
|
exit(1); |
2968 |
|
if (read(fd, data3, pagesize) != pagesize) |
2969 |
|
exit(1); |
2970 |
|
for (i = 0; i < pagesize; ++i) |
2971 |
|
if (*(data + i) != *(data3 + i)) |
2972 |
|
exit(1); |
2973 |
|
close(fd); |
2974 |
|
unlink("conftestmmap"); |
2975 |
|
exit(0); |
2976 |
|
} |
2977 |
|
|
2978 |
|
EOF |
2979 |
|
if { (eval echo configure:2980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
2980 |
|
then |
2981 |
|
ac_cv_func_mmap_fixed_mapped=yes |
2982 |
|
else |
2983 |
|
echo "configure: failed program was:" >&5 |
2984 |
|
cat conftest.$ac_ext >&5 |
2985 |
|
rm -fr conftest* |
2986 |
|
ac_cv_func_mmap_fixed_mapped=no |
2987 |
|
fi |
2988 |
|
rm -fr conftest* |
2989 |
|
fi |
2990 |
|
|
2991 |
|
fi |
2992 |
|
|
2993 |
|
echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 |
2994 |
|
if test $ac_cv_func_mmap_fixed_mapped = yes; then |
2995 |
|
cat >> confdefs.h <<\EOF |
2996 |
|
#define HAVE_MMAP 1 |
2997 |
|
EOF |
2998 |
|
|
2999 |
|
fi |
3000 |
|
|
3001 |
|
|
3002 |
|
echo $ac_n "checking for working strncmp""... $ac_c" 1>&6 |
3003 |
|
echo "configure:3004: checking for working strncmp" >&5 |
3004 |
|
if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then |
3005 |
|
echo $ac_n "(cached) $ac_c" 1>&6 |
3006 |
|
else |
3007 |
|
if test "$cross_compiling" = yes; then |
3008 |
|
ac_cv_func_strncmp_works=no |
3009 |
|
else |
3010 |
|
cat > conftest.$ac_ext <<EOF |
3011 |
|
#line 3012 "configure" |
3012 |
|
#include "confdefs.h" |
3013 |
|
|
3014 |
|
/* Test by Jim Wilson and Kaveh Ghazi. |
3015 |
|
Check whether strncmp reads past the end of its string parameters. */ |
3016 |
|
#include <sys/types.h> |
3017 |
|
|
3018 |
|
#ifdef HAVE_FCNTL_H |
3019 |
|
#include <fcntl.h> |
3020 |
|
#endif |
3021 |
|
|
3022 |
|
#ifdef HAVE_SYS_MMAN_H |
3023 |
|
#include <sys/mman.h> |
3024 |
|
#endif |
3025 |
|
|
3026 |
|
#ifndef MAP_ANON |
3027 |
|
#ifdef MAP_ANONYMOUS |
3028 |
|
#define MAP_ANON MAP_ANONYMOUS |
3029 |
|
#else |
3030 |
|
#define MAP_ANON MAP_FILE |
3031 |
|
#endif |
3032 |
|
#endif |
3033 |
|
|
3034 |
|
#ifndef MAP_FILE |
3035 |
|
#define MAP_FILE 0 |
3036 |
|
#endif |
3037 |
|
#ifndef O_RDONLY |
3038 |
|
#define O_RDONLY 0 |
3039 |
|
#endif |
3040 |
|
|
3041 |
|
#define MAP_LEN 0x10000 |
3042 |
|
|
3043 |
|
main () |
3044 |
|
{ |
3045 |
|
#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE) |
3046 |
|
char *p; |
3047 |
|
int dev_zero; |
3048 |
|
|
3049 |
|
dev_zero = open ("/dev/zero", O_RDONLY); |
3050 |
|
if (dev_zero < 0) |
3051 |
|
exit (1); |
3052 |
|
|
3053 |
|
p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE, |
3054 |
|
MAP_ANON|MAP_PRIVATE, dev_zero, 0); |
3055 |
|
if (p == (char *)-1) |
3056 |
|
exit (2); |
3057 |
|
else |
3058 |
|
{ |
3059 |
|
char *string = "__si_type_info"; |
3060 |
|
char *q = (char *) p + MAP_LEN - strlen (string) - 2; |
3061 |
|
char *r = (char *) p + 0xe; |
3062 |
|
|
3063 |
|
strcpy (q, string); |
3064 |
|
strcpy (r, string); |
3065 |
|
strncmp (r, q, 14); |
3066 |
|
} |
3067 |
|
#endif /* HAVE_MMAP || HAVE_MMAP_ANYWHERE */ |
3068 |
|
exit (0); |
3069 |
|
} |
3070 |
|
|
3071 |
|
EOF |
3072 |
|
if { (eval echo configure:3073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
3073 |
|
then |
3074 |
|
ac_cv_func_strncmp_works=yes |
3075 |
|
else |
3076 |
|
echo "configure: failed program was:" >&5 |
3077 |
|
cat conftest.$ac_ext >&5 |
3078 |
|
rm -fr conftest* |
3079 |
|
ac_cv_func_strncmp_works=no |
3080 |
|
fi |
3081 |
|
rm -fr conftest* |
3082 |
fi |
fi |
3083 |
|
|
3084 |
|
rm -f core core.* *.core |
3085 |
|
fi |
3086 |
|
|
3087 |
|
echo "$ac_t""$ac_cv_func_strncmp_works" 1>&6 |
3088 |
|
if test $ac_cv_func_strncmp_works = no ; then |
3089 |
|
LIBOBJS="$LIBOBJS strncmp.o" |
3090 |
|
fi |
3091 |
|
|
3092 |
|
|
3093 |
# Install a library built with a cross compiler in $(tooldir) rather |
# Install a library built with a cross compiler in $(tooldir) rather |
3094 |
# than $(libdir). |
# than $(libdir). |
3095 |
if test -z "${with_cross_host}"; then |
if test -z "${with_cross_host}"; then |
3246 |
s%@AR@%$AR%g |
s%@AR@%$AR%g |
3247 |
s%@RANLIB@%$RANLIB%g |
s%@RANLIB@%$RANLIB%g |
3248 |
s%@CC@%$CC%g |
s%@CC@%$CC%g |
3249 |
|
s%@ac_libiberty_warn_cflags@%$ac_libiberty_warn_cflags%g |
3250 |
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
3251 |
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g |
3252 |
s%@INSTALL_DATA@%$INSTALL_DATA%g |
s%@INSTALL_DATA@%$INSTALL_DATA%g |