Re: [A-A-P-develop] Monthly report A-A-P, July 2003

joerg <j.beyer-S0/[email protected]>
Newsgroups gmane.comp.tools.aap.user,gmane.comp.tools.aap.devel
Message-ID <[email protected]>

Bram Moolenaar wrote:

> - Add an autoconf-like configuration feature.  SCons also has a similar
>   feature, it would be a good idea to attempt working on this together.
>   Joerg Beyer also has done some work on this, but has not shown
>   progress the last two months.  Closely related to this is
>   automatically finding tools installed on the system (including
>   compilers) and using them for building.  I intend to work about two
>   weeks on this.

well, it's not that bad :-)

I have code working to detect which header files are available. you
could say if a header file is needed: if it's not there, then the
build is not possible, if one of a set of headers is needed (like
any of time.h or sys/time.h) or a header file is optional (like
a ssl header: if it's there then the build might take profit of it).

roughly the same for libaries.

And a simple compiler detection is also in place.

an example receipe looks like this:

-------------------------------------------
configure:
     # find a C compiler, assign it's name to the aap variable CC
     :conf compiler CC gcc cc
     #
     # find a C++ compiler, assign it's name to the aap variable CXX
     :conf compiler CXX g++ c++ gcc
     #
     :conf headers dirent.h fcntl.h fnmatch.h stdlib.h string.h unistd.h 
sys/dir.h sys/stat.h sys/types.h
     :conf {oneof} headers time.h sys/times.h
     # the next header does not exist
     :conf {optional} headers was_willst_du.h huhu.h
     # find the lib-z and check if it contains the symbol compress
     :conf libs z compress

     # the next lib does not exist
     :conf {optional} libs strange ups
     :conf {optional} libs ssl ssl_new
-------------------------------------------

output will be a confdefs.h (which contains the names of the header
that have been found), it looks like this:

---------------------------------------
/* auto generated file, do not edit */

#define HAVE_DIRENT_H 1

#define HAVE_FCNTL_H 1

#define HAVE_FNMATCH_H 1

#define HAVE_STDLIB_H 1

#define HAVE_STRING_H 1

#define HAVE_UNISTD_H 1

#define HAVE_SYS_DIR_H 1

#define HAVE_SYS_STAT_H 1

#define HAVE_SYS_TYPES_H 1

#define HAVE_TIME_H 1

#define HAVE_LIBZ 1

/* #undef HAVE_WAS_WILLST_DU_H */

/* #undef HAVE_HUHU_H */

/* #undef HAVE_LIBSTRANGE */
---------------------------------------

the file config.aap is also generated and contails some variables that
carry feature test results, like what is the name of the c++ compiler:
--------------------------------
# this is machine generated, do not change

CC=gcc
CXX=g++
LIBS=-lz
--------------------------------

I need to catch up with current a-a-p changes (have not done cvs up
for a while) and the code should be extended if there is interest in
it.


     Joerg



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.