autoconf trouble

Enrico Weigelt weigelt at metux.de
Mon Sep 12 10:58:06 PDT 2005


Hi folks,


Here are some ideas for dealing with problem of interface detection
or interface dependent compilation: (ie. w/ fchown()):

a)
Some stuff is always needed - won't build w/o it. That are just 
dependencies. we have nothing to define here, or anything else.
We simply 'query' for that interface, and abort if missing.

b) 
Sometimes we may choose between several interfaces for some 
functionality. We take the "best" interface we find (just by
giving them an order). If none of them is available, we must abort.

c) 
There are some optional features, which *can* be enabled, if certain
dependencies are fulfilled (aka. required interfaces existing).
If we try to enable one without having the right interface, abort.


Whether our target environment provides a certain interface, isn't
guessed by the configure script anylonger. Instead we use a system-wide,
which maybe filled from some autoconfig tool or maintained by hand.

The first case (a) can be written like this in the build.conf file:

    ## we need to have printf()
    require-interface:		libc/sysv7/printf
    
    ## we like to have fchwon(), but we can live without it
    try-interface:		syscall/srv4/fchown

By the "require-interface" line, we *need* printf. We define 
HAVE_INTERFACE_LIBC_SYSV7_PRINTF for it.

With the "try-interface" statement asks for the fchown() syscall 
and defines HAVE_INTERFACE_SYSCALL_SRV4_FCHOWN if its found.


That's all for the first case, which isn't complex. I have to 
think a while about the other ones.


cu
-- 
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux IT service
  phone:     +49 36207 519931         www:       http://www.metux.de/
  fax:       +49 36207 519932         email:     contact at metux.de
---------------------------------------------------------------------
  Realtime Forex/Stock Exchange trading powered by postgresSQL :))
                                            http://www.fxignal.net/
---------------------------------------------------------------------


More information about the xorg-modular mailing list