From: "Ronald S. Bultje" <[email protected]>

This is similar in style to how it currently supports some exotic
compilers (e.g. see CC_O).
---
 configure |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index ebc6310..c8ac2b2 100755
--- a/configure
+++ b/configure
@@ -1702,6 +1702,9 @@ SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
 AS_O='-o $@'
 CC_O='-o $@'
 
+LD_PRE='-l'
+LD_POST=''
+
 host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
 host_libs='-lm'
 
@@ -2884,7 +2887,7 @@ check_func  sysconf
 check_func  sysctl
 check_func  usleep
 check_func_headers io.h setmode
-check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
+check_lib2 "windows.h psapi.h" GetProcessMemoryInfo ${LD_PRE}psapi${LD_POST}
 check_func_headers windows.h GetProcessAffinityMask
 check_func_headers windows.h GetProcessTimes
 check_func_headers windows.h GetSystemTimeAsFileTime
@@ -2909,8 +2912,12 @@ check_header vdpau/vdpau_x11.h
 check_header windows.h
 check_header X11/extensions/XvMClib.h
 
-disabled  zlib || check_lib   zlib.h      zlibVersion -lz   || disable  zlib
-disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
+disabled  zlib || \
+    check_lib  zlib.h       zlibVersion ${LD_PRE}z${LD_POST} || \
+    disable  zlib
+disabled bzlib || \
+    check_lib2 bzlib.h BZ2_bzlibVersion ${LD_PRE}bz2${LD_POST} || \
+    disable bzlib
 
 if ! disabled w32threads && ! enabled pthreads; then
     check_func _beginthreadex && enable w32threads
-- 
1.7.9.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to