summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-05-09 15:39:25 +0300
committerMartin Storsjö <martin@martin.st>2013-05-12 19:45:26 +0300
commitb1803c79dcd6d0a345fa1cbe18dd8e2149717121 (patch)
tree89ed7d50b671f07c638403118cda9bfbb61fa14f /configure
parent94235f2ba2eb8be014b6dbc2b2aed494c169cef1 (diff)
configure: Use enable_weak when enabling pic
This allows it to be overridden, either by the user on the command line, or by other sections of the configure script. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure11
1 files changed, 6 insertions, 5 deletions
diff --git a/configure b/configure
index d85451980b..575d70041d 100755
--- a/configure
+++ b/configure
@@ -2958,7 +2958,7 @@ case "$arch" in
esac
enable $subarch
-enabled spic && enable pic
+enabled spic && enable_weak pic
# OS specific
case $target_os in
@@ -3217,7 +3217,7 @@ esc(){
echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate
-check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
+check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable_weak pic
set_default $PATHS_LIST
set_default nm
@@ -3256,14 +3256,15 @@ enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
disabled optimizations || check_cflags -fomit-frame-pointer
-enable_pic() {
+enable_weak_pic() {
+ disabled pic && return
enable pic
add_cppflags -DPIC
add_cflags -fPIC
add_asflags -fPIC
}
-enabled pic && enable_pic
+enabled pic && enable_weak_pic
check_cc <<EOF || die "Symbol mangling check failed."
int ff_extern;
@@ -3332,7 +3333,7 @@ EOF
check_inline_asm asm_mod_q '"add r0, %Q0, %R0" :: "r"((long long)0)'
check_inline_asm asm_mod_y '"vmul.i32 d0, d0, %y0" :: "x"(0)'
- enabled_all armv6t2 shared !pic && enable_pic
+ enabled_all armv6t2 shared !pic && enable_weak_pic
elif enabled mips; then