configure: Don't add -fPIC on windows targets
authorMartin Storsjö <martin@martin.st>
Wed, 5 Jun 2013 11:51:28 +0000 (14:51 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 10 Jun 2013 11:32:13 +0000 (14:32 +0300)
This avoids warnings about this option not having any effect on
this platform.

We still want to enable the pic configure item for these platforms
(if detected via the compiler builtin define __PIC__) to get proper
inline assembly workarounds.

Signed-off-by: Martin Storsjö <martin@martin.st>
configure

index c558aeb..25fab1d 100755 (executable)
--- a/configure
+++ b/configure
@@ -3350,7 +3350,13 @@ enable_weak_pic() {
     disabled pic && return
     enable pic
     add_cppflags -DPIC
-    add_cflags   -fPIC
+    case "$target_os" in
+    mingw*|cygwin*)
+        ;;
+    *)
+        add_cflags -fPIC
+        ;;
+    esac
     add_asflags  -fPIC
 }