[brlcad-commits] SF.net SVN: brlcad: [30741] brlcad/trunk/m4/patch.m4
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2008-04-19 19:56:20
|
Revision: 30741 http://brlcad.svn.sourceforge.net/brlcad/?rev=30741&view=rev Author: brlcad Date: 2008-04-19 12:56:26 -0700 (Sat, 19 Apr 2008) Log Message: ----------- This should finally (re)fix the Debian and Ubuntu builds. The problem boils down to the Debian devs insisting on modifying default upstream libtool linkage behavior. They do this for performance/relinkage reasons so that rebuilding and installing a base library (like libpng) doesn't necessarily require relinking all callers. They force *off* the addition of dependency libraries on the linker line by setting link_all_deplibs=no which in turn mucks havok with compilation. Their intent seems to assume that all libs are installed before a binary needs to link against them so that recursive linux dynamic link lookups will find everything needed via rpaths alone. So all of the dependencies listed on our (not-yet-installed) libtool archive libraries are stripped off when binaries are linked. This fix reverts the libtool script back to the default "unknown" value for link_all_deplibs. So libtool does properly keep track of the recursive dependency descriptions provided in the build files and allows binaries to link against libraries that aren't yet installed. References: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=291641 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=297726 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473415 Modified Paths: -------------- brlcad/trunk/m4/patch.m4 Modified: brlcad/trunk/m4/patch.m4 =================================================================== --- brlcad/trunk/m4/patch.m4 2008-04-19 15:08:50 UTC (rev 30740) +++ brlcad/trunk/m4/patch.m4 2008-04-19 19:56:26 UTC (rev 30741) @@ -46,34 +46,45 @@ # the generated libtool script which is outright wrong under certain # conditions. Check for the flag and remove it. -case $host_os in - darwin*) - for script in $ac_top_builddir $ac_abs_builddir $ac_builddir . ; do - if test "x$script" = "x" ; then - libtoolscript="libtool" - else - libtoolscript="${script}/libtool" - fi - if test -f ${libtoolscript} ; then - if test -w ${libtoolscript} ; then - # remove any -all_load option. - # provokes libtool linker bug with noinst libraries. +for script in $ac_top_builddir $ac_abs_builddir $ac_builddir . ; do + if test "x$script" = "x" ; then + libtoolscript="libtool" + else + libtoolscript="${script}/libtool" + fi + if test -f ${libtoolscript} ; then + if test -w ${libtoolscript} ; then + + case $host_os in + # remove any -all_load option. + # provokes libtool linker bug with noinst libraries. + darwin*) sed 's/-all_load.*convenience//g' < $libtoolscript > ${libtoolscript}.sed sed "s/temp_rpath=\$/temp_rpath=$TCL_PATH:$TK_PATH/g" < $libtoolscript.sed > ${libtoolscript}.sed2 if test ! "x`cat ${libtoolscript}`" = "x`cat ${libtoolscript}.sed2`" ; then AC_MSG_RESULT([Found -all_load in libtool script, removing]) cp ${libtoolscript}.sed2 ${libtoolscript} fi + rm -f ${libtoolscript}.sed ${libtoolscript}.sed2 + ;; + + # make sure the debian devs don't screw with link_all_deplibs + linux*) + sed 's/^link_all_deplibs=no/link_all_deplibs=unknown/g' < $libtoolscript > ${libtoolscript}.sed + if test ! "x`cat ${libtoolscript}`" = "x`cat ${libtoolscript}.sed`" ; then + AC_MSG_RESULT([Found link_all_deplibs=no in libtool script, reverting]) + cp ${libtoolscript}.sed ${libtoolscript} + fi rm -f ${libtoolscript}.sed - rm -f ${libtoolscript}.sed2 - else - AC_MSG_WARN([libtool script exists but is not writable so not attempting to edit]) - fi - fi - done - ;; -esac + ;; + esac + else + AC_MSG_WARN([libtool script exists but is not writable so not attempting to edit]) + fi + fi +done + ]) # Local Variables: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |