Revision b2e3c528

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
ffmpeg.c
3488 3488
{
3489 3489
    show_banner();
3490 3490
    printf(
3491
#ifdef CONFIG_GPL
3492
    "This program is free software; you can redistribute it and/or modify\n"   
3493
    "it under the terms of the GNU General Public License as published by\n"
3494
    "the Free Software Foundation; either version 2 of the License, or\n"
3495
    "(at your option) any later version.\n"
3496
    "\n"
3497
    "This program is distributed in the hope that it will be useful,\n"
3498
    "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
3499
    "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
3500
    "GNU General Public License for more details.\n"
3501
    "\n"
3502
    "You should have received a copy of the GNU General Public License\n"
3503
    "along with this program; if not, write to the Free Software\n"
3504
    "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n"
3505
#else
3491 3506
    "This library is free software; you can redistribute it and/or\n"
3492 3507
    "modify it under the terms of the GNU Lesser General Public\n"
3493 3508
    "License as published by the Free Software Foundation; either\n"
......
3501 3516
    "You should have received a copy of the GNU Lesser General Public\n"
3502 3517
    "License along with this library; if not, write to the Free Software\n"
3503 3518
    "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n"
3519
#endif
3504 3520
    );
3505 3521
    exit(1);
3506 3522
}

Also available in: Unified diff