Referring to *.o files under a .libs/ directory is not recommended
because this belongs to libtool's innards.
Indeed, libtool decides to place the *.o files in an
implementation-specific location:
- PIC *.o files go into a .libs/ directory;
- non-PIC *.o files are generated along side to their corresponding
source files.
Using PIC objects to build executable is legit, thought it may
introduce some minor overhead at runtime.
However, hard-coding these PIC object files in the Makefile.am to build
executables breaks the build in case of static only build.
In this case, no PIC object files is generated, so the linker will not
found some of the needed objects files.
Changing these dependencies' path fixes the static build, keeping the
shared one ok, though the non-PIC object files are now always built.
Fixes #983.
Fix tested on git master and v2.6 with no change needed.
Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>