version update, bld tweaks, resize track booby, 10fps for images
[goodguy/cinelerra.git] / cinelerra-5.1 / configure.ac
index 0a6cd86b70efe0f95720ed8304bf5dd1fb17cb40..9305fe2c7d367c7f3e26677dc95fc7496f2e71a2 100644 (file)
@@ -54,7 +54,6 @@ CHECK_WITH([libzmpeg],[build libzmpeg],[LIBZMPEG],[yes])
 CHECK_WITH([commercial],[enable commercial capture],[COMMERCIAL],[yes])
 CHECK_WITH([thirdparty],[use thirdparty build],[CIN_3RDPARTY],[yes])
 CHECK_WITH([shuttle],[shuttle device],[SHUTTLE],[yes])
-CHECK_WITH([shuttle-usb],[use libusb for shuttle],[SHUTTLE_USB],[no])
 
 if test "x$WANT_LV2" != "xno"; then
   GTK2_LIBS=`pkg-config --libs gtk+-2.0`
@@ -226,10 +225,9 @@ PKG_3RD([flac],[auto],
   [ include ])
 
 PKG_3RD([giflib],[yes],
-  [giflib-5.1.4],
-  [ lib/.libs/libgif.a \
-    util/libgetarg.a ],
-  [ lib ])
+  [giflib-5.1.6],
+  [ libgif.a ],
+  [ . ])
 
 PKG_3RD([ilmbase],[auto],
   [ilmbase-2.2.1],
@@ -437,10 +435,30 @@ AC_DEFUN([REQUIRE_PROG], [
  fi
 ])
 
-# Checks for programs.
+## arch dep tests
+ARCH=[`uname -m`]
+I86=[`expr "x$ARCH" : 'xi[346]86.*'`]
+X86=[`expr "x$ARCH" : 'x..._64*'`]
+
+if test "x$I86$X86" != "x00" ; then
+  # Checks for ix86 programs.
+  REQUIRE_PROG(NASM, [nasm])
+  # libx264 nasm fix
+  AC_MSG_CHECKING([nasm x264 compatible])
+  echo "vmovdqa32 [[eax]]{k1}{z}, zmm0" > conftest.asm
+  nasm conftest.asm -o conftest.o > /dev/null 2>&1
+  if test $? != 0 ; then
+   AC_MSG_RESULT([no])
+   AC_MSG_WARN([libx264 built without assembly code])
+   X264_CFG_PARAMS="$X264_CFG_PARAMS --disable-asm"
+  else
+   AC_MSG_RESULT([yes])
+  fi
+  rm -f conftest.asm conftest.o
+  REQUIRE_PROG(YASM, [yasm])
+fi
+## end arch dep tests
 
-REQUIRE_PROG(NASM, [nasm])
-REQUIRE_PROG(YASM, [yasm])
 REQUIRE_PROG(OBJCOPY, [objcopy])
 if test "x$FATAL_ERROR" != "x"; then
  AC_MSG_ERROR("fatal eror.")
@@ -448,19 +466,6 @@ fi
 CHECK_PROG(PACTL, [pactl])
 WANT_PACTL=$PROG_PACTL
 
-# libx264 nasm fix
-AC_MSG_CHECKING([nasm x264 compatible])
-echo "vmovdqa32 [[eax]]{k1}{z}, zmm0" > conftest.asm
-nasm conftest.asm -o conftest.o > /dev/null 2>&1
-if test $? != 0 ; then
- AC_MSG_RESULT([no])
- AC_MSG_WARN([libx264 built without assembly code])
- X264_CFG_PARAMS="$X264_CFG_PARAMS --disable-asm"
-else
- AC_MSG_RESULT([yes])
-fi
-rm -f conftest.asm conftest.o
-
 AC_CHECK_DECL([X_HAVE_UTF8_STRING],,[no_utf=yes],[#include <X11/Xlib.h>])
 if test "$no_utf" = "yes"; then
   AC_MSG_ERROR([Cinelerra requires utf8 support in X Windows.])
@@ -577,12 +582,15 @@ CHECK_LIB([vdpau], [vdpau], [vdp_device_create_x11])
 AC_DEFUN([CHECK_WANT], [
 RESULT=yes
 # WANT_$1
-if test "x$WANT_$1" != "xyes" -a "x$WANT_$1" != "xno" ; then
+if test "x$WANT_$1" != "xno" ; then
 AC_ARG_WITH(m4_tolower([$1]),
  AC_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))], [$3] (auto)),
   [WANT_$1=$withval],[WANT_$1=$2])
  m4_quote($4)
  if test "x$RESULT" = "xno" -a "x$PKG_$1" = "x"; then
+  if test "x$WANT_$1" = "xyes" ; then
+    AC_MSG_ERROR([required for $1 support.])
+  fi
   echo "=== want $1 Failed."
   WANT_$1=no
  elif test "x$WANT_$1" = "xauto" ; then
@@ -638,6 +646,10 @@ CHECK_WANT([ESOUND], [no], [use esd], [
  CHECK_LIB([audiofile], [audiofile], [afOpenFile])
  CHECK_HEADERS([audiofile], [audiofile headers], [audiofile.h])])
 
+CHECK_WANT([SHUTTLE_USB], [yes], [use libusb-1.0], [
+ CHECK_LIB([libusbx], [usb-1.0], [libusb_init])
+ CHECK_HEADERS([libusbx], [libusb headers], [libusb-1.0/libusb.h])])
+
 CHECK_WANT([LV2], [auto], [use lv2], [
  saved_CFLAGS="$CFLAGS"
  CHECK_LIB([lilv], [lilv-0], [lilv_world_new])
@@ -850,8 +862,6 @@ echo "  using: with-noelision = $WANT_NOELISION"
 echo "  using: with-booby = $WANT_BOOBY"
 echo "  using: with-libzmpeg = $WANT_LIBZMPEG"
 echo "  using: with-commerical = $WANT_COMMERCIAL"
-echo "  using: with-shuttle = $WANT_SHUTTLE"
-echo "  using: with-shuttle-usb = $WANT_SHUTTLE_USB"
 echo ""
 echo "  using: thirdparty build = $WANT_CIN_3RDPARTY"
 echo "  using: single-user  = $WANT_CINBIN_BUILD"
@@ -875,9 +885,6 @@ fi
 if test "x$WANT_BOOBY" != "xno"; then
   CFG_CFLAGS+=" -DBOOBY"
 fi
-if test "x$WANT_SHUTTLE_USB" != "xno"; then
-  EXTRA_LIBS+=' -lusb-1.0'
-fi
 
 # intel lock elision bugs
 if test "x$WANT_NOELISION" != "xno"; then