Don't you get any error message telling you what goes wrong? |
Besides:
1 2
|
configure:3798: WARNING: Assuming zlib is available
configure:3913: error: zlib >= 1.2.3 is required
|
. no
Is this something you put there yourself? |
Yes.
I was able to run a lot of tests today using my own conftest and came to conclusion that the two most likely responsible lines are these two:
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
.
if (sscanf(zlibver, "%d.%d.%d", &zlib_major_version, &zlib_minor_version, &zlib_micro_version) != 3)
placing these two printf:
printf ("major.minor.micro: %d.%d.%d\n");
..
printf ("zlib_major_version.zlib_minor_version.zlib_micro_version: %d.%d.%d\n");
I receive this weird output:
major.minor.micro: 141205512.134515000.-143699968
zlib_major_version.zlib_minor_version.zlib_micro_version: 141205512.134515000.-143699968
..which seems weird.
This causes the execution of the the third if clause:
1 2 3 4 5 6 7
|
if ((zlib_major_version > major) ||
((zlib_major_version == major) && (zlib_minor_version > minor)) ||
((zlib_major_version == major) && (zlib_minor_version == minor) && (zlib_micro_version >= micro)))
{
printf ("BOTO3");
return 0;
}
|
However, thinking a bit more, it makes no difference, as these identical, weird triple numbers also satisfies the third comparison inside the if, as it would if the number versions were correct.
So the real problem might be beyond the c code, back in the shell script code.
P.S:I had to make a number of small modifications to be able to run my own conftest without shell script code.
The most important was probably this:
tmp_version = my_strdup("$min_zlib_version");
tmp_version = my_strdup("$1.2.3");
I executed an echo in the configure script that revealed that
$min_zlib_version
really evaluates to 1.2.3, as it should.
So it doesn't there is a problem with
tmp_version
or
zlibver
, which makes even weird these strange numbers being printed in the zlib_major_version, major etc, variables.
***RESUME*** While it appears to be a bug in the two sscanf line of codes, they would not be causing the issue, even by luck. The problem would lie ahead, back in the shell script code. However, as my own conftest code has to be a bit different so to allow me to execute it, I cannot be 100% sure.