GNU Automake, Autoconf (Specify dependency?)

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

GNU Automake, Autoconf (Specify dependency?)

Post 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)
Post Reply