Make aclocal.m4:WINE_GET_SONAME more flexible

Todd Vierling tv at pobox.com
Thu Jul 24 16:01:13 CDT 2003


The following patch to aclocal.m4 (will require a run of "autoconf" after
changing to pick up the change) will make WINE_GET_SONAME work on NetBSD,
and likely the other *BSDs.  It is still Linux compatible -- in fact, this
new incarnation returns the fully qualified path to the shared object,
eliminating fears of runtime linking path searches.

In this new incarnation, the ldd output

[Linux]
	libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4010a000)

[NetBSD]
	 -lX11.6 => /usr/X11R6/lib/libX11.so.6

is parsed so that the soname retrieved comes from *after* the "=>". This is
inspired by a diff in NetBSD's pkgsrc, but which was not compatible with
Linux.  I fixed up the sed expression a bit to make sure to drop any
ancillary text (such as the mapping address as appended by Linux), so it
appears to build properly now in Linux too.

Because this patch deals mostly with handling of whitespace and tabs, I've
included a uuencoded version of the diff as well.

===== aclocal.m4.diff =====
Index: aclocal.m4
===================================================================
RCS file: /home/wine/wine/aclocal.m4,v
retrieving revision 1.10
diff -u -r1.10 aclocal.m4
--- aclocal.m4	2 Apr 2003 23:27:46 -0000	1.10
+++ aclocal.m4	24 Jul 2003 20:58:15 -0000
@@ -38,7 +38,7 @@
 [ac_get_soname_save_LIBS=$LIBS
 LIBS="-l$1 $3 $LIBS"
   AC_LINK_IFELSE([AC_LANG_CALL([], [$2])],
-  [ac_cv_lib_soname_$1=`$ac_cv_path_LDD conftest$ac_exeext | grep lib$1\\.so | sed 's/^[[ 	]]*\([[^ 	]]*\)[[ 	]]*=>.*$/\1/'`
+  [ac_cv_lib_soname_$1=`$ac_cv_path_LDD conftest$ac_exeext | grep lib$1\\.so | sed 's/^.*=>[	 ]*\([^	 ]*\).*/\1/'`
   if test "x$ac_cv_lib_soname_$1" = "x"
   then
      ac_cv_lib_soname_$1="lib$1.so"

==========
begin 644 aclocal.m4.diff
M26YD97 at Z(&%C;&]C86PN;30*/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/0I20U,@
M9FEL93H at +VAO;64O=VEN92]W:6YE+V%C;&]C86PN;30L=@IR971R:65V:6YG
M(')E=FES:6]N(#$N,3`*9&EF9B`M=2`M<C$N,3`@86-L;V-A;"YM-`HM+2T@
M86-L;V-A;"YM-`DR($%P<B`R,#`S(#(S.C(W.C0V("TP,#`P"3$N,3`**RLK
M(&%C;&]C86PN;30),C0 at 2G5L(#(P,#,@,C`Z-3 at Z,3, at +3`P,#`*0$`@+3,X
M+#<@*S,X+#<@0$`*(%MA8U]G971?<V]N86UE7W-A=F5?3$E"4STD3$E"4PH@
M3$E"4STB+6PD,2`D,R`D3$E"4R(*("`@04-?3$E.2U])1D5,4T4H6T%#7TQ!
M3D=?0T%,3"A;72P at 6R0R72E=+`HM("!;86-?8W9?;&EB7W-O;F%M95\D,3U@
M)&%C7V-V7W!A=&A?3$1$(&-O;F9T97-T)&%C7V5X965X="!\(&=R97`@;&EB
M)#%<7"YS;R!\('-E9"`G<R]>6UL@"5U=*EPH6UM>(`E=72I<*5M;(`E=72H]
M/BXJ)"]<,2\G8`HK("!;86-?8W9?;&EB7W-O;F%M95\D,3U@)&%C7V-V7W!A
M=&A?3$1$(&-O;F9T97-T)&%C7V5X965X="!\(&=R97`@;&EB)#%<7"YS;R!\
M('-E9"`G<R]>+BH]/EL)(%TJ7"A;7 at D@72I<*2XJ+UPQ+R=@"B`@(&EF('1E
M<W0@(G at D86-?8W9?;&EB7W-O;F%M95\D,2(@/2`B>"(*("`@=&AE;@H@("`@
A("!A8U]C=E]L:6)?<V]N86UE7R0Q/2)L:6(D,2YS;R(*
`
end

-- 
-- Todd Vierling <tv at pobox.com>



More information about the wine-patches mailing list