Revision b2e3c528 configure

View differences:

configure
30 30
echo "  --enable-amr_wb          enable amr_wb float audio codec"
31 31
echo "  --enable-sunmlib         use Sun medialib [default=no]"
32 32
echo "  --enable-pthreads        use pthreads [default=no]"
33
echo "  --enable-gpl             allow use of gpl code, the resulting libav* and ffmpeg will be under gpl [default=no]"
33 34
echo ""
34 35
echo "Advanced options (experts only):"
35 36
echo "  --source-path=PATH       path of source code [$source_path]"
......
173 174
amr_nb_fixed="no"
174 175
sunmlib="no"
175 176
pthreads="no"
177
gpl="no"
176 178

  
177 179
# OS specific
178 180
targetos=`uname -s`
......
419 421
  ;;
420 422
  --enable-pthreads) pthreads="yes"
421 423
  ;;
424
  --enable-gpl) gpl="yes"
425
  ;;
422 426
  esac
423 427
done
424 428

  
429
if test "$gpl" != "yes"; then
430
    if test "$pp" != "no" -o "$shared_pp" != "no"; then
431
        echo "The Postprocessing code is under GPL and --enable-gpl is not specified"
432
        fail="yes"
433
    fi
434

  
435
    if test "$a52" != "no" -o "$a52bin" != "no"; then
436
        echo "liba52 is under GPL and --enable-gpl is not specified"
437
        fail="yes"
438
    fi
439
    
440
    if test "$faad" != "no" -o "$faadbin" != "no"; then
441
        cat > $TMPC << EOF
442
            #include <faad.h>
443
            int main( void ) { return 0; }
444
EOF
445
    
446
        if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
447
            cat > $TMPC << EOF
448
                #include <faad.h>
449
                #ifndef FAAD2_VERSION
450
                ok faad1
451
                #endif
452
                int main( void ) { return 0; }
453
EOF
454
            if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
455
                echo "faad2 is under GPL and --enable-gpl is not specified"
456
                fail="yes"
457
            fi
458
        else
459
            faad="no"
460
            faadbin="no"
461
            echo "faad test failed"
462
        fi
463
    fi
464
   
465

  
466
    if test "$fail" == "yes"; then
467
        exit 1
468
    fi
469
fi
470

  
425 471
# compute mmx state
426 472
if test $mmx = "default"; then
427 473
    if test $cpu = "x86"; then
......
927 973
echo "AMR-NB float support"  $amr_nb
928 974
echo "AMR-NB fixed support"  $amr_nb_fixed
929 975
echo "AMR-WB float support"  $amr_wb
976
if test "$gpl" = "no" ; then
977
echo "License: LGPL"
978
else
979
echo "License: GPL"
980
fi
930 981

  
931 982
echo "Creating config.mak and config.h"
932 983

  
......
1225 1276
  echo "CONFIG_RISKY=yes" >> config.mak
1226 1277
fi
1227 1278

  
1279
if test "$gpl" = "yes" ; then
1280
  echo "#define CONFIG_GPL 1" >> $TMPH
1281
  echo "CONFIG_GPL=yes" >> config.mak
1282
fi
1283

  
1228 1284
echo "#define restrict $_restrict" >> $TMPH
1229 1285

  
1230 1286
# build tree in object directory if source path is different from current one

Also available in: Unified diff