Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH 2/3] configure: iconv: Remove hack that added -L/usr/lib

On 11/14/2015 16:20, Alexander Strasser wrote:
Seems not really a good idea to do such modifications to
the selection of the libraries that will be linked.

Also adding -L/usr/lib might invalidate previous results
of tests because now a different lib will finally be linked
in the end.

I got caught by this hack when compiling with a mingw compiler
and adding /usr/lib linker search path prioritized msys/cygwin
versions of the libs.

Signed-off-by: Alexander Strasser <eclipse7@xxxxxxx>
  configure | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/configure b/configure
index 57e9cb7..6326134 100755
--- a/configure
+++ b/configure
@@ -4103,10 +4103,7 @@ int main(void) {
-  # NOTE: -L/usr/lib is a hack to avoid issues due to a
-  # broken libiconv that e.g. macports installs into /opt/local/lib
-  # which might get addded to the search path later by e.g. SDL
-  for ld_tmp in "" "-L/usr/lib -liconv" "-liconv" "-liconv $ld_dl" ; do
+  for ld_tmp in "" "-liconv" "-liconv $ld_dl" ; do
      cc_check $ld_tmp && extra_ldflags="$extra_ldflags $ld_tmp" &&
        ld_iconv="$ld_tmp" && _iconv=yes && break

Had this same issue in MSYS2 only recently, caused by a recent MSYS2 update that installed some MSYS2 dev files such as 'libm.a'. configure tests tried (but failed) to use MSYS2's libm causing a lot of things to be disabled. Along with this modification I went a little further to remove msys2 dev files.

I meant to bring it up, eventually.
MPlayer-dev-eng mailing list