Unix Programming - autoconf and AC_SUBST

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2004 > autoconf and AC_SUBST





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author autoconf and AC_SUBST
vertigo

2004-10-02, 9:13 pm

Hello
I have problmes exporting variable names from configure.in:
mylib="-lmylib"
AC_SUBST(mylib)

and then in Makefile.am:
myprog_LDFLAGS=@mylib@

and durring linking myprog i receive error because i got command
g++...@mylib@..., instead of g++...-lmylib...

i can not find mylib in config.status, but i find:
mylib="-lmylib" in config.log

Everything else with automake & autoconf works fine.
Where is my mistake ?

Thanx
Michal

Heiko

2004-10-03, 5:55 pm

vertigo wrote:

> I have problmes exporting variable names from configure.in:
> mylib="-lmylib"
> AC_SUBST(mylib)
>
> and then in Makefile.am:
> myprog_LDFLAGS=@mylib@


AFAIK you need to refer to the substituted var with $(mylib) in
Makefile.am. So I think this will work:

myprog_LDFLAGS += $(mylib)


Heiko
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com