removed % handling
[swftools.git] / configure
index edf40f3..a2da48d 100755 (executable)
--- a/configure
+++ b/configure
@@ -16,9 +16,13 @@ ac_help="$ac_help
 ac_help="$ac_help
   --enable-debug          turn on debugging"
 ac_help="$ac_help
+  --enable-profiling      turn on profiling"
+ac_help="$ac_help
+  --enable-warnings       turn on compiler warnings"
+ac_help="$ac_help
   --enable-optimizations  turn on compiler optimizations (recommended for avi2swf)"
 ac_help="$ac_help
-  --disable-mp3           don't compile any mp3 code in"
+  --disable-lame          don't compile any L.A.M.E. mp3 encoding code in"
 ac_help="$ac_help
   --enable-shared[=PKGS]  build shared libraries [default=yes]"
 ac_help="$ac_help
@@ -701,6 +705,7 @@ fi
 
 
 
+
 # Check whether --enable-checkmem or --disable-checkmem was given.
 if test "${enable_checkmem+set}" = set; then
   enableval="$enable_checkmem"
@@ -713,43 +718,69 @@ if test "${enable_debug+set}" = set; then
   DEBUG=true
 fi
 
+# Check whether --enable-profiling or --disable-profiling was given.
+if test "${enable_profiling+set}" = set; then
+  enableval="$enable_profiling"
+  PROFILING=true
+fi
+
+# Check whether --enable-warnings or --disable-warnings was given.
+if test "${enable_warnings+set}" = set; then
+  enableval="$enable_warnings"
+  ENABLE_WARNINGS=true
+fi
+
 # Check whether --enable-optimizations or --disable-optimizations was given.
 if test "${enable_optimizations+set}" = set; then
   enableval="$enable_optimizations"
   OPTIMIZE=true
 fi
 
-# Check whether --enable-mp3 or --disable-mp3 was given.
-if test "${enable_mp3+set}" = set; then
-  enableval="$enable_mp3"
-  NO_MP3=true
+# Check whether --enable-lame or --disable-lame was given.
+if test "${enable_lame+set}" = set; then
+  enableval="$enable_lame"
+  DISABLE_LAME=true
 fi
 
 
 PACKAGE=swftools
-VERSION=2004-02-01-1614
+VERSION=2005-09-10-1014
 
 
+# ------------------------------------------------------------------
 
+if test "x${srcdir}" != "x."; then
+    echo "--srcdir is not supported"
+    exit 1
+fi
 
-# -Winline?
+WARNINGS="-Wparentheses -Wimplicit -Wreturn-type"
+if test "x$ENABLE_WARNINGS" '!=' "x";then
+    WARNINGS="-Wall -Wno-unused -Wno-format -Wno-redundant-decls"
+fi
 
 if test "x$CHECKMEM" '!=' "x";then
     DEBUG=yes
 fi
+if test "x$PROFILING" '!=' "x";then
+    DEBUG=yes
+fi
 if test "x$DEBUG" '!=' "x";then
-    CFLAGS="-Wparentheses -Wimplicit -Wreturn-type -g $CFLAGS"
-    CXXFLAGS="-Wparentheses -Wimplicit -Wreturn-type -g $CXXFLAGS"
-    STRIP="@echo debug enabled, not stripping "
-    export STRIP
-    
+    if test "x$PROFILING" = "x";then
+        CFLAGS="$WARNINGS -O2 -g $CFLAGS"
+        CXXFLAGS="$WARNINGS -O2 -g $CXXFLAGS"
+    else
+        CFLAGS="$WARNINGS -O2 -g -pg $CFLAGS"
+        CXXFLAGS="$WARNINGS -O2 -g -pg $CXXFLAGS"
+        LDFLAGS="-g -pg $LIBS"
+    fi
 else if test "x$OPTIMIZE" '!=' "x"; then
-       CFLAGS="-Wparentheses -Wimplicit -Wreturn-type -Winline -O3 -fomit-frame-pointer $CFLAGS"
-       CXXFLAGS="-Wparentheses -Wimplicit -Wreturn-type -Winline -O3 -fomit-frame-pointer $CXXFLAGS"
-     else
-       CFLAGS="-Wparentheses -Wimplicit -Wreturn-type -O -fomit-frame-pointer $CFLAGS"
-       CXXFLAGS="-Wparentheses -Wimplicit -Wreturn-type -O -fomit-frame-pointer $CXXFLAGS"
-     fi
+    CFLAGS="$WARNINGS -O3 -fomit-frame-pointer -Winline $CFLAGS"
+    CXXFLAGS="$WARNINGS -O3 -fomit-frame-pointer -Winline $CXXFLAGS"
+else
+    CFLAGS="$WARNINGS -O -fomit-frame-pointer $CFLAGS"
+    CXXFLAGS="$WARNINGS -O -fomit-frame-pointer $CXXFLAGS"
+fi
 fi
 #OLDGCC=1
 #if test "x$OLDGCC" '!=' "x";then
@@ -761,7 +792,8 @@ fi
 
 export PACKAGE VERSION CFLAGS CXXFLAGS
 
- ac_aux_dir=
+
+ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
   if test -f $ac_dir/install-sh; then
     ac_aux_dir=$ac_dir
@@ -787,7 +819,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:791: checking host system type" >&5
+echo "configure:823: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -807,18 +839,29 @@ host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
+
+SHARED="-shared"
 MACOSX=
 case $host_os in
     *darwin* ) 
        MACOSX=yes
-       CFLAGS="$CFLAGS -fno-rtti"
+       CFLAGS="$CFLAGS"
        CXXFLAGS="$CXXFLAGS -fno-rtti"
+       SHARED="-bundle"
+       # Use fink packages if available.
+       #if test -d /sw/include && test -d /sw/lib; then
+       #    CPPFLAGS="${CPPFLAGS} -I/sw/include"
+       #    LDFLAGS="${LDFLAGS} -L/sw/lib"
+       #fi
        ;;
 esac
+
+
+
  # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:822: checking for $ac_word" >&5
+echo "configure:865: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -848,7 +891,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:852: checking for $ac_word" >&5
+echo "configure:895: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -899,7 +942,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:903: checking for $ac_word" >&5
+echo "configure:946: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -931,7 +974,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:935: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:978: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -942,12 +985,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 946 "configure"
+#line 989 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -973,12 +1016,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:977: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1020: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:982: checking whether we are using GNU C" >&5
+echo "configure:1025: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -987,7 +1030,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1006,7 +1049,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1010: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1053: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1042,7 +1085,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1046: checking for $ac_word" >&5
+echo "configure:1089: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1074,7 +1117,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1078: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1121: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1085,12 +1128,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1089 "configure"
+#line 1132 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1116,12 +1159,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1120: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1163: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1125: checking whether we are using GNU C++" >&5
+echo "configure:1168: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1130,7 +1173,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -1149,7 +1192,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1153: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1196: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1180,7 +1223,7 @@ else
   fi
 fi
 
-
+    
 if test "x$CHECKMEM" '!=' "x";then
     CC="ccmalloc $CC"
     CXX="ccmalloc $CXX"
@@ -1191,7 +1234,7 @@ if test "x$CHECKMEM" '!=' "x";then
     #AC_PROG_CXX
 fi
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1195: checking how to run the C preprocessor" >&5
+echo "configure:1238: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1206,13 +1249,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1210 "configure"
+#line 1253 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1223,13 +1266,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1227 "configure"
+#line 1270 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1240,13 +1283,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1244 "configure"
+#line 1287 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1274,7 +1317,7 @@ echo "$ac_t""$CPP" 1>&6
  # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1278: checking for $ac_word" >&5
+echo "configure:1321: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1302,7 +1345,7 @@ else
 fi
 
  echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1306: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1349: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1340,7 +1383,7 @@ fi
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1344: checking for a BSD compatible install" >&5
+echo "configure:1387: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1393,7 +1436,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1397: checking whether ln -s works" >&5
+echo "configure:1440: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1425,12 +1468,12 @@ if test "X${PATH_SEPARATOR+set}" != Xset; then
 fi
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:1429: checking for Cygwin environment" >&5
+echo "configure:1472: checking for Cygwin environment" >&5
 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1434 "configure"
+#line 1477 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1441,7 +1484,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:1445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -1458,19 +1501,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:1462: checking for mingw32 environment" >&5
+echo "configure:1505: checking for mingw32 environment" >&5
 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1467 "configure"
+#line 1510 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:1474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -1556,7 +1599,7 @@ else
 fi
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1560: checking build system type" >&5
+echo "configure:1603: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1585,7 +1628,7 @@ ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1589: checking for ld used by GCC" >&5
+echo "configure:1632: checking for ld used by GCC" >&5
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -1615,10 +1658,10 @@ echo "configure:1589: checking for ld used by GCC" >&5
   esac
 elif test "$with_gnu_ld" = yes; then
   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1619: checking for GNU ld" >&5
+echo "configure:1662: checking for GNU ld" >&5
 else
   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1622: checking for non-GNU ld" >&5
+echo "configure:1665: checking for non-GNU ld" >&5
 fi
 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1653,7 +1696,7 @@ else
 fi
 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1657: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1700: checking if the linker ($LD) is GNU ld" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1670,7 +1713,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1674: checking for $LD option to reload object files" >&5
+echo "configure:1717: checking for $LD option to reload object files" >&5
 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1682,7 +1725,7 @@ reload_flag=$lt_cv_ld_reload_flag
 test -n "$reload_flag" && reload_flag=" $reload_flag"
 
 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1686: checking for BSD-compatible nm" >&5
