I have a project with several sources directories :
src/A /B /C
In each, the Makefile.am contains
AM_CXXFLAGS = -fP
Use EXTRA_CFLAGS in configure.ac
For example for your case it would be this:
EXTRA_CFLAGS=-fPIC -Wall -Wextra