[FFmpeg-cvslog] configure: Add check_ld() helper function to simplify some expressions

Diego Biurrun git at videolan.org
Wed Mar 28 21:23:57 EEST 2018


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Fri Oct 20 03:43:58 2017 +0200| [18dc1ff0fb4572b1d50a44905aa1e76bc3bbb0ad] | committer: Diego Biurrun

configure: Add check_ld() helper function to simplify some expressions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18dc1ff0fb4572b1d50a44905aa1e76bc3bbb0ad
---

 configure | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 499d98f1ba..5e350983dd 100755
--- a/configure
+++ b/configure
@@ -850,6 +850,14 @@ test_ld(){
     test_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
 }
 
+check_ld(){
+    log check_ld "$@"
+    name=$1
+    shift
+    disable $name
+    test_ld $@ && enable $name
+}
+
 print_include(){
     hdr=$1
     test "${hdr%.h}" = "${hdr}" &&
@@ -4267,8 +4275,8 @@ elif enabled arm; then
         :
     elif ! test_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__" && [ $target_os != darwin ]; then
         case "${cross_prefix:-$cc}" in
-            *hardfloat*)         enable vfp_args;   fpabi=vfp ;;
-            *) test_ld <<EOF &&  enable vfp_args && fpabi=vfp || fpabi=soft ;;
+            *hardfloat*) enable vfp_args; fpabi=vfp ;;
+            *) check_ld vfp_args <<EOF && fpabi=vfp || fpabi=soft ;;
 __asm__ (".eabi_attribute 28, 1");
 int main(void) { return 0; }
 EOF
@@ -4867,7 +4875,7 @@ enabled xmm_clobber_test &&
                   -Wl,--wrap,sws_scale ||
     disable xmm_clobber_test
 
-test_ld <<EOF && enable proper_dce
+check_ld proper_dce <<EOF
 extern const int array[512];
 static inline int func(void) { return array[0]; }
 int main(void) { return 0; }



More information about the ffmpeg-cvslog mailing list