mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-20 22:40:47 +00:00
require the user to explicitly specifiy --enable-gpl before enabling of gpl parts becomes possible
print correct license if --enable-gpl is specified Originally committed as revision 2985 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2768b0d99f
commit
b2e3c52814
56
configure
vendored
56
configure
vendored
@ -30,6 +30,7 @@ echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
|
||||
echo " --enable-amr_wb enable amr_wb float audio codec"
|
||||
echo " --enable-sunmlib use Sun medialib [default=no]"
|
||||
echo " --enable-pthreads use pthreads [default=no]"
|
||||
echo " --enable-gpl allow use of gpl code, the resulting libav* and ffmpeg will be under gpl [default=no]"
|
||||
echo ""
|
||||
echo "Advanced options (experts only):"
|
||||
echo " --source-path=PATH path of source code [$source_path]"
|
||||
@ -173,6 +174,7 @@ amr_wb="no"
|
||||
amr_nb_fixed="no"
|
||||
sunmlib="no"
|
||||
pthreads="no"
|
||||
gpl="no"
|
||||
|
||||
# OS specific
|
||||
targetos=`uname -s`
|
||||
@ -419,9 +421,53 @@ for opt do
|
||||
;;
|
||||
--enable-pthreads) pthreads="yes"
|
||||
;;
|
||||
--enable-gpl) gpl="yes"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test "$gpl" != "yes"; then
|
||||
if test "$pp" != "no" -o "$shared_pp" != "no"; then
|
||||
echo "The Postprocessing code is under GPL and --enable-gpl is not specified"
|
||||
fail="yes"
|
||||
fi
|
||||
|
||||
if test "$a52" != "no" -o "$a52bin" != "no"; then
|
||||
echo "liba52 is under GPL and --enable-gpl is not specified"
|
||||
fail="yes"
|
||||
fi
|
||||
|
||||
if test "$faad" != "no" -o "$faadbin" != "no"; then
|
||||
cat > $TMPC << EOF
|
||||
#include <faad.h>
|
||||
int main( void ) { return 0; }
|
||||
EOF
|
||||
|
||||
if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
|
||||
cat > $TMPC << EOF
|
||||
#include <faad.h>
|
||||
#ifndef FAAD2_VERSION
|
||||
ok faad1
|
||||
#endif
|
||||
int main( void ) { return 0; }
|
||||
EOF
|
||||
if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
|
||||
echo "faad2 is under GPL and --enable-gpl is not specified"
|
||||
fail="yes"
|
||||
fi
|
||||
else
|
||||
faad="no"
|
||||
faadbin="no"
|
||||
echo "faad test failed"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if test "$fail" == "yes"; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# compute mmx state
|
||||
if test $mmx = "default"; then
|
||||
if test $cpu = "x86"; then
|
||||
@ -927,6 +973,11 @@ echo "pthreads support" $pthreads
|
||||
echo "AMR-NB float support" $amr_nb
|
||||
echo "AMR-NB fixed support" $amr_nb_fixed
|
||||
echo "AMR-WB float support" $amr_wb
|
||||
if test "$gpl" = "no" ; then
|
||||
echo "License: LGPL"
|
||||
else
|
||||
echo "License: GPL"
|
||||
fi
|
||||
|
||||
echo "Creating config.mak and config.h"
|
||||
|
||||
@ -1225,6 +1276,11 @@ if test "$risky" = "yes" ; then
|
||||
echo "CONFIG_RISKY=yes" >> config.mak
|
||||
fi
|
||||
|
||||
if test "$gpl" = "yes" ; then
|
||||
echo "#define CONFIG_GPL 1" >> $TMPH
|
||||
echo "CONFIG_GPL=yes" >> config.mak
|
||||
fi
|
||||
|
||||
echo "#define restrict $_restrict" >> $TMPH
|
||||
|
||||
# build tree in object directory if source path is different from current one
|
||||
|
16
ffmpeg.c
16
ffmpeg.c
@ -3488,6 +3488,21 @@ static void show_license(void)
|
||||
{
|
||||
show_banner();
|
||||
printf(
|
||||
#ifdef CONFIG_GPL
|
||||
"This program is free software; you can redistribute it and/or modify\n"
|
||||
"it under the terms of the GNU General Public License as published by\n"
|
||||
"the Free Software Foundation; either version 2 of the License, or\n"
|
||||
"(at your option) any later version.\n"
|
||||
"\n"
|
||||
"This program is distributed in the hope that it will be useful,\n"
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
|
||||
"GNU General Public License for more details.\n"
|
||||
"\n"
|
||||
"You should have received a copy of the GNU General Public License\n"
|
||||
"along with this program; if not, write to the Free Software\n"
|
||||
"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"
|
||||
#else
|
||||
"This library is free software; you can redistribute it and/or\n"
|
||||
"modify it under the terms of the GNU Lesser General Public\n"
|
||||
"License as published by the Free Software Foundation; either\n"
|
||||
@ -3501,6 +3516,7 @@ static void show_license(void)
|
||||
"You should have received a copy of the GNU Lesser General Public\n"
|
||||
"License along with this library; if not, write to the Free Software\n"
|
||||
"Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n"
|
||||
#endif
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user