[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CHECK_LIB Not finding Libraries that are not Compiled with PIC
From: |
James L. Barker |
Subject: |
AC_CHECK_LIB Not finding Libraries that are not Compiled with PIC |
Date: |
Thu, 22 May 2014 09:39:34 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
OS: RHEL 6.5
Autoconf: 2.63
Automake: 1.11.1
I have a library compiled as a mylib.a without Position Independent Code.
When I put the following line in my configure.ac file, the library is
not found.
LDFLAGS="-I/usr/local/packages/lib"
AC_CHECK_LIB(mylib, function)
The ./configure script can't find -lmylib.
I recompiled mylib.a with the -fPIC options, and all of a sudden
./configure can now find it.
Does the ./configure not work with libraries that haven't been compiled
with position independent code, or is this a bug?
When I do a nm on both the PIC and non-PIC library, the symbols are
clearly listed.
Thanks,
James
- AC_CHECK_LIB Not finding Libraries that are not Compiled with PIC,
James L. Barker <=