On Mon, Mar 3, 2008 at 6:37 PM, Peter O'Gorman <[EMAIL PROTECTED]> wrote: > Dan Nicholson wrote: > > > I was just looking through the pic code evaluation in libtool.m4 and > > not getting real excited about recreating that. > > In xserver's configure.ac you can, somewhere after AC_PROG_LIBTOOL, put > something like: > CC_PIC_FLAG="$lt_prog_compiler_pic" > CXX_PIC_FLAG="$lt_prog_compiler_pic_CXX" > AC_SUBST([CC_PIC_FLAG]) > AC_SUBST([CXX_PIC_FLAG]) > > Then in the Makefile.am that descends into the mesa build, you can set > these vars as arguments to make (I guess you already set CC etc this > way?), and use them to build the pic objects.
That's excellent, I had never thought of that. However, I may just have to add a macro anyway since we need pic when building mesa independently of Xorg. I may end up just borrowing some parts of libtool.m4 and refactoring them. Or just using AC_PROG_LIBTOOL and stripping out the values I need like above. What I have right now is essentially "if gcc, add -fPIC, else fill in later...". > I am pretty sure that you can similarly avoid the need for a fake > convenience .la, but can not work it out without actually attempting a > build :) How do you suppose that would work? Do I somehow tell libtool "this other static library is pic, I'd like you to disassemble the objects like a convenience library". If you actually want to try on xserver/mesa, I can point you to the necessary repos and what packages are necessary for the build. Just to be sure, though: If I'm able to ensure that the static library is pic, are there any other barriers to the fake .la approach? I just want to make sure I know the limitations before proposing this. -- Dan _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool