If you are using Autoconf and Automake, then you should be able to pass in linker flags at compile time to make using the following:
make LDFLAGS='-L/my/nonstandard/prefix/lib' target
Additionally, you can do this for CC, CFLAGS, CPP, CPPFLAGS, and LIBS. For example:
make CC=gcc-4.2 \
LIBS='-lmylibrary -lhislib ../lib/libcustom.a' \
LDFLAGS='-L/opt/vend/lib' \
CPPFLAGS='-I../include' \
CFLAGS='-Wall' \
target
If you want to make them permanent in the make file, add them the to automake variables:
AM_LIBS = -lmylibrary -lhislib ../lib/libcustom.a
AM_LDFLAGS = -L/opt/vend/lib
AM_CPPFLAGS = -I../include
AM_CFLAGS = -Wall
Using the above variables, will still allow you to add flags by passing them to make using the previous method.