+echo "configure:1729: checking for BSD-compatible nm" >&5
 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1720,7 +1763,7 @@ NM="$lt_cv_path_NM"
 echo "$ac_t""$NM" 1>&6
 
 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
-echo "configure:1724: checking for a sed that does not truncate output" >&5
+echo "configure:1767: checking for a sed that does not truncate output" >&5
 if eval "test \"`echo '$''{'lt_cv_path_SED'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1804,7 +1847,7 @@ fi
 echo "$ac_t""$SED" 1>&6
 
 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
-echo "configure:1808: checking how to recognise dependent libraries" >&5
+echo "configure:1851: checking how to recognise dependent libraries" >&5
 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1990,13 +2033,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 
 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1994: checking for object suffix" >&5
+echo "configure:2037: checking for object suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   rm -f conftest*
 echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:2000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   for ac_file in conftest.*; do
     case $ac_file in
     *.c) ;;
@@ -2016,7 +2059,7 @@ ac_objext=$ac_cv_objext
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2020: checking for executable suffix" >&5
+echo "configure:2063: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2026,7 +2069,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:2030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:2073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj) ;;
@@ -2057,7 +2100,7 @@ fi
 
 # Check for command to grab the raw symbol name followed by C symbol from nm.
 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
-echo "configure:2061: checking command to parse $NM output" >&5
+echo "configure:2104: checking command to parse $NM output" >&5
 if eval "test \"`echo '$''{'lt_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2140,10 +2183,10 @@ void nm_test_func(){}
 int main(){nm_test_var='a';nm_test_func();return(0);}
 EOF
 
-  if { (eval echo configure:2144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  if { (eval echo configure:2187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { (eval echo configure:2147: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
+    if { (eval echo configure:2190: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
        mv -f "$nlist"T "$nlist"
@@ -2194,7 +2237,7 @@ EOF
          save_CFLAGS="$CFLAGS"
          LIBS="conftstm.$ac_objext"
          CFLAGS="$CFLAGS$no_builtin_flag"
-         if { (eval echo configure:2198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
+         if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
            pipe_works=yes
          fi
          LIBS="$save_LIBS"
@@ -2243,17 +2286,17 @@ for ac_hdr in dlfcn.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2247: checking for $ac_hdr" >&5
+echo "configure:2290: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2252 "configure"
+#line 2295 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2289,7 +2332,7 @@ case $deplibs_check_method in
 file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:2293: checking for ${ac_tool_prefix}file" >&5
+echo "configure:2336: checking for ${ac_tool_prefix}file" >&5
 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2351,7 +2394,7 @@ fi
 if test -z "$lt_cv_path_MAGIC_CMD"; then
   if test -n "$ac_tool_prefix"; then
     echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:2355: checking for file" >&5
+echo "configure:2398: checking for file" >&5
 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2422,7 +2465,7 @@ esac
 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2426: checking for $ac_word" >&5
+echo "configure:2469: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2454,7 +2497,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2458: checking for $ac_word" >&5
+echo "configure:2501: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2489,7 +2532,7 @@ fi
 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
 set dummy ${ac_tool_prefix}strip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2493: checking for $ac_word" >&5
+echo "configure:2536: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2521,7 +2564,7 @@ if test -n "$ac_tool_prefix"; then
   # Extract the first word of "strip", so it can be a program name with args.
 set dummy strip; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2525: checking for $ac_word" >&5
+echo "configure:2568: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2570,8 +2613,8 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 2574 "configure"' > conftest.$ac_ext
-  if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  echo '#line 2617 "configure"' > conftest.$ac_ext
+  if { (eval echo configure:2618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     case `/usr/bin/file conftest.$ac_objext` in
     *32-bit*)
       LD="${LD-ld} -32"
@@ -2591,7 +2634,7 @@ case $host in
   # Test if the compiler is 64bit
   echo 'int i;' > conftest.$ac_ext
   lt_cv_cc_64bit_output=no
-  if { (eval echo configure:2595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  if { (eval echo configure:2638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     case `/usr/bin/file conftest.$ac_objext` in
     *"ELF 64"*)
       lt_cv_cc_64bit_output=yes
@@ -2606,7 +2649,7 @@ case $host in
   SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2610: checking whether the C compiler needs -belf" >&5
+echo "configure:2653: checking whether the C compiler needs -belf" >&5
 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2619,14 +2662,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
 cross_compiling=$ac_cv_prog_cc_cross
 
      cat > conftest.$ac_ext <<EOF
-#line 2623 "configure"
+#line 2666 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lt_cv_cc_needs_belf=yes
 else
@@ -2746,7 +2789,7 @@ set dummy $CC
 compiler="$2"
 
 echo $ac_n "checking for objdir""... $ac_c" 1>&6
-echo "configure:2750: checking for objdir" >&5
+echo "configure:2793: checking for objdir" >&5
 rm -f .libs 2>/dev/null
 mkdir .libs 2>/dev/null
 if test -d .libs; then
@@ -2773,7 +2816,7 @@ test -z "$pic_mode" && pic_mode=default
 # in isolation, and that seeing it set (from the cache) indicates that
 # the associated values are set (in the cache) correctly too.
 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
-echo "configure:2777: checking for $compiler option to produce PIC" >&5
+echo "configure:2820: checking for $compiler option to produce PIC" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_cc_pic'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2921,21 +2964,21 @@ else
 
   # Check to make sure the pic_flag actually works.
   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
-echo "configure:2925: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
+echo "configure:2968: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
   if eval "test \"`echo '$''{'lt_cv_prog_cc_pic_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
       save_CFLAGS="$CFLAGS"
     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
     cat > conftest.$ac_ext <<EOF
-#line 2932 "configure"
+#line 2975 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
         case $host_os in
       hpux9* | hpux10* | hpux11*)
@@ -2987,7 +3030,7 @@ if test -n "$lt_cv_prog_cc_shlib"; then
 fi
 
 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
-echo "configure:2991: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
+echo "configure:3034: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
 if eval "test \"`echo '$''{'lt_cv_prog_cc_static_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2995,14 +3038,14 @@ else
   save_LDFLAGS="$LDFLAGS"
   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
   cat > conftest.$ac_ext <<EOF
-#line 2999 "configure"
+#line 3042 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lt_cv_prog_cc_static_works=yes
 else
@@ -3029,7 +3072,7 @@ can_build_shared="$lt_cv_prog_cc_can_build_shared"
 
 # Check to see if options -o and -c are simultaneously supported by compiler
 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
-echo "configure:3033: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo "configure:3076: checking if $compiler supports -c -o file.$ac_objext" >&5
 if eval "test \"`echo '$''{'lt_cv_compiler_c_o'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3048,7 +3091,7 @@ chmod -w .
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 compiler_c_o=no
-if { (eval echo configure:3052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:3095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
   # The compiler can only warn and ignore the option if not recognized
   # So say no if there are warnings
   if test -s out/conftest.err; then
@@ -3077,7 +3120,7 @@ echo "$ac_t""$compiler_c_o" 1>&6
 if test x"$compiler_c_o" = x"yes"; then
   # Check to see if we can write to a .lo
   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
-echo "configure:3081: checking if $compiler supports -c -o file.lo" >&5
+echo "configure:3124: checking if $compiler supports -c -o file.lo" >&5
   if eval "test \"`echo '$''{'lt_cv_compiler_o_lo'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3088,14 +3131,14 @@ else
   save_objext="$ac_objext"
   ac_objext=lo
   cat > conftest.$ac_ext <<EOF
-#line 3092 "configure"
+#line 3135 "configure"
 #include "confdefs.h"
 
 int main() {
 int some_variable = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:3099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
       # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings
@@ -3126,7 +3169,7 @@ hard_links="nottested"
 if test "$compiler_c_o" = no && test "$need_locks" != no; then
   # do not overwrite the value of need_locks provided by the user
   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
-echo "configure:3130: checking if we can lock with hard links" >&5
+echo "configure:3173: checking if we can lock with hard links" >&5
   hard_links=yes
   $rm conftest*
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
@@ -3145,20 +3188,20 @@ fi
 if test "$GCC" = yes; then
   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
-echo "configure:3149: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo "configure:3192: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
   echo "int some_variable = 0;" > conftest.$ac_ext
   save_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
   compiler_rtti_exceptions=no
   cat > conftest.$ac_ext <<EOF
-#line 3155 "configure"
+#line 3198 "configure"
 #include "confdefs.h"
 
 int main() {
 int some_variable = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:3162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
       # The compiler can only warn and ignore the option if not recognized
     # So say no if there are warnings
@@ -3185,7 +3228,7 @@ fi
 
 # See if the linker supports building shared libraries.
 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
-echo "configure:3189: checking whether the linker ($LD) supports shared libraries" >&5
+echo "configure:3232: checking whether the linker ($LD) supports shared libraries" >&5
 
 allow_undefined_flag=
 no_undefined_flag=
@@ -3402,6 +3445,30 @@ EOF
     hardcode_shlibpath_var=no
     ;;
 
+  linux*)
+    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      supports_anon_versioning=no
+      case `$LD -v 2>/dev/null` in
+        *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+        *\ 2.11.*) ;; # other 2.11 versions
+        *) supports_anon_versioning=yes ;;
+      esac
+      if test $supports_anon_versioning = yes; then
+        archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+      else
+        $archive_expsym_cmds="$archive_cmds"
+      fi
+    else
+      ld_shlibs=no
+    fi
+    ;;
+
   *)
     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
@@ -3884,7 +3951,7 @@ test "$ld_shlibs" = no && can_build_shared=no
 
 # Check hardcoding attributes.
 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
-echo "configure:3888: checking how to hardcode library paths into programs" >&5
+echo "configure:3955: checking how to hardcode library paths into programs" >&5
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" || \
    test -n "$runpath_var"; then
@@ -3912,7 +3979,7 @@ echo "$ac_t""$hardcode_action" 1>&6
 striplib=
 old_striplib=
 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
-echo "configure:3916: checking whether stripping libraries is possible" >&5
+echo "configure:3983: checking whether stripping libraries is possible" >&5
 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
@@ -3926,7 +3993,7 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 # PORTME Fill in your ld.so characteristics
 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
-echo "configure:3930: checking dynamic linker characteristics" >&5
+echo "configure:3997: checking dynamic linker characteristics" >&5
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -4192,8 +4259,8 @@ linux-gnu*)
   libsuff=
   case "$host_cpu" in
   x86_64*)
-    echo '#line 4196 "configure"' > conftest.$ac_ext
-    if { (eval echo configure:4197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+    echo '#line 4263 "configure"' > conftest.$ac_ext
+    if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
       case `/usr/bin/file conftest.$ac_objext` in
       *64-bit*)
         libsuff=64
@@ -4364,11 +4431,11 @@ test "$dynamic_linker" = no && can_build_shared=no
 
 # Report the final consequences.
 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
-echo "configure:4368: checking if libtool supports shared libraries" >&5
+echo "configure:4435: checking if libtool supports shared libraries" >&5
 echo "$ac_t""$can_build_shared" 1>&6
 
 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
-echo "configure:4372: checking whether to build shared libraries" >&5
+echo "configure:4439: checking whether to build shared libraries" >&5
 test "$can_build_shared" = "no" && enable_shared=no
 
 # On AIX, shared libraries and static libraries use the same namespace, and
@@ -4391,7 +4458,7 @@ esac
 echo "$ac_t""$enable_shared" 1>&6
 
 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
-echo "configure:4395: checking whether to build static libraries" >&5
+echo "configure:4462: checking whether to build static libraries" >&5
 # Make sure either enable_shared or enable_static is yes.
 test "$enable_shared" = yes || enable_static=yes
 echo "$ac_t""$enable_static" 1>&6
@@ -4432,12 +4499,12 @@ else
 
   *)
     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "configure:4436: checking for shl_load" >&5
+echo "configure:4503: checking for shl_load" >&5
 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4441 "configure"
+#line 4508 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shl_load(); below.  */
@@ -4460,7 +4527,7 @@ shl_load();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_shl_load=yes"
 else
@@ -4478,7 +4545,7 @@ if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "configure:4482: checking for shl_load in -ldld" >&5
+echo "configure:4549: checking for shl_load in -ldld" >&5
 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4486,7 +4553,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4490 "configure"
+#line 4557 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4497,7 +4564,7 @@ int main() {
 shl_load()
 ; return 0; }
 EOF
-if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4516,12 +4583,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "configure:4520: checking for dlopen" >&5
+echo "configure:4587: checking for dlopen" >&5
 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4525 "configure"
+#line 4592 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dlopen(); below.  */
@@ -4544,7 +4611,7 @@ dlopen();
 
 ; return 0; }
 EOF
-if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_dlopen=yes"
 else
@@ -4562,7 +4629,7 @@ if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4566: checking for dlopen in -ldl" >&5
+echo "configure:4633: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4570,7 +4637,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4574 "configure"
+#line 4641 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4581,7 +4648,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4600,7 +4667,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-echo "configure:4604: checking for dlopen in -lsvld" >&5
+echo "configure:4671: checking for dlopen in -lsvld" >&5
 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4608,7 +4675,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsvld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4612 "configure"
+#line 4679 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4619,7 +4686,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4638,7 +4705,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "configure:4642: checking for dld_link in -ldld" >&5
+echo "configure:4709: checking for dld_link in -ldld" >&5
 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4646,7 +4713,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldld  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4650 "configure"
+#line 4717 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4657,7 +4724,7 @@ int main() {
 dld_link()
 ; return 0; }
 EOF
-if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -4713,7 +4780,7 @@ fi
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "configure:4717: checking whether a program can dlopen itself" >&5
+echo "configure:4784: checking whether a program can dlopen itself" >&5
 if eval "test \"`echo '$''{'lt_cv_dlopen_self'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4723,7 +4790,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 4727 "configure"
+#line 4794 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -4784,7 +4851,7 @@ int main ()
     exit (status);
 }
 EOF
-  if { (eval echo configure:4788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  if { (eval echo configure:4855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -4807,7 +4874,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6
     if test "x$lt_cv_dlopen_self" = xyes; then
       LDFLAGS="$LDFLAGS $link_static_flag"
       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "configure:4811: checking whether a statically linked program can dlopen itself" >&5
+echo "configure:4878: checking whether a statically linked program can dlopen itself" >&5
 if eval "test \"`echo '$''{'lt_cv_dlopen_self_static'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -4817,7 +4884,7 @@ else
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 4821 "configure"
+#line 4888 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -4878,7 +4945,7 @@ int main ()
     exit (status);
 }
 EOF
-  if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  if { (eval echo configure:4949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
     (./conftest; exit; ) 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -4927,14 +4994,14 @@ if test "$enable_shared" = yes && test "$GCC" = yes; then
     # systems, -lgcc has to come before -lc. If gcc already passes -lc
     # to ld, don't add -lc before -lgcc.
     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
-echo "configure:4931: checking whether -lc should be explicitly linked in" >&5
+echo "configure:4998: checking whether -lc should be explicitly linked in" >&5
     if eval "test \"`echo '$''{'lt_cv_archive_cmds_need_lc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   $rm conftest*
     echo 'static int dummy;' > conftest.$ac_ext
 
-    if { (eval echo configure:4938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+    if { (eval echo configure:5005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
       soname=conftest
       lib=conftest
       libobjs=conftest.$ac_objext
@@ -4947,7 +5014,7 @@ else
       libname=conftest
       save_allow_undefined_flag=$allow_undefined_flag
       allow_undefined_flag=
-      if { (eval echo configure:4951: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
+      if { (eval echo configure:5018: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\") 1>&5; (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5; }
       then
        lt_cv_archive_cmds_need_lc=no
       else
@@ -5536,7 +5603,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5540: checking for $ac_word" >&5
+echo "configure:5607: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_UNCOMPRESS'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5565,45 +5632,14 @@ fi
 test -n "$UNCOMPRESS" && break
 done
 
- for ac_prog in freetype-config
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5574: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_FREETYPE_CONFIG'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$FREETYPE_CONFIG"; then
-  ac_cv_prog_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test.
-else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-  ac_dummy="$PATH"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_FREETYPE_CONFIG="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-FREETYPE_CONFIG="$ac_cv_prog_FREETYPE_CONFIG"
-if test -n "$FREETYPE_CONFIG"; then
-  echo "$ac_t""$FREETYPE_CONFIG" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
 
-test -n "$FREETYPE_CONFIG" && break
-done
- # TODO: use this
+OBJEXT="o"
+AREXT=".a"
+
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:5607: checking for executable suffix" >&5
+echo "configure:5643: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5613,7 +5649,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:5617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:5653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj) ;;
@@ -5634,6 +5670,13 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6
 ac_exeext=$EXEEXT
 
 
+if test "x$EXEEXT" = "x.exe";then
+    OBJEXT="obj"
+    AREXT=".lib"
+fi
+
+
+
 
 
 # Make sure we can run config.sub.
@@ -5642,7 +5685,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:5646: checking host system type" >&5
+echo "configure:5689: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -5665,7 +5708,7 @@ echo "$ac_t""$host" 1>&6
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:5669: checking for executable suffix" >&5
+echo "configure:5712: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -5675,7 +5718,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:5679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj) ;;
@@ -5697,7 +5740,7 @@ ac_exeext=$EXEEXT
 
 
 echo $ac_n "checking for target system""... $ac_c" 1>&6
-echo "configure:5701: checking for target system" >&5
+echo "configure:5744: checking for target system" >&5
 CYGWIN=
 MINGW=
 case $host_os in
@@ -5706,7 +5749,7 @@ case $host_os in
 esac
 
 AR=ar
-if test "x$MINGW" == "xyes"; then
+if test "x$MINGW" = "xyes"; then
     #fix for the debian distribution of mingw
     if test -x "/usr/i586-mingw32msvc/bin/ar";then
        AR="/usr/i586-mingw32msvc/bin/ar"
@@ -5759,12 +5802,20 @@ EOF
 fi
 
 
+SLEXT="so"
 if test "x${MINGW}" != "xyes"; then
+    # no mingW
     cat >> confdefs.h <<EOF
 #define O_BINARY 0
 EOF
 
+else
+    # mingW
+    SLEXT="dll"
 fi
+export SLEXT
+
+
 # The following tries to make use of includes and libraries in
 # /usr/local, too. Notice: A -I/usr/local/include might break
 # things (MingW, cross-compiling etc.) in the same way as -I/usr/include, 
@@ -5787,8 +5838,19 @@ if test "$prefix" != "NONE" -a "$prefix" != "/usr/local" -a "$prefix" != "/usr/l
     # TODO- test whether gcc still works after this
 fi
 
+#Mac OS:
+#LDFLAGS "-L/sw/lib" ; CPPFLAGS "-I/sw/include -I/sw/include/lame"
+
+
+# this must be done after (I believe) AC_PROG_MAKE_SET
+if test "x$DEBUG" '!=' "x";then
+    STRIP="@echo debug enabled, not stripping "
+    export STRIP
+    
+fi
+
  echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:5792: checking for sin in -lm" >&5
+echo "configure:5854: checking for sin in -lm" >&5
 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5796,7 +5858,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5800 "configure"
+#line 5862 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5807,7 +5869,7 @@ int main() {
 sin()
 ; return 0; }
 EOF
-if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5838,7 +5900,7 @@ echo "Error: Math library not found.";
 fi
 
  echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
-echo "configure:5842: checking for deflate in -lz" >&5
+echo "configure:5904: checking for deflate in -lz" >&5
 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5846,7 +5908,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lz  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5850 "configure"
+#line 5912 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5857,7 +5919,7 @@ int main() {
 deflate()
 ; return 0; }
 EOF
-if { (eval echo configure:5861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5882,14 +5944,11 @@ EOF
 
 else
   echo "$ac_t""no" 1>&6
-DISABLEPNG2SWF=true;
- MISSINGLIBS="${MISSINGLIBS} zlib"
- ZLIBMISSING=true;
+ZLIBMISSING=true
 fi
 
  echo $ac_n "checking for jpeg_write_raw_data in -ljpeg""... $ac_c" 1>&6
-echo "configure:5893: checking for jpeg_write_raw_data in -ljpeg" >&5
+echo "configure:5952: checking for jpeg_write_raw_data in -ljpeg" >&5
 ac_lib_var=`echo jpeg'_'jpeg_write_raw_data | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5897,7 +5956,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ljpeg  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5901 "configure"
+#line 5960 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5908,7 +5967,7 @@ int main() {
 jpeg_write_raw_data()
 ; return 0; }
 EOF
-if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5933,14 +5992,11 @@ EOF
 
 else
   echo "$ac_t""no" 1>&6
-DISABLEPDF2SWF=true;
- DISABLEJPEG2SWF=true;
- MISSINGLIBS="${MISSINGLIBS} jpeglib"
+JPEGLIBMISSING=true
 fi
 
  echo $ac_n "checking for T1_LoadFont in -lt1""... $ac_c" 1>&6
-echo "configure:5944: checking for T1_LoadFont in -lt1" >&5
+echo "configure:6000: checking for T1_LoadFont in -lt1" >&5
 ac_lib_var=`echo t1'_'T1_LoadFont | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -5948,7 +6004,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lt1  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5952 "configure"
+#line 6008 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -5959,7 +6015,7 @@ int main() {
 T1_LoadFont()
 ; return 0; }
 EOF
-if { (eval echo configure:5963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -5984,32 +6040,30 @@ EOF
 
 else
   echo "$ac_t""no" 1>&6
-DISABLEPDF2SWF=true;
- MISSINGLIBS="${MISSINGLIBS} t1lib"
+T1LIBMISSING=true
 fi
 
- echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
-echo "configure:5994: checking for FT_Init_FreeType in -lfreetype" >&5
-ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for DGifOpen in -lungif""... $ac_c" 1>&6
+echo "configure:6048: checking for DGifOpen in -lungif" >&5
+ac_lib_var=`echo ungif'_'DGifOpen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_save_LIBS="$LIBS"
-LIBS="-lfreetype  $LIBS"
+LIBS="-lungif  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6002 "configure"
+#line 6056 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
-char FT_Init_FreeType();
+char DGifOpen();
 
 int main() {
-FT_Init_FreeType()
+DGifOpen()
 ; return 0; }
 EOF
-if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6024,20 +6078,28 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
-  USE_FREETYPE=true
+    ac_tr_lib=HAVE_LIB`echo ungif | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lungif $LIBS"
+
 else
   echo "$ac_t""no" 1>&6
+UNGIFMISSING=true
 fi
 
 
 
 echo $ac_n "checking for byte order""... $ac_c" 1>&6
-echo "configure:6036: checking for byte order" >&5
+echo "configure:6098: checking for byte order" >&5
 if test "$cross_compiling" = yes; then
   CROSSCOMPILE=1
 else
   cat > conftest.$ac_ext <<EOF
-#line 6041 "configure"
+#line 6103 "configure"
 #include "confdefs.h"
 
 int main (int argc, char *argv[])
@@ -6047,7 +6109,7 @@ int main (int argc, char *argv[])
 }
 
 EOF
-if { (eval echo configure:6051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   BIGENDIAN=1
 else
@@ -6091,7 +6153,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:6095: checking host system type" >&5
+echo "configure:6157: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -6112,7 +6174,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$host" 1>&6
 
 echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:6116: checking target system type" >&5
+echo "configure:6178: checking target system type" >&5
 
 target_alias=$target
 case "$target_alias" in
@@ -6130,7 +6192,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 echo "$ac_t""$target" 1>&6
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:6134: checking build system type" >&5
+echo "configure:6196: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -6153,7 +6215,7 @@ test "$host_alias" != "$target_alias" &&
   program_prefix=${target_alias}-
 
  echo $ac_n "checking for byte order, try 2""... $ac_c" 1>&6
-echo "configure:6157: checking for byte order, try 2" >&5
+echo "configure:6219: checking for byte order, try 2" >&5
  case "${target}" in
   *86* | *-pc-* )
      LITTLEENDIAN=1
@@ -6189,12 +6251,12 @@ fi
 
 
 echo $ac_n "checking whether system() can handle command substitution""... $ac_c" 1>&6
-echo "configure:6193: checking whether system() can handle command substitution" >&5
+echo "configure:6255: checking whether system() can handle command substitution" >&5
 if test "$cross_compiling" = yes; then
   CROSSCOMPILE=1
 else
   cat > conftest.$ac_ext <<EOF
-#line 6198 "configure"
+#line 6260 "configure"
 #include "confdefs.h"
 
 #include "stdlib.h"
@@ -6204,7 +6266,7 @@ int main (int argc, char*argv[])
 }
 
 EOF
-if { (eval echo configure:6208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   OK=OK
 else
@@ -6220,7 +6282,7 @@ if test "x${OK}" = "xOK";then
 fi
 
 if test "x${CROSSCOMPILE}" = "x1";then
-    OK=OK;
+    OK=no;
 fi
 if test "x${OK}" = "xOK";then
 rm -f config.tmp2
@@ -6263,12 +6325,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:6267: checking for $ac_hdr that defines DIR" >&5
+echo "configure:6329: checking for $ac_hdr that defines DIR" >&5
 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6272 "configure"
+#line 6334 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_hdr>
@@ -6276,7 +6338,7 @@ int main() {
 DIR *dirp = 0;
 ; return 0; }
 EOF
-if { (eval echo configure:6280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   eval "ac_cv_header_dirent_$ac_safe=yes"
 else
@@ -6301,7 +6363,7 @@ done
 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
 if test $ac_header_dirent = dirent.h; then
 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:6305: checking for opendir in -ldir" >&5
+echo "configure:6367: checking for opendir in -ldir" >&5
 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6309,7 +6371,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldir  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6313 "configure"
+#line 6375 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6320,7 +6382,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6342,7 +6404,7 @@ fi
 
 else
 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:6346: checking for opendir in -lx" >&5
+echo "configure:6408: checking for opendir in -lx" >&5
 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6350,7 +6412,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lx  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6354 "configure"
+#line 6416 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6361,7 +6423,7 @@ int main() {
 opendir()
 ; return 0; }
 EOF
-if { (eval echo configure:6365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6384,12 +6446,12 @@ fi
 fi
 
  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:6388: checking for ANSI C header files" >&5
+echo "configure:6450: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6393 "configure"
+#line 6455 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -6397,7 +6459,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6414,7 +6476,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 6418 "configure"
+#line 6480 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -6432,7 +6494,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 6436 "configure"
+#line 6498 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -6453,7 +6515,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 6457 "configure"
+#line 6519 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -6464,7 +6526,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:6468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -6487,21 +6549,21 @@ EOF
 
 fi
 
- for ac_hdr in zlib.h jpeglib.h t1lib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h
+ for ac_hdr in zlib.h gif_lib.h jpeglib.h t1lib.h assert.h signal.h pthread.h sys/stat.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6495: checking for $ac_hdr" >&5
+echo "configure:6557: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6500 "configure"
+#line 6562 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6528,27 +6590,6 @@ fi
 done
 
 
-if test "x${ac_cv_header_jpeglib_h}" != "xyes"; then
- DISABLEPDF2SWF=true;
- DISABLEJPEG2SWF=true;
- MISSINGLIBS="${MISSINGLIBS} jpeglib.h"
-fi
-if test "x${ac_cv_header_t1lib_h}" != "xyes"; then
- DISABLEPDF2SWF=true;
- MISSINGLIBS="${MISSINGLIBS} t1lib.h"
-fi
-if test "x${ac_cv_header_zlib_h}" != "xyes"; then
- DISABLEPNG2SWF=true;
- MISSINGLIBS="${MISSINGLIBS} zlib.h"
- ZLIBMISSING=true;
-fi
-
-if test "x$USE_FREETYPE" != "x"; then
-    cat >> confdefs.h <<EOF
-#define USE_FREETYPE "$USE_FREETYPE"
-EOF
-
-fi
 cat >> confdefs.h <<EOF
 #define PACKAGE "$PACKAGE"
 EOF
@@ -6564,12 +6605,12 @@ EOF
 
 
  echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:6568: checking for working const" >&5
+echo "configure:6609: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6573 "configure"
+#line 6614 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -6618,7 +6659,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:6622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -6639,21 +6680,21 @@ EOF
 fi
 
  echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:6643: checking for inline" >&5
+echo "configure:6684: checking for inline" >&5
 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 6650 "configure"
+#line 6691 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:6657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -6679,12 +6720,12 @@ EOF
 esac
 
  echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:6683: checking for off_t" >&5
+echo "configure:6724: checking for off_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6688 "configure"
+#line 6729 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6712,12 +6753,12 @@ EOF
 fi
 
  echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:6716: checking for size_t" >&5
+echo "configure:6757: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6721 "configure"
+#line 6762 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6745,12 +6786,12 @@ EOF
 fi
 
  echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:6749: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:6790: checking whether struct tm is in sys/time.h or time.h" >&5
 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6754 "configure"
+#line 6795 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -6758,7 +6799,7 @@ int main() {
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:6762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -6779,12 +6820,12 @@ EOF
 fi
 
  echo $ac_n "checking for boolean""... $ac_c" 1>&6
-echo "configure:6783: checking for boolean" >&5
+echo "configure:6824: checking for boolean" >&5
 if eval "test \"`echo '$''{'ac_cv_type_boolean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6788 "configure"
+#line 6829 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -6810,50 +6851,17 @@ if test $ac_cv_type_boolean = no; then
 EOF
 
 fi
-
- echo $ac_n "checking for bool""... $ac_c" 1>&6
-echo "configure:6816: checking for bool" >&5
-if eval "test \"`echo '$''{'ac_cv_type_bool'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 6821 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "(^|[^a-zA-Z_0-9])bool[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_bool=yes
-else
-  rm -rf conftest*
-  ac_cv_type_bool=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_bool" 1>&6
-if test $ac_cv_type_bool = no; then
-  cat >> confdefs.h <<\EOF
-#define bool char
-EOF
-
-fi
-
-     
- for ac_func in popen mkstemp stat lrand48 rand srand48 srand bcopy bzero
+ #needed for jpeglib
+      
+ for ac_func in popen mkstemp stat lrand48 rand srand48 srand bcopy bzero time
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6852: checking for $ac_func" >&5
+echo "configure:6860: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6857 "configure"
+#line 6865 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6876,7 +6884,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6900,172 +6908,1011 @@ else
 fi
 done
 
-echo $ac_n "checking whether we can compile the avifile test program""... $ac_c" 1>&6
-echo "configure:6906: checking whether we can compile the avifile test program" >&5
 
-cat > conftest.cpp << EOF
-#include <avifile/version.h>
-#if (AVIFILE_MAJOR_VERSION == 0) && (AVIFILE_MINOR_VERSION>=6) 
-   #include <avifile.h>
-   #include <aviplay.h>
-   #include <fourcc.h>
-   #include <creators.h>
-   #include <StreamInfo.h>
-   #define VERSION6
-#else
-   #include <avifile.h>
-   #include <aviplay.h>
-   #include <aviutil.h>
-   #define Width width
-   #define Height height
-   #define Data data
-   #define Bpp bpp
-#endif
+# ------------------------------------------------------------------
 
-int test()
-{
-  IAviReadFile* player;
-  IAviReadStream* astream;
-  IAviReadStream* vstream;
-  player = CreateIAviReadFile(0);
-  astream = player->GetStream(0, AviStream::Audio);
-  vstream = player->GetStream(0, AviStream::Video);
-  vstream -> StartStreaming();
-  astream -> StartStreaming();
-#ifndef VERSION6
-  MainAVIHeader head;
-  player->GetFileHeader(&head);
-  head.dwMicroSecPerFrame;
-  head.dwTotalFrames;
-  head.dwStreams;
-  head.dwWidth;
-  head.dwHeight;
-  head.dwMicroSecPerFrame;
-  astream->GetEndPos(),
-  astream->GetEndTime());
-  player->StreamCount();
-#else
-  StreamInfo*audioinfo;
-  StreamInfo*videoinfo;
-  audioinfo = astream->GetStreamInfo();
-  videoinfo = vstream->GetStreamInfo();
-  videoinfo->GetVideoWidth();
-  videoinfo->GetVideoHeight();
-  audioinfo->GetAudioSamplesPerSec();
-  videoinfo->GetFps();
-#endif
-  CImage*img = vstream->GetFrame();
-  img->ToRGB();
-  img->Data();
-  img->Bpp();
-  img->Width();
-  img->Height();
-  WAVEFORMATEX wave;
-  astream->GetAudioFormatInfo(&wave,0);
-  uint_t a,b;
-  astream->ReadFrames(0,0,0,a,b);
-}
-int main (int argc, char*argv)
-{
-    return 0;
-}
-EOF
 
-ac_link='$CXX $CPPFLAGS $CXXFLAGS `avifile-config --cflags` `avifile-config --libs` conftest.cpp -o conftest${ac_exeext}'
-if { (eval echo avi2swf.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ./conftest${ac_exeext}; then
-  echo "$ac_t""yes" 1>&6
-  AVIFILE=true
-  export AVIFILE
-  cat >> confdefs.h <<EOF
-#define AVIFILE true
-EOF
 
+# Extract the first word of "freetype-config", so it can be a program name with args.
+set dummy freetype-config; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:6920: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_FREETYPE_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$FREETYPE_CONFIG" in
+  /*)
+  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
+  ;;
+  ?:/*)                         
+  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy=""$PATH:/usr/local/bin:/sw/bin:/opt/local/bin""
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+fi
+FREETYPE_CONFIG="$ac_cv_path_FREETYPE_CONFIG"
+if test -n "$FREETYPE_CONFIG"; then
+  echo "$ac_t""$FREETYPE_CONFIG" 1>&6
 else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
   echo "$ac_t""no" 1>&6
 fi
-rm -f conftest*
 
 
-avi2swf="avi2swf/Makefile"
-if test "x${AVIFILE}" != "xtrue"; then
- echo "* Couldn't compile the avifile test program."
- echo "* Disabling avi2swf tool..."
- echo all install uninstall clean: > avi2swf/Makefile
- avi2swf=
+OLDCPPFLAGS="${CPPFLAGS}"
+OLDLIBS="${LIBS}"
+if test "x${FREETYPE_CONFIG}" '!=' "x"; then
+    CPPFLAGS="$CPPFLAGS "`$FREETYPE_CONFIG --cflags`
+else if test -d /usr/include/freetype2; then
+    CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2"
+else if test -d /usr/local/include/freetype2; then
+    CPPFLAGS="$CPPFLAGS -I/usr/local/include/freetype2"
+fi 
 fi
-
-if test "x${NO_MP3}" == "x"; then
-    cat >> confdefs.h <<EOF
-#define USE_MP3 1
-EOF
-
 fi
 
-if test "x${USE_FREETYPE}" == "xtrue"; then
-    if test "x{$FREETYPE_CONFIG}" != "x"; then
-       ftinclude=`freetype-config --cflags`
-       ftlibs=`freetype-config --libs`
-       CXXFLAGS="$CXXFLAGS $ftinclude"
-       CFLAGS="$CFLAGS $ftinclude"
-       LIBS="$LIBS $ftlibs"
-    else if test -d /usr/include/freetype2; then
-       CXXFLAGS="$CXXFLAGS -I/usr/include/freetype2"
-       CFLAGS="$CFLAGS -I/usr/include/freetype2"
-       LIBS="$LIBS -lfreetype"
-    else if test -d /usr/local/include/freetype2; then
-       CXXFLAGS="$CXXFLAGS -I/usr/local/include/freetype2"
-       CFLAGS="$CFLAGS -I/usr/local/include/freetype2"
-       LIBS="$LIBS -L /usr/local/lib -lfreetype"
-    fi
-    fi
-    fi
-fi 
+if test "x${FREETYPE_CONFIG}" '=' "x";then
+    # if we didn't find the freetype-config program, we won't
+    # know where the libs are expected to be. So just blindly
+    # try to link against them.
+    echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
+echo "configure:6970: checking for FT_Init_FreeType in -lfreetype" >&5
+ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lfreetype  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6978 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char FT_Init_FreeType();
 
-if test "x${UNCOMPRESS}" = "xgzip"; then
-    cat >> confdefs.h <<EOF
-#define USE_GZIP 1
+int main() {
+FT_Init_FreeType()
+; return 0; }
 EOF
-
+if { (eval echo configure:6989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  HAVE_LIB_FREETYPE=1
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+for ac_hdr in ft2build.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7015: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7020 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ HAVE_FT2BUILD_H=1
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+if test "x${HAVE_FT2BUILD_H}" '=' "x";then
+    for ac_hdr in freetype/freetype.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7056: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7061 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ HAVE_FREETYPE_FREETYPE_H=1
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+
+if test "x${HAVE_LIB_FREETYPE}" '!=' "x" -o \
+        "x${FREETYPE_CONFIG}" '!=' "x";then
+    if test "x${HAVE_FREETYPE_FREETYPE_H}" '!=' "x";then
+       HAVE_FREETYPE=1
+    fi
+    if test "x${HAVE_FT2BUILD_H}" '!=' "x";then
+       HAVE_FREETYPE=1
+    fi
+fi
+
+if test "x${HAVE_FREETYPE}" = "x1"; then 
+    if test "x${FREETYPE_CONFIG}" '!=' "x"; then
+       LIBS="$LIBS "`$FREETYPE_CONFIG --libs`
+    else
+       LIBS="$LIBS -lfreetype"
+    fi
+
+    if test "x${HAVE_FT2BUILD_H}" = "x1"; then
+       HAVE_FT2BUILD_H_DEFINE='#define HAVE_FT2BUILD_H'
+    fi
+
+    echo $ac_n "checking whether we can compile the freetype test program""... $ac_c" 1>&6
+echo "configure:7116: checking whether we can compile the freetype test program" >&5
+
+    cat > conftest.c << EOF
+$HAVE_FT2BUILD_H_DEFINE
+
+#ifdef HAVE_FT2BUILD_H
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_GLYPH_H
+#include FT_SIZES_H
+#include FT_SFNT_NAMES_H
+#include FT_TRUETYPE_IDS_H
+#include FT_OUTLINE_H
+#else
+#include <freetype/freetype.h>
+#include <freetype/ftglyph.h>
+#include <freetype/ftsizes.h>
+#include <freetype/ftsnames.h>
+#include <freetype/ttnameid.h>
+#include <freetype/ftoutln.h>
+#endif
+
+int main()
+{
+    FT_Library ftlibrary;
+    FT_Face face;
+    FT_Error error;
+    FT_ULong charcode;
+    FT_UInt gindex;
+    FT_Glyph glyph;
+    FT_BBox bbox;
+    FT_Matrix matrix;
+    FT_UInt i;
+    char* name = 0;
+    char italic, bold;
+   
+    FT_Init_FreeType(&ftlibrary);
+    FT_New_Face(ftlibrary, "filename", 0, &face);
+    i = face->num_glyphs - 1;
+    italic = face->style_flags&FT_STYLE_FLAG_ITALIC;
+    bold = face->style_flags&FT_STYLE_FLAG_BOLD;
+    FT_Get_Postscript_Name(face);
+    FT_Get_Char_Index(face, 33);
+    FT_Get_First_Char(face, &i);
+    FT_Get_Next_Char(face, 33, &i);
+    if(FT_HAS_GLYPH_NAMES(face)) {
+       FT_Get_Glyph_Name(face, 33, name, 127);
+    }
+    FT_Load_Glyph(face, 33, FT_LOAD_NO_BITMAP|FT_LOAD_NO_SCALE);
+    FT_Get_Glyph(face->glyph, &glyph);
+    FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_unscaled, &bbox);
+    FT_Done_Glyph(glyph);
+    FT_Done_Face(face);
+    FT_Done_FreeType(ftlibrary);
+    return 0;
+}
+EOF
+
+    ac_link='$CC $CPPFLAGS $CFLAGS conftest.c $LDFLAGS $LIBS -o conftest${ac_exeext}'
+    if { (eval echo freetype.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+       echo "$ac_t""yes" 1>&6
+       cat >> confdefs.h <<EOF
+#define HAVE_FREETYPE 1
+EOF
+
+       cat >> confdefs.h <<EOF
+#define USE_FREETYPE 1
+EOF
+  # for ttf2tp1
+    else
+       echo "configure: failed program was:" >&5
+       cat conftest.c >&5
+       HAVE_FREETYPE=0
+       echo "$ac_t""no" 1>&6
+    fi
+    rm -f conftest*
+fi
+
+# if the above didn't work out, reset all changes to the compiler variables.
+if test "x${HAVE_FREETYPE}" '!=' "x1"; then 
+    CPPFLAGS=$OLDCPPFLAGS
+    LIBS=$OLDLIBS
+fi 
+
+
+
+OLDCPPFLAGS="${CPPFLAGS}"
+OLDLIBS="${LIBS}"
+       
+if test -d /usr/include/fontconfig; then
+    CPPFLAGS="$CPPFLAGS -I/usr/include/fontconfig"
+fi
+
+echo $ac_n "checking for FcInit in -lfontconfig""... $ac_c" 1>&6
+echo "configure:7210: checking for FcInit in -lfontconfig" >&5
+ac_lib_var=`echo fontconfig'_'FcInit | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lfontconfig  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7218 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char FcInit();
+
+int main() {
+FcInit()
+; return 0; }
+EOF
+if { (eval echo configure:7229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  HAVE_LIB_FONTCONFIG=1
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+for ac_hdr in fontconfig.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7253: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7258 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ HAVE_FONTCONFIG_H=1
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+if test "x${HAVE_LIB_FONTCONFIG}" != "x";then
+if test "x${HAVE_FONTCONFIG_H}" != "x";then
+    HAVE_FONTCONFIG=1
+fi
+fi
+
+if test "x${HAVE_FONTCONFIG}" = "x1"; then 
+    LIBS="$LIBS -lfontconfig"
+echo $ac_n "checking whether we can compile the fontconfig test program""... $ac_c" 1>&6
+echo "configure:7299: checking whether we can compile the fontconfig test program" >&5
+
+if (echo $LIBS | grep lfreetype >/dev/null 2>&1); then
+    #move freetype library to the end of libraries, otherwise fontconfig
+    #won't compile.
+    LIBS=`echo $LIBS | sed -e 's/-lfreetype//g' -e 's/$/ -lfreetype/'`
+fi
+
+cat > conftest.c << EOF
+#include <fontconfig.h>
+
+int main()
+{
+    FcPattern *pattern, *match;
+    FcResult result;
+    FcChar8 *v;
+    FcInit();
+    pattern = FcPatternBuild(0, FC_FAMILY, FcTypeString, "", 0);
+    FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
+    FcPatternAddInteger(pattern, FC_WEIGHT, FC_WEIGHT_BOLD);
+    FcConfigSubstitute(0, pattern, FcMatchPattern); 
+    FcDefaultSubstitute(pattern);
+    match = FcFontMatch(0, pattern, &result);
+    FcPatternGetString(match, "family", 0, &v) == FcResultMatch;
+    FcPatternPrint(pattern);
+    FcPatternDestroy(pattern);
+    FcPatternDestroy(match);
+    return 0;
+}
+EOF
+
+    ac_link='$CC $CPPFLAGS $CFLAGS conftest.c $LDFLAGS $LIBS -o conftest${ac_exeext}'
+    if { (eval echo freetype.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+       echo "$ac_t""yes" 1>&6
+       cat >> confdefs.h <<EOF
+#define HAVE_FONTCONFIG 1
+EOF
+
+    else
+       echo "configure: failed program was:" >&5
+       cat conftest.c >&5
+       HAVE_FONTCONFIG=0
+       echo "$ac_t""no" 1>&6
+    fi
+    rm -f conftest*
+fi
+
+# if the above didn't work out, reset all changes to the compiler variables.
+if test "x${HAVE_FREETYPE}" "!=" "x1"; then 
+    CPPFLAGS=$OLDCPPFLAGS
+    LIBS=$OLDLIBS
+fi 
+
+
+# ------------------------------------------------------------------
+lame_objects= 
+lame_makefile=
+if test "x${DISABLE_LAME}" = "xtrue"; then
+    echo "*" Disabling lame support...
+else
+    # old lame code at lib/lame
+    if test -f lib/lame/Makefile.in; then
+       lame_objects="lame/psymodel.\$(O) lame/fft.\$(O) lame/newmdct.\$(O) lame/quantize.\$(O) lame/takehiro.\$(O) lame/reservoir.\$(O) lame/quantize_pvt.\$(O) lame/vbrquantize.\$(O) lame/encoder.\$(O) lame/id3tag.\$(O) lame/version.\$(O) lame/tables.\$(O) lame/util.\$(O) lame/bitstream.\$(O) lame/set_get.\$(O) lame/VbrTag.\$(O) lame/lame.\$(O)"
+       lame_makefile="lib/lame/Makefile"
+       CPPFLAGS="$CPPFLAGS -Ilame"
+       cat >> confdefs.h <<EOF
+#define HAVE_LAME 1
+EOF
+
+    else
+       if test -d /usr/include/lame; then
+           CPPFLAGS="$CPPFLAGS -I /usr/include/lame"
+       else
+           if test -d /usr/local/include/lame; then
+               CPPFLAGS="$CPPFLAGS -I /usr/local/include/lame"
+           fi
+       fi
+       echo $ac_n "checking for lame_init in -lmp3lame""... $ac_c" 1>&6
+echo "configure:7378: checking for lame_init in -lmp3lame" >&5
+ac_lib_var=`echo mp3lame'_'lame_init | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lmp3lame  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 7386 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char lame_init();
+
+int main() {
+lame_init()
+; return 0; }
+EOF
+if { (eval echo configure:7397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo mp3lame | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-lmp3lame $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+NO_LIBMP3LAME=1
+fi
+
+       for ac_hdr in lame.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7429: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7434 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+       if test "x$NO_LIBMP3LAME" "!=" "x1" -a "x$ac_cv_header_lame_h" "!=" "x";then
+           cat >> confdefs.h <<EOF
+#define HAVE_LAME 1
+EOF
+
+       fi
+    fi
+fi
+
+
+# ------------------------------------------------------------------
+
+
+for ac_prog in avifile-config
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:7484: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AVIFILE_CONFIG'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AVIFILE_CONFIG"; then
+  ac_cv_prog_AVIFILE_CONFIG="$AVIFILE_CONFIG" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AVIFILE_CONFIG="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+AVIFILE_CONFIG="$ac_cv_prog_AVIFILE_CONFIG"
+if test -n "$AVIFILE_CONFIG"; then
+  echo "$ac_t""$AVIFILE_CONFIG" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AVIFILE_CONFIG" && break
+done
+
+
+if test "x$AVIFILE_CONFIG" '!=' "x";then
+    OLDCPPFLAGS="$CPPFLAGS"
+    # temporarily add avifile paths to CPPFLAGS...
+    CPPFLAGS="$CPPFLAGS $CXXFLAGS "`$AVIFILE_CONFIG --cflags`
+    for ac_hdr in avifile/version.h version.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7522: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 7527 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+    # ... and reset
+    CPPFLAGS="$OLDCPPFLAGS"
+fi
+
+echo $ac_n "checking whether we can compile the avifile test program""... $ac_c" 1>&6
+echo "configure:7563: checking whether we can compile the avifile test program" >&5
+
+if test "x${ac_cv_header_version_h}" '=' "xyes";then
+    HAVE_VERSION_H_DEFINE='#define HAVE_VERSION_H'
+fi
+if test "x${ac_cv_header_avifile_version_h}" '=' "xyes";then
+    HAVE_AVIFILE_VERSION_H_DEFINE='#define HAVE_AVIFILE_VERSION_H'
+fi
+
+cat > conftest.cpp << EOF
+
+// hack- we can't yet access the variables in config.h (because it hasn't been generated yet),
+// so we have to introduce them this way
+$HAVE_VERSION_H_DEFINE
+$HAVE_AVIFILE_VERSION_H_DEFINE
+
+#ifdef HAVE_VERSION_H
+  #include <version.h>
+#endif
+#ifdef HAVE_AVIFILE_VERSION_H
+  #include <avifile/version.h>
+#endif
+
+#if (AVIFILE_MAJOR_VERSION == 0) && (AVIFILE_MINOR_VERSION>=6) 
+   #include <avifile.h>
+   #include <aviplay.h>
+   #include <fourcc.h>
+   #include <creators.h>
+   #include <StreamInfo.h>
+   #define VERSION6
+#else
+   #include <avifile.h>
+   #include <aviplay.h>
+   #include <aviutil.h>
+   #define Width width
+   #define Height height
+   #define Data data
+   #define Bpp bpp
+#endif
+
+void test()
+{
+  IAviReadFile* player;
+  IAviReadStream* astream;
+  IAviReadStream* vstream;
+  player = CreateIAviReadFile(0);
+  astream = player->GetStream(0, AviStream::Audio);
+  vstream = player->GetStream(0, AviStream::Video);
+  vstream -> StartStreaming();
+  astream -> StartStreaming();
+#ifndef VERSION6
+  MainAVIHeader head;
+  player->GetFileHeader(&head);
+  head.dwMicroSecPerFrame;
+  head.dwTotalFrames;
+  head.dwStreams;
+  head.dwWidth;
+  head.dwHeight;
+  head.dwMicroSecPerFrame;
+  astream->GetEndPos(),
+  astream->GetEndTime());
+  player->StreamCount();
+#else
+  StreamInfo*audioinfo;
+  StreamInfo*videoinfo;
+  audioinfo = astream->GetStreamInfo();
+  videoinfo = vstream->GetStreamInfo();
+  videoinfo->GetVideoWidth();
+  videoinfo->GetVideoHeight();
+  audioinfo->GetAudioSamplesPerSec();
+  videoinfo->GetFps();
+#endif
+  CImage*img = vstream->GetFrame();
+  img->ToRGB();
+  img->Data();
+  img->Bpp();
+  img->Width();
+  img->Height();
+  WAVEFORMATEX wave;
+  astream->GetAudioFormatInfo(&wave,0);
+  uint_t a,b;
+  astream->ReadFrames(0,0,0,a,b);
+}
+int main (int argc, char*argv)
+{
+    return 0;
+}
+EOF
+
+if test "x$AVIFILE_CONFIG" '!=' "x";then
+    AVIFILE_LIBS=`$AVIFILE_CONFIG --libs`
+    AVIFILE_CFLAGS=`$AVIFILE_CONFIG --cflags`
+    avifile_link='$CXX $CPPFLAGS $CXXFLAGS $AVIFILE_CFLAGS conftest.cpp $AVIFILE_LIBS -o conftest${ac_exeext}'
+    if { (eval echo avi2swf.m4:71: \"$avifile_link\") 1>&5; (eval $avifile_link) 2>&5; } && test -s conftest${ac_exeext} && ./conftest${ac_exeext}; then
+      echo "$ac_t""yes" 1>&6
+      AVIFILE=true
+      export AVIFILE
+      cat >> confdefs.h <<EOF
+#define AVIFILE true
+EOF
+
+    else
+      echo "configure: failed program was:" >&5
+      cat conftest.cpp >&5
+      echo "$ac_t""no" 1>&6
+    fi
+else
+    echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+if test "x${AVIFILE}" = "xtrue"; then
+    VIDEO_LIBS="$VIDEO_LIBS $AVIFILE_LIBS"
+    VIDEO_CFLAGS="$VIDEO_CFLAGS $AVIFILE_CFLAGS"
+    cat >> confdefs.h <<EOF
+#define HAVE_AVIFILE 1
+EOF
+
+fi
+
+if test "x${WIN32}" != "x"; then
+    #AC_CHECK_LIB(avifil32, AVIFileInit,AVIFIL32=true)
+    #if test "x${AVIFIL32}" != "x"; then
+    #  VIDEO_LIBS="$VIDEO_LIBS -lavifil32"
+    #fi
+    VIDEO_LIBS="$VIDEO_LIBS -lavifil32"
+    AVIFIL32=true
+fi
+
+
+
+# ------------------------------------------------------------------
+
+if test "x${UNCOMPRESS}" = "xgzip"; then
+    cat >> confdefs.h <<EOF
+#define USE_GZIP 1
+EOF
+
+fi
+
+
+# ------------------------------------------------------------------
+
+
+echo $ac_n "checking for Python.h and PIL""... $ac_c" 1>&6
+echo "configure:7708: checking for Python.h and PIL" >&5
+
+if test "x$PYTHON_LIB" '!=' "x" -a "x$PYTHON_INCLUDES" '!=' "x";then
+    PY_VERSION=unknown
+else
+    if test "x$PYTHON_LIB" '!=' "x" -o "x$PYTHON_INCLUDES" '!=' "x";then
+        echo "Set both PYTHON_LIB and PYTHON_INCLUDES, or none at all"
+    fi
+    # iterate through version 2.2 to 2.4
+    for v in 2 3 4; do
+        # Linux
+        if test -f "/usr/lib/python2.$v/site-packages/PIL/_imaging.so" -a -f "/usr/include/python2.$v/Python.h";then
+            PY_VERSION=2.$v
+           PYTHON_LIB="-lpython$PY_VERSION /usr/lib/python$PY_VERSION/site-packages/PIL/_imaging.so"
+           PYTHON_INCLUDES="-I/usr/include/python$PY_VERSION"
+        # Mac OS X
+        elif test -f "/System/Library/Frameworks/Python.framework/Versions/2.$v/include/python2.$v/Python.h";then
+            #TODO: test for /System/Library/Frameworks/Python.framework/Versions/2.3/Python ?
+            PY_VERSION=2.$v
+            PYTHON_LIB="-framework Python" 
+            if test -f "/Library/Python/2.$v/PIL/_imaging.so";then
+                PYTHON_LIB2="$PYTHON_LIB /Library/Python/2.$v/PIL/_imaging.so"
+            else
+                PYTHON_LIB2="$PYTHON_LIB"
+            fi
+            PYTHON_INCLUDES="-I/System/Library/Frameworks/Python.framework/Versions/2.$v/include/python2.$v/"
+       # Mac OS X [Fink]:
+        elif test "(" -f "/sw/lib/python2.$v/config/libpython2.$v.dylib" \
+                  -o -f "/sw/lib/python2.$v/config/libpython2.$v.a" \
+                  -o -f "/sw/lib/python2.$v/config/libpython2.$v.so" \
+                 ")" \
+              -a -f "/sw/include/python2.$v/Python.h" \
+               -a -f "/sw/lib/python2.$v/site-packages/PIL/_imaging.so";then
+            PY_VERSION=2.$v
+            PYTHON_LIB="-L /sw/lib/python2.$v/config/ -lpython$PY_VERSION /sw/lib/python2.$v/site-packages/PIL/_imaging.so"
+            PYTHON_INCLUDES="-I /sw/include/python2.$v/"
+        fi
+    done
+fi
+
+if test "x$PY_VERSION" "!=" "x"; then
+    echo "$ac_t""$PY_VERSION" 1>&6
+    export PYTHON_INCLUDES PYTHON_LIB
+    
+    
+    echo $ac_n "checking whether we can compile the python test program""... $ac_c" 1>&6
+echo "configure:7754: checking whether we can compile the python test program" >&5
+    
+    cat > conftest.c << EOF
+#include <Python.h>
+#include <Imaging.h>
+
+int main()
+{
+    int ret;
+    ret = Py_Main(0, 0);
+    int x; // check also for gcc 2.95.x incompatibilities
+    return ret;
+}
+EOF
+    ac_link='$CC $CPPFLAGS $CFLAGS $PYTHON_INCLUDES conftest.c $LDFLAGS $PYTHON_LIB $LIBS -o conftest${ac_exeext}'
+    if { (eval echo python.m4: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+       echo "$ac_t""yes" 1>&6
+       PYTHON_OK=yes
+    else
+        ac_link='$CC $CPPFLAGS $CFLAGS $PYTHON_INCLUDES conftest.c $LDFLAGS ${PYTHON_LIB2} $LIBS -o conftest${ac_exeext}'
+        if { (eval echo python.m4: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+            echo "$ac_t""yes" 1>&6
+            PYTHON_LIB="${PYTHON_LIB2}"
+            PYTHON_OK=yes
+        else
+            echo "configure: failed program was:" >&5
+            cat conftest.c >&5
+            echo "$ac_t""no" 1>&6
+        fi
+    fi
+    rm -f conftest*
+else
+    echo "$ac_t""nope" 1>&6
+fi
+
+
+if test "x$PYTHON_OK" '!=' "xyes";then
+    echo all install uninstall clean: > lib/python/Makefile
+    # fail silently- the most users won't have any need for the
+    # python interface anyway
+else
+    pythonrfxswf="lib/python/Makefile"
+fi
+
+# ------------------------------------------------------------------
+
+echo $ac_n "checking for missing libraries""... $ac_c" 1>&6
+echo "configure:7801: checking for missing libraries" >&5
+
+if test "x$ZLIBMISSING" = "xtrue";then
+    MISSINGLIBS="${MISSINGLIBS} zlib"
+    DISABLEPNG2SWF=true
+    PARTIAL=true
+fi
+if test "x$JPEGLIBMISSING" = "xtrue";then
+    MISSINGLIBS="${MISSINGLIBS} jpeglib"
+    DISABLEPDF2SWF=true
+    DISABLEJPEG2SWF=true
+    PARTIAL=true
+fi
+if test "x$T1LIBMISSING" = "xtrue";then
+    MISSINGLIBS="${MISSINGLIBS} t1lib"
+fi
+if test "x$UNGIFMISSING" = "xtrue";then
+    DISABLEGIF2SWF=true
+    MISSINGLIBS="${MISSINGLIBS} ungif"
+    PARTIAL=true
+fi
+
+if test "x${ac_cv_header_jpeglib_h}" '!=' "xyes"; then
+    DISABLEPDF2SWF=true;
+    DISABLEJPEG2SWF=true;
+    MISSINGLIBS="${MISSINGLIBS} jpeglib.h"
+    PARTIAL=true
+fi
+if test "x$HAVE_FREETYPE" '!=' "x1"; then
+    DISABLEPDF2SWF=true;
+    MISSINGLIBS="${MISSINGLIBS} freetype"
+    PARTIAL=true
+fi
+if test "x${ac_cv_header_t1lib_h}" '!=' "xyes"; then
+    MISSINGLIBS="${MISSINGLIBS} t1lib.h"
+fi
+if test "x${ac_cv_header_gif_lib_h}" '!=' "xyes"; then
+    DISABLEGIF2SWF=true
+    MISSINGLIBS="${MISSINGLIBS} gif_lib.h"
+    PARTIAL=true
+fi
+if test "x${ac_cv_header_zlib_h}" '!=' "xyes"; then
+    DISABLEPNG2SWF=true;
+    MISSINGLIBS="${MISSINGLIBS} zlib.h"
+    PARTIAL=true
+fi
+if test "x${AVIFILE}" '!=' "xtrue" -a "x${AVIFIL32}" '!=' "xtrue"; then
+    MISSINGLIBS="${MISSINGLIBS} avifile"
+    PARTIAL=true
+fi
+
+echo "$ac_t""${MISSINGLIBS}" 1>&6
+
+# ------------------------------------------------------------------
+
+if test "x${MISSINGLIBS}" '!=' "x"; then
+  echo "***************************************************"
+  echo "* The following headers/libraries are missing: " ${MISSINGLIBS}
+fi
+
+avi2swf="avi2swf/Makefile"
+if test "x${AVIFILE}" '!=' "xtrue" -a "x${AVIFIL32}" '!=' "xtrue"; then
+ echo "* Disabling avi2swf tool..."
+ echo all install uninstall clean: > avi2swf/Makefile
+ avi2swf=
+fi
+
+pdf2swf_makefile="pdf2swf/Makefile pdf2swf/xpdf/Makefile"
+if test "x${DISABLEPDF2SWF}" = "xtrue"; then
+  echo "* Disabling pdf2swf tool..."
+  rm -f pdf2swf/Makefile
+  echo all install uninstall clean: > pdf2swf/Makefile
+  pdf2swf_makefile=""
+fi
+
+if test "x${ZLIBMISSING}" = "xtrue"; then
+  echo
+  echo "* Warning! Without zlib, you will not be able to read"
+  echo "* or write compressed Flash MX files!"
 fi
-
 
 JPEG2SWF='jpeg2swf$(E)'
+if test "x${DISABLEJPEG2SWF}" = "xtrue"; then
+  echo "* Disabling jpeg2swf tool..."
+  JPEG2SWF=
+fi
 export JPEG2SWF
+
+
+GIF2SWF='gif2swf$(E)'
+if test "x${DISABLEGIF2SWF}" = "xtrue"; then
+  echo "* Disabling gif2swf tool..."
+  GIF2SWF=
+fi
+export GIF2SWF
+
+
 PNG2SWF='png2swf$(E)'
+if test "x${DISABLEPNG2SWF}" = "xtrue"; then
+  echo "* Disabling png2swf tool..."
+  PNG2SWF=
+fi
 export PNG2SWF
-if test "x${DISABLEPDF2SWF}" = "xtrue"; then
-  echo "***************************************************"
-  echo "The following headers/libraries are missing: " ${MISSINGLIBS}
-  if test "x${DISABLEPDF2SWF}" = "xtrue"; then
-    echo "Disabling pdf2swf tool..."
-    rm -f pdf2swf/Makefile
-    echo all install uninstall clean: > pdf2swf/Makefile
-  fi
-  if test "x${DISABLEJPEG2SWF}" = "xtrue"; then
-    echo "Disabling jpeg2swf tool..."
-    JPEG2SWF=
-    export JPEG2SWF
-  fi
-  if test "x${DISABLEPNG2SWF}" = "xtrue"; then
-    echo "Disabling png2swf tool..."
-    PNG2SWF=
-    export PNG2SWF
-  fi
-  if test "x${ZLIBMISSING}" = "xtrue"; then
-    echo
-    echo "Warning! Without zlib, you will not be able to read"
-    echo "or write compressed Flash MX files!"
+
+
+if test "x${MISSINGLIBS}" '!=' "x"; then
+  if test "x${PARTIAL}" '=' "x"; then
+    echo "* (never mind)"
   fi
   echo "***************************************************"
-  FILES="./release Makefile.common ${avi2swf} Makefile lib/lame/Makefile lib/Makefile lib/action/Makefile src/Makefile swfs/Makefile"
-else
-  FILES="./release Makefile.common ${avi2swf} Makefile lib/lame/Makefile lib/Makefile lib/action/Makefile src/Makefile pdf2swf/Makefile pdf2swf/xpdf/Makefile pdf2swf/ttf2pt1/Makefile swfs/Makefile"
 fi
 
+# ------------------------------------------------------------------
 
+if test -f "release.in"; then release_in="./release"; fi
+FILES="$release_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythonrfxswf} ${lame_makefile} lib/art/Makefile"
 
 trap '' 1 2 15
 cat > confcache <<\EOF
@@ -7200,12 +8047,12 @@ s%@includedir@%$includedir%g
 s%@oldincludedir@%$oldincludedir%g
 s%@infodir@%$infodir%g
 s%@mandir@%$mandir%g
-s%@STRIP@%$STRIP%g
 s%@host@%$host%g
 s%@host_alias@%$host_alias%g
 s%@host_cpu@%$host_cpu%g
 s%@host_vendor@%$host_vendor%g
 s%@host_os@%$host_os%g
+s%@SHARED@%$SHARED%g
 s%@CC@%$CC%g
 s%@CXX@%$CXX%g
 s%@CPP@%$CPP%g
@@ -7223,10 +8070,12 @@ s%@build_os@%$build_os%g
 s%@OBJEXT@%$OBJEXT%g
 s%@EXEEXT@%$EXEEXT%g
 s%@ECHO@%$ECHO%g
+s%@STRIP@%$STRIP%g
 s%@LIBTOOL@%$LIBTOOL%g
 s%@UNCOMPRESS@%$UNCOMPRESS%g
-s%@FREETYPE_CONFIG@%$FREETYPE_CONFIG%g
+s%@AREXT@%$AREXT%g
 s%@AR@%$AR%g
+s%@SLEXT@%$SLEXT%g
 s%@target@%$target%g
 s%@target_alias@%$target_alias%g
 s%@target_cpu@%$target_cpu%g
@@ -7237,8 +8086,16 @@ s%@SYSTEM_BACKTICKS@%$SYSTEM_BACKTICKS%g
 s%@PACKAGE@%$PACKAGE%g
 s%@VERSION@%$VERSION%g
 s%@HAVE_UNISTD_H@%$HAVE_UNISTD_H%g
+s%@FREETYPE_CONFIG@%$FREETYPE_CONFIG%g
+s%@lame_objects@%$lame_objects%g
+s%@AVIFILE_CONFIG@%$AVIFILE_CONFIG%g
+s%@VIDEO_LIBS@%$VIDEO_LIBS%g
+s%@VIDEO_CFLAGS@%$VIDEO_CFLAGS%g
 s%@USE_GZIP@%$USE_GZIP%g
+s%@PYTHON_LIB@%$PYTHON_LIB%g
+s%@PYTHON_INCLUDES@%$PYTHON_INCLUDES%g
 s%@JPEG2SWF@%$JPEG2SWF%g
+s%@GIF2SWF@%$GIF2SWF%g
 s%@PNG2SWF@%$PNG2SWF%g
 
 CEOF
@@ -7460,6 +8317,26 @@ rm -fr confdefs* $ac_clean_files
 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
 
-if test "x${srcdir}" != "x."; then
-    echo "Warning: --srcdir is not supported"
+
+#
+# On development trees, create snapshots of config.status
+#
+if test -f snapshot -a "x$CHECKMEM" = "x" -a "x$PROFILING" = "x";then
+    if test "x${MINGW}" = "xyes"; then
+       echo cp config.status config.status.win32
+       cp config.status config.status.win32
+    else
+       if test "x$DEBUG" '=' "x" -a "x$OPTIMIZE"  '=' "x";then
+           echo cp config.status config.status.linux
+           cp config.status config.status.linux
+       fi
+       if test "x$DEBUG" '!=' "x" -a "x$OPTIMIZE"  '=' "x";then
+           echo cp config.status config.status.debug
+           cp config.status config.status.debug
+       fi
+       if test "x$DEBUG"    = "x" -a "x$OPTIMIZE" '!=' "x"; then
+           echo cp config.status config.status.optimize
+           cp config.status config.status.optimize
+       fi
+    fi
 fi