diff options
author | brian-ch <brian-ch@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2015-04-03 20:42:27 +0000 |
---|---|---|
committer | brian-ch <brian-ch@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2015-04-03 20:42:27 +0000 |
commit | f80199e9dfde699a8c6c3de5e182f64755805efd (patch) | |
tree | c8a0030f681840bde74a2144ccfa6311c229de9e /configure | |
parent | d3fab250e5da9a9d894d5e4d0c78d3d16b86a8f4 (diff) | |
download | usdx-f80199e9dfde699a8c6c3de5e182f64755805efd.tar.gz usdx-f80199e9dfde699a8c6c3de5e182f64755805efd.tar.xz usdx-f80199e9dfde699a8c6c3de5e182f64755805efd.zip |
Update configure to detect lua5.3 and ffmpeg 2.6
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3113 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 290 |
1 files changed, 269 insertions, 21 deletions
@@ -4528,7 +4528,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libpng_VERSION_INT -le 60000000; then - if test $libpng_VERSION_INT -ge 54015100; then + if test $libpng_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $libpng_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $libpng_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -4748,7 +4750,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libpng_VERSION_INT -le 60000000; then - if test $libpng_VERSION_INT -ge 54015100; then + if test $libpng_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $libpng_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $libpng_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -5012,11 +5016,234 @@ See the pkg-config man page for more details. fi -# find lua 5.2 or 5.11 +# find lua 5.3, 5.2 or 5.11 # (K)Ubuntu uses lua5.2.pc and lua5.1.pc, # Mac OS X and other linux distributions use lua.pc have_lib="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua5.3" >&5 +$as_echo_n "checking for lua5.3... " >&6; } + if test x"$with_lua" = xnocheck; then + # do not call pkg-config, use user settings + have_lib="yes" + elif test x"$with_lua" != xno; then + # check if package exists + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "lua5.3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + + have_lib="yes" + lua_LIBS=`$PKG_CONFIG --libs --silence-errors "lua5.3"` + lua_LIBDIRS=`$PKG_CONFIG --libs-only-L --silence-errors "lua5.3"` + lua_LIBDIRS=` + echo "$lua_LIBDIRS" | $SED 's/^[ \t]*//' | $SED 's/[ \t]*$//' +` + # add library directories to LIBS (ignore *_LIBS for now) + if test -n "$lua_LIBDIRS"; then + LIBS="$LIBS $lua_LIBDIRS" + fi + +fi + fi + if test x$have_lib = xyes; then + lua_HAVE="yes" + if test -n "$lua_LIBDIRS"; then + # show additional lib-dirs + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($lua_LIBDIRS)" >&5 +$as_echo "yes ($lua_LIBDIRS)" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + else + lua_HAVE="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + # check if package is required + if test xcheck = xyes -o x"$with_lua" = xyes ; then + # print error message and quit + err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.3"` + as_fn_error $? " + +$err_msg + +Alternatively, you may set --with-lua=nocheck and the environment +variables lua_[...] (see configure --help) +to appropriate values to avoid the need to call pkg-config. + +See the pkg-config man page for more details. +" "$LINENO" 5 + fi + fi + +lua_lib_name="lua5.3" +if [ x$lua_HAVE = xyes ]; then + + if test x$lua_HAVE = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of lua" >&5 +$as_echo_n "checking version of lua... " >&6; } + + + # check if variable was defined by the user + if test -z "$lua_VERSION"; then + # if not, get it from pkg-config + if test x$lua_HAVE = xyes; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lua5.3\""; } >&5 + ($PKG_CONFIG --exists --print-errors "lua5.3") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + lua_VERSION=`$PKG_CONFIG --modversion --silence-errors "lua5.3"` +else + # print error message and quit + err_msg=`$PKG_CONFIG --errors-to-stdout --print-errors "lua5.3"` + as_fn_error $? " + +$err_msg + +If --with-lua=nocheck is defined the environment variable +lua_VERSION +must be set to avoid the need to call pkg-config. + +See the pkg-config man page for more details. +" "$LINENO" 5 + + +fi + fi + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: [$lua_VERSION]" >&5 +$as_echo "[$lua_VERSION]" >&6; } + else + lua_VERSION="0.0.0" + fi + + version=$lua_VERSION + + # strip leading non-numeric tokens + # (necessary for some ffmpeg-packages in ubuntu) + # example: 0d.51.1.0 -> 51.1.0 + version=`echo $version | sed 's/^[^.]*[^0-9.][^.]*\.//'` + + # replace "." and "-" with " " and ignore trailing tokens. + # 1.23.4-r2 will be splitted to [maj=1, min=23, rel=4]. + # In addition we delete everything after the first character + # which is not 0-9. + # 1.3a4-r32 will be [maj=1, min=3, rel=0]. + read major minor release ignore <<eof + `echo $version | tr '.-' ' ' | sed 's/[^0-9\ ].*//'` +eof + # Note: Do NOT indent the eof-delimiter + # We use a here-document (<<< here-strings not POSIX compatible) + + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + + # strip preceding 0s and set unset version-parts to 0 + lua_VERSION_MAJOR=$(($major)) + lua_VERSION_MINOR=$(($minor)) + lua_VERSION_RELEASE=$(($release)) + # integer representation: MMMmmmrrr (M:major,m:minor,r:release) + # can be used if pkg-config's comparison fails + lua_VERSION_INT=$(($lua_VERSION_MAJOR*1000000+$lua_VERSION_MINOR*1000+$lua_VERSION_RELEASE)) + + + + + + + + # for avutil: map library version to ffmpeg version + if test lua = "libavutil"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 +$as_echo_n "checking version of ffmpeg... " >&6; } + if test $lua_VERSION_INT -le 60000000; then + if test $lua_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $lua_VERSION_INT -ge 54015100; then + FFMPEG_VERSION="2.5" + elif test $lua_VERSION_INT -ge 54007001; then + FFMPEG_VERSION="2.4" + elif test $lua_VERSION_INT -ge 52066100; then + FFMPEG_VERSION="2.2" + elif test $lua_VERSION_INT -ge 52048100; then + FFMPEG_VERSION="2.1" + elif test $lua_VERSION_INT -ge 52038100; then + FFMPEG_VERSION="2.0" + elif test $lua_VERSION_INT -ge 52018100; then + FFMPEG_VERSION="1.2" + elif test $lua_VERSION_INT -ge 52013100; then + FFMPEG_VERSION="1.1" + elif test $lua_VERSION_INT -ge 51073101; then + FFMPEG_VERSION="1.0" + elif test $lua_VERSION_INT -ge 51054100; then + FFMPEG_VERSION="0.11" + elif test $lua_VERSION_INT -ge 51034101; then + FFMPEG_VERSION="0.10" + elif test $lua_VERSION_INT -ge 51032000; then + FFMPEG_VERSION="0.9" + elif test $lua_VERSION_INT -ge 51009001; then + FFMPEG_VERSION="0.8" + elif test $lua_VERSION_INT -ge 50043000; then + FFMPEG_VERSION="0.7" + else + FFMPEG_VERSION="0" + fi + else + FFMPEG_VERSION="0" + fi + + version=$FFMPEG_VERSION + + # strip leading non-numeric tokens + # (necessary for some ffmpeg-packages in ubuntu) + # example: 0d.51.1.0 -> 51.1.0 + version=`echo $version | sed 's/^[^.]*[^0-9.][^.]*\.//'` + + # replace "." and "-" with " " and ignore trailing tokens. + # 1.23.4-r2 will be splitted to [maj=1, min=23, rel=4]. + # In addition we delete everything after the first character + # which is not 0-9. + # 1.3a4-r32 will be [maj=1, min=3, rel=0]. + read major minor release ignore <<eof + `echo $version | tr '.-' ' ' | sed 's/[^0-9\ ].*//'` +eof + # Note: Do NOT indent the eof-delimiter + # We use a here-document (<<< here-strings not POSIX compatible) + + test -z $major && major=0 + test -z $minor && minor=0 + test -z $release && release=0 + + # strip preceding 0s and set unset version-parts to 0 + FFMPEG_VERSION_MAJOR=$(($major)) + FFMPEG_VERSION_MINOR=$(($minor)) + FFMPEG_VERSION_RELEASE=$(($release)) + # integer representation: MMMmmmrrr (M:major,m:minor,r:release) + # can be used if pkg-config's comparison fails + FFMPEG_VERSION_INT=$(($FFMPEG_VERSION_MAJOR*1000000+$FFMPEG_VERSION_MINOR*1000+$FFMPEG_VERSION_RELEASE)) + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: [$FFMPEG_VERSION]" >&5 +$as_echo "[$FFMPEG_VERSION]" >&6; } + fi + +else + + have_lib="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua5.2" >&5 $as_echo_n "checking for lua5.2... " >&6; } if test x"$with_lua" = xnocheck; then @@ -5076,8 +5303,8 @@ See the pkg-config man page for more details. fi fi -lua_lib_name="lua5.2" -if [ x$lua_HAVE = xyes ]; then + lua_lib_name="lua5.2" + if [ x$lua_HAVE = xyes ]; then if test x$lua_HAVE = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of lua" >&5 @@ -5162,7 +5389,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $lua_VERSION_INT -le 60000000; then - if test $lua_VERSION_INT -ge 54015100; then + if test $lua_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $lua_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $lua_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -5235,7 +5464,7 @@ eof $as_echo "[$FFMPEG_VERSION]" >&6; } fi -else + else have_lib="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua5.1" >&5 @@ -5297,8 +5526,8 @@ See the pkg-config man page for more details. fi fi - lua_lib_name="lua5.1" - if [ x$lua_HAVE = xyes ]; then + lua_lib_name="lua5.1" + if [ x$lua_HAVE = xyes ]; then if test x$lua_HAVE = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of lua" >&5 @@ -5383,7 +5612,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $lua_VERSION_INT -le 60000000; then - if test $lua_VERSION_INT -ge 54015100; then + if test $lua_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $lua_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $lua_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -5456,7 +5687,7 @@ eof $as_echo "[$FFMPEG_VERSION]" >&6; } fi - else + else have_lib="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lua >= 5.1" >&5 @@ -5518,7 +5749,7 @@ See the pkg-config man page for more details. fi fi - lua_lib_name="lua" + lua_lib_name="lua" if test x$lua_HAVE = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of lua" >&5 @@ -5603,7 +5834,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $lua_VERSION_INT -le 60000000; then - if test $lua_VERSION_INT -ge 54015100; then + if test $lua_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $lua_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $lua_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -5676,7 +5909,8 @@ eof $as_echo "[$FFMPEG_VERSION]" >&6; } fi - fi + fi + fi fi @@ -5900,7 +6134,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libavcodec_VERSION_INT -le 60000000; then - if test $libavcodec_VERSION_INT -ge 54015100; then + if test $libavcodec_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $libavcodec_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $libavcodec_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -6239,7 +6475,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libavformat_VERSION_INT -le 60000000; then - if test $libavformat_VERSION_INT -ge 54015100; then + if test $libavformat_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $libavformat_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $libavformat_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -6457,7 +6695,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libavutil_VERSION_INT -le 60000000; then - if test $libavutil_VERSION_INT -ge 54015100; then + if test $libavutil_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $libavutil_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $libavutil_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -6690,7 +6930,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libswscale_VERSION_INT -le 60000000; then - if test $libswscale_VERSION_INT -ge 54015100; then + if test $libswscale_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $libswscale_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $libswscale_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -6919,7 +7161,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libprojectM_VERSION_INT -le 60000000; then - if test $libprojectM_VERSION_INT -ge 54015100; then + if test $libprojectM_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $libprojectM_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $libprojectM_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -7223,7 +7467,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $portaudio_VERSION_INT -le 60000000; then - if test $portaudio_VERSION_INT -ge 54015100; then + if test $portaudio_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $portaudio_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $portaudio_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" @@ -7452,7 +7698,9 @@ eof { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of ffmpeg" >&5 $as_echo_n "checking version of ffmpeg... " >&6; } if test $libpcre_VERSION_INT -le 60000000; then - if test $libpcre_VERSION_INT -ge 54015100; then + if test $libpcre_VERSION_INT -ge 54020100; then + FFMPEG_VERSION="2.6" + elif test $libpcre_VERSION_INT -ge 54015100; then FFMPEG_VERSION="2.5" elif test $libpcre_VERSION_INT -ge 54007001; then FFMPEG_VERSION="2.4" |