cc: [email protected]
Subject: Re: [ast-users] worlds collide -- using AST tools with non-AST 
software  (how to config?)
--------

> I'm working on porting some of my own code to use iffe and nmake.
> But my code relies on other code that will not be configured using
> these tools.  I therefore face the usual problem of figuring out
> what -I options have to be passed to the compiler and what -L and -l
> options have to be passed to the linker in order to compile my code
> against non-AST libraries.
> 

Here is an example iffe script corresponding to the GNU diff package
configure script.
================cut here===================
set     config

hdr     dirent,fcntl,limits,ndir,time,unistd,vfork
hdr     float,stdarg,stdlib,string
key     const =
lib     dup2,memchr,sigaction,strchr,tmpnam
lib     vfork = fork
sys     dir,file,ndir,wait
typ     pid_t = int

tst     note{ signal handler return type }end compile{
                #include <sys/types.h>
                #include <signal.h>
                #undef signal
                extern void (*signal())();
        }end yes{       
                #define RETSIGTYPE void
        }end no{
                #define RETSIGTYPE int
        }end

tst     CLOSEDIR_VOID note{ closedir() is a void function }end nocompile{
                #include <dirent.h>
                main()
                {
                        return closedir(0);
                }
        }end

STDC_HEADERS    = ( HAVE_FLOAT_H & HAVE_STDARG_H & HAVE_STDLIB_H & 
HAVE_STRING_H )
HAVE_ST_BLKSIZE = mem stat.st_blksize sys/stat.h

run{
        echo "#if _PACKAGE_ast"
        echo "#include <ast_std.h>"
        echo "#endif"
        case $HAVE_VFORK_H in
        1)      echo "#include <vfork.h>" ;;
        esac
}end
================cut here===================

David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to