On Sat, 7 Jul 2012, Ronald S. Bultje wrote:

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

Can this be handled by the filter in msvc_flags()? That'd be less ugly since the -l stuff is in quite many places. Although zlib still needs special treatment, since the lib isn't named z.lib, it's named zlib.lib...

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

Reply via email to