comp.lang.ada
 help / color / mirror / Atom feed
* Autoconf & gnat Help Needed
@ 2010-04-21 19:54 Warren
  2010-04-21 20:31 ` Charmed Snark
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Warren @ 2010-04-21 19:54 UTC (permalink / raw)


Has anyone here had experience using GNAT with autoconf/automake?

I'm attempting to port my autoconf from the original bdbbasic
project to the Ada rewrite project (z9basic). But I am having 
much difficulty getting autoconf, automake and libtool to
work together for a gnat build.     

In a nutshell, I have some static library modules built from:

lib_LTLIBRARIES = libz9.la
libz9_la_LDFLAGS = -static -version-info 1:0:1
libz9_la_SOURCES = misc.c terminal.c grammar.c parse.c cores.c ccmain.cc

This works OK, and produces libz9.a as expected.


But the problem is, I need to coax Automake to do the following
using libtool. The following is from a non-automake Makefile 
(which works ok):

DEBUG  = -g -O0
AFLAGS = $(DEBUG) -gnat05 -Wall -gnatwl -gnata -gnatVa -gnatf -gnatwr
CFLAGS = $(DEBUG) -I.. 
CXFLAGS = $(DEBUG) -I..

z9:  libz9.a z9-tokens.ads
     gnatmake $(AFLAGS) z9.adb
     gnatbind -n z9.ali
     gnatlink z9.ali --GCC=g++ --LINK=g++ -L. -lz9 -lncurses -lpanel


I need to accomplish the same in an automake fashion. I tried 
(unsuccessfully) the following:

z9$(EXE): libz9.a z9-tokens.ads  
        gnatmake $(AFLAGS) z9.adb
        gnatbind -n z9.ali
        gnatlink z9.ali ccmain.o --GCC=g++ --LINK=g++ -L. -lz9 -lncurses 
-lpanel

But the automake genned Makefile just ignored the gnat* steps and
attempted to link without the Ada modules.


Autoconf supports macros AC_PROG_CC and AC_PROG_CXX, but I don't 
see any support for gnat in aclocal.m4.

Surely someone else has bumped into this?

Warren



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-04-27 13:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-21 19:54 Autoconf & gnat Help Needed Warren
2010-04-21 20:31 ` Charmed Snark
2010-04-22 10:23 ` Georg Bauhaus
2010-04-22 15:19   ` Warren
2010-04-22 10:44 ` Stephen Leake
2010-04-22 15:27   ` Warren
2010-04-22 15:59     ` Warren
2010-04-23  6:48     ` Stephen Leake
2010-04-23 13:44       ` Warren
2010-04-23 18:39         ` Vadim Godunko
2010-04-23 20:13           ` Warren
2010-04-24 11:18             ` Stephen Leake
2010-04-26 15:01               ` Warren
2010-04-27  6:57                 ` Alex R. Mosteo
2010-04-27 13:21                   ` Warren
2010-04-23 18:41 ` Vadim Godunko
2010-04-23 20:18   ` Warren
2010-04-24  0:11     ` Ludovic Brenta
2010-04-26 15:06       ` Charmed Snark
2010-04-26 18:30       ` Robert A Duff
2010-04-24 12:54     ` Vadim Godunko
2010-04-26 15:25       ` Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox