]> git.sesse.net Git - mlt/commitdiff
allow env CC to override hard-coded gcc in configure scripts
authorDan Dennedy <dan@dennedy.org>
Sun, 9 Sep 2012 05:15:38 +0000 (22:15 -0700)
committerDan Dennedy <dan@dennedy.org>
Sun, 9 Sep 2012 05:15:38 +0000 (22:15 -0700)
patch by Alberto Villa

configure
src/framework/configure
src/modules/avformat/configure
src/modules/frei0r/configure

index 46531d94c429c4ccc83149f53d03d2cca5976339..c9c6e00fda72a131b162d861e1b74fb1fc85cd6b 100755 (executable)
--- a/configure
+++ b/configure
@@ -195,6 +195,9 @@ export targetos=$(uname -s)
 export targetarch=
 export amd64=false
 
+# Define the compiler used in tests (gcc is not installed everywhere)
+: ${CC:=gcc}
+
 # Iterate through arguments
 for i in "$@"
 do
@@ -327,7 +330,7 @@ do
                [ $help = 0 ] && echo "Configuring `basename $i`:"
                olddir=`pwd`
                cd src/$i
-               ./configure "$@"
+               CC="$CC" ./configure "$@"
                [ $? != 0 ] && exit 1
                cd $olddir
        fi
index 7cb01d58460a5448fc146ef0454a06b64dd02720..49ab581070efb3fe207eab5395fa843ff4768265 100755 (executable)
@@ -4,7 +4,7 @@ echo "framework -I$prefix/include -I$prefix/include/mlt -D_REENTRANT    -L$libdir -
 echo > config.mak
 if [ "$(uname -s)" = "FreeBSD" ]
 then
-       printf "#include <sys/param.h>\n int main(){ return 0;}" | gcc -c -x c - >/dev/null 2>&1
+       printf "#include <sys/param.h>\n int main(){ return 0;}" | $CC -c -x c - >/dev/null 2>&1
        [ "$?" -eq 0 ] && echo "HAVE_SYS_PARAM_H=1" >> config.mak
 fi
 exit 0
index 16e23cf1eebbd96bcea67ac3dd18a8da65bedfea..c11b67985af8262bb7cc7b649002e1dd1f283bff 100755 (executable)
@@ -105,7 +105,7 @@ else
                        
                        if [ "$vdpau" = "true" ]
                        then
-                               printf "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | gcc -I"$static_ffmpeg" $CFLAGS -c -x c -  >/dev/null 2>&1
+                               printf "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | $CC -I"$static_ffmpeg" $CFLAGS -c -x c -  >/dev/null 2>&1
                                [ "$x11" = "0" -a "$?" = "0" ] && echo "VDPAU=1" >> config.mak
                        fi
                else
@@ -141,7 +141,7 @@ else
                
                if [ "$vdpau" = "true" ]
                then
-                       printf "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | gcc -I"$(pkg-config --cflags libavformat)" -I"$shared_ffmpeg/include" $CFLAGS -c -x c -  >/dev/null 2>&1
+                       printf "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | $CC -I"$(pkg-config --cflags libavformat)" -I"$shared_ffmpeg/include" $CFLAGS -c -x c -  >/dev/null 2>&1
                        [ "$x11" = "0" -a "$?" = "0" ] && echo "VDPAU=1" >> config.mak
                fi
        else
index 73757a468def86fc5a5191470306eddec29f9533..9c11952f84e8d1e4cf14649bae5e4a589fdc101b 100755 (executable)
@@ -3,7 +3,7 @@
 if [ "$help" != "1" ]
 then
 
-       echo "#include <frei0r.h> int main(){ f0r_plugin_info_t test; test.name;return 0;}"| gcc $CFLAGS -c -x c -  >/dev/null 2>&1
+       echo "#include <frei0r.h> int main(){ f0r_plugin_info_t test; test.name;return 0;}"| $CC $CFLAGS -c -x c -  >/dev/null 2>&1
 
        if [ "$?" = "1" ]
        then