Run configure to test for the library and create the Makefile:
# ./configure
checking how to run the C preprocessor... gcc -E
checking for aalib support... yes, shared
checking for aalib files in default path... found in /usr/local
checking for aalib in -laalib... no
configure: error: wrong aalib lib version or lib not found
We messed up :(
config.log to the rescue:
configure:1659: checking for aa_init in -laalib
configure:1678: gcc -o conftest -g -O2
-L/usr/local/lib -lm -ldl
conftest.c -laalib 1>&5
/usr/bin/ld: cannot find -laalib
collect2: ld returned 1 exit status
configure: failed program was:
#line 1667 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.
We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char aa_init();
int main() {
aa_init()
; return 0; }
The library is called 'aa' (and not 'aalib'), so we fix config.m4:
29
30 LIBNAME=aa # you may want to change this
31 LIBSYMBOL=aa_init # you most likely want to change this
32