diff --git a/configure b/configure
index 5604181b58848487c843facf629792c93fd0a941..25e8cef0763dc737d416e45daa280df1075d3f76 100755
--- a/configure
+++ b/configure
@@ -2121,7 +2121,6 @@ esac
 
 enable $subarch
 enabled spic && enable pic
-check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
 
 # OS specific
 case $target_os in
@@ -2292,6 +2291,8 @@ case $target_os in
         ;;
 esac
 
+check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
+
 set_default $PATHS_LIST
 
 add_extralibs $osextralibs