1 --- Configure.orig 2007-04-08 22:19:09.000000000 -0400
2 +++ Configure 2007-04-09 02:34:02.000000000 -0400
4 : Possible local library directories to search.
5 loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
6 loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
9 : general looking path for locating libraries
10 glibpth="/lib /usr/lib $xlibpth"
11 @@ -1981,6 +1982,30 @@
15 +: figure out sizes of things with just compile tests
16 +: based on AC_CHECK_SIZEOF from autoconf
21 + echo "$sizeincludes" > try.c
22 + echo "typedef \$type ac__type_sizeof_;" > try.c
23 + echo "int main() {" >> try.c
24 + echo "static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= \$size)];" >> try.c
25 + echo "test_array [0] = 0; return 0;}" >> try.c
26 + if \$cc $cflags -c try.c >/dev/null 2>&1; then
30 + if test \$size -gt 20; then
34 + size=\`expr \$size + 1\`
39 : now set up to do reads with possible shell escape and default assignment
42 @@ -4617,7 +4642,18 @@
43 for thisdir in $libpth $xlibpth; do
44 test -d $thisdir && libspath="$libspath $thisdir"
46 +echo 'main(){}' > try.c
47 for thislib in $libswanted; do
48 + printf "Checking for -l$thislib ... " >&4
49 + if $cc $cflags $ldflags -l$thislib try.c >/dev/null 2>&1; then
51 + dflt="$dflt -l$thislib"
52 + libsfiles="$libsfiles lib${thislib}.so"
53 + libsfound="$libsfound /usr/lib/lib${thislib}.so"
58 for thisdir in $libspath; do
60 if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
62 rp="You have a problem. Shall I abort Configure"
65 + # we dont care how it executed, just that it compiled
68 echo "I can't compile the test program." >>try.msg
69 rp="You have a BIG problem. Shall I abort Configure"
70 @@ -5182,23 +5220,20 @@
73 echo "Checking to see how big your integers are..." >&4
82 - printf("intsize=%d;\n", (int)sizeof(int));
83 - printf("longsize=%d;\n", (int)sizeof(long));
84 - printf("shortsize=%d;\n", (int)sizeof(short));
89 - if eval $compile_ok && $run ./try > /dev/null; then
104 + if test "X$intsize" != X -a "X$longsize" != X -a "X$shortsize" != X; then
105 echo "Your integers are $intsize bytes long."
106 echo "Your long integers are $longsize bytes long."
107 echo "Your short integers are $shortsize bytes long."
108 @@ -5225,7 +5260,6 @@
114 : check for long long
116 @@ -5246,19 +5280,11 @@
117 : check for length of long long
118 case "${d_longlong}${longlongsize}" in
121 - echo "Checking to see how big your long longs are..." >&4
122 - $cat >try.c <<'EOCP'
126 - printf("%d\n", (int)sizeof(long long));
131 - if eval $compile_ok; then
132 - longlongsize=`$run ./try`
135 + longlongsize="$size"
137 + if test "X$longlongsize" != X; then
138 echo "Your long longs are $longlongsize bytes long."
141 @@ -5572,21 +5598,10 @@
142 case "$doublesize" in
144 echo "Checking to see how big your double precision numbers are..." >&4
153 - printf("%d\n", (int)sizeof(double));
158 - if eval $compile_ok; then
159 - doublesize=`$run ./try`
163 + if test "X$doublesize" != X; then
164 echo "Your double is $doublesize bytes long."
167 @@ -5620,17 +5635,10 @@
170 echo "Checking to see how big your long doubles are..." >&4
171 - $cat >try.c <<'EOCP'
175 - printf("%d\n", sizeof(long double));
180 - if eval $compile; then
181 - longdblsize=`$run ./try`
184 + longdblsize="$size"
185 + if test "X$longdblsize" != X; then
186 echo "Your long doubles are $longdblsize bytes long."
189 @@ -6268,25 +6276,13 @@
191 echo "Checking to see how big your pointers are..." >&4
192 if test "$voidflags" -gt 7; then
193 - echo '#define VOID_PTR char *' > try.c
196 - echo '#define VOID_PTR void *' > try.c
199 - $cat >>try.c <<EOCP
207 - printf("%d\n", (int)sizeof(VOID_PTR));
212 - if eval $compile_ok; then
213 - ptrsize=`$run ./try`
216 + if test "X$ptrsize" != X; then
217 echo "Your pointers are $ptrsize bytes long."
220 @@ -8837,18 +8833,10 @@
223 echo "Checking to see how big your file offsets are..." >&4
225 -#include <sys/types.h>
229 - printf("%d\n", (int)sizeof($lseektype));
234 -if eval $compile_ok; then
235 - lseeksize=`$run ./try`
239 +if test "X$lseeksize" != X; then
240 echo "Your file offsets are $lseeksize bytes long."
243 @@ -8871,21 +8859,10 @@
246 echo "Checking the size of $zzz..." >&4
248 -#include <sys/types.h>
255 - printf("%d\n", (int)sizeof($fpostype));
260 -if eval $compile_ok; then
265 +if test "X$yyy" != X; then
268 echo "(I can't execute the test program--guessing $fpossize.)" >&4
269 @@ -8953,18 +8930,10 @@
270 if $test -f uselargefiles.cbu; then
272 echo "Rechecking to see how big your file offsets are..." >&4
274 -#include <sys/types.h>
278 - printf("%d\n", (int)sizeof($lseektype));
283 - if eval $compile_ok; then
284 - lseeksize=`$run ./try`
288 + if test "X$lseeksize" != X; then
289 $echo "Your file offsets are now $lseeksize bytes long."
292 @@ -14590,22 +14559,10 @@
295 echo "Checking to see how big your characters are (hey, you never know)..." >&4
304 - printf("%d\n", (int)sizeof(char));
309 - if eval $compile_ok; then
315 + if test "X$dflt" = X; then
317 echo "(I can't seem to compile the test program. Guessing...)"
319 @@ -17430,6 +17387,24 @@
324 +short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
325 +short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
326 +void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
327 +short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
328 +short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
329 +void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
330 +int main() { _ascii (); _ebcdic (); return 0; }
332 + if $cc $cflags -c try.c -o try.o; then
333 + if grep BIGenDianSyS try.o >/dev/null; then
336 + if grep LiTTleEnDian try.o >/dev/null; then
342 (I can't seem to compile the test program. Guessing big-endian...)
344 @@ -17753,6 +17728,13 @@
346 if eval $compile_ok; then
348 + if test "X$dflt" = X; then
349 + if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
350 + dflt='__alignof__(long double)'
352 + dflt='__alignof__(double)'
357 echo "(I can't seem to compile the test program...)"
358 @@ -18475,21 +18457,10 @@
361 echo "Checking the size of $zzz..." >&4
363 -#include <sys/types.h>
370 - printf("%d\n", (int)sizeof($gidtype));
375 -if eval $compile_ok; then
380 +if test "X$yyy" != X; then
383 echo "(I can't execute the test program--guessing $gidsize.)" >&4
384 @@ -19659,21 +19630,10 @@
387 echo "Checking the size of $zzz..." >&4
389 -#include <sys/types.h>
396 - printf("%d\n", (int)sizeof($sizetype));
401 -if eval $compile_ok; then
406 +if test "X$yyy" != X; then
409 echo "(I can't execute the test program--guessing $sizesize.)" >&4