s3: Fix bugs in the detection of the GNU ld version (Bug #6147)
authorSteve Langasek <vorlon@debian.org>
Tue, 17 Mar 2009 21:08:28 +0000 (22:08 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 19 Mar 2009 17:04:01 +0000 (18:04 +0100)
This bug results in a failure to use linker scripts to limit the set of symbols
exported by our shared libraries.

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit c6b570ce30b5cc3631c0ed780826d5450f681800)

source/configure.in

index fee3ac11b106fa1b2d6913e3d60901f7257897be..6d8a3870c19f7c15617e9d4fe191711d79dfa281 100644 (file)
@@ -250,7 +250,7 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then
         else
            AC_MSG_CHECKING(GNU ld release version)
            changequote(,)dnl
-           ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
+           ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n 's,^.*[^0-9\.]\+\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
            ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
            ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
            changequote([,])dnl
@@ -262,7 +262,7 @@ if test "$ac_cv_prog_gnu_ld" = "yes"; then
            if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test "$ac_cv_gnu_ld_vernr_minor" -lt 14; then
              ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
            fi
-           if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major"=2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
+           if test "$ac_cv_gnu_ld_vernr_major" -gt 2 || test "$ac_cv_gnu_ld_vernr_major" = 2 && test "$ac_cv_gnu_ld_vernr_minor" -ge 12; then
              ac_cv_gnu_ld_version_script=yes
            fi
         fi