Do a second pass to find libraries without a single version digit after the .so
authorSam Lantinga <slouken@libsdl.org>
Fri, 23 Nov 2018 21:11:11 -0800
changeset 12429682d6359c430
parent 12428 f5d2abe5af7f
child 12430 d2514b03d3d6
Do a second pass to find libraries without a single version digit after the .so
This finds libsndio.so.6.1 on Raspberry Pi
configure
configure.in
     1.1 --- a/configure	Wed Nov 21 23:46:37 2018 -0400
     1.2 +++ b/configure	Fri Nov 23 21:11:11 2018 -0800
     1.3 @@ -15786,6 +15786,14 @@
     1.4              return
     1.5          fi
     1.6      done
     1.7 +    # Try again, this time allowing more than one version digit after the .so
     1.8 +    for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
     1.9 +        lib=`ls -- $path/$1 2>/dev/null | sed -e 's,.*/,,' | sort | tail -1`
    1.10 +        if test x$lib != x; then
    1.11 +            echo $lib
    1.12 +            return
    1.13 +        fi
    1.14 +    done
    1.15  }
    1.16  
    1.17  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
    1.18 @@ -19418,6 +19426,7 @@
    1.19      fi
    1.20  }
    1.21  
    1.22 +
    1.23  CheckNativeClient()
    1.24  {
    1.25          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     2.1 --- a/configure.in	Wed Nov 21 23:46:37 2018 -0400
     2.2 +++ b/configure.in	Fri Nov 23 21:11:11 2018 -0800
     2.3 @@ -156,6 +156,14 @@
     2.4              return
     2.5          fi
     2.6      done
     2.7 +    # Try again, this time allowing more than one version digit after the .so
     2.8 +    for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
     2.9 +        lib=[`ls -- $path/$1 2>/dev/null | sed -e 's,.*/,,' | sort | tail -1`]
    2.10 +        if test x$lib != x; then
    2.11 +            echo $lib
    2.12 +            return
    2.13 +        fi
    2.14 +    done
    2.15  }
    2.16  
    2.17  dnl Check for compiler characteristics