LDFLAGS usage in autotools with libtool -


Depending on the OS, I define a particular LDFLAGS in my configurable. If the test is "$ host_os" = Sigwin then LDFALGS = "$ LDFALGS-W, -N-undefined" export LDFALAGS FIACIBBST ([LDFALGS])

package uses AC_PROG_LIBTOOL and when LDFLAGS is sent to libtool, the -Wl prefix remains, and the linker Does not understand the option. If I remove this prefix, then the AC_PROG_CXX macro fails because the GCC itself suppresses -en-undefined what am I doing?

LDFALGS makefile.M is not mentioned, but I have made sure that it has been awarded in libtool command is running < Code> make -n .

I am using Autoconf 2.69, automake 1.14, Gram 4.0 and GCC 4.8.2 under Sigwin 1.7.28 (0.271 / 5/3)

Edit : I have a few dozen Makefile.am , out of which more than half of the external libraries - I like to control these flags from the central location.

There is a -en-undefined option in Librol.

The GNU LD has an - no-undefined option.

You should know about Libtol from within Makefile.am , be careful to forward the linker:

configure. AC

  AC_CANONICAL_HOST if test "$ host_os" = cygwin then EXTRA_LDFLAGS = "- no-defined" fix AC_SUBST ([EXTRA_LDFLAGS])  

Makefile.am

  AM_LDFLAGS = $ (EXTRA_LDFLAGS) ...  

As a general rule, you configure Should not mess with CPPFLAGS, LDFALGS etc, because the user can create "make" They may need to change in


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -