[SCM] mjpegtools/master: Imported Upstream version 2.0.0+debian

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Sep 2 13:49:35 UTC 2012


The following commit has been merged in the master branch:
commit 2ab083dcc321b12aa30ea0156baa61241eb308a6
Author: Reinhard Tartler <siretart at tauware.de>
Date:   Sun Sep 2 14:52:22 2012 +0200

    Imported Upstream version 2.0.0+debian

diff --git a/BUGS b/BUGS
index e4a1f4a..a533a1d 100644
--- a/BUGS
+++ b/BUGS
@@ -18,7 +18,23 @@
 	mux-er has	checked for /ensured video buffer size bounding.
 
 
-4.	mpeg2enc is currently broken for 422 and 444 video.   The problem is that
+4.	mpeg2enc is currently broken for 422 and 444 video. The problem is that
 	the calculations for checking chrominance in the the motion compensation
 	search assume 2-pel sub-sampled U and V in X and Y.
 
+5. 	lavplay, lavrec seek problem when you have movies that are longer than
+	2:30, they play back well but the slider in glav does not work
+	proper when about 2:30 is reached
+
+6.	zoran card/lavrec problem on modern machines. It works only if you
+	don't have more than 2GB of Ram. A patch exists but didn't make into
+	the kernel. The Patch does not apply well on a newer Kernel thatn
+	2.6.20
+
+7.	mjpegtools do not compile when you have X11 an SDL installed. And 
+	disable SDL with a configure option.
+
+8.	2.6.38 Kernels don't have v4l(1) any more. So lavrec does not work any
+	more. Actually you can't compile lavrec. the configure script detects
+	that and disables lavrec if the kernel headers for v4l are not found.
+	lavrec should be updated to us v4l2 
diff --git a/ChangeLog b/ChangeLog
index 7b553a0..c885019 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -77,6 +77,9 @@
 
 CVS log:
 $Log: ChangeLog,v $
+Revision 1.16  2011/05/14 11:59:36  waldviertler
+documented some (hopefully most to all) changes since the last release
+
 Revision 1.15  2008/11/29 19:31:20  wackston2
 Trial fix: stop sampling frames at Q floor (where Actual bits *expected* to be
            < Target bits) to compute mean Target/Actual ratio after pass2
@@ -187,3 +190,25 @@ Changes to lavtools-1.0
 
 - steering of lavplay (forward, backward, pause etc.) with commands
   (for real command line hardliners)
+
+Changes to lavtools 1.9.0 (in no particular order)
+
+- added changes to support the compiling for new CPUs
+
+- some autoconf/configure fixes (x11 and other libs
+- patch to compile png2yuv with newer png lib
+- clean upf for vrious compiling problems
+- jpegutil fix for neser libjpeg
+
+- mpeg2enc some more two-pass encoding support
+- mpeg2enc fixes for bit rate problems
+
+- mplex added support for subtitle streams from tcextract 
+- mplex small fixes
+
+- y4mdenoise better, faster, fixed the problem in dark/cloudy areas
+
+- fixes for the __progname problem
+
+- yuvdenoise god speed up by a SSE2 ASM version of some code
+
diff --git a/Makefile.in b/Makefile.in
index bcf00eb..7b645df 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -219,13 +219,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/aclocal.m4 b/aclocal.m4
index 1f759bf..e2242eb 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -1035,7 +1035,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
 # to the aix ld manual.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+AC_LINK_IFELSE([AC_LANG_PROGRAM],[
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
 	/^0/ {
@@ -4840,9 +4840,18 @@ _LT_EOF
 	# implicitly export all symbols.
         save_LDFLAGS="$LDFLAGS"
         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
+        AC_LINK_IFELSE(
+          [AC_LANG_SOURCE(
+	     [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+			   [C++], [[int foo (void) { return 0; }]],
+			   [Fortran 77], [[
+       subroutine foo
+       end]],
+			   [Fortran], [[
+       subroutine foo
+       end]])])], [
           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
+        ])
         LDFLAGS="$save_LDFLAGS"
       else
 	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
@@ -7858,15 +7867,15 @@ m4_define([lt_dict_filter],
 
 # Generated from ltversion.in.
 
-# serial 3017 ltversion.m4
+# serial 3018 ltversion.m4
 # This file is part of GNU Libtool
 
 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
-m4_define([LT_PACKAGE_REVISION], [1.3017])
+m4_define([LT_PACKAGE_REVISION], [1.3018])
 
 AC_DEFUN([LTVERSION_VERSION],
 [macro_version='2.2.6b'
-macro_revision='1.3017'
+macro_revision='1.3018'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
@@ -7965,6 +7974,7 @@ m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
 m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
 
 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
 # 
 # Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
 #
@@ -7992,7 +8002,10 @@ m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
 AC_DEFUN([PKG_PROG_PKG_CONFIG],
 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
 fi
@@ -8005,7 +8018,6 @@ if test -n "$PKG_CONFIG"; then
 		AC_MSG_RESULT([no])
 		PKG_CONFIG=""
 	fi
-		
 fi[]dnl
 ])# PKG_PROG_PKG_CONFIG
 
@@ -8014,21 +8026,20 @@ fi[]dnl
 # Check to see whether a particular set of modules exists.  Similar
 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
 #
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
 # --------------------------------------------------------------
 AC_DEFUN([PKG_CHECK_EXISTS],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 if test -n "$PKG_CONFIG" && \
     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
+  m4_default([$2], [:])
 m4_ifvaln([$3], [else
   $3])dnl
 fi])
 
-
 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 # ---------------------------------------------
 m4_define([_PKG_CONFIG],
@@ -8081,6 +8092,7 @@ and $1[]_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.])
 
 if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
@@ -8090,7 +8102,7 @@ if test $pkg_failed = yes; then
 	# Put the nasty error message in config.log where it belongs
 	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
-	ifelse([$4], , [AC_MSG_ERROR(dnl
+	m4_default([$4], [AC_MSG_ERROR(
 [Package requirements ($2) were not met:
 
 $$1_PKG_ERRORS
@@ -8098,212 +8110,27 @@ $$1_PKG_ERRORS
 Consider adjusting the PKG_CONFIG_PATH environment variable if you
 installed software in a non-standard prefix.
 
-_PKG_TEXT
-])],
-		[AC_MSG_RESULT([no])
-                $4])
+_PKG_TEXT])[]dnl
+        ])
 elif test $pkg_failed = untried; then
-	ifelse([$4], , [AC_MSG_FAILURE(dnl
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
 path to pkg-config.
 
 _PKG_TEXT
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-		[$4])
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
 else
 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
         AC_MSG_RESULT([yes])
-	ifelse([$3], , :, [$3])
+	$3
 fi[]dnl
 ])# PKG_CHECK_MODULES
 
-# Configure paths for SDL
-# Sam Lantinga 9/21/99
-# stolen from Manish Singh
-# stolen back from Frank Belew
-# stolen from Manish Singh
-# Shamelessly stolen from Owen Taylor
-
-dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
-dnl
-AC_DEFUN([AM_PATH_SDL],
-[dnl 
-dnl Get the cflags and libraries from the sdl-config script
-dnl
-AC_ARG_WITH(sdl-prefix,[  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)],
-            sdl_prefix="$withval", sdl_prefix="")
-AC_ARG_WITH(sdl-exec-prefix,[  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
-            sdl_exec_prefix="$withval", sdl_exec_prefix="")
-AC_ARG_ENABLE(sdltest, [  --disable-sdltest       Do not try to compile and run a test SDL program],
-		    , enable_sdltest=yes)
-
-  if test x$sdl_exec_prefix != x ; then
-    sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
-    if test x${SDL_CONFIG+set} != xset ; then
-      SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
-    fi
-  fi
-  if test x$sdl_prefix != x ; then
-    sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
-    if test x${SDL_CONFIG+set} != xset ; then
-      SDL_CONFIG=$sdl_prefix/bin/sdl-config
-    fi
-  fi
-
-  as_save_PATH="$PATH"
-  if test "x$prefix" != xNONE; then
-    PATH="$prefix/bin:$prefix/usr/bin:$PATH"
-  fi
-  AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
-  PATH="$as_save_PATH"
-  min_sdl_version=ifelse([$1], ,0.11.0,$1)
-  AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
-  no_sdl=""
-  if test "$SDL_CONFIG" = "no" ; then
-    no_sdl=yes
-  else
-    SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
-    SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
-
-    sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-    if test "x$enable_sdltest" = "xyes" ; then
-      ac_save_CFLAGS="$CFLAGS"
-      ac_save_CXXFLAGS="$CXXFLAGS"
-      ac_save_LIBS="$LIBS"
-      CFLAGS="$CFLAGS $SDL_CFLAGS"
-      CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
-      LIBS="$LIBS $SDL_LIBS"
-dnl
-dnl Now check if the installed SDL is sufficiently new. (Also sanity
-dnl checks the results of sdl-config to some extent
-dnl
-      rm -f conf.sdltest
-      AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "SDL.h"
-
-char*
-my_strdup (char *str)
-{
-  char *new_str;
-  
-  if (str)
-    {
-      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
-      strcpy (new_str, str);
-    }
-  else
-    new_str = NULL;
-  
-  return new_str;
-}
-
-int main (int argc, char *argv[])
-{
-  int major, minor, micro;
-  char *tmp_version;
-
-  /* This hangs on some systems (?)
-  system ("touch conf.sdltest");
-  */
-  { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = my_strdup("$min_sdl_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_sdl_version");
-     exit(1);
-   }
-
-   if (($sdl_major_version > major) ||
-      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
-      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
-    {
-      return 0;
-    }
-  else
-    {
-      printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
-      printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
-      printf("*** best to upgrade to the required version.\n");
-      printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
-      printf("*** to point to the correct copy of sdl-config, and remove the file\n");
-      printf("*** config.cache before re-running configure\n");
-      return 1;
-    }
-}
-
-],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CFLAGS="$ac_save_CFLAGS"
-       CXXFLAGS="$ac_save_CXXFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-  fi
-  if test "x$no_sdl" = x ; then
-     AC_MSG_RESULT(yes)
-     ifelse([$2], , :, [$2])     
-  else
-     AC_MSG_RESULT(no)
-     if test "$SDL_CONFIG" = "no" ; then
-       echo "*** The sdl-config script installed by SDL could not be found"
-       echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the SDL_CONFIG environment variable to the"
-       echo "*** full path to sdl-config."
-     else
-       if test -f conf.sdltest ; then
-        :
-       else
-          echo "*** Could not run SDL test program, checking why..."
-          CFLAGS="$CFLAGS $SDL_CFLAGS"
-          CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
-          LIBS="$LIBS $SDL_LIBS"
-          AC_TRY_LINK([
-#include <stdio.h>
-#include "SDL.h"
-
-int main(int argc, char *argv[])
-{ return 0; }
-#undef  main
-#define main K_and_R_C_main
-],      [ return 0; ],
-        [ echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding SDL or finding the wrong"
-          echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-	  echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
-        [ echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means SDL was incorrectly installed"
-          echo "*** or that you have moved SDL since it was installed. In the latter case, you"
-          echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
-          CFLAGS="$ac_save_CFLAGS"
-          CXXFLAGS="$ac_save_CXXFLAGS"
-          LIBS="$ac_save_LIBS"
-       fi
-     fi
-     SDL_CFLAGS=""
-     SDL_LIBS=""
-     ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(SDL_CFLAGS)
-  AC_SUBST(SDL_LIBS)
-  rm -f conf.sdltest
-])
-
 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
diff --git a/aenc/Makefile.in b/aenc/Makefile.in
index 871ef9c..67d1434 100644
--- a/aenc/Makefile.in
+++ b/aenc/Makefile.in
@@ -160,13 +160,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/config.h.in b/config.h.in
index 52b6f88..12ba2f0 100644
--- a/config.h.in
+++ b/config.h.in
@@ -63,7 +63,7 @@
 /* pthread stack sizes accesible */
 #undef HAVE_PTHREADSTACKSIZE
 
-/* SDL library present */
+/* libsdl > 1.1.3 present */
 #undef HAVE_SDL
 
 /* SDL_gfx library present */
diff --git a/configure b/configure
index 9b20302..85a92fd 100755
--- a/configure
+++ b/configure
@@ -1,13 +1,13 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for mjpegtools 2.0.0.
+# Generated by GNU Autoconf 2.68 for mjpegtools 2.0.0.
 #
 # Report bugs to <mjpeg-developer at lists.sourceforge.net>.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -91,6 +91,7 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
   # We cannot yet assume a decent shell, so we have to provide a
 	# neutralization value for shells without unset; and this also
 	# works around shells that cannot unset nonexistent variables.
+	# Preserve -v and -x to the replacement shell.
 	BASH_ENV=/dev/null
 	ENV=/dev/null
 	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 	export CONFIG_SHELL
-	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+	case $- in # ((((
+	  *v*x* | *x*v* ) as_opts=-vx ;;
+	  *v* ) as_opts=-v ;;
+	  *x* ) as_opts=-x ;;
+	  * ) as_opts= ;;
+	esac
+	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 fi
 
     if test x$as_have_required = xno; then :
@@ -319,7 +327,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -359,19 +367,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -682,7 +690,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -764,11 +772,12 @@ HAVE_SDL_FALSE
 HAVE_SDL_TRUE
 SDL_LIBS
 SDL_CFLAGS
-SDL_CONFIG
 HAVE_GTK_FALSE
 HAVE_GTK_TRUE
 GTK_LIBS
 GTK_CFLAGS
+HAVE_LIBXXF86DGA_FALSE
+HAVE_LIBXXF86DGA_TRUE
 V4LCONF_LIBS
 X_EXTRA_LIBS
 X_LIBS
@@ -785,6 +794,8 @@ HAVE_LIBQUICKTIME_FALSE
 HAVE_LIBQUICKTIME_TRUE
 LIBQUICKTIME_LIBS
 LIBQUICKTIME_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
 PKG_CONFIG
 JPEG_CFLAGS
 JPEG_LIBS
@@ -934,6 +945,9 @@ with_extra_cflags
 with_libquicktime
 with_libdv
 with_libpng
+with_dga
+with_gtk
+with_libsdl
 enable_dependency_tracking
 enable_shared
 enable_static
@@ -942,10 +956,8 @@ enable_fast_install
 with_gnu_ld
 enable_libtool_lock
 enable_largefile
+with_v4l
 with_x
-with_sdl_prefix
-with_sdl_exec_prefix
-enable_sdltest
 enable_assert
 '
       ac_precious_vars='build_alias
@@ -964,6 +976,8 @@ CXXCPP
 CCAS
 CCASFLAGS
 PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
 LIBQUICKTIME_CFLAGS
 LIBQUICKTIME_LIBS
 LIBPNG_CFLAGS
@@ -972,7 +986,9 @@ LIBDV_CFLAGS
 LIBDV_LIBS
 XMKMF
 GTK_CFLAGS
-GTK_LIBS'
+GTK_LIBS
+SDL_CFLAGS
+SDL_LIBS'
 
 
 # Initialize some variables set by options.
@@ -1035,8 +1051,9 @@ do
   fi
 
   case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1081,7 +1098,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1107,7 +1124,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1311,7 +1328,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1327,7 +1344,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1357,8 +1374,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1366,7 +1383,7 @@ Try \`$0 --help' for more information."
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1376,7 +1393,7 @@ Try \`$0 --help' for more information."
     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1384,13 +1401,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1413,7 +1430,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1427,8 +1444,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1443,9 +1460,9 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1484,11 +1501,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
 	pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1528,7 +1545,7 @@ Configuration:
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1614,7 +1631,6 @@ Optional Features:
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --disable-largefile     omit support for large files
-  --disable-sdltest       Do not try to compile and run a test SDL program
   --disable-assert        Disable assertions (compile with NDEBUG).
 
 Optional Packages:
@@ -1625,12 +1641,14 @@ Optional Packages:
   --without-libquicktime  Do not use libquicktime.
   --without-libdv         Do not use libdv.
   --without-libpng        Do not use libpng.
+  --without-dga           Do not use dga.
+  --without-gtk           Do not use gtk.
+  --without-libsdl        Do not use libsdl.
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --without-v4l           Disable v4l1 API
   --with-x                use the X Window System
-  --with-sdl-prefix=PFX   Prefix where SDL is installed (optional)
-  --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)
 
 Some influential environment variables:
   CC          C compiler command
@@ -1647,6 +1665,10 @@ Some influential environment variables:
   CCAS        assembler compiler command (defaults to CC)
   CCASFLAGS   assembler compiler flags (defaults to CFLAGS)
   PKG_CONFIG  path to pkg-config utility
+  PKG_CONFIG_PATH
+              directories to add to pkg-config's search path
+  PKG_CONFIG_LIBDIR
+              path overriding pkg-config's built-in search path
   LIBQUICKTIME_CFLAGS
               C compiler flags for LIBQUICKTIME, overriding pkg-config
   LIBQUICKTIME_LIBS
@@ -1660,6 +1682,8 @@ Some influential environment variables:
   XMKMF       Path to xmkmf, Makefile generator for X Window System
   GTK_CFLAGS  C compiler flags for GTK, overriding pkg-config
   GTK_LIBS    linker flags for GTK, overriding pkg-config
+  SDL_CFLAGS  C compiler flags for SDL, overriding pkg-config
+  SDL_LIBS    linker flags for SDL, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -1728,9 +1752,9 @@ test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
 mjpegtools configure 2.0.0
-generated by GNU Autoconf 2.65
+generated by GNU Autoconf 2.68
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1774,7 +1798,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_compile
@@ -1800,7 +1824,7 @@ $as_echo "$ac_try_echo"; } >&5
     mv -f conftest.er1 conftest.err
   fi
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
+  test $ac_status = 0; } > conftest.i && {
 	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 	 test ! -s conftest.err
        }; then :
@@ -1811,7 +1835,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_cpp
@@ -1824,10 +1848,10 @@ fi
 ac_fn_c_check_header_mongrel ()
 {
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  if eval \${$3+:} false; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 fi
 eval ac_res=\$$3
@@ -1863,7 +1887,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
 else
   ac_header_preproc=no
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
 $as_echo "$ac_header_preproc" >&6; }
 
@@ -1886,17 +1910,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( cat <<\_ASBOX
-## ---------------------------------------------------- ##
+( $as_echo "## ---------------------------------------------------- ##
 ## Report this to mjpeg-developer at lists.sourceforge.net ##
-## ---------------------------------------------------- ##
-_ASBOX
+## ---------------------------------------------------- ##"
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   eval "$3=\$ac_header_compiler"
@@ -1905,7 +1927,7 @@ eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_mongrel
 
@@ -1946,7 +1968,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
        ac_retval=$ac_status
 fi
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_run
@@ -1960,7 +1982,7 @@ ac_fn_c_check_header_compile ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1978,7 +2000,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_header_compile
 
@@ -2023,7 +2045,7 @@ fi
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
@@ -2036,7 +2058,7 @@ ac_fn_c_check_func ()
   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
 $as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2091,7 +2113,7 @@ fi
 eval ac_res=\$$3
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
 
 } # ac_fn_c_check_func
 
@@ -2128,7 +2150,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 	ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_compile
@@ -2154,7 +2176,7 @@ $as_echo "$ac_try_echo"; } >&5
     mv -f conftest.er1 conftest.err
   fi
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } >/dev/null && {
+  test $ac_status = 0; } > conftest.i && {
 	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
 	 test ! -s conftest.err
        }; then :
@@ -2165,7 +2187,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
     ac_retval=1
 fi
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_cpp
@@ -2211,7 +2233,7 @@ fi
   # interfere with the next link command; also delete a directory that is
   # left behind by Apple's compiler.  We do this before executing the actions.
   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
   as_fn_set_status $ac_retval
 
 } # ac_fn_cxx_try_link
@@ -2220,7 +2242,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by mjpegtools $as_me 2.0.0, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
 
@@ -2330,11 +2352,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -2368,11 +2388,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -2385,11 +2403,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -2403,11 +2419,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -2462,7 +2476,12 @@ _ACEOF
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
 elif test "x$prefix" != xNONE; then
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -2477,7 +2496,11 @@ do
     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -2553,7 +2576,7 @@ if $ac_cache_corrupted; then
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -2569,8 +2592,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-MJPEG_MAJOR_VERSION=1
-MJPEG_MINOR_VERSION=10
+MJPEG_MAJOR_VERSION=2
+MJPEG_MINOR_VERSION=0
 MJPEG_MICRO_VERSION=0
 MJPEG_VERSION=$MJPEG_MAJOR_VERSION.$MJPEG_MINOR_VERSION.$MJPEG_MICRO_VERSION
 
@@ -2579,16 +2602,22 @@ ac_config_headers="$ac_config_headers config.h"
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
 done
 if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -2602,27 +2631,27 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
+if ${ac_cv_build+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -2640,14 +2669,14 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+if ${ac_cv_host+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
@@ -2655,7 +2684,7 @@ fi
 $as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -2690,7 +2719,7 @@ am__api_version='1.11'
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
 $as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2777,11 +2806,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \	]*)
-    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -2803,7 +2832,7 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" "$LINENO" 5
    fi
 
@@ -2813,7 +2842,7 @@ then
    # Ok.
    :
 else
-   as_fn_error "newly created file is older than distributed files!
+   as_fn_error $? "newly created file is older than distributed files!
 Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -2867,7 +2896,7 @@ if test "$cross_compiling" != no; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -2907,7 +2936,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -2960,7 +2989,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
-  if test "${ac_cv_path_mkdir+set}" = set; then :
+  if ${ac_cv_path_mkdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3011,7 +3040,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -3051,7 +3080,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -3059,7 +3088,7 @@ SHELL = /bin/sh
 all:
 	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -3093,7 +3122,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -3236,6 +3265,30 @@ else
   with_libpng=yes
 fi
 
+
+# Check whether --with-dga was given.
+if test "${with_dga+set}" = set; then :
+  withval=$with_dga;
+else
+  with_dga=yes
+fi
+
+
+# Check whether --with-gtk was given.
+if test "${with_gtk+set}" = set; then :
+  withval=$with_gtk;
+else
+  with_gtk=yes
+fi
+
+
+# Check whether --with-libsdl was given.
+if test "${with_libsdl+set}" = set; then :
+  withval=$with_libsdl;
+else
+  with_libsdl=yes
+fi
+
 DEPDIR="${am__leading_dot}deps"
 
 ac_config_commands="$ac_config_commands depfiles"
@@ -3308,7 +3361,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3348,7 +3401,7 @@ if test -z "$ac_cv_prog_CC"; then
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3401,7 +3454,7 @@ if test -z "$CC"; then
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3441,7 +3494,7 @@ if test -z "$CC"; then
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3500,7 +3553,7 @@ if test -z "$CC"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -3544,7 +3597,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -3598,8 +3651,8 @@ fi
 
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3713,9 +3766,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
@@ -3757,8 +3809,8 @@ done
 else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest conftest$ac_cv_exeext
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3815,9 +3867,9 @@ $as_echo "$ac_try_echo"; } >&5
     else
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
+as_fn_error $? "cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5; }
     fi
   fi
 fi
@@ -3828,7 +3880,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
 ac_clean_files=$ac_clean_files_save
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
 $as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3868,8 +3920,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
@@ -3879,7 +3931,7 @@ OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3916,7 +3968,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -3994,7 +4046,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -4093,7 +4145,7 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -4229,7 +4281,7 @@ if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then :
+  if ${ac_cv_prog_CPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
@@ -4259,7 +4311,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4275,11 +4327,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -4318,7 +4370,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -4334,18 +4386,18 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
 
 else
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -4357,7 +4409,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$GREP"; then
@@ -4406,7 +4458,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_GREP"; then
-    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_GREP=$GREP
@@ -4420,7 +4472,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
 $as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4472,7 +4524,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_EGREP=$EGREP
@@ -4487,7 +4539,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4604,8 +4656,7 @@ do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
 "
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -4617,7 +4668,7 @@ done
 
 
   ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
   MINIX=yes
 else
   MINIX=
@@ -4639,7 +4690,7 @@ $as_echo "#define _MINIX 1" >>confdefs.h
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4687,7 +4738,7 @@ esac
 
 
 macro_version='2.2.6b'
-macro_revision='1.3017'
+macro_revision='1.3018'
 
 
 
@@ -4705,7 +4756,7 @@ ltmain="$ac_aux_dir/ltmain.sh"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
+if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
 else
             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
@@ -4760,7 +4811,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_SED"; then
-    as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
   fi
 else
   ac_cv_path_SED=$SED
@@ -4787,7 +4838,7 @@ Xsed="$SED -e 1s/^X//"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
 $as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
+if ${ac_cv_path_FGREP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
@@ -4839,7 +4890,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_FGREP"; then
-    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_FGREP=$FGREP
@@ -4918,7 +4969,7 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
 $as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
@@ -4955,10 +5006,10 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -4985,7 +5036,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
+if ${lt_cv_path_NM+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NM"; then
@@ -5045,7 +5096,7 @@ else
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DUMPBIN"; then
@@ -5089,7 +5140,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DUMPBIN"; then
@@ -5152,18 +5203,18 @@ test -z "$NM" && NM=nm
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
 $as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then :
+if ${lt_cv_nm_interface+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:5160: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:5211: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5163: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:5214: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:5166: output\"" >&5)
+  (eval echo "\"\$as_me:5217: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5187,7 +5238,7 @@ fi
 # find the maximum length of command line arguments
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
 $as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
@@ -5379,7 +5430,7 @@ esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
 $as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
+if ${lt_cv_ld_reload_flag+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_reload_flag='-r'
@@ -5415,7 +5466,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}objdump; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OBJDUMP"; then
@@ -5455,7 +5506,7 @@ if test -z "$ac_cv_prog_OBJDUMP"; then
 set dummy objdump; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OBJDUMP"; then
@@ -5514,7 +5565,7 @@ test -z "$OBJDUMP" && OBJDUMP=objdump
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
 $as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
+if ${lt_cv_deplibs_check_method+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -5730,7 +5781,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ar; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
+if ${ac_cv_prog_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AR"; then
@@ -5770,7 +5821,7 @@ if test -z "$ac_cv_prog_AR"; then
 set dummy ar; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_AR"; then
@@ -5835,7 +5886,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$STRIP"; then
@@ -5875,7 +5926,7 @@ if test -z "$ac_cv_prog_STRIP"; then
 set dummy strip; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_STRIP"; then
@@ -5934,7 +5985,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$RANLIB"; then
@@ -5974,7 +6025,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
 set dummy ranlib; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_RANLIB"; then
@@ -6091,7 +6142,7 @@ compiler=$CC
 # Check for command to grab the raw symbol name followed by C symbol from nm.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+if ${lt_cv_sys_global_symbol_pipe+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -6368,7 +6419,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 6371 "configure"' > conftest.$ac_ext
+  echo '#line 6422 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -6462,7 +6513,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   CFLAGS="$CFLAGS -belf"
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
+if ${lt_cv_cc_needs_belf+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_ext=c
@@ -6538,7 +6589,7 @@ need_locks="$enable_libtool_lock"
 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$DSYMUTIL"; then
@@ -6578,7 +6629,7 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then
 set dummy dsymutil; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_DSYMUTIL"; then
@@ -6630,7 +6681,7 @@ fi
 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$NMEDIT"; then
@@ -6670,7 +6721,7 @@ if test -z "$ac_cv_prog_NMEDIT"; then
 set dummy nmedit; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_NMEDIT"; then
@@ -6722,7 +6773,7 @@ fi
 set dummy ${ac_tool_prefix}lipo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then :
+if ${ac_cv_prog_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$LIPO"; then
@@ -6762,7 +6813,7 @@ if test -z "$ac_cv_prog_LIPO"; then
 set dummy lipo; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_LIPO"; then
@@ -6814,7 +6865,7 @@ fi
 set dummy ${ac_tool_prefix}otool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then :
+if ${ac_cv_prog_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL"; then
@@ -6854,7 +6905,7 @@ if test -z "$ac_cv_prog_OTOOL"; then
 set dummy otool; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL"; then
@@ -6906,7 +6957,7 @@ fi
 set dummy ${ac_tool_prefix}otool64; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$OTOOL64"; then
@@ -6946,7 +6997,7 @@ if test -z "$ac_cv_prog_OTOOL64"; then
 set dummy otool64; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_OTOOL64"; then
@@ -7021,7 +7072,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
 $as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
@@ -7050,7 +7101,7 @@ fi
 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_ld_exported_symbols_list=no
@@ -7119,7 +7170,7 @@ for ac_header in dlfcn.h
 do :
   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
 "
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+if test "x$ac_cv_header_dlfcn_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_DLFCN_H 1
 _ACEOF
@@ -7303,7 +7354,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
 $as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
+if ${lt_cv_objdir+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   rm -f .libs 2>/dev/null
@@ -7411,7 +7462,7 @@ file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -7477,7 +7528,7 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
 $as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+if ${lt_cv_path_MAGIC_CMD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $MAGIC_CMD in
@@ -7610,7 +7661,7 @@ if test "$GCC" = yes; then
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_rtti_exceptions=no
@@ -7626,11 +7677,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7629: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7680: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7633: \$? = $ac_status" >&5
+   echo "$as_me:7684: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7949,7 +8000,7 @@ $as_echo "$lt_prog_compiler_pic" >&6; }
 if test -n "$lt_prog_compiler_pic"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_pic_works=no
@@ -7965,11 +8016,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7968: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8019: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7972: \$? = $ac_status" >&5
+   echo "$as_me:8023: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8008,7 +8059,7 @@ fi
 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
@@ -8051,7 +8102,7 @@ fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -8070,11 +8121,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8073: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8124: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8077: \$? = $ac_status" >&5
+   echo "$as_me:8128: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8106,7 +8157,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o=no
@@ -8125,11 +8176,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8128: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8179: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8132: \$? = $ac_status" >&5
+   echo "$as_me:8183: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8907,10 +8958,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int foo(void) {}
+int foo (void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+          archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
 fi
 rm -f core conftest.err conftest.$ac_objext \
@@ -10234,7 +10286,7 @@ else
   # if libdl is installed we need to link against it
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10268,7 +10320,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
 
@@ -10282,12 +10334,12 @@ fi
 
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
+if test "x$ac_cv_func_shl_load" = xyes; then :
   lt_cv_dlopen="shl_load"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 $as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+if ${ac_cv_lib_dld_shl_load+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10321,16 +10373,16 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
 else
   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
+if test "x$ac_cv_func_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+if ${ac_cv_lib_dl_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10364,12 +10416,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+if ${ac_cv_lib_svld_dlopen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10403,12 +10455,12 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
 $as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+if ${ac_cv_lib_dld_dld_link+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -10442,7 +10494,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
 fi
 
@@ -10483,7 +10535,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
 $as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
+if ${lt_cv_dlopen_self+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   	  if test "$cross_compiling" = yes; then :
@@ -10492,7 +10544,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10495 "configure"
+#line 10547 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10579,7 +10631,7 @@ $as_echo "$lt_cv_dlopen_self" >&6; }
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
+if ${lt_cv_dlopen_self_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   	  if test "$cross_compiling" = yes; then :
@@ -10588,7 +10640,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 10591 "configure"
+#line 10643 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10822,7 +10874,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
@@ -10868,7 +10920,7 @@ if test -n "$ac_tool_prefix"; then
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -10908,7 +10960,7 @@ if test -z "$ac_cv_prog_CC"; then
 set dummy gcc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -10961,7 +11013,7 @@ if test -z "$CC"; then
 set dummy ${ac_tool_prefix}cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -11001,7 +11053,7 @@ if test -z "$CC"; then
 set dummy cc; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -11060,7 +11112,7 @@ if test -z "$CC"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
@@ -11104,7 +11156,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
@@ -11158,8 +11210,8 @@ fi
 
 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -11188,7 +11240,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11225,7 +11277,7 @@ ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
 $as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
@@ -11303,7 +11355,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
@@ -11402,7 +11454,7 @@ depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -11536,7 +11588,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
 fi
 set dummy $CC; ac_cc=`$as_echo "$2" |
 		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11671,7 +11723,7 @@ if test -z "$CXX"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
@@ -11715,7 +11767,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
@@ -11793,7 +11845,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11830,7 +11882,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -11916,7 +11968,7 @@ depcc="$CXX"  am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -12056,7 +12108,7 @@ if test -z "$CXX"; then
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
@@ -12100,7 +12152,7 @@ do
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
@@ -12178,7 +12230,7 @@ done
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -12215,7 +12267,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -12301,7 +12353,7 @@ depcc="$CXX"  am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -12435,7 +12487,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
 if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+  if ${ac_cv_prog_CXXCPP+:} false; then :
   $as_echo_n "(cached) " >&6
 else
       # Double quotes because CXXCPP needs to be expanded
@@ -12465,7 +12517,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -12481,11 +12533,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
   break
 fi
@@ -12524,7 +12576,7 @@ else
   # Broken: fails on valid input.
 continue
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -12540,11 +12592,11 @@ else
 ac_preproc_ok=:
 break
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then :
 
 else
@@ -12736,7 +12788,7 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
 $as_echo_n "checking for non-GNU ld... " >&6; }
 fi
-if test "${lt_cv_path_LD+set}" = set; then :
+if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
@@ -12773,10 +12825,10 @@ else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+if ${lt_cv_prog_gnu_ld+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
@@ -14298,7 +14350,7 @@ $as_echo "$lt_prog_compiler_pic_CXX" >&6; }
 if test -n "$lt_prog_compiler_pic_CXX"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_pic_works_CXX=no
@@ -14314,11 +14366,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14317: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14369: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14321: \$? = $ac_status" >&5
+   echo "$as_me:14373: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14354,7 +14406,7 @@ fi
 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works_CXX=no
@@ -14394,7 +14446,7 @@ fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o_CXX=no
@@ -14413,11 +14465,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14416: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14468: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14420: \$? = $ac_status" >&5
+   echo "$as_me:14472: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14446,7 +14498,7 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then :
+if ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_c_o_CXX=no
@@ -14465,11 +14517,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14468: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14520: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14472: \$? = $ac_status" >&5
+   echo "$as_me:14524: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15412,7 +15464,7 @@ fi
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if test "${ac_cv_c_bigendian+set}" = set; then :
+if ${ac_cv_c_bigendian+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_bigendian=unknown
@@ -15630,13 +15682,13 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
      ;; #(
    *)
-     as_fn_error "unknown endianness
+     as_fn_error $? "unknown endianness
  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
  esac
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then :
+if ${ac_cv_c_const+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15716,7 +15768,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
 $as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if ${ac_cv_c_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_c_inline=no
@@ -15765,7 +15817,7 @@ if test "$enable_largefile" != no; then
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+if ${ac_cv_sys_largefile_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_cv_sys_largefile_CC=no
@@ -15816,7 +15868,7 @@ $as_echo "$ac_cv_sys_largefile_CC" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+if ${ac_cv_sys_file_offset_bits+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   while :; do
@@ -15885,7 +15937,7 @@ rm -rf conftest*
   if test $ac_cv_sys_file_offset_bits = unknown; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if test "${ac_cv_sys_large_files+set}" = set; then :
+if ${ac_cv_sys_large_files+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   while :; do
@@ -15966,7 +16018,7 @@ depcc="$CCAS"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
 $as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CCAS_dependencies_compiler_type+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -16098,8 +16150,7 @@ for ac_header in stdint.h inttypes.h sys/types.h getopt.h malloc.h sys/soundcard
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
@@ -16113,7 +16164,7 @@ done
 #maddog:  (How does this interact with cpml stuff below???????)
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5
 $as_echo_n "checking for sin in -lm... " >&6; }
-if test "${ac_cv_lib_m_sin+set}" = set; then :
+if ${ac_cv_lib_m_sin+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16147,7 +16198,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5
 $as_echo "$ac_cv_lib_m_sin" >&6; }
-if test "x$ac_cv_lib_m_sin" = x""yes; then :
+if test "x$ac_cv_lib_m_sin" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBM 1
 _ACEOF
@@ -16160,8 +16211,7 @@ for ac_func in posix_memalign memalign fmax fmin lround
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
@@ -16171,7 +16221,7 @@ done
 
 
 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
-if test "x$ac_cv_func_getopt_long" = x""yes; then :
+if test "x$ac_cv_func_getopt_long" = xyes; then :
 
 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
 
@@ -16179,7 +16229,7 @@ else
    # FreeBSD and BSD/OS have a gnugetopt library for this:
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getopt_long in -lgnugetopt" >&5
 $as_echo_n "checking for getopt_long in -lgnugetopt... " >&6; }
-if test "${ac_cv_lib_gnugetopt_getopt_long+set}" = set; then :
+if ${ac_cv_lib_gnugetopt_getopt_long+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16213,7 +16263,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnugetopt_getopt_long" >&5
 $as_echo "$ac_cv_lib_gnugetopt_getopt_long" >&6; }
-if test "x$ac_cv_lib_gnugetopt_getopt_long" = x""yes; then :
+if test "x$ac_cv_lib_gnugetopt_getopt_long" = xyes; then :
 
 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
 
@@ -16227,7 +16277,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
 $as_echo_n "checking return type of signal handlers... " >&6; }
-if test "${ac_cv_type_signal+set}" = set; then :
+if ${ac_cv_type_signal+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -16272,7 +16322,7 @@ case $host in
 $as_echo "yes" >&6; }
 	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asin in -lcpml" >&5
 $as_echo_n "checking for asin in -lcpml... " >&6; }
-if test "${ac_cv_lib_cpml_asin+set}" = set; then :
+if ${ac_cv_lib_cpml_asin+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16306,7 +16356,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpml_asin" >&5
 $as_echo "$ac_cv_lib_cpml_asin" >&6; }
-if test "x$ac_cv_lib_cpml_asin" = x""yes; then :
+if test "x$ac_cv_lib_cpml_asin" = xyes; then :
    LIBM_LIBS="-lcpml"
                            have_cpml=true
 fi
@@ -16332,21 +16382,34 @@ esac
 
 
 have_video4linux=false
+
+# Check whether --with-v4l was given.
+if test "${with_v4l+set}" = set; then :
+  withval=$with_v4l;
+fi
+
+if test "x$with_v4l" != "xno"; then :
+
 case $host in
   *-*-linux*)
   ac_fn_c_check_header_mongrel "$LINENO" "linux/videodev.h" "ac_cv_header_linux_videodev_h" "$ac_includes_default"
-if test "x$ac_cv_header_linux_videodev_h" = x""yes; then :
+if test "x$ac_cv_header_linux_videodev_h" = xyes; then :
   have_video4linux=true
 
 $as_echo "#define HAVE_V4L 1" >>confdefs.h
 
-else
-  as_fn_error "videodev.h not found - please install the linux kernel headers" "$LINENO" 5
 fi
 
 
-   ;;
+  ;;
 esac
+fi
+
+if test "x$have_video4linux" != "xtrue" && test "x$with_v4l" != "xno"; then :
+  have_video4linux=false
+	 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: videodev.h not found - please install the linux kernel headers programms needing v4l disabled" >&5
+$as_echo "$as_me: WARNING: videodev.h not found - please install the linux kernel headers programms needing v4l disabled" >&2;}
+fi
  if test x$have_video4linux = xtrue; then
   HAVE_V4L_TRUE=
   HAVE_V4L_FALSE='#'
@@ -16480,7 +16543,7 @@ $as_echo_n "checking whether pthreads work with $flag... " >&6; }
 set dummy pthread-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_acx_pthread_config+set}" = set; then :
+if ${ac_cv_prog_acx_pthread_config+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$acx_pthread_config"; then
@@ -16655,7 +16718,7 @@ $as_echo "${flag}" >&6; }
 set dummy cc_r; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then :
+if ${ac_cv_prog_PTHREAD_CC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -n "$PTHREAD_CC"; then
@@ -16721,7 +16784,7 @@ CC="$PTHREAD_CC"
 oldLIBS="$LIBS"
 LIBS="$LIBS $PTHREAD_LIBS"
 ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
-if test "x$ac_cv_func_pthread_attr_getstacksize" = x""yes; then :
+if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
 
 $as_echo "#define HAVE_PTHREADSTACKSIZE 1" >>confdefs.h
 
@@ -16731,7 +16794,7 @@ LIBS="$oldLIBS"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_start_compress in -ljpeg" >&5
 $as_echo_n "checking for jpeg_start_compress in -ljpeg... " >&6; }
-if test "${ac_cv_lib_jpeg_jpeg_start_compress+set}" = set; then :
+if ${ac_cv_lib_jpeg_jpeg_start_compress+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -16765,7 +16828,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_start_compress" >&5
 $as_echo "$ac_cv_lib_jpeg_jpeg_start_compress" >&6; }
-if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = x""yes; then :
+if test "x$ac_cv_lib_jpeg_jpeg_start_compress" = xyes; then :
    JPEG_LIBS="-ljpeg"
 	      JPEG_CFLAGS=""
 	    have_libjpeg=true
@@ -16773,7 +16836,7 @@ fi
 
 
 if test x$have_libjpeg != "xtrue"; then
-   as_fn_error "JPEG 6b library missing - Go to http://www.ijg.org/" "$LINENO" 5
+   as_fn_error $? "JPEG 6b library missing - Go to http://www.ijg.org/" "$LINENO" 5
 fi
 
 
@@ -16781,13 +16844,17 @@ fi
 
 
 
+
+
+
+
 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 	if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $PKG_CONFIG in
@@ -16830,7 +16897,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
 set dummy pkg-config; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   case $ac_pt_PKG_CONFIG in
@@ -16893,7 +16960,6 @@ $as_echo "yes" >&6; }
 $as_echo "no" >&6; }
 		PKG_CONFIG=""
 	fi
-
 fi
 
 have_libquicktime=false
@@ -16939,6 +17005,8 @@ fi
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -16953,10 +17021,10 @@ fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBQUICKTIME_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                have_libquicktime=false
+	have_libquicktime=false
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	have_libquicktime=false
 else
 	LIBQUICKTIME_CFLAGS=$pkg_cv_LIBQUICKTIME_CFLAGS
@@ -17021,6 +17089,8 @@ fi
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -17035,10 +17105,10 @@ fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBPNG_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                have_libpng=false
+	have_libpng=false
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	have_libpng=false
 else
 	LIBPNG_CFLAGS=$pkg_cv_LIBPNG_CFLAGS
@@ -17089,6 +17159,8 @@ fi
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -17103,10 +17175,10 @@ fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBPNG_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                have_libpng=false
+	have_libpng=false
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	have_libpng=false
 else
 	LIBPNG_CFLAGS=$pkg_cv_LIBPNG_CFLAGS
@@ -17169,6 +17241,8 @@ fi
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -17183,10 +17257,10 @@ fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$LIBDV_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                have_libdv=false
+	have_libdv=false
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	have_libdv=false
 else
 	LIBDV_CFLAGS=$pkg_cv_LIBDV_CFLAGS
@@ -17215,8 +17289,8 @@ if test "x$with_x" = xno; then
   have_x=disabled
 else
   case $x_includes,$x_libraries in #(
-    *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
-    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
+    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
+    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   # One or both of the vars are not set, and there is no cached value.
@@ -17233,7 +17307,7 @@ libdir:
 	@echo libdir='${LIBDIR}'
 _ACEOF
   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
-    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
     for ac_var in incroot usrlibdir libdir; do
       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
     done
@@ -17319,7 +17393,7 @@ else
   fi
 done
 fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 fi # $ac_x_includes = no
 
 if test "$ac_x_libraries" = no; then
@@ -17493,7 +17567,7 @@ if ac_fn_c_try_link "$LINENO"; then :
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
-if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
+if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17527,14 +17601,14 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
 fi
 
     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
-if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
+if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17568,7 +17642,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
-if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
 fi
 
@@ -17587,14 +17661,14 @@ rm -f core conftest.err conftest.$ac_objext \
     # The functions gethostbyname, getservbyname, and inet_addr are
     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
     ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
-if test "x$ac_cv_func_gethostbyname" = x""yes; then :
+if test "x$ac_cv_func_gethostbyname" = xyes; then :
 
 fi
 
     if test $ac_cv_func_gethostbyname = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17628,14 +17702,14 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
 fi
 
       if test $ac_cv_lib_nsl_gethostbyname = no; then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
-if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
+if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17669,7 +17743,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
-if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
+if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
 fi
 
@@ -17684,14 +17758,14 @@ fi
     # must be given before -lnsl if both are needed.  We assume that
     # if connect needs -lnsl, so does gethostbyname.
     ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
-if test "x$ac_cv_func_connect" = x""yes; then :
+if test "x$ac_cv_func_connect" = xyes; then :
 
 fi
 
     if test $ac_cv_func_connect = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
 $as_echo_n "checking for connect in -lsocket... " >&6; }
-if test "${ac_cv_lib_socket_connect+set}" = set; then :
+if ${ac_cv_lib_socket_connect+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17725,7 +17799,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
 $as_echo "$ac_cv_lib_socket_connect" >&6; }
-if test "x$ac_cv_lib_socket_connect" = x""yes; then :
+if test "x$ac_cv_lib_socket_connect" = xyes; then :
   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
 fi
 
@@ -17733,14 +17807,14 @@ fi
 
     # Guillermo Gomez says -lposix is necessary on A/UX.
     ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
-if test "x$ac_cv_func_remove" = x""yes; then :
+if test "x$ac_cv_func_remove" = xyes; then :
 
 fi
 
     if test $ac_cv_func_remove = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
 $as_echo_n "checking for remove in -lposix... " >&6; }
-if test "${ac_cv_lib_posix_remove+set}" = set; then :
+if ${ac_cv_lib_posix_remove+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17774,7 +17848,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
 $as_echo "$ac_cv_lib_posix_remove" >&6; }
-if test "x$ac_cv_lib_posix_remove" = x""yes; then :
+if test "x$ac_cv_lib_posix_remove" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
 fi
 
@@ -17782,14 +17856,14 @@ fi
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
-if test "x$ac_cv_func_shmat" = x""yes; then :
+if test "x$ac_cv_func_shmat" = xyes; then :
 
 fi
 
     if test $ac_cv_func_shmat = no; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
 $as_echo_n "checking for shmat in -lipc... " >&6; }
-if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
+if ${ac_cv_lib_ipc_shmat+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17823,7 +17897,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
-if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
+if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
 fi
 
@@ -17841,7 +17915,7 @@ fi
   # John Interrante, Karl Berry
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
-if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
+if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -17875,7 +17949,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
-if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
 fi
 
@@ -17886,7 +17960,7 @@ fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __progname" >&5
 $as_echo_n "checking for __progname... " >&6; }
-if test "${mjt_cv_extern___progname+set}" = set; then :
+if ${mjt_cv_extern___progname+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17917,14 +17991,16 @@ $as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
 
 fi
 
+have_dga=false
+if test x$with_dga != xno ; then
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XF86DGAQueryExtension in -lXxf86dga" >&5
 $as_echo_n "checking for XF86DGAQueryExtension in -lXxf86dga... " >&6; }
-if test "${ac_cv_lib_Xxf86dga_XF86DGAQueryExtension+set}" = set; then :
+if ${ac_cv_lib_Xxf86dga_XF86DGAQueryExtension+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXxf86dga $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS $LIBS"
+LIBS="-lXxf86dga $X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -17954,15 +18030,29 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" >&5
 $as_echo "$ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" >&6; }
-if test "x$ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" = x""yes; then :
+if test "x$ac_cv_lib_Xxf86dga_XF86DGAQueryExtension" = xyes; then :
   V4LCONF_LIBS="$X_LIBS -lXxf86dga"
+		     have_dga="true"
 
 $as_echo "#define HAVE_LIBXXF86DGA 1" >>confdefs.h
 
+else
+  have_dga="false"
 fi
 
+fi
+ if test x$have_dga = xtrue; then
+  HAVE_LIBXXF86DGA_TRUE=
+  HAVE_LIBXXF86DGA_FALSE='#'
+else
+  HAVE_LIBXXF86DGA_TRUE='#'
+  HAVE_LIBXXF86DGA_FALSE=
+fi
 
 
+have_gtk=false
+if test x$with_gtk != xno ; then
+
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
 $as_echo_n "checking for GTK... " >&6; }
@@ -18003,6 +18093,8 @@ fi
 
 
 if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
         _pkg_short_errors_supported=yes
@@ -18017,10 +18109,10 @@ fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$GTK_PKG_ERRORS" >&5
 
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                have_gtk="false"
+	have_gtk="false"
 elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	have_gtk="false"
 else
 	GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
@@ -18029,6 +18121,7 @@ else
 $as_echo "yes" >&6; }
 	have_gtk="true"
 fi
+fi
  if test x$have_gtk = xtrue; then
   HAVE_GTK_TRUE=
   HAVE_GTK_FALSE='#'
@@ -18038,264 +18131,81 @@ else
 fi
 
 
+have_sdl=false
+if test x$with_libsdl != xno ; then
 
-# Check whether --with-sdl-prefix was given.
-if test "${with_sdl_prefix+set}" = set; then :
-  withval=$with_sdl_prefix; sdl_prefix="$withval"
-else
-  sdl_prefix=""
-fi
-
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL" >&5
+$as_echo_n "checking for SDL... " >&6; }
 
-# Check whether --with-sdl-exec-prefix was given.
-if test "${with_sdl_exec_prefix+set}" = set; then :
-  withval=$with_sdl_exec_prefix; sdl_exec_prefix="$withval"
+if test -n "$SDL_CFLAGS"; then
+    pkg_cv_SDL_CFLAGS="$SDL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl > 1.1.3\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sdl > 1.1.3") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SDL_CFLAGS=`$PKG_CONFIG --cflags "sdl > 1.1.3" 2>/dev/null`
 else
-  sdl_exec_prefix=""
+  pkg_failed=yes
 fi
-
-# Check whether --enable-sdltest was given.
-if test "${enable_sdltest+set}" = set; then :
-  enableval=$enable_sdltest;
-else
-  enable_sdltest=yes
+ else
+    pkg_failed=untried
 fi
-
-
-  if test x$sdl_exec_prefix != x ; then
-    sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
-    if test x${SDL_CONFIG+set} != xset ; then
-      SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
-    fi
-  fi
-  if test x$sdl_prefix != x ; then
-    sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
-    if test x${SDL_CONFIG+set} != xset ; then
-      SDL_CONFIG=$sdl_prefix/bin/sdl-config
-    fi
-  fi
-
-  as_save_PATH="$PATH"
-  if test "x$prefix" != xNONE; then
-    PATH="$prefix/bin:$prefix/usr/bin:$PATH"
-  fi
-  # Extract the first word of "sdl-config", so it can be a program name with args.
-set dummy sdl-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_SDL_CONFIG+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+if test -n "$SDL_LIBS"; then
+    pkg_cv_SDL_LIBS="$SDL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sdl > 1.1.3\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sdl > 1.1.3") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SDL_LIBS=`$PKG_CONFIG --libs "sdl > 1.1.3" 2>/dev/null`
 else
-  case $SDL_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_SDL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
-  ;;
-esac
+  pkg_failed=yes
 fi
-SDL_CONFIG=$ac_cv_path_SDL_CONFIG
-if test -n "$SDL_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDL_CONFIG" >&5
-$as_echo "$SDL_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+ else
+    pkg_failed=untried
 fi
 
 
-  PATH="$as_save_PATH"
-  min_sdl_version=1.1.3
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SDL - version >= $min_sdl_version" >&5
-$as_echo_n "checking for SDL - version >= $min_sdl_version... " >&6; }
-  no_sdl=""
-  if test "$SDL_CONFIG" = "no" ; then
-    no_sdl=yes
-  else
-    SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
-    SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
-
-    sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
-           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
-    sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
-           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
-    sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
-           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
-    if test "x$enable_sdltest" = "xyes" ; then
-      ac_save_CFLAGS="$CFLAGS"
-      ac_save_CXXFLAGS="$CXXFLAGS"
-      ac_save_LIBS="$LIBS"
-      CFLAGS="$CFLAGS $SDL_CFLAGS"
-      CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
-      LIBS="$LIBS $SDL_LIBS"
-      rm -f conf.sdltest
-      if test "$cross_compiling" = yes; then :
-  echo $ac_n "cross compiling; assumed OK... $ac_c"
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "SDL.h"
-
-char*
-my_strdup (char *str)
-{
-  char *new_str;
-
-  if (str)
-    {
-      new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
-      strcpy (new_str, str);
-    }
-  else
-    new_str = NULL;
 
-  return new_str;
-}
-
-int main (int argc, char *argv[])
-{
-  int major, minor, micro;
-  char *tmp_version;
-
-  /* This hangs on some systems (?)
-  system ("touch conf.sdltest");
-  */
-  { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = my_strdup("$min_sdl_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_sdl_version");
-     exit(1);
-   }
-
-   if (($sdl_major_version > major) ||
-      (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
-      (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
-    {
-      return 0;
-    }
-  else
-    {
-      printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
-      printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
-      printf("*** best to upgrade to the required version.\n");
-      printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
-      printf("*** to point to the correct copy of sdl-config, and remove the file\n");
-      printf("*** config.cache before re-running configure\n");
-      return 1;
-    }
-}
-
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
 else
-  no_sdl=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+        _pkg_short_errors_supported=no
 fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SDL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "sdl > 1.1.3" 2>&1`
+        else
+	        SDL_PKG_ERRORS=`$PKG_CONFIG --print-errors "sdl > 1.1.3" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SDL_PKG_ERRORS" >&5
 
-       CFLAGS="$ac_save_CFLAGS"
-       CXXFLAGS="$ac_save_CXXFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-  fi
-  if test "x$no_sdl" = x ; then
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+	have_sdl=false
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	have_sdl=false
+else
+	SDL_CFLAGS=$pkg_cv_SDL_CFLAGS
+	SDL_LIBS=$pkg_cv_SDL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-     have_sdl=true
+	have_sdl=true
 
 $as_echo "#define HAVE_SDL 1" >>confdefs.h
 
-  else
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-     if test "$SDL_CONFIG" = "no" ; then
-       echo "*** The sdl-config script installed by SDL could not be found"
-       echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the SDL_CONFIG environment variable to the"
-       echo "*** full path to sdl-config."
-     else
-       if test -f conf.sdltest ; then
-        :
-       else
-          echo "*** Could not run SDL test program, checking why..."
-          CFLAGS="$CFLAGS $SDL_CFLAGS"
-          CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
-          LIBS="$LIBS $SDL_LIBS"
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdio.h>
-#include "SDL.h"
-
-int main(int argc, char *argv[])
-{ return 0; }
-#undef  main
-#define main K_and_R_C_main
-
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-   echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding SDL or finding the wrong"
-          echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-	  echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
-else
-   echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means SDL was incorrectly installed"
-          echo "*** or that you have moved SDL since it was installed. In the latter case, you"
-          echo "*** may want to edit the sdl-config script: $SDL_CONFIG"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-          CFLAGS="$ac_save_CFLAGS"
-          CXXFLAGS="$ac_save_CXXFLAGS"
-          LIBS="$ac_save_LIBS"
-       fi
-     fi
-     SDL_CFLAGS=""
-     SDL_LIBS=""
-     have_sdl=false
-  fi
-
-
-  rm -f conf.sdltest
-
+fi
  if test x$have_sdl = xtrue; then
   HAVE_SDL_TRUE=
   HAVE_SDL_FALSE='#'
@@ -18311,7 +18221,7 @@ if test x$have_sdl = xtrue; then
    LIBS="$LIBS -lSDL -lSDL_gfx"
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vlineColor in -lSDL_gfx" >&5
 $as_echo_n "checking for vlineColor in -lSDL_gfx... " >&6; }
-if test "${ac_cv_lib_SDL_gfx_vlineColor+set}" = set; then :
+if ${ac_cv_lib_SDL_gfx_vlineColor+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -18345,7 +18255,7 @@ LIBS=$ac_check_lib_save_LIBS
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SDL_gfx_vlineColor" >&5
 $as_echo "$ac_cv_lib_SDL_gfx_vlineColor" >&6; }
-if test "x$ac_cv_lib_SDL_gfx_vlineColor" = x""yes; then :
+if test "x$ac_cv_lib_SDL_gfx_vlineColor" = xyes; then :
   SDLgfx_LIBS="-lSDL_gfx"
 
 $as_echo "#define HAVE_SDLgfx 1" >>confdefs.h
@@ -18512,7 +18422,7 @@ $as_echo_n "checking sub-architecture settings... " >&6; }
     fi
   else
     if test ! -r $srcdir/cpuinfo.sh; then
-       as_fn_error "cpuinfo.sh script not found - do a cvs update" "$LINENO" 5
+       as_fn_error $? "cpuinfo.sh script not found - do a cvs update" "$LINENO" 5
     fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking sub-architecture settings" >&5
 $as_echo_n "checking sub-architecture settings... " >&6; }
@@ -18635,7 +18545,7 @@ fi
 
 # Check whether --enable-assert was given.
 if test "${enable_assert+set}" = set; then :
-  enableval=$enable_assert;  case "$enableval" in yes|no) : ;; *) as_fn_error "bad value for --enable-assert" "$LINENO" 5                ;; esac
+  enableval=$enable_assert;  case "$enableval" in yes|no) : ;; *) as_fn_error $? "bad value for --enable-assert" "$LINENO" 5                ;; esac
 else
    enable_assert=yes
 fi
@@ -18720,10 +18630,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
+    if test "x$cache_file" != "x/dev/null"; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
 $as_echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -18739,6 +18660,7 @@ DEFS=-DHAVE_CONFIG_H
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -18762,76 +18684,80 @@ else
 fi
 
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
-  as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  as_fn_error "conditional \"AMDEP\" was never defined.
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCC\" was never defined.
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
 if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
-  as_fn_error "conditional \"am__fastdepCCAS\" was never defined.
+  as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_V4L_TRUE}" && test -z "${HAVE_V4L_FALSE}"; then
-  as_fn_error "conditional \"HAVE_V4L\" was never defined.
+  as_fn_error $? "conditional \"HAVE_V4L\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_LIBQUICKTIME_TRUE}" && test -z "${HAVE_LIBQUICKTIME_FALSE}"; then
-  as_fn_error "conditional \"HAVE_LIBQUICKTIME\" was never defined.
+  as_fn_error $? "conditional \"HAVE_LIBQUICKTIME\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_LIBPNG_TRUE}" && test -z "${HAVE_LIBPNG_FALSE}"; then
-  as_fn_error "conditional \"HAVE_LIBPNG\" was never defined.
+  as_fn_error $? "conditional \"HAVE_LIBPNG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LIBXXF86DGA_TRUE}" && test -z "${HAVE_LIBXXF86DGA_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_LIBXXF86DGA\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_GTK_TRUE}" && test -z "${HAVE_GTK_FALSE}"; then
-  as_fn_error "conditional \"HAVE_GTK\" was never defined.
+  as_fn_error $? "conditional \"HAVE_GTK\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_SDL_TRUE}" && test -z "${HAVE_SDL_FALSE}"; then
-  as_fn_error "conditional \"HAVE_SDL\" was never defined.
+  as_fn_error $? "conditional \"HAVE_SDL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_ASM_MMX_TRUE}" && test -z "${HAVE_ASM_MMX_FALSE}"; then
-  as_fn_error "conditional \"HAVE_ASM_MMX\" was never defined.
+  as_fn_error $? "conditional \"HAVE_ASM_MMX\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_X86CPU_TRUE}" && test -z "${HAVE_X86CPU_FALSE}"; then
-  as_fn_error "conditional \"HAVE_X86CPU\" was never defined.
+  as_fn_error $? "conditional \"HAVE_X86CPU\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_PPCCPU_TRUE}" && test -z "${HAVE_PPCCPU_FALSE}"; then
-  as_fn_error "conditional \"HAVE_PPCCPU\" was never defined.
+  as_fn_error $? "conditional \"HAVE_PPCCPU\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_ALTIVEC_TRUE}" && test -z "${HAVE_ALTIVEC_FALSE}"; then
-  as_fn_error "conditional \"HAVE_ALTIVEC\" was never defined.
+  as_fn_error $? "conditional \"HAVE_ALTIVEC\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 if test -z "${HAVE_V4L_OR_SDL_TRUE}" && test -z "${HAVE_V4L_OR_SDL_FALSE}"; then
-  as_fn_error "conditional \"HAVE_V4L_OR_SDL\" was never defined.
+  as_fn_error $? "conditional \"HAVE_V4L_OR_SDL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -18932,6 +18858,7 @@ fi
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -18977,19 +18904,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -19185,7 +19112,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -19239,7 +19166,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # values after options handling.
 ac_log="
 This file was extended by mjpegtools $as_me 2.0.0, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -19305,10 +19232,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 mjpegtools config.status 2.0.0
-configured by $0, generated by GNU Autoconf 2.65,
+configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -19326,11 +19253,16 @@ ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
@@ -19352,6 +19284,7 @@ do
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -19364,7 +19297,7 @@ do
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    as_fn_error "ambiguous option: \`$1'
+    as_fn_error $? "ambiguous option: \`$1'
 Try \`$0 --help' for more information.";;
   --help | --hel | -h )
     $as_echo "$ac_cs_usage"; exit ;;
@@ -19373,7 +19306,7 @@ Try \`$0 --help' for more information.";;
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -19804,7 +19737,7 @@ do
     "mjpegtools.pc") CONFIG_FILES="$CONFIG_FILES mjpegtools.pc" ;;
     "mjpegtools.spec") CONFIG_FILES="$CONFIG_FILES mjpegtools.spec" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -19827,9 +19760,10 @@ fi
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
   trap 'as_fn_exit 1' 1 2 13 15
 }
@@ -19837,12 +19771,13 @@ $debug ||
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -19859,12 +19794,12 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
 
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
@@ -19873,18 +19808,18 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -19892,7 +19827,7 @@ done
 rm -f conf$$subs.sh
 
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
 _ACEOF
 sed -n '
 h
@@ -19940,7 +19875,7 @@ t delim
 rm -f conf$$subs.awk
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
   for (key in S) S_is_set[key] = 1
   FS = ""
 
@@ -19972,21 +19907,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
 else
   cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
 s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
 s/^[^=]*=[	 ]*$//
 }'
 fi
@@ -19998,7 +19941,7 @@ fi # test -n "$CONFIG_FILES"
 # No need to generate them if there are no CONFIG_HEADERS.
 # This happens for instance with `./config.status Makefile'.
 if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
 BEGIN {
 _ACEOF
 
@@ -20010,11 +19953,11 @@ _ACEOF
 # handling of long lines.
 ac_delim='%!_!# '
 for ac_last_try in false false :; do
-  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_t"; then
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -20099,7 +20042,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 _ACAWK
 _ACEOF
 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error "could not setup config headers machinery" "$LINENO" 5
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
 fi # test -n "$CONFIG_HEADERS"
 
 
@@ -20112,7 +20055,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -20131,7 +20074,7 @@ do
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
 	 # because $ac_f cannot contain `:'.
@@ -20140,7 +20083,7 @@ do
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -20166,8 +20109,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
     esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -20303,23 +20246,24 @@ s&@INSTALL@&$ac_INSTALL&;t t
 s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
+which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out" && rm -f "$tmp/out";;
-  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
   esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
@@ -20328,21 +20272,21 @@ which seems to be undefined.  Please make sure it is defined." >&2;}
   if test x"$ac_file" != x-; then
     {
       $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
-    } >"$tmp/config.h" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
 $as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
       rm -f "$ac_file"
-      mv "$tmp/config.h" "$ac_file" \
-	|| as_fn_error "could not create $ac_file" "$LINENO" 5
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
     $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error "could not create -" "$LINENO" 5
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
 # Compute "$ac_file"'s index in $config_headers.
 _am_arg="$ac_file"
@@ -21293,7 +21237,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -21314,7 +21258,7 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
+  $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
diff --git a/configure.ac b/configure.ac
index 203ad87..6980e5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,8 +3,8 @@ AC_INIT([mjpegtools],[2.0.0],[mjpeg-developer at lists.sourceforge.net])
 AC_PREREQ(2.57)
 AC_CONFIG_SRCDIR([lavtools/lav_io.c])
 
-MJPEG_MAJOR_VERSION=1
-MJPEG_MINOR_VERSION=99
+MJPEG_MAJOR_VERSION=2
+MJPEG_MINOR_VERSION=0
 MJPEG_MICRO_VERSION=0
 MJPEG_VERSION=$MJPEG_MAJOR_VERSION.$MJPEG_MINOR_VERSION.$MJPEG_MICRO_VERSION
 
@@ -55,6 +55,15 @@ AC_ARG_WITH(libdv,
 AC_ARG_WITH(libpng,
             AC_HELP_STRING([--without-libpng], [Do not use libpng.]),
             [], [with_libpng=yes])
+AC_ARG_WITH(dga,
+	    AC_HELP_STRING([--without-dga], [Do not use dga.]),
+	    [], [with_dga=yes])
+AC_ARG_WITH(gtk,
+	    AC_HELP_STRING([--without-gtk], [Do not use gtk.]),
+	    [], [with_gtk=yes])
+AC_ARG_WITH(libsdl,
+	    AC_HELP_STRING([--without-libsdl], [Do not use libsdl.]),
+	    [], [with_libsdl=yes])
 AC_GNU_SOURCE
 
 dnl Initialize libtool
@@ -151,15 +160,20 @@ dnl Test whether we're linux or not. If so, define HAVE_V4L and build the
 dnl video4linux/hardware dependent tools. Else, undefine HAVE_V4L
 
 have_video4linux=false
+AC_ARG_WITH([v4l], AC_HELP_STRING([--without-v4l], [Disable v4l1 API]))
+AS_IF([test "x$with_v4l" != "xno"], [
 case $host in
   *-*-linux*)
   AC_CHECK_HEADER(linux/videodev.h,
                   [have_video4linux=true
                    AC_DEFINE(HAVE_V4L, 1,
-		             [Building for Linux - using the video4linux API])],
-                  [AC_MSG_ERROR([videodev.h not found - please install the linux kernel headers])])
-   ;;
-esac
+		             [Building for Linux - using the video4linux API])], [])
+  ;; 
+esac])
+
+AS_IF([test "x$have_video4linux" != "xtrue" && test "x$with_v4l" != "xno"],
+        [have_video4linux=false
+	 AC_MSG_WARN([videodev.h not found - please install the linux kernel headers programms needing v4l disabled])])
 AM_CONDITIONAL(HAVE_V4L, test x$have_video4linux = xtrue)
 
 dnl *********************************************************************
@@ -255,29 +269,42 @@ fi
 dnl ********************************************************************
 dnl Check for DGA (for v4l-conf)
 dnl ********************************************************************
-AC_SUBST(V4LCONF_LIBS)
-AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
-	V4LCONF_LIBS="$X_LIBS -lXxf86dga" 
-	AC_DEFINE(HAVE_LIBXXF86DGA,1, [libxf86dga is present]),,
-	$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS)
+have_dga=false
+if test x$with_dga != xno ; then
+	AC_SUBST(V4LCONF_LIBS)
+	AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension,
+		     V4LCONF_LIBS="$X_LIBS -lXxf86dga"
+		     have_dga="true"
+		     AC_DEFINE(HAVE_LIBXXF86DGA,1, [libxf86dga is present]),
+		     have_dga="false",
+		     $X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS)
+fi
+AM_CONDITIONAL(HAVE_LIBXXF86DGA, test x$have_dga = xtrue)
 
 dnl ********************************************************************
 dnl Check for Gtk+/glib (for glav).  2.4.0 or greater required (should
 dnl not be a problem on recent distributions).
 dnl   (defines GTK_CFLAGS and GTK_LIBS)
 dnl ********************************************************************
-PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.4.0], have_gtk="true", have_gtk="false")
+have_gtk=false
+if test x$with_gtk != xno ; then
+	PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.4.0],
+			  have_gtk="true", have_gtk="false")
+fi
 AM_CONDITIONAL(HAVE_GTK, test x$have_gtk = xtrue)
 
 dnl ********************************************************************
 dnl Check for the SDL library (for software playback)
 dnl   (defines SDL_CFLAGS and SDL_LIBS)
 dnl ********************************************************************
-AM_PATH_SDL(1.1.3,
-            [have_sdl=true
-             AC_DEFINE(HAVE_SDL, 1, [SDL library present]) ],
-            [have_sdl=false])
-AM_CONDITIONAL(HAVE_SDL, test x$have_sdl = xtrue)
+have_sdl=false
+if test x$with_libsdl != xno ; then
+  PKG_CHECK_MODULES(SDL, [sdl > 1.1.3],
+		    [have_sdl=true
+		     AC_DEFINE(HAVE_SDL, 1, [libsdl > 1.1.3 present])],
+		    [have_sdl=false])
+fi
+AM_CONDITIONAL(HAVE_SDL, test x$have_sdl = xtrue)			  
 
 dnl ***
 dnl Check for SDL_gfx which is used by y4mhist to display a graphical 
diff --git a/docs/Makefile.in b/docs/Makefile.in
index fd0bc29..c141239 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -154,13 +154,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/lavtools/Makefile.am b/lavtools/Makefile.am
index 86920e4..6f40323 100644
--- a/lavtools/Makefile.am
+++ b/lavtools/Makefile.am
@@ -59,7 +59,10 @@ liblavplay_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDV_CFLAGS) $(X_CFLAGS) $(SDL_CFLAGS
 liblavplay_la_LDFLAGS = $(LAV_ALL_LIB_OPTS)
 liblavplay_la_LIBADD = liblavfile.la $(SDL_LIBS) liblavjpeg.la $(LIBDV_LIBS) $(LIBMJPEGUTILS)
 if HAVE_V4L
-   liblavplay_la_LIBADD += ${X_LIBS} -lX11
+   liblavplay_la_LIBADD += ${X_LIBS} 
+endif
+if HAVE_SDL
+   liblavplay_la_LIBADD += -lX11
 endif
 liblavplay_la_DEPENDENCIES = liblavfile.la liblavjpeg.la
 
diff --git a/lavtools/Makefile.in b/lavtools/Makefile.in
index 9fd1c02..b3bc4df 100644
--- a/lavtools/Makefile.in
+++ b/lavtools/Makefile.in
@@ -41,7 +41,8 @@ host_triplet = @host@
 @HAVE_ALTIVEC_TRUE at am__append_1 = $(top_builddir)/mpeg2enc/libmpeg2encpp.la
 @HAVE_V4L_TRUE at am__append_2 = liblavrec.la
 @HAVE_V4L_OR_SDL_TRUE at am__append_3 = liblavplay.la
- at HAVE_V4L_TRUE@am__append_4 = ${X_LIBS} -lX11
+ at HAVE_V4L_TRUE@am__append_4 = ${X_LIBS} 
+ at HAVE_SDL_TRUE@am__append_5 = -lX11
 bin_PROGRAMS = mjpeg_simd_helper$(EXEEXT) lav2wav$(EXEEXT) \
 	lav2yuv$(EXEEXT) lavaddwav$(EXEEXT) lavtrans$(EXEEXT) \
 	ypipe$(EXEEXT) yuv2lav$(EXEEXT) transist.flt$(EXEEXT) \
@@ -52,11 +53,11 @@ bin_PROGRAMS = mjpeg_simd_helper$(EXEEXT) lav2wav$(EXEEXT) \
 	yuvfps$(EXEEXT) yuvinactive$(EXEEXT) $(am__EXEEXT_1) \
 	$(am__EXEEXT_2) $(am__EXEEXT_3) $(am__EXEEXT_4) \
 	$(am__EXEEXT_5)
- at HAVE_GTK_TRUE@am__append_5 = glav
- at HAVE_SDL_TRUE@am__append_6 = yuvplay
- at HAVE_V4L_TRUE@am__append_7 = lavrec testrec lavvideo
- at HAVE_V4L_OR_SDL_TRUE@am__append_8 = lavplay
- at HAVE_LIBPNG_TRUE@am__append_9 = png2yuv
+ at HAVE_GTK_TRUE@am__append_6 = glav
+ at HAVE_SDL_TRUE@am__append_7 = yuvplay
+ at HAVE_V4L_TRUE@am__append_8 = lavrec testrec lavvideo
+ at HAVE_V4L_OR_SDL_TRUE@am__append_9 = lavplay
+ at HAVE_LIBPNG_TRUE@am__append_10 = png2yuv
 subdir = lavtools
 DIST_COMMON = $(liblavinclude_HEADERS) $(noinst_HEADERS) \
 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
@@ -347,13 +348,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
@@ -462,7 +464,7 @@ liblavplay_la_SOURCES = liblavplay.c audiolib.c
 liblavplay_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDV_CFLAGS) $(X_CFLAGS) $(SDL_CFLAGS)
 liblavplay_la_LDFLAGS = $(LAV_ALL_LIB_OPTS)
 liblavplay_la_LIBADD = liblavfile.la $(SDL_LIBS) liblavjpeg.la \
-	$(LIBDV_LIBS) $(LIBMJPEGUTILS) $(am__append_4)
+	$(LIBDV_LIBS) $(LIBMJPEGUTILS) $(am__append_4) $(am__append_5)
 liblavplay_la_DEPENDENCIES = liblavfile.la liblavjpeg.la
 noinst_HEADERS = \
 	colorspace.h \
diff --git a/lavtools/png2yuv.c b/lavtools/png2yuv.c
index 2cb2408..e15c37a 100644
--- a/lavtools/png2yuv.c
+++ b/lavtools/png2yuv.c
@@ -33,6 +33,7 @@ png2yuv
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <limits.h>
 
 #include <string.h>
 #include <errno.h>
@@ -49,12 +50,9 @@ png2yuv
 
 #include "subsample.h"
 #include "colorspace.h"
-//#include "mplexconsts.hh"
 
 #define DEFAULT_CHROMA_MODE Y4M_CHROMA_420JPEG
 
-#define MAXPIXELS (2800*1152)  /**< Maximum size of final image */
-
 typedef struct _parameters 
 {
   char *pngformatstr;
@@ -70,14 +68,10 @@ typedef struct _parameters
   int ss_mode; /**< subsampling mode (based on ssm_id from subsample.h) */
 
   int new_width; /// new MPEG2 width, in case the original one is uneven
+  int new_height; /// new MPEG2 width, in case the original one is uneven
 } parameters_t;
 
 
-struct _parameters *sh_param; 
-png_structp png_ptr;
-png_infop info_ptr, end_info;
-uint8_t *raw0, *raw1, *raw2;  /* buffer for RGB first, and then Y/Cb/Cr planes of decoded PNG */
-
 /*
  * The User Interface parts 
  */
@@ -152,8 +146,6 @@ static void parse_commandline(int argc, char ** argv, parameters_t *param)
   param->interleave = -1;
   param->verbose = 1;
   param->ss_mode = DEFAULT_CHROMA_MODE;
-  //param->mza_filename = NULL;
-  //param->make_z_alpha = 0;
 
   /* parse options */
   for (;;) {
@@ -240,93 +232,43 @@ static void parse_commandline(int argc, char ** argv, parameters_t *param)
     }
 }
 
-void png_separation(png_structp png_ptr, png_row_infop row_info, png_bytep data)
-{
-  int row_nr = png_ptr->row_number; // internal variable ? 
-  int i, width = row_info->width; 
-  int new_width = sh_param->new_width;
-
-  /* contents of row_info:
-   *  png_uint_32 width      width of row
-   *  png_uint_32 rowbytes   number of bytes in row
-   *  png_byte color_type    color type of pixels
-   *  png_byte bit_depth     bit depth of samples
-   *  png_byte channels      number of channels (1-4)
-   *  png_byte pixel_depth   bits per pixel (depth*channels)
-   */
-
-  //mjpeg_debug("PNG YUV transformation callback; color_type is %d row_number %d\n", 
-  //	 row_info->color_type, row_nr);
-
-  if(row_info->color_type == PNG_COLOR_TYPE_GRAY) // only Z available
-    {
-      //mjpeg_debug("Grayscale to YUV, row %d", row_nr);
-      for (i = 0; i < width; i++)
-	{
-	  raw0[i + row_nr * new_width] = data[i];
-	  raw1[i + row_nr * new_width] = data[i];
-	  raw2[i + row_nr * new_width] = data[i];
-	}
-      return;
-    }
-
-  if(row_info->color_type == PNG_COLOR_TYPE_RGB) // Z and Alpha available
-    {
-      //mjpeg_info("RGB to YUV, row %d", row_nr);
-      for (i = 0; i < width; i++)
-	{
-	  raw0[i + row_nr * new_width] = data[i*3];
-	  raw1[i + row_nr * new_width] = data[i*3 + 1];
-	  raw2[i + row_nr * new_width] = data[i*3 + 2];
-	}
-      return;
-    }
-
-  mjpeg_error_exit1("mpegz: UNKNOWN COLOR FORMAT %d in PNG transformation !\n", row_info->color_type);
-}
-
 
 /*
  * The file handling parts 
  */
 /** 
 Reads one PNG file. 
- at param process Process the image data (0 for initial parameter determination)
+ at param process Process the image data (NULL for initial parameter determination)
 @returns -1 on failure, 1 on sucess
+ at on success returns RGB data in the second, yuv, parameter
 */
-int decode_png(const char *pngname, int process, parameters_t *param)
+int decode_png(const char *pngname, uint8_t *yuv[], parameters_t *param)
 {
-  int num_pass = 1;
-  int bit_depth, color_type;
+  png_structp png_ptr;
+  png_infop info_ptr;
   FILE *pngfile;
-  //png_byte hdptr[8];
-
-  /* Now open this PNG file, and examine its header to retrieve the 
-     YUV4MPEG info that shall be written */
-  pngfile = fopen(pngname, "rb");
-  if (!pngfile)
-    {
-      perror("PNG file open failed:");
-      return -1;
-    }
 
-  //fread(hdptr, 1, 8, pngfile);
+  /* libpng needs two structs - a png_struct and a png_info, there is no
+   * need to make the third, another png_info, because that is only used
+   * to store data (such as textual information) that can come after the
+   * PNG image.  This code only cares about the image.
+   */
+  info_ptr = NULL;
+  pngfile = NULL;
+  png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+  if (!png_ptr)
+    mjpeg_error_exit1("%s: Could not allocate PNG read struct !", pngname);
 
-#if 0 
-  bool is_png = !png_sig_cmp(hdptr, 0, 8);
-  if (!is_png)
+  /* This needs to be done immediately after creation of the png_struct
+   * because storage allocation failures will longjmp back to here:
+   */
+  if (setjmp(png_jmpbuf(png_ptr)))
     {
-      mjpeg_error("%s is _no_ PNG file !\n");
+      png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+      if (pngfile) (void)fclose(pngfile);
+      mjpeg_error("%s: Corrupted PNG file !", pngname);
       return -1;
     }
-#endif
-  
-  png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-  if (!png_ptr)
-    mjpeg_error_exit1("%s: Could not allocate PNG read struct !", pngname);
-  
-  png_init_io(png_ptr, pngfile);
-  //png_set_sig_bytes(png_ptr, 8);
   
   info_ptr = png_create_info_struct(png_ptr);
   if (!info_ptr)
@@ -336,79 +278,104 @@ int decode_png(const char *pngname, int process, parameters_t *param)
       mjpeg_error_exit1("%s: Could not allocate PNG info struct !", pngname);
     }
   
-  end_info = png_create_info_struct(png_ptr);
-  if (!end_info)
+/* Now open this PNG file, and examine its header to retrieve the 
+ * YUV4MPEG info that shall be written */
+  pngfile = fopen(pngname, "rb");
+  if (!pngfile)
     {
-      png_destroy_read_struct(&png_ptr, &info_ptr,
-			      (png_infopp)NULL);
-      mjpeg_error_exit1("%s: Could not allocate PNG end info struct !", pngname);
+      perror(pngname);
+      png_error(png_ptr, "PNG file open failed");
     }
-  
-  if (setjmp(png_jmpbuf(png_ptr)))
+
+  png_init_io(png_ptr, pngfile);
+
+  if (yuv)
     {
-      png_destroy_read_struct(&png_ptr, &info_ptr,
-			      &end_info);
-      mjpeg_error("%s: Corrupted PNG file !", pngname);
-      return -1;
+      png_uint_32 nr, input_height, input_width, output_height, output_width;
+      uint8_t *r, *g, *b;
+      png_bytepp rows;
+
+      /* The code uses png_read_png to obtain a complete buffered copy of the
+       * PNG file reduced (or expanded) to 8 bit RGB.  This is a little wasteful
+       * in the case of a non-interlaced image - the code could work row by
+       * row without buffering the whole image - but the interlaced case is
+       * almost impossible to handle this way so it is better to be simple and
+       * correct.
+       */
+#     if PNG_LIBPNG_VER >= 10500 && PNG_LIBPNG_VER < 10502
+         /* There is a bug in 1.5 before 1.5.2 which causes png_read_png to
+          * whine most terribly on interlaced images, this stops it:
+          */
+          (void)png_set_interlace_handling(png_ptr);
+#     endif
+      png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_STRIP_16 |
+       PNG_TRANSFORM_STRIP_ALPHA | PNG_TRANSFORM_EXPAND |
+       PNG_TRANSFORM_GRAY_TO_RGB /* requires libpng 1.4 or later */, 0);
+
+      /* And return the separated data to the parameters. */
+      rows = png_get_rows(png_ptr, info_ptr);
+
+      /* Since the PNG files for the frames are separate the actual PNG file 
+       * that was read could be unrelated - a random width and height.  Because
+       * the output may be interleaved the output height may be twice the input
+       * PNG height.  Because the MPEG code requires an even width the output
+       * width may be one more than the original frame width.
+       *
+       * For the interleaving the PNG data is smashed into the lower half of
+       * the yuv rows.  For the other cases the input data is cropped or
+       * top-lefted as appropriate.
+       */
+      output_height = param->new_height;
+
+      input_height = png_get_image_height(png_ptr, info_ptr);
+      if (input_height > output_height)
+          input_height = output_height;
+
+      output_width = param->new_width;
+
+      input_width = png_get_image_width(png_ptr, info_ptr);
+      if (input_width > output_width)
+        input_width = output_width;
+
+      /* Breaking up the RGB data is not hard to do, the separated channels are
+       * simply packed into the three raw yuv arrays with new_width values per
+       * row.
+       */
+      r = yuv[0];
+      g = yuv[1];
+      b = yuv[2];
+      for (nr=0; nr<input_height; ++nr)
+        {
+         png_uint_32 nc;
+         png_bytep row = *rows++;
+
+         for (nc=0; nc<input_width; ++nc)
+           {
+               *r++ = *row++;
+               *g++ = *row++;
+               *b++ = *row++;
+           }
+       
+         /* Pad the output: */
+         for (; nc<output_width; ++nc)
+           *r++ = *g++ = *b++ = 0;
+       }
     }
   
-  if (process)
-    png_set_read_user_transform_fn(png_ptr, png_separation);
-  png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_STRIP_ALPHA, NULL);
-  
-  if (png_get_IHDR(png_ptr, info_ptr, &param->width, &param->height, &bit_depth,
-		       //   &color_type, &interlace_type, &compression_type, &filter_type))
-		   &color_type, NULL, NULL, NULL))	
-    num_pass = png_set_interlace_handling(png_ptr);
-  else
-    mjpeg_error_exit1("PNG header reading failed !!\n");
-#if 0 
-  mjpeg_info("Reading info struct...\n");
-  png_read_info(png_ptr, info_ptr);
-  mjpeg_info("Done...\n");
-  
-  if (png_get_IHDR(png_ptr, info_ptr, &param->width, &param->height, &bit_depth,
-		       //   &color_type, &interlace_type, &compression_type, &filter_type))
-		   &color_type, NULL, NULL, NULL))	
-    num_pass = png_set_interlace_handling(png_ptr);
   else
-    mjpeg_error_exit1("PNG header reading failed !!\n");
-  
-  if (process)
     {
-      printf("%d passes needed\n\n", num_pass);
-      
-      if (bit_depth != 8 && bit_depth != 16)
-	{
-	  mjpeg_error_exit1("Invalid bit_depth %d, only 8 and 16 bit allowed !!\n", bit_depth);
-	}
-      
-      png_set_strip_16(png_ptr); // always has to strip the 16bit input, MPEG can't handle it	  
-      png_set_strip_alpha(png_ptr); // Alpha can't be processed until Z/Alpha is integrated
-      
-      printf("\nAllocating row buffer...");
-      png_set_read_user_transform_fn(png_ptr, png_separation);
-      png_bytep row_buf = (png_bytep)png_malloc(png_ptr,
-						png_get_rowbytes(png_ptr, info_ptr));
-      
-      for (int n=0; n < num_pass; n++)
-	for (int y=0; y < sh_param->height; y++)
-	  {
-	    printf("Writing row data for pass %d\n", n);
-	    png_read_rows(png_ptr, (png_bytepp)&row_buf, NULL, 1);
-	  }
-      
-      png_free(png_ptr, row_buf);	      
-    }
-  png_read_end(png_ptr, info_ptr);
-#endif  
-  if (setjmp(png_ptr->jmpbuf)) {
-    png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
-    return 2;
+      /* Just return the image width and height in *param */
+      png_read_info(png_ptr, info_ptr);
+
+      param->width = png_get_image_width(png_ptr, info_ptr);
+      param->height = png_get_image_height(png_ptr, info_ptr);
+
     }
 
+/* Successful exit: */
+  png_destroy_read_struct(&png_ptr, &info_ptr, 0);
+
   fclose(pngfile);
-  png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
   return 1;
 }
 
@@ -419,13 +386,17 @@ int decode_png(const char *pngname, int process, parameters_t *param)
  */
 static int init_parse_files(parameters_t *param)
 { 
-  char pngname[255];
+  char pngname[PATH_MAX+1]; /* See POSIX 1003.1 section 2.9.5 */
 
   snprintf(pngname, sizeof(pngname), 
 	   param->pngformatstr, param->begin);
   mjpeg_debug("Analyzing %s to get the right pic params", pngname);
   
-  if (decode_png(pngname, 0, param) == -1)
+  /* The first frame (the param->begin frame) determines the height and
+   * width of the output.  Passing NULL instead of yuv (see below) causes
+   * decode_png to fill in param with the image dimensions.
+   */
+  if (decode_png(pngname, NULL, param) == -1)
     mjpeg_error_exit1("Reading of %s failed.\n", pngname);
 
   mjpeg_info("Image dimensions are %ux%u",
@@ -455,6 +426,7 @@ static int init_parse_files(parameters_t *param)
 
   if (!(param->interleave) && (param->interlace != Y4M_ILACE_NONE)) 
     {
+      /* So the height in 'param' might be twice the PNG input height:*/
       param->height *= 2;
       mjpeg_info("Non-interleaved fields (image height doubled)");
     }
@@ -466,33 +438,29 @@ static int init_parse_files(parameters_t *param)
 static int generate_YUV4MPEG(parameters_t *param)
 {
   uint32_t frame;
-  //size_t pngsize;
-  char pngname[FILENAME_MAX];
-  uint8_t *yuv[3];  /* buffer for Y/U/V planes of decoded PNG */
+  uint8_t *yuv[3];  /* Buffers, initially for R,G,B then Y,Cb,Cr */
   y4m_stream_info_t streaminfo;
   y4m_frame_info_t frameinfo;
 
-  if ((param->width % 2) == 0)
-    param->new_width = param->width;
-  else
-    {
-      param->new_width = ((param->width >> 1) + 1) << 1;
-      printf("Setting new, even image width %d", param->new_width);
-    }
+  /* Make the output even, so the output may be one larger than the
+   * original PNG image width.
+   */
+  param->new_width = param->width + (param->width & 1);
+  param->new_height = param->height + (param->height & 1);
 
   mjpeg_info("Now generating YUV4MPEG stream.");
   y4m_init_stream_info(&streaminfo);
   y4m_init_frame_info(&frameinfo);
 
   y4m_si_set_width(&streaminfo, param->new_width);
-  y4m_si_set_height(&streaminfo, param->height);
+  y4m_si_set_height(&streaminfo, param->new_height);
   y4m_si_set_interlace(&streaminfo, param->interlace);
   y4m_si_set_framerate(&streaminfo, param->framerate);
   y4m_si_set_chroma(&streaminfo, param->ss_mode);
 
-  yuv[0] = (uint8_t *)malloc(param->new_width * param->height * sizeof(yuv[0][0]));
-  yuv[1] = (uint8_t *)malloc(param->new_width * param->height * sizeof(yuv[1][0]));
-  yuv[2] = (uint8_t *)malloc(param->new_width * param->height * sizeof(yuv[2][0]));
+  yuv[0] = (uint8_t *)malloc(param->new_width * param->new_height * sizeof(yuv[0][0]));
+  yuv[1] = (uint8_t *)malloc(param->new_width * param->new_height * sizeof(yuv[1][0]));
+  yuv[2] = (uint8_t *)malloc(param->new_width * param->new_height * sizeof(yuv[2][0]));
 
   y4m_write_stream_header(STDOUT_FILENO, &streaminfo);
 
@@ -500,15 +468,13 @@ static int generate_YUV4MPEG(parameters_t *param)
        (frame < param->numframes + param->begin) || (param->numframes == -1);
        frame++) 
     {
-      //      if (frame < 25)
-      //      else      
-      //snprintf(pngname, sizeof(pngname), param->pngformatstr, frame - 25);
+      char pngname[PATH_MAX+1];
       snprintf(pngname, sizeof(pngname), param->pngformatstr, frame);
             
-      raw0 = yuv[0];
-      raw1 = yuv[1];
-      raw2 = yuv[2];
-      if (decode_png(pngname, 1, param) == -1)
+      /* decode_png reads the PNG into the yuv buffers as r,g,b [0..255]
+       * values.
+       */
+      if (decode_png(pngname, yuv, param) == -1)
 	{
 	  mjpeg_info("Read from '%s' failed:  %s", pngname, strerror(errno));
 	  if (param->numframes == -1) 
@@ -523,79 +489,18 @@ static int generate_YUV4MPEG(parameters_t *param)
 	} 
       else 
 	{
-#if 0 
-	  mjpeg_debug("Preparing frame");
-	  
-	  /* Now open this PNG file, and examine its header to retrieve the 
-	     YUV4MPEG info that shall be written */
-
-	  if ((param->interlace == Y4M_ILACE_NONE) || (param->interleave == 1)) 
-	    {
-	      mjpeg_info("Processing non-interlaced/interleaved %s.", 
-			 pngname, pngsize);
-
-	      decode_png(imagedata, 0, 420, yuv[0], yuv[1], yuv[2], 
-			 param->width, param->height, param->new_width);
-	      
-#if 0 
-	      if (param->make_z_alpha)
-		{
-		  mjpeg_info("Writing Z/Alpha data.\n");
-		  za_write(real_z_imagemap, param->width, param->height,z_alpha_fp,frame);
-		}
-#endif
-	    } 
-	  else 
-	    {
-	      mjpeg_error_exit1("Can't handle interlaced PNG information (yet) since there is no standard for it.\n"
-				"Use interleaved mode (-L option) to create interlaced material.");
-
-	      switch (param->interlace) 
-		{		  
-		case Y4M_ILACE_TOP_FIRST:
-		  mjpeg_info("Processing interlaced, top-first %s", pngname);
-#if 0 
-		  decode_jpeg_raw(jpegdata, jpegsize,
-				  Y4M_ILACE_TOP_FIRST,
-				  420, param->width, param->height,
-				  yuv[0], yuv[1], yuv[2]);
-#endif
-		  break;
-		case Y4M_ILACE_BOTTOM_FIRST:
-		  mjpeg_info("Processing interlaced, bottom-first %s", pngname);
-#if 0 
-		  decode_jpeg_raw(jpegdata, jpegsize,
-				  Y4M_ILACE_BOTTOM_FIRST,
-				  420, param->width, param->height,
-				  yuv[0], yuv[1], yuv[2]);
-#endif
-		  break;
-		default:
-		  mjpeg_error_exit1("FATAL logic error?!?");
-		  break;
-		}
-	    }
-#endif
 	  mjpeg_debug("Converting frame to YUV format.");
 	  /* Transform colorspace, then subsample (in place) */
-	  convert_RGB_to_YCbCr(yuv, param->height *  param->new_width);
-	  chroma_subsample(param->ss_mode, yuv, param->new_width, param->height);
+	  convert_RGB_to_YCbCr(yuv, param->new_height *  param->new_width);
+	  chroma_subsample(param->ss_mode, yuv, param->new_width, param->new_height);
 
 	  mjpeg_debug("Frame decoded, now writing to output stream.");
 	}
-      
+
       mjpeg_debug("Frame decoded, now writing to output stream.");
       y4m_write_frame(STDOUT_FILENO, &streaminfo, &frameinfo, yuv);
     }
 
-#if 0 
-  if (param->make_z_alpha)
-    {
-      za_write_end(z_alpha_fp);
-      fclose(z_alpha_fp);
-    }
-#endif
-
   y4m_fini_stream_info(&streaminfo);
   y4m_fini_frame_info(&frameinfo);
   free(yuv[0]);
@@ -614,7 +519,6 @@ static int generate_YUV4MPEG(parameters_t *param)
 int main(int argc, char ** argv)
 { 
   parameters_t param;
-  sh_param = ¶m;
 
   y4m_accept_extensions(1);
 
@@ -632,13 +536,3 @@ int main(int argc, char ** argv)
 
   return 0;
 }
-
-
-
-
-
-
-
-
-
-
diff --git a/ltmain.sh b/ltmain.sh
index a72f2fd..950feee 100755
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -75,7 +75,7 @@ PROGRAM=ltmain.sh
 PACKAGE=libtool
 VERSION=2.2.6b
 TIMESTAMP=""
-package_revision=1.3017
+package_revision=1.3018
 
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -116,15 +116,15 @@ $lt_unset CDPATH
 
 : ${CP="cp -f"}
 : ${ECHO="echo"}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
+: ${EGREP="/usr/bin/grep -E"}
+: ${FGREP="/usr/bin/grep -F"}
+: ${GREP="/usr/bin/grep"}
 : ${LN_S="ln -s"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="/bin/sed"}
+: ${SED="/usr/bin/sed"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
 : ${Xsed="$SED -e 1s/^X//"}
 
diff --git a/mjpegtools.pc b/mjpegtools.pc
new file mode 100644
index 0000000..3a1428f
--- /dev/null
+++ b/mjpegtools.pc
@@ -0,0 +1,10 @@
+prefix=/usr/local
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include/mjpegtools
+
+Name: MJPEG-tools
+Description: Video-recording, -editing, -filtering and -encoding tools
+Version: 2.0.0
+Libs: -L${libdir} -lmjpegutils 
+Cflags: -I${includedir} -I${includedir}/mpeg2enc -I${includedir}/mplex
diff --git a/mjpegtools.spec.in b/mjpegtools.spec
similarity index 92%
copy from mjpegtools.spec.in
copy to mjpegtools.spec
index e51e21d..3060fbc 100644
--- a/mjpegtools.spec.in
+++ b/mjpegtools.spec
@@ -1,6 +1,6 @@
-%define name    @PACKAGE@
-%define version @VERSION@
-%define release RC1
+%define name    mjpegtools
+%define version 2.0.0
+%define release 1
 
 %define infoentry "* mjpeg-howto: (mjpeg-howto).        How to use the mjpeg tools"
 %define infofile mjpeg-howto.info
@@ -49,7 +49,7 @@ mkdir usr
 %build
 
 tmp_prefix="`pwd`/usr"
-mkdir -p $tmp_prefix/{include,lib,lib64,bin,share}
+mkdir -p $tmp_prefix/{include,lib,bin,share}
 
 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
@@ -122,6 +122,11 @@ of the mjpegtools package.
 %{_libdir}/*.so
 
 %changelog
+* Sat Mai 21 2011 Bernhard Praschinger <shadowlord at utanet.at>
+  This is it, after more than 10 years on Sourcefogre we named this 
+  release 2.0.0. For further changes and fixes please take a look at the
+  Changelog. 
+
 * Tue Dec 02 2008 Bernhard Praschinger <shadowlord at utanet.at>
   No we have everything together to release a new RC4
   That will be very close to the next relase.
diff --git a/mjpegtools.spec.in b/mjpegtools.spec.in
index e51e21d..59af5b2 100644
--- a/mjpegtools.spec.in
+++ b/mjpegtools.spec.in
@@ -1,6 +1,6 @@
 %define name    @PACKAGE@
 %define version @VERSION@
-%define release RC1
+%define release 1
 
 %define infoentry "* mjpeg-howto: (mjpeg-howto).        How to use the mjpeg tools"
 %define infofile mjpeg-howto.info
@@ -49,7 +49,7 @@ mkdir usr
 %build
 
 tmp_prefix="`pwd`/usr"
-mkdir -p $tmp_prefix/{include,lib,lib64,bin,share}
+mkdir -p $tmp_prefix/{include,lib,bin,share}
 
 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS
 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS
@@ -122,6 +122,11 @@ of the mjpegtools package.
 %{_libdir}/*.so
 
 %changelog
+* Sat Mai 21 2011 Bernhard Praschinger <shadowlord at utanet.at>
+  This is it, after more than 10 years on Sourcefogre we named this 
+  release 2.0.0. For further changes and fixes please take a look at the
+  Changelog. 
+
 * Tue Dec 02 2008 Bernhard Praschinger <shadowlord at utanet.at>
   No we have everything together to release a new RC4
   That will be very close to the next relase.
diff --git a/mpeg2enc/Makefile.in b/mpeg2enc/Makefile.in
index 3a30d04..95c3f37 100644
--- a/mpeg2enc/Makefile.in
+++ b/mpeg2enc/Makefile.in
@@ -222,13 +222,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/mplex/Makefile.in b/mplex/Makefile.in
index 4126df0..839465d 100644
--- a/mplex/Makefile.in
+++ b/mplex/Makefile.in
@@ -201,13 +201,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/mplex/README.subtitles b/mplex/README.subtitles
deleted file mode 100644
index 232a22d..0000000
--- a/mplex/README.subtitles
+++ /dev/null
@@ -1,105 +0,0 @@
-
-README.subtitles 
-- modifications by Roland Stadtmueller (grotti at nefkom.net) . 2010/03/13
-
-Intention:
-==========
-
-The intention of the adding subtitle support was to enable mplex to mux all streams
-necessary for a DVD so that the mpeg2 stream created can be used directly for
-further dvd creation. Please be aware that i do not use the term "authoring"
-
-Limitations:
-===========
-mplex does NOT support the creation, editing or rendering of subtitles and menues yet.
-It is still - and will probably always be - a muliplexer tool.
-This means, that you need a handy binary subtitle stream at hand to be able to mplex
-them into your target stream, text-based subtitle formats are not supported.
-
-Palette handling
-================
-DVD's have their color palettes (color definitions for subtitles) in the PGC structure
-(part of the IFO file). As mplex does not know about IFO there's no palette handling
-within mplex. Fortunately enough, stand-alone players define a default palette for
-subtitles. Within dvdauthor you can add a palette using the "-p" switch.
-
-Supported formats:
-==================
-Currently only PS1 streams as generated by tcextract (from transcode > 0.6.x) are
-supported. As tcextract extracts the ps1 stream from a program stream, all other
-binary formats are supported indirectly whenever tcextract can extract them accordingly
-(see format details)
-
-
-What is it then all about?
-==========================
-For subtitle multiplexing, mplex takes a subtitle stream created by tcextract
-(from the transcode package) and multiplexes it into the target stream.
-The syntax is pretty much the same as you already know from mplex with following additions:
-
---subpicture-delay |-d <delay [suffix]>[:<stream-id>] [, [...]]
-
-Specifies the offset between start of the subtitle and the video. This is necessary as in 
-real life the subtitles do not begin exactly with the start of the video but some seconds
-later. There's no automatic way to detect the correnct value, so you have to play around
-a bit within your mplex'ed video.
-
-You can specify following suffixes to the delay:
-* ms <default>  : sync offset in milliseconds
-*  s 		: sync offset in seconds
-* mpt		: sync offset in 90KHz ticks
-*  c		: sync offset in 90KHz*300 ticks
-
-The optional subtitle stream-id overrides the subtitle stream id as provided in the source stream
-(aka mappping).
-Valid subtitle stream are in a range of 32-63 (including).
-
-You may want to specify each stream you mplex, use "," to delimit each stream.
-
-Example given:
-If you want to mux one video, one audio and two subtitle streams having delays of 500 and 1000 ms,
-the first shall have id 32, the second is 33 (Subtitle stream 0 and 1):
-
-$ mplex -f 8 -o my_mpeg.mpeg -d 500:32,100:33 video_in.mpv audio_in.m2a subtitle_0.ps1 subtitle_1.ps1
-
-
-Creating subtitle PS1 streams with transcode
-============================================
-This is a quite simple approach:
-
-$ tcextract -i chapter_5.vob  -a 0x21 -x ps1 > chp5_1.ps1
-extracts subtitle 1 (id 33) from chapter_5.vob into the chp5_1.ps1
-
-If you have a VObSub file (these are the ones coming with "*.sub + *.idx" suffixes), you can do the same:
- 
-$ tcextract -i subtitle.sub  -a 0x20 -x ps1 > chp5_1.ps1
-There's no need for the idx file here.
-
-By the way, you can create a vobsub (*.sub + *.idx) file by using subtile2vobsub (included in the subtitleripper package)
-
-The biggest drawback for now: as far as i know there's no (*NIX-) possibility to create ps1/vobsub streams directly from
-text based subtitles. All the tools i know (mplayer, spumux) expect to have at least a program stream to cope with.
-If you have (even a empty, useless ) stream, you can tcextract again.
-
-PS 1 stream format (from tcextract)
-===================================
-(this should go to transcode, but anyway...)
-Each subtitle entry starts with the tag "SUBTITLE", followed by a header entry:
-typedef struct {
-
-  unsigned int header_length;
-  unsigned int header_version;
-  unsigned int payload_length;
-
-  unsigned int lpts;
-  double rpts;
-} subtitle_header_v3_t;
-
-The header version is 0x00030000. The header_length specifies the length of the header w/o "SUBTITLE" and might
-point behind the header struct (enclosing additional data). The header_data points to the beginning of the subtitle entry.
-The subtitle entry length is specified by.payload_length. The "Subtitle entry" is the full subtile includung control
-sequences and RLE-coded pictures as used in dvd subtitles (The "Subtitle entry" is a 1:1 copy of the source stream actually).
-"lpts" and "rpts"  is the presentation time stamp of subtitle. LPTS seems to be the old fashioned way to do it and is not
-in use anymore.
-
-
diff --git a/mplex/zalphastrm.hpp b/mplex/zalphastrm.hpp
deleted file mode 100644
index cb9f82b..0000000
--- a/mplex/zalphastrm.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-
-/*
- *  zalphastrm.hpp:  Z/Alpha video elementary input stream
- *
- *  Copyright (C) 2002 Gernot Ziegler <gz at lysator.liu.se>
- *  Copyright (C) 2001 Andrew Stevens <andrew.stevens at philips.com>
- *
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of version 2 of the GNU General Public License
- *  as published by the Free Software Foundation.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-#ifndef __ZALPHASTRM_H__
-#define __ZALPHASTRM_H__
-
-#include "videostrm.hpp"
-
-class ZAlphaStream : public VideoStream
-{
-public:
-	//ZAlphaStream(IBitStream &ibs, OutputStream &into);
-	ZAlphaStream(IBitStream &ibs, VideoParams *parms, 
-                Multiplexor &into);
-	void Init( const int stream_num );
-    static bool Probe(IBitStream &bs );
-
-	void Close();
-
-	virtual bool MuxPossible(clockticks currentSCR);
-    void SetMaxStdBufferDelay( unsigned int demux_rate );
-	void OutputSector();
-protected:
-	void OutputSeqhdrInfo();
-    void FillAUbuffer(unsigned int frames_to_buffer);
-	virtual void NextDTSPTS( );
-	virtual void ScanFirstSeqHeader();
-    bool RunOutComplete();
-
-private:
-    float z_min; 
-    float z_max;	
-    int z_format;
-    int alpha_depth, z_depth;
-}; 	
-
-
-
-#endif // __INPUTSTRM_H__
-
-
-/* 
- * Local variables:
- *  c-file-style: "stroustrup"
- *  tab-width: 4
- *  indent-tabs-mode: nil
- * End:
- */
diff --git a/mplex/zalphastrm_in.cpp b/mplex/zalphastrm_in.cpp
deleted file mode 100644
index 96e90fb..0000000
--- a/mplex/zalphastrm_in.cpp
+++ /dev/null
@@ -1,492 +0,0 @@
-/*
- *  zalphastrm_in.cpp:  Members of Z/Alpha stream class related to raw stream
- *               scanning and buffering.
- *
- *  Copyright (C) 2001 Gernot Ziegler <gz at lysator.liu.se>
- *  Copyright (C) 2001 Andrew Stevens <andrew.stevens at philips.com>
- *
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of version 2 of the GNU General Public License
- *  as published by the Free Software Foundation.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-#include <config.h>
-#include <math.h>
-#include <stdlib.h>
-
-#include "zalphastrm.hpp"
-#include "interact.hpp"
-#include "multiplexor.hpp"
-
-
-
-static void marker_bit (IBitStream &bs, unsigned int what)
-{
-    if (what != bs.Get1Bit())
-    {
-        mjpeg_error ("Illegal MPEG stream at offset (bits) %lld: supposed marker bit not found.",bs.bitcount());
-        exit (1);
-    }
-}
-
-
-void ZAlphaStream::ScanFirstSeqHeader()
-{
-    if (bs.GetBits( 32)==ZA_SEQUENCE_HEADER)
-    {
-        mjpeg_debug("Reading Z/Alpha sequence header ... ");
-		num_sequence++;
-        
-        int headerlen = bs.GetBits(16);
-        mjpeg_info("Header frame length is %d", headerlen);
-
-        int frame_num = bs.GetBits(8);
-        mjpeg_info("Header frame number is %d", frame_num);
-		horizontal_size	= bs.GetBits( 12);
-		vertical_size	= bs.GetBits( 12);
-
-#if 0 
-		aspect_ratio	= bs.GetBits(  4);
-		picture_rate 	= bs.GetBits(  4);
-		bit_rate		= bs.GetBits( 18);
-		marker_bit( bs, 1);
-		vbv_buffer_size	= bs.GetBits( 10);
-		CSPF		= bs.get1bit();
-#else
-        // hardcoded here, but should really be copied from the video stream... 
-		aspect_ratio	= 2;
-		picture_rate	= 3;
-		bit_rate		= 3000;
-        //bit_rate = 0x3ffff;
-		//marker_bit( bs, 1);
-		vbv_buffer_size	= 50;
-		CSPF		= 0;
-#endif
-        uint8_t conv[4];
-
-        conv[0] = bs.GetBits(8);
-        conv[1] = bs.GetBits(8);
-        conv[2] = bs.GetBits(8);
-        conv[3] = bs.GetBits(8);
-
-        memcpy(&z_min, conv, 4);
-
-        conv[0] = bs.GetBits(8);
-        conv[1] = bs.GetBits(8);
-        conv[2] = bs.GetBits(8);
-        conv[3] = bs.GetBits(8);
-
-        memcpy(&z_max, conv, 4);
-
-        z_format = bs.GetBits(8);
-        printf("Z format byte is set to 0x%x\n", z_format);
-        z_depth = bs.GetBits(8);
-        alpha_depth = bs.GetBits(8);
-    } 
-    else
-    {
-		mjpeg_error ("Invalid MPEG ZAlpha stream header.");
-		exit (1);
-    }
-
-	if (mpeg_valid_framerate_code(picture_rate))
-    {
-		frame_rate = Y4M_RATIO_DBL(mpeg_framerate(picture_rate));
-	}
-    else
-    {
-		frame_rate = 25.0;
-	}
-
-}
-
-
-
-
-void ZAlphaStream::Init ( const int stream_num )
-{
-	mjpeg_debug( "SETTING video buffer to %d", parms->DecodeBufferSize() );
-	MuxStream::Init( ZALPHA_STR_0+stream_num,
-					 1,  // Buffer scale
-					 parms->DecodeBufferSize()*1024,
-					 0,  // Zero stuffing
-					 muxinto.buffers_in_video,
-					 muxinto.always_buffers_in_video);
-    mjpeg_debug( "Scanning for header info: Z/Alpha stream %02x (%s)",
-                ZALPHA_STR_0+stream_num,
-                bs.StreamName()
-                );
-	InitAUbuffer();
-
-	SetBufSize( 4*1024*1024 );
-	ScanFirstSeqHeader();
-
-	/* Skip to the end of the 1st AU (*2nd* Picture start!)
-	*/
-	AU_hdr = ZA_SEQUENCE_HEADER;
-	AU_pict_data = 1;
-	AU_start = 0LL;
-    
-    OutputSeqhdrInfo();
-}
-
-//
-// Set the Maximum STD buffer delay for this video stream.
-// By default we set 1 second but if we have specified a video
-// buffer that can hold more than 1.0 seconds demuxed data we
-// set the delay to the time to fill the buffer.
-//
-
-void ZAlphaStream::SetMaxStdBufferDelay( unsigned int dmux_rate )
-{
-    double max_delay = CLOCKS;
-    if( static_cast<double>(BufferSize()) / dmux_rate > 1.0 )
-        max_delay *= static_cast<double>(BufferSize()) / dmux_rate;
-
-    //
-    // To enforce a maximum STD buffer residency the
-    // calculation is a bit tricky as when we decide to mux we may
-    // (but not always) have some of the *previous* picture left to
-    // mux in which case it is the timestamp of the next picture that counts.
-    // For simplicity we simply reduce the limit by 1.5 frame intervals
-    // and use the timestamp for the current picture.
-    //
-    if( frame_rate > 10.0 )
-        max_STD_buffer_delay = static_cast<clockticks>(max_delay * (frame_rate-1.5)/frame_rate);
-    else
-        max_STD_buffer_delay = static_cast<clockticks>(10.0 * max_delay / frame_rate);
-
-    mjpeg_error_exit1("dmux_rate is %d max_delay %g", dmux_rate, max_delay);
-
-}
-
-//
-// Return whether AU buffer needs refilling.  There are two cases:
-// 1. We have less than our look-ahead "FRAME_CHUNK" buffer AU's
-// buffered 2. AU's are very small and we could have less than 1
-// sector's worth of data buffered.
-//
-
-bool ZAlphaStream::AUBufferNeedsRefill()
-{
-    int retval = 
-        !eoscan
-        && ( aunits.current()+FRAME_CHUNK > last_buffered_AU
-             ||
-             bs.BufferedBytes() < muxinto.sector_size 
-            );
-
-    //mjpeg_info("Z/A needs %s refill.\n", retval ? "a":"no");
-    return retval;
-}
-
-//
-// Refill the AU unit buffer setting  AU PTS DTS from the scanned
-// header information...
-//
-
-void ZAlphaStream::FillAUbuffer(unsigned int frames_to_buffer)
-{
-    int frame_num;
-    unsigned int bits_persec;
-    int headerlen;
-
-    if( eoscan )
-        return;
-
-	last_buffered_AU += frames_to_buffer;
-	mjpeg_debug( "Scanning %d Z/A video frames to frame %d", 
-				 frames_to_buffer, last_buffered_AU );
-
-    // We set a limit of 2M to seek before we give up.
-    // This is intentionally very high because some heavily
-    // padded still frames may have a loooong gap before
-    // a following sequence end marker.
-	while(!bs.eos() 
-          && decoding_order < last_buffered_AU 
-          && !muxinto.AfterMaxPTS(access_unit.PTS)
-          && bs.SeekSync( SYNCWORD_START, 24, 2*1024*1024)
-		)
-	{
-		syncword = (SYNCWORD_START<<8) + bs.GetBits( 8);
-        //mjpeg_info( "Traversing ... syncword 0x%x ", syncword); 
-		if( AU_pict_data )
-		{
-			
-			/* Handle the header *ending* an AU...
-			   If we have the AU picture data an AU and have now
-			   reached a header marking the end of an AU fill in the
-			   the AU length and append it to the list of AU's and
-			   start a new AU.  I.e. sequence and gop headers count as
-			   part of the AU of the corresponding picture
-			*/
-			stream_length = bs.bitcount()-32LL;
-			switch (syncword) 
-			{
-            // note: there are currently _no_ sequence distinctions in Z/Alpha ! 
-			case ZA_SEQUENCE_HEADER :
-				access_unit.start = AU_start;
-				access_unit.length = (int) (stream_length - AU_start)>>3;
-				access_unit.end_seq = 0;
-                access_unit.type = IFRAME;
-				avg_frames[access_unit.type-1]+=access_unit.length;
-                access_unit.dorder = decoding_order;
-                access_unit.seq_header = 1; //( AU_hdr == SEQUENCE_HEADER);
-
-                
-                bits_persec = 
-					(unsigned int) ( ((double)(stream_length - prev_offset)) *
-									 2*frame_rate / ((double)(2 /*+ fields_presented- group_start_field*/)));
-				
-                //mjpeg_info("New bits_persec is %d bits/second.", bits_persec);
-                
-				if( bits_persec > max_bits_persec )
-				{
-					max_bits_persec = bits_persec;
-				}
-
-				prev_offset = stream_length;
-
-                headerlen = bs.GetBits(16);
-                frame_num = bs.GetBits(8);
-                //mjpeg_info("Header frame number is %d", frame_num);
-
-				mjpeg_debug( "Found Z/Alpha AU %d (real: %d): DTS=%d", access_unit.dorder, frame_num,
-							 access_unit.DTS/300);
-                
-                if ( decoding_order >= old_frames+1000 )
-                {
-                    mjpeg_debug("Got %d picture headers.", decoding_order);
-                    old_frames = decoding_order;
-                }
-
-                decoding_order++;
-                //mjpeg_info("Decoding order is now %d", decoding_order);
-
-                NextDTSPTS( access_unit.DTS, access_unit.PTS);
-				aunits.append( access_unit ); // INSERTING NEW AUNIT ! 
-
-                
-                if ((access_unit.type>0) && (access_unit.type<5))
-                {
-                    num_frames[access_unit.type-1]++; // counts the frames in this Z/Alpha stream
-                }                
-                
-				AU_hdr = syncword;
-				AU_start = stream_length;
-				AU_pict_data = 1;
-
-                if (decoding_order >= last_buffered_AU)
-                {
-                    mjpeg_debug("Reached end of buffer ...");
-                    break;
-                }
-
-				break;
-
-			case SEQUENCE_END: // still using the MPEG sequence end, so that we don't have to use another SYNCWORD
-				access_unit.start = AU_start;
-				access_unit.length = (int) ((stream_length - AU_start)>>3)+4;
-				access_unit.end_seq = 1;
-				avg_frames[access_unit.type-1]+=access_unit.length;
-                access_unit.dorder = decoding_order;
-                access_unit.seq_header = 1; //( AU_hdr == SEQUENCE_HEADER);
-
-                access_unit.type = IFRAME;
-				mjpeg_debug( "Adding final AU %d (real: %d): DTS=%d", access_unit.dorder, frame_num,
-							 access_unit.DTS/300);
-                NextDTSPTS( access_unit.DTS, access_unit.PTS);
-				aunits.append( access_unit ); // INSERTING NEW AUNIT ! 
-
-
-				//access_unit.length = ((stream_length - AU_start)>>3)+4;
-				//access_unit.end_seq = 1;
-				//aunits.append( access_unit );
-				mjpeg_debug( "Z/Alpha: Scanned to end AU %d at %d", access_unit.dorder, stream_length/8 );
-				avg_frames[access_unit.type-1]+=access_unit.length;
-
-				/* Do we have a sequence split in the video stream? */
-				if( !bs.eos() && 
-					bs.GetBits( 32) ==SEQUENCE_HEADER )
-				{
-					stream_length = bs.bitcount()-32LL;
-					AU_start = stream_length;
-					syncword  = AU_hdr = SEQUENCE_HEADER;
-					AU_pict_data = 0;
-					if( !muxinto.split_at_seq_end )
-						mjpeg_warn("Sequence end marker found in video stream but single-segment splitting specified!" );
-				}
-				else
-				{
-					if( !bs.eos() && muxinto.split_at_seq_end )
-						mjpeg_warn("No seq. header starting new sequence after seq. end!");
-				}
-					
-				num_seq_end++;
-				break;
-			}
-		}
-	}
-	last_buffered_AU = decoding_order;
-	num_pictures = decoding_order;	
-	eoscan = bs.eos() || muxinto.AfterMaxPTS(access_unit.PTS);
-}
-
-void ZAlphaStream::Close()
-{
-    unsigned int comp_bit_rate	;
-    unsigned int peak_bit_rate  ;
-
-    stream_length = (unsigned int)(bs.bitcount() / 8);
-    for (int i=0; i<4; i++)
-	{
-		avg_frames[i] /= num_frames[i] == 0 ? 1 : num_frames[i];
-	}
-
-    comp_bit_rate = (unsigned int)
-		(
-			(((double)stream_length) / ((double)fields_presented)) * 2.0
-			* ((double)frame_rate)  + 25.0
-			) / 50;
-	
-	/* Peak bit rate in 50B/sec units... */
-	peak_bit_rate = ((max_bits_persec / 8) / 50);
-	mjpeg_info ("VIDEO_STATISTICS: %02x", stream_id); 
-    mjpeg_info ("Video Stream length: %11llu bytes",stream_length);
-    mjpeg_info ("Sequence headers: %8u",num_sequence);
-    mjpeg_info ("Sequence ends   : %8u",num_seq_end);
-    mjpeg_info ("No. Pictures    : %8u",num_pictures);
-    mjpeg_info ("No. I Frames    : %8u avg. size%6u bytes",
-			  num_frames[0],avg_frames[0]);
-    mjpeg_info("Average bit-rate : %8u bits/sec",comp_bit_rate*400);
-    mjpeg_info("Peak bit-rate    : %8u  bits/sec",peak_bit_rate*400);
-
-	
-}
-	
-
-
-
-/*************************************************************************
-	OutputSeqHdrInfo
-     Display sequence header parameters
-*************************************************************************/
-
-void ZAlphaStream::OutputSeqhdrInfo ()
-{
-	const char *str;
-	mjpeg_info("Z/Alpha STREAM: %02x", stream_id);
-
-    mjpeg_info ("Frame width     : %u\n",horizontal_size);
-    mjpeg_info ("Frame height    : %u\n",vertical_size);
-
-    mjpeg_info ("Z min    : %f\n", z_min);
-    mjpeg_info ("Z max    : %f\n", z_max);
-
-    mjpeg_info ("Z format 0x%x, depth    : %d", z_format, z_depth);
-    mjpeg_info ("Alpha depth   : %d", alpha_depth);
-
-	if (mpeg_valid_aspect_code(muxinto.mpeg, aspect_ratio))
-		str =  mpeg_aspect_code_definition(muxinto.mpeg,aspect_ratio);
-	else
-		str = "forbidden";
-    mjpeg_info ("Aspect ratio    : %s", str );
-
-    if (picture_rate == 0)
-		mjpeg_info( "Picture rate    : forbidden");
-    else if (mpeg_valid_framerate_code(picture_rate))
-		mjpeg_info( "Picture rate    : %2.3f frames/sec",
-					Y4M_RATIO_DBL(mpeg_framerate(picture_rate)) );
-    else
-		mjpeg_info( "Picture rate    : %x reserved",picture_rate);
-				
-    if (bit_rate == 0x3ffff)
-		{
-			bit_rate = 0;
-			mjpeg_info( "Bit rate        : variable"); 
-		}
-    else if (bit_rate == 0)
-		mjpeg_info( "Bit rate       : forbidden");
-    else
-		mjpeg_info( "Bit rate        : %u bits/sec",
-					bit_rate*400);
-
-
-    mjpeg_info("Vbv buffer size : %u bytes",vbv_buffer_size*2048);
-    mjpeg_info("CSPF            : %u",CSPF);
-}
-
-//
-// Compute DTS of current AU in the Z/alpha sequence being
-// scanned.  
-//
-
-void ZAlphaStream::NextDTSPTS( clockticks &DTS, clockticks &PTS)
-{
-#if 0  // ZAlpha can't currently handle interlaced or 3:2 pulldown
-    if( pict_struct != PIC_FRAME )
-    {
-		DTS = static_cast<clockticks>
-			(fields_presented * (double)(CLOCKS/2) / frame_rate);
-        int dts_fields = temporal_reference*2 + group_start_field+1;
-        if( temporal_reference == prev_temp_ref )
-            dts_fields += 1;
-        PTS =
-            static_cast<clockticks>(dts_fields* (double)(CLOCKS/2) / frame_rate);
-		access_unit.porder = temporal_reference /*+ group_start_pic*/;
-        fields_presented += 1;
-    }	
-    else if( pulldown_32 )
-	{
-		int frames2field;
-		int frames3field;
-		DTS = static_cast<clockticks>
-			(fields_presented * (double)(CLOCKS/2) / frame_rate);
-		if( repeat_first_field )
-		{
-			frames2field = (temporal_reference+1) / 2;
-			frames3field = temporal_reference / 2;
-			fields_presented += 3;
-		}
-		else
-		{
-			frames2field = (temporal_reference) / 2;
-			frames3field = (temporal_reference+1) / 2;
-			fields_presented += 2;
-		}
-		PTS = static_cast<clockticks>
-			((frames2field*2 + frames3field*3 + group_start_field+1) * (double)(CLOCKS/2) / frame_rate);
-		access_unit.porder = temporal_reference + group_start_pic;
-	}
-    else
-#endif
-	{
-		DTS = static_cast<clockticks> 
-			(decoding_order * (double)CLOCKS / frame_rate);
-        PTS=DTS;
-		fields_presented += 2;
-	}
-}
-
-
-
-
-
-/* 
- * Local variables:
- *  c-file-style: "stroustrup"
- *  tab-width: 4
- *  indent-tabs-mode: nil
- * End:
- */
-
diff --git a/mplex/zalphastrm_out.cpp b/mplex/zalphastrm_out.cpp
deleted file mode 100644
index 4240ade..0000000
--- a/mplex/zalphastrm_out.cpp
+++ /dev/null
@@ -1,324 +0,0 @@
-
-/*
- *  zalphastrm_out.cpp:  Members of input stream classes related to muxing out into
- *               the output stream.
- *
- *  Copyright (C) 2001 Gernot Ziegler <gz at lysator.liu.se>
- *  Copyright (C) 2001 Andrew Stevens <andrew.stevens at philips.com>
- *
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of version 2 of the GNU General Public License
- *  as published by the Free Software Foundation.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-
-#include <config.h>
-#include <assert.h>
-#include "zalphastrm.hpp"
-#include "multiplexor.hpp"
-
-
-ZAlphaStream::ZAlphaStream(IBitStream &ibs, VideoParams *parms, 
-                         Multiplexor &into ) :
-	VideoStream( ibs, parms, into)
-//ZAlphaStream::ZAlphaStream(IBitStream &ibs, OutputStream &into )	:
-//	VideoStream( ibs, into)
-{
-	prev_offset=0;
-    decoding_order=0;
-	fields_presented=0;
-    temporal_reference=0;
-	pulldown_32 = 0;
-    temporal_reference = -1;   // Needed to recognise 2nd field of 1st
-                               // frame in a field pic sequence
-	last_buffered_AU=0;
-	max_bits_persec = 0;
-	AU_hdr = ZA_SEQUENCE_HEADER;  /* GOP or SEQ Header starting AU? */
-	for( int i =0; i<4; ++i )
-		num_frames[i] = avg_frames[i] = 0;
-    FRAME_CHUNK = 6;
-		
-}
-
-bool ZAlphaStream::Probe(IBitStream &bs )
-{
-    return bs.GetBits( 32)  == ZA_SEQUENCE_HEADER;
-}
-
-/*********************************
- * Signals if it is permissible/possible to Mux out a sector from the Stream.
- * The universal constraints that muxing should not be complete and that
- * that the reciever buffer should have sufficient it also insists that
- * the muxed data won't hang around in the receiver buffer for more than
- * one second.  This is mainly for the benefit of (S)VCD and DVD applications
- * where long delays mess up random access.
- *******************************/
-
-bool ZAlphaStream::MuxPossible( clockticks currentSCR )
-{
-    bool a = ElementaryStream::MuxPossible(currentSCR);
-    bool b = (RequiredDTS() < (currentSCR + max_STD_buffer_delay));
-
-    //mjpeg_info("Z/A max_STD_buffer_delay %d", max_STD_buffer_delay); 
-    //mjpeg_info("Z/A Mux Possible %d, %d ", a, b);
-    //mjpeg_info("RequiredDTS %ld",RequiredDTS());
-    //mjpeg_info("currentSCR %ld", currentSCR);
-    //mjpeg_info("max_STD_buffer_delay %ld", max_STD_buffer_delay);
-
-	return (  a && b );
-}
-
-/******************************************************************
-	Output_Video
-	generates Pack/Sys_Header/Packet information from the
-	video stream and writes out the new sector
-******************************************************************/
-
-void ZAlphaStream::OutputSector ( )
-
-#if 1
-{
-
-	unsigned int max_packet_payload; 	 
-	unsigned int actual_payload;
-	unsigned int old_au_then_new_payload;
-	clockticks  DTS,PTS;
-    int autype;
-
-	max_packet_payload = 0;	/* 0 = Fill sector */
-  	/* 	
- 	   We're now in the last AU of a segment.  So we don't want to go
- 	   beyond it's end when filling sectors. Hence we limit packet
- 	   payload size to (remaining) AU length.  The same applies when
- 	   we wish to ensure sequence headers starting ACCESS-POINT AU's
- 	   in (S)VCD's etc are sector-aligned.  
-
-       N.b.runout_PTS is the PTS of the first I picture following the
-       run-out is recorded.
-	*/
-	int nextAU = NextAUType();
-	if( ( muxinto.running_out && nextAU == IFRAME && NextRequiredPTS() >= muxinto.runout_PTS) 
-        || (muxinto.sector_align_iframeAUs && nextAU == IFRAME  )
-		) 
-	{
-		max_packet_payload = au_unsent;
-	}
-
-	/* Figure out the threshold payload size below which we can fit more
-	   than one AU into a packet N.b. because fitting more than one in
-	   imposses an overhead of additional header fields so there is a
-	   dead spot where we *have* to stuff the packet rather than start
-	   fitting in an extra AU.  Slightly over-conservative in the case
-	   of the last packet...  */
-
-	old_au_then_new_payload = muxinto.PacketPayload( *this,
-													 buffers_in_header, 
-													 true, true);
-
-	/* CASE: Packet starts with new access unit			*/
-	if (new_au_next_sec  )
-	{
-        autype = AUType();
-        //
-        // Some types of output format (e.g. DVD) require special
-        // control sectors before the sector starting a new GOP
-        // N.b. this implies muxinto.sector_align_iframeAUs
-        //
-        if( gop_control_packet && autype == IFRAME )
-        {
-            OutputGOPControlSector();
-        }
-
-        if(  dtspts_for_all_au  && max_packet_payload == 0 )
-            max_packet_payload = au_unsent;
-
-        PTS = RequiredPTS();
-        DTS = RequiredDTS();
-		actual_payload =
-			muxinto.WritePacket ( max_packet_payload,
-						*this,
-						NewAUBuffers(autype), 
-                                  		PTS, DTS,
-						NewAUTimestamps(autype) );
-
-	}
-
-	/* CASE: Packet begins with old access unit, no new one	*/
-	/*	     can begin in the very same packet					*/
-
-	else if ( au_unsent >= old_au_then_new_payload ||
-              (max_packet_payload != 0 && au_unsent >= max_packet_payload) )
-	{
-		actual_payload = 
-			muxinto.WritePacket( au_unsent,
-						*this,
-						false, 0, 0,
-						TIMESTAMPBITS_NO );
-	}
-
-	/* CASE: Packet begins with old access unit, a new one	*/
-	/*	     could begin in the very same packet			*/
-	else /* if ( !new_au_next_sec  && 
-			(au_unsent < old_au_then_new_payload)) */
-	{
-		/* Is there a new access unit ? */
-		if( Lookahead() != 0 )
-		{
-            autype = NextAUType();
-			if(  dtspts_for_all_au  && max_packet_payload == 0 )
-				max_packet_payload = au_unsent + Lookahead()->length;
-
-			PTS = NextRequiredPTS();
-			DTS = NextRequiredDTS();
-
-			actual_payload = 
-				muxinto.WritePacket ( max_packet_payload,
-						*this,
-						NewAUBuffers(autype), 
-                                      		PTS, DTS,
-						NewAUTimestamps(autype) );
-		} 
-		else
-		{
-			actual_payload = muxinto.WritePacket ( au_unsent,
-						*this, false, 0, 0,
-						TIMESTAMPBITS_NO);
-		}
-	}
-	++nsec;
-	buffers_in_header = always_buffers_in_header;
-}
-
-#else
-{
-	unsigned int max_packet_payload; 	 
-	unsigned int actual_payload;
-	unsigned int prev_au_tail;
-	VAunit *vau;
-	unsigned int old_au_then_new_payload;
-	clockticks  DTS,PTS;
-        int autype;
-
-	max_packet_payload = 0;	/* 0 = Fill sector */
-  	/* 	
- 	   We're now in the last AU of a segment. 
-		So we don't want to go beyond it's end when filling
-		sectors. Hence we limit packet payload size to (remaining) AU length.
-		The same applies when we wish to ensure sequence headers starting
-		ACCESS-POINT AU's in (S)VCD's etc are sector-aligned.
-	*/
-	int nextAU = NextAUType();
-	if( (muxinto.running_out && nextAU == IFRAME && 
-		 NextRequiredPTS() > muxinto.runout_PTS) ||
-		(muxinto.sector_align_iframeAUs && nextAU == IFRAME )
-		) 
-	{
-		max_packet_payload = au_unsent;
-	}
-
-	/* Figure out the threshold payload size below which we can fit more
-	   than one AU into a packet N.b. because fitting more than one in
-	   imposses an overhead of additional header fields so there is a
-	   dead spot where we *have* to stuff the packet rather than start
-	   fitting in an extra AU.  Slightly over-conservative in the case
-	   of the last packet...  */
-
-	old_au_then_new_payload = muxinto.PacketPayload( *this,
-					buffers_in_header, true, true);
-
-	/* CASE: Packet starts with new access unit			*/
-	if (new_au_next_sec  )
-	{
-        autype = AUType();
-        //
-        // Some types of output format (e.g. DVD) require special
-        // control sectors before the sector starting a new GOP
-        // N.b. this implies muxinto.sector_align_iframeAUs
-        //
-        if( gop_control_packet && autype == IFRAME )
-            OutputGOPControlSector();
-
-        if(  dtspts_for_all_au  && max_packet_payload == 0 )
-            max_packet_payload = au_unsent;
-
-        PTS = RequiredPTS();
-        DTS = RequiredDTS();
-		actual_payload =
-			muxinto.WritePacket ( max_packet_payload,
-						*this,
-						NewAUBuffers(autype), 
-                                  		PTS, DTS,
-						NewAUTimestamps(autype) );
-	}
-
-	/* CASE: Packet begins with old access unit, no new one	*/
-	/*	     can begin in the very same packet					*/
-
-	else if ( au_unsent >= old_au_then_new_payload ||
-              (max_packet_payload != 0 && au_unsent >= max_packet_payload) )
-	{
-		actual_payload = 
-			muxinto.WritePacket( au_unsent, *this,
-						false, 0, 0, TIMESTAMPBITS_NO );
-	}
-
-	/* CASE: Packet begins with old access unit, a new one	*/
-	/*	     could begin in the very same packet			*/
-	else /* if ( !new_au_next_sec  && 
-			(au_unsent < old_au_then_new_payload)) */
-	{
-		/* Is there a new access unit ? */
-		if( Lookahead() != 0 )
-		{
-            autype = NextAUType();
-			if(  dtspts_for_all_au  && max_packet_payload == 0 )
-				max_packet_payload = au_unsent + Lookahead()->length;
-
-			PTS = NextRequiredPTS();
-			DTS = NextRequiredDTS();
-
-			actual_payload = 
-				muxinto.WritePacket ( max_packet_payload, *this,
-						NewAUBuffers(autype), 
-                                     		PTS, DTS, 
-						NewAUTimestamps(autype) );
-		} 
-		else
-		{
-			actual_payload = muxinto.WritePacket ( 0, *this,
-							false, 0, 0,
-							TIMESTAMPBITS_NO);
-		}
-
-	}
-	++nsec;
-	buffers_in_header = always_buffers_in_header;
-}
-#endif
-
-bool ZAlphaStream::RunOutComplete()
-{
-	return (au_unsent == 0);
-// || 
-//			( muxinto.running_out &&
-//			  au->type == IFRAME && RequiredPTS() >= muxinto.runout_PTS));
-}
-
-
-/* 
- * Local variables:
- *  c-file-style: "stroustrup"
- *  tab-width: 4
- *  indent-tabs-mode: nil
- * End:
- */
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 9fb05ed..7eac03d 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -154,13 +154,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/utils/Makefile.in b/utils/Makefile.in
index d9f2352..99b43d3 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -217,13 +217,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/utils/altivec/Makefile.in b/utils/altivec/Makefile.in
index 565d2bf..668d9d4 100644
--- a/utils/altivec/Makefile.in
+++ b/utils/altivec/Makefile.in
@@ -163,13 +163,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/utils/mmxsse/Makefile.in b/utils/mmxsse/Makefile.in
index 841a9ba..a75d324 100644
--- a/utils/mmxsse/Makefile.in
+++ b/utils/mmxsse/Makefile.in
@@ -156,13 +156,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/y4mdenoise/Makefile.am b/y4mdenoise/Makefile.am
index 9df8d66..aca2a46 100644
--- a/y4mdenoise/Makefile.am
+++ b/y4mdenoise/Makefile.am
@@ -22,6 +22,8 @@ noinst_HEADERS = \
 	DoublyLinkedList.hh \
 	Limits.hh \
 	MotionSearcher.hh \
+	newdenoise.hh \
+	PlacementAllocator.hh\
 	ReferenceFrame.hh \
 	Region2D.hh \
 	SearchBorder.hh \
@@ -31,7 +33,8 @@ noinst_HEADERS = \
 	SkipList.hh \
 	Status_t.h \
 	TemplateLib.hh \
-	newdenoise.hh
+	VariableSizeAllocator.hh \
+	Vector.hh
 
 noinst_PROGRAMS = regiontest
 
diff --git a/y4mdenoise/Makefile.in b/y4mdenoise/Makefile.in
index 9e2e8af..20f6b52 100644
--- a/y4mdenoise/Makefile.in
+++ b/y4mdenoise/Makefile.in
@@ -169,13 +169,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
@@ -255,6 +256,8 @@ noinst_HEADERS = \
 	DoublyLinkedList.hh \
 	Limits.hh \
 	MotionSearcher.hh \
+	newdenoise.hh \
+	PlacementAllocator.hh\
 	ReferenceFrame.hh \
 	Region2D.hh \
 	SearchBorder.hh \
@@ -264,7 +267,8 @@ noinst_HEADERS = \
 	SkipList.hh \
 	Status_t.h \
 	TemplateLib.hh \
-	newdenoise.hh
+	VariableSizeAllocator.hh \
+	Vector.hh
 
 regiontest_SOURCES = regiontest.cc
 y4mdenoise_SOURCES = main.c newdenoise.cc
diff --git a/y4munsharp/Makefile.in b/y4munsharp/Makefile.in
index dce4a81..c44d950 100644
--- a/y4munsharp/Makefile.in
+++ b/y4munsharp/Makefile.in
@@ -154,13 +154,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/y4mutils/Makefile.in b/y4mutils/Makefile.in
index d9ab8b6..43276c0 100644
--- a/y4mutils/Makefile.in
+++ b/y4mutils/Makefile.in
@@ -213,13 +213,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/yuvcorrect/Makefile.in b/yuvcorrect/Makefile.in
index b62e8a2..89c078e 100644
--- a/yuvcorrect/Makefile.in
+++ b/yuvcorrect/Makefile.in
@@ -162,13 +162,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/yuvdeinterlace/Makefile.in b/yuvdeinterlace/Makefile.in
index c0dc7e5..b7927fc 100644
--- a/yuvdeinterlace/Makefile.in
+++ b/yuvdeinterlace/Makefile.in
@@ -156,13 +156,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/yuvdenoise/Makefile.in b/yuvdenoise/Makefile.in
index b10943a..e5c7d56 100644
--- a/yuvdenoise/Makefile.in
+++ b/yuvdenoise/Makefile.in
@@ -153,13 +153,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/yuvdenoise/main.c b/yuvdenoise/main.c
index 44e141a..5247401 100644
--- a/yuvdenoise/main.c
+++ b/yuvdenoise/main.c
@@ -810,8 +810,8 @@ void temporal_filter_planes_p (int idx, int w, int h, int t)
 /* 4 to 5 times faster */
 void filter_plane_median_sse2(uint8_t *plane, int w, int h, int level) {
 	int i;
-	/* int avg; should not be needed any more */
-	/* int cnt; should not be needed any more */
+	int avg; /*should not be needed any more */
+	int cnt; /* should not be needed any more */
 	uint8_t * p;
 	uint8_t * d;
 	
diff --git a/yuvfilters/Makefile.in b/yuvfilters/Makefile.in
index 1b6c4f6..8b43780 100644
--- a/yuvfilters/Makefile.in
+++ b/yuvfilters/Makefile.in
@@ -172,13 +172,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@
diff --git a/yuvscaler/Makefile.in b/yuvscaler/Makefile.in
index eab79df..ab40bdd 100644
--- a/yuvscaler/Makefile.in
+++ b/yuvscaler/Makefile.in
@@ -162,13 +162,14 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 PROGRAM_NOPIC = @PROGRAM_NOPIC@
 PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SDL_CFLAGS = @SDL_CFLAGS@
-SDL_CONFIG = @SDL_CONFIG@
 SDL_LIBS = @SDL_LIBS@
 SDLgfx_LIBS = @SDLgfx_LIBS@
 SED = @SED@

-- 
mjpegtools packaging



More information about the pkg-multimedia-commits mailing list