From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,12c54a0f5a27d882,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Autoconf & gnat Help Needed Date: Wed, 21 Apr 2010 19:54:08 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: Injection-Date: Wed, 21 Apr 2010 19:54:08 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="17140"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++M7q1Ku3nKvdts1Ap57T6fgc61UjpbNo=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:je3dWE/pRBQbhMs8cpUtZxhEBTE= Xref: g2news1.google.com comp.lang.ada:10119 Date: 2010-04-21T19:54:08+00:00 List-Id: 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