Page 1 of 1

Incomplete configure (autoconfig)

Posted: Fri Jan 30, 2009 5:37 am
by AndrewAPrice
I'm just wondering, when I call configure (the autoconfig script) and it's checking my system, why do some things say "no" yet the the program still compiles.

e.g.

Code: Select all

checking for sys/file.h... yes
checking for sys/param.h... yes
checking for limits.h... yes
checking for stdlib.h... yes
checking for malloc.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for time.h... yes
checking for sys/resource.h... yes
checking for sys/stat.h... yes
checking for sys/mman.h... yes
checking for fcntl.h... yes
checking for alloca.h... yes
checking for sys/pstat.h... no
checking for sys/sysmp.h... no
checking for sys/sysinfo.h... no
checking for machine/hal_sysinfo.h... no
checking for sys/table.h... no
checking for sys/sysctl.h... no
checking for sys/systemcfg.h... no
checking for stdint.h... yes
checking for stdio_ext.h... no
Why would it check for "sys/pstat.h" if it didn't depend on it? Yet it compiles fine without it. Does the code change to adapt to not having that file?

I've noticed some other things fail as well, like checking for compiler features or certain functions, yet it still builds.

How are these tests performed:

Code: Select all

checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
By parsing the headers or compiling sample code? (which seems like a lot)

Also, it determined I had a functioning C compiler, then a while later I saw:

Code: Select all

checking for int... yes
!

Re: Incomplete configure (autoconfig)

Posted: Fri Jan 30, 2009 5:55 am
by Combuster
*recalls gentoo spurting out "removing useless checks" messages prior to calling configure*

Re: Incomplete configure (autoconfig)

Posted: Fri Jan 30, 2009 5:58 am
by Solar
MessiahAndrw wrote:Does the code change to adapt to not having that file?
Exactly.
How are these tests performed:
You will find a file "config.log" in your configure directory, which has additional information. This is especially useful if your configure fails, because the error message the configure script gives you might not really reflect the error that has happened...

Re: Incomplete configure (autoconfig)

Posted: Fri Jan 30, 2009 1:36 pm
by bewing
How are these tests performed:
...

By parsing the headers or compiling sample code? (which seems like a lot)
When a configure script tests for include files and libraries, it uses the "test" command -- just letting the shell determine if the file exists.

For individual compiler features, like the ones you posted -- yes, the configure script creates a tiny little .c program for each feature and compiles it with the compiler that it already detected, and verifies the output. Yes, it IS a lot. Why do you think configure scripts are so slow? :wink: