update openjpeg + x265, unproxy clip fix, config mods for lv2/opus/x265-10bit
[goodguy/history.git] / cinelerra-5.1 / configure.ac
index 60497a06150dce72d15a1f6cac4f81bed6dad61f..d3a03d4b0f0c4cd3925a7b494e2d8c3f8b9e3029 100644 (file)
@@ -36,7 +36,6 @@ CHECK_WITH([exec-name],[binary executable name],[CIN],[cin])
 CHECK_WITH([single-user],[to install cin in bin],[CINBIN_BUILD],[no])
 CHECK_WITH([ladspa-build],[build ladspa library],[LADSPA_BUILD],[yes])
 CHECK_WITH([lv2],[lv2 library support],[LV2],[yes])
-CHECK_WITH([lv2ui],[lv2 ui support],[LV2UI],[yes])
 CHECK_WITH([cinlib],[cinelerra library path],[CINLIB_DIR],[auto])
 CHECK_WITH([cindat],[cinelerra share path],[CINDAT_DIR],[auto])
 CHECK_WITH([plugin-dir],[plugin install dir],[PLUGIN_DIR],[auto])
@@ -47,14 +46,12 @@ CHECK_WITH([git-ffmpeg],[git ffmpeg using url],[GIT_FFMPEG],[no])
 CHECK_WITH([noelision],[use noelision/libpthread],[NOELISION],[auto])
 
 if test "x$WANT_LV2" != "xno"; then
-  if test "x$WANT_LV2UI" != "xno"; then
-    GTK2_LIBS=`pkg-config --libs gtk+-2.0`
-    AC_CHECK_LIB([m], [gtk_init], [HAVE_gtk=yes], [HAVE_gtk=no], [$GTK2_LIBS])
-    test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --cflags gtk+-2.0`" && HAVE_gtk=no
-    test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --libs gtk+-2.0`" && HAVE_gtk=no
-    if test "x$HAVE_gtk" = "xno"; then
-      AC_MSG_ERROR([LV2UI requires gtk+-2.0 support.])
-    fi
+  GTK2_LIBS=`pkg-config --libs gtk+-2.0`
+  AC_CHECK_LIB([m], [gtk_init], [HAVE_gtk=yes], [HAVE_gtk=no], [$GTK2_LIBS])
+  test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --cflags gtk+-2.0`" && HAVE_gtk=no
+  test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --libs gtk+-2.0`" && HAVE_gtk=no
+  if test "x$HAVE_gtk" = "xno"; then
+    AC_MSG_ERROR([LV2 requires gtk+-2.0 support.])
   fi
 fi
 
@@ -251,7 +248,7 @@ PKG_3RD([opus],[auto],
   [ include ])
 
 PKG_3RD([openjpeg],[auto],
-  [openjpeg-2.1.0-20160221],
+  [openjpeg-2.3.0],
   [ bin/libopenjp2.a ],
   [ src/lib/openjp2 ])
 
@@ -331,7 +328,7 @@ PKG_3RD([x264],[auto],
   [ . ])
 
 PKG_3RD([x265],[auto],
-  [x265_2.7],
+  [x265_2.8],
   [ libx265.a ],
   [ . source ])
 
@@ -380,6 +377,7 @@ AC_ARG_ENABLE([$1],
 
 CHECK_ENABLE([static-build], [STATIC_BUILD], [build static], [auto])
 CHECK_ENABLE([x264_hidepth], [X264_HIDEPTH], [build x264 10bit], [no])
+CHECK_ENABLE([x265_hidepth], [X265_HIDEPTH], [build x265 10bit], [no])
 
 test "x$WANT_STATIC_BUILD" = "xauto" && WANT_STATIC_BUILD=$WANT_CINBIN_BUILD
 
@@ -591,7 +589,7 @@ CHECK_WANT([ESOUND], [no], [use esd], [
  CHECK_LIB([audiofile], [audiofile], [afOpenFile])
  CHECK_HEADERS([audiofile], [audiofile headers], [audiofile.h])])
 
-CHECK_WANT([LIBOPUS], [auto], [use libopus], [
+CHECK_WANT([OPUS], [auto], [use libopus], [
  CHECK_LIB([opus], [opus], [opus_multistream_decoder_create])
  CHECK_HEADERS([opus], [libopus headers], [opus/opus_multistream.h])])
 
@@ -603,16 +601,9 @@ CHECK_WANT([LV2], [auto], [use lv2], [
  CHECK_LIB([sratom], [sratom-0], [sratom_new])
  CFLAGS="-I/usr/include/lilv-0"
  CHECK_HEADERS([lv2], [lilv headers], [lilv/lilv.h])
- CFLAGS="$saved_CFLAGS"])
-
-if test "x$WANT_LV2" = "xno"; then
- WANT_LV2UI=no
-fi
-
-CHECK_WANT([LV2UI], [auto], [use lv2ui], [
  CHECK_LIB([suil], [suil-0], [suil_instance_new])
  CFLAGS="-I/usr/include/suil-0"
- CHECK_HEADERS([lv2ui], [suil headers], [suil/suil.h])
+ CHECK_HEADERS([lv2], [suil headers], [suil/suil.h])
  CFLAGS="$saved_CFLAGS"])
 
 CHECK_WANT([DL], [auto], [system has libdl], [
@@ -757,10 +748,13 @@ PKG_PROVIDE([lilv], [$WANT_LV2])
 PKG_PROVIDE([sratom], [$WANT_LV2])
 PKG_PROVIDE([serd], [$WANT_LV2])
 PKG_PROVIDE([sord], [$WANT_LV2])
-PKG_PROVIDE([suil], [$WANT_LV2UI])
+PKG_PROVIDE([suil], [$WANT_LV2])
 
-test "x$WANT_LV2"   = "xyes" && test "x$BUILD_lilv" = "x0" && CFG_CFLAGS+=' -I/usr/include/lilv-0'
-test "x$WANT_LV2UI" = "xyes" && test "x$BUILD_suil" = "x0" && CFG_CFLAGS+=' -I/usr/include/suil-0'
+if test "x$WANT_LV2" = "xyes"; then
+  if test "x$HAVE_lv2" = "xyes" -a "x$BUILD_lilv" = "x0"; then
+    CFG_CFLAGS+=' -I/usr/include/lilv-0 -I/usr/include/suil-0'
+  fi
+fi
 
 AC_SUBST(STATIC_BLDS)
 AC_SUBST(SHARED_LIBS)
@@ -772,7 +766,7 @@ AC_SUBST(SYSTEM_LIBS)
 
 echo ""
 for v in GL XFT XXF86VM OSS ALSA FIREWIRE DV DVB \
-        VIDEO4LINUX2 ESOUND PACTL OPENEXR LV2 LV2UI; do
+        VIDEO4LINUX2 ESOUND PACTL OPENEXR LV2; do
   eval vv="\$WANT_$v"
   if test "x$vv" != "xno"; then
     CFG_CFLAGS+=" -DHAVE_$v"
@@ -814,10 +808,12 @@ if test "x$HAVE_DL" = "xyes"; then
   EXTRA_LIBS+=' -ldl'
   FFMPEG_EXTRA_CFG+=' --extra-ldflags="-ldl"'
 fi
-if test "x$HAVE_opus" = "xyes"; then
-  EXTRA_LIBS+=' -lopus'
-  CFG_CFLAGS+=' -I/usr/include/opus'
+if test "x$WANT_OPUS" = "xyes"; then
   FFMPEG_EXTRA_CFG+=' --enable-libopus'
+  if "x$HAVE_OPUS" = "xyes" -a "x$BUILD_opus" = "x0"; then
+    EXTRA_LIBS+=' -lopus'
+    CFG_CFLAGS+=' -I/usr/include/opus'
+  fi
 fi
 
 # intel lock elision bugs
@@ -833,6 +829,7 @@ fi
 AC_SUBST(EXTRA_LIBS)
 AC_SUBST(FFMPEG_EXTRA_CFG)
 AC_SUBST(WANT_X264_HIDEPTH)
+AC_SUBST(WANT_X265_HIDEPTH)
 
 AC_SUBST(CFG_CFLAGS)
 AC_SUBST(CFG_CXXFLAGS)
@@ -889,9 +886,12 @@ echo ""
 for flg in $CFG_CXXFLAGS; do echo "CXXFLAGS += $flg"; done
 echo ""
 
-if test  $WANT_X264_HIDEPTH = "yes" ; then
+if test "x$WANT_X264_HIDEPTH" = "xyes" ; then
   X264_CFG_PARAMS="$X264_CFG_PARAMS --bit-depth=10"
 fi
+if test "x$WANT_X265_HIDEPTH" = "xyes" ; then
+  X265_CFG_PARAMS="$X265_CFG_PARAMS -DHIGH_BIT_DEPTH:BOOL=ON" # -DMAIN12:BOOL=ON"
+fi
 
 for pkg in $STATIC_PKGS; do
   eval pkg_lib="\$PKG_$pkg"
@@ -955,11 +955,14 @@ if test "x$HAVE_tiff" = "xyes"; then
 fi
 
 if test "x$WANT_GIT_FFMPEG" != "xno"; then
-echo "ffmpeg.git := $WANT_GIT_FFMPEG"
+  echo "ffmpeg.git := $WANT_GIT_FFMPEG"
 fi
-if test "x$HAVE_opus" = "xyes"; then
-echo 'ffmpeg.cflags+=" -I/usr/include/opus"'
+if test "x$WANT_OPUS" = "xyes" -a "x$BUILD_opus" = "x0"; then
+  echo 'ffmpeg.cflags+=" -I/usr/include/opus"'
 fi
 if test "x$X264_CFG_PARAMS" != "x" ; then
   echo "x264.cfg_params :=$X264_CFG_PARAMS --enable-static --enable-pic"
 fi
+if test "x$X265_CFG_PARAMS" != "x" ; then
+  echo "x265.cfg_params :=$X265_CFG_PARAMS -DENABLE_SHARED=no"
+fi