Page 1 of 1

GNU Automake, Autoconf (Specify dependency?)

Posted: Sun Mar 26, 2006 2:20 pm
by Chris Corbyn
Hello again :D

I'm just bundling something up I've written and it's the first time I've done it, mostly because I've never had the chance to write anything in C++ :) I'm using GNU Autotools to create the configure and Makefile scripts but I can't understand what I need to add to configure.in and Makefile.am in order to specify that libpcre++ is needed :(

i.e. When you compile it manually with g++ you'd *need* to do:

g++ -lpcre++ lexer.cpp -o lexer

So basically I need to tell autotools to add that -l option (or an alternative).
Not sure if I need to do additional things to have ./configure to bail out with an error if libpcre++ isn't found too (I'd like to be able to have the user specify a --with-pcrepp=/some/dir, but I've already read how to do that I think).

Thanks :)

EDIT | By pure fluke this seems to work in Makefile.am but I may have put it in the wrong place :?

lexer_LDADD = -lpcre++ $(INTI_LIBS)