fixed drawlink() ruby callback
[swftools.git] / configure
index 28644c5..7e03d9c 100755 (executable)
--- a/configure
+++ b/configure
@@ -640,8 +640,15 @@ LIBOBJS
 PNG2SWF
 GIF2SWF
 JPEG2SWF
+PDF2PDF
+DEVICE_PDF
 LIBPDF
 PDF2SWF
+RUBY_INSTALLDIR
+RUBY_LDFLAGS
+RUBY_CPPFLAGS
+RUBY_LIBS
+RUBY
 HAVE_PYTHON_IMAGING
 PYTHON_INCLUDES
 PYTHON_LIB
@@ -651,7 +658,6 @@ VIDEO_LIBS
 AVIFILE_CONFIG
 splash_in_source
 xpdf_in_source
-art_in_source
 lame_in_source
 DEVICE_OPENGL
 FREETYPE_CONFIG
@@ -1846,6 +1852,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+# ------------------- option parsing -------------------------------
+
+DEBUG=
+CHECKMEM=
+PROFILING=
+ENABLE_WARNINGS=
+OPTIMIZE=
+DISABLE_LAME=
+
 # Check whether --enable-checkmem was given.
 if test "${enable_checkmem+set}" = set; then
   enableval=$enable_checkmem; CHECKMEM=true
@@ -1882,8 +1897,7 @@ fi
 
 
 PACKAGE=swftools
-VERSION=2009-08-12-1514
-
+VERSION=2010-02-06-1900
 
 # ------------------------------------------------------------------
 
@@ -1892,9 +1906,9 @@ if test "x${srcdir}" != "x."; then
     exit 1
 fi
 
-WARNINGS="-Wparentheses -Wimplicit -Wreturn-type"
+WARNINGS="-Wimplicit -Wreturn-type -Wno-write-strings -Wformat"
 if test "x$ENABLE_WARNINGS" '!=' "x";then
-    WARNINGS="-Wall -Wno-unused -Wno-format -Wno-redundant-decls -D_FORTIFY_SOURCE=2 "
+    WARNINGS="-Wall -Wno-unused -Wno-format -Wno-redundant-decls -Wno-write-strings -D_FORTIFY_SOURCE=2 "
 fi
 
 if test "x$CHECKMEM" '!=' "x";then
@@ -1907,11 +1921,11 @@ if test "x$DEBUG" '!=' "x";then
     if test "x$PROFILING" = "x";then
         CFLAGS="$WARNINGS -O2 -g $CFLAGS"
         CXXFLAGS="$WARNINGS -O2 -g $CXXFLAGS"
-        LDFLAGS="-g $LIBS"
+        LDFLAGS="-g $LDFLAGS"
     else
         CFLAGS="$WARNINGS -O2 -g -pg $CFLAGS"
         CXXFLAGS="$WARNINGS -O2 -g -pg $CXXFLAGS"
-        LDFLAGS="-g -pg $LIBS"
+        LDFLAGS="-g -pg $LDFLAGS"
     fi
 else if test "x$OPTIMIZE" '!=' "x"; then
     CFLAGS="$WARNINGS -O3 -fomit-frame-pointer -Winline $CFLAGS"
@@ -4288,6 +4302,83 @@ if test "x$ZLIBMISSING" = "xtrue";then
 fi
 
 
+{ $as_echo "$as_me:$LINENO: checking for PDF_open_file in -lpdf" >&5
+$as_echo_n "checking for PDF_open_file in -lpdf... " >&6; }
+if test "${ac_cv_lib_pdf_PDF_open_file+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpdf  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char PDF_open_file ();
+int
+main ()
+{
+return PDF_open_file ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_pdf_PDF_open_file=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_pdf_PDF_open_file=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pdf_PDF_open_file" >&5
+$as_echo "$ac_cv_lib_pdf_PDF_open_file" >&6; }
+if test "x$ac_cv_lib_pdf_PDF_open_file" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPDF 1
+_ACEOF
+
+  LIBS="-lpdf $LIBS"
+
+else
+  PDFLIBMISSING=true
+fi
+
+
 { $as_echo "$as_me:$LINENO: checking for jpeg_write_raw_data in -ljpeg" >&5
 $as_echo_n "checking for jpeg_write_raw_data in -ljpeg... " >&6; }
 if test "${ac_cv_lib_jpeg_jpeg_write_raw_data+set}" = set; then
@@ -4522,6 +4613,83 @@ fi
 
 fi
 
+{ $as_echo "$as_me:$LINENO: checking for zzip_file_open in -lzzip" >&5
+$as_echo_n "checking for zzip_file_open in -lzzip... " >&6; }
+if test "${ac_cv_lib_zzip_zzip_file_open+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lzzip  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char zzip_file_open ();
+int
+main ()
+{
+return zzip_file_open ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+        test "$cross_compiling" = yes ||
+        $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_zzip_zzip_file_open=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_cv_lib_zzip_zzip_file_open=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_zzip_zzip_file_open" >&5
+$as_echo "$ac_cv_lib_zzip_zzip_file_open" >&6; }
+if test "x$ac_cv_lib_zzip_zzip_file_open" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZZIP 1
+_ACEOF
+
+  LIBS="-lzzip $LIBS"
+
+else
+  ZZIPMISSING=true
+fi
+
+
 
 { $as_echo "$as_me:$LINENO: checking for byte order" >&5
 $as_echo_n "checking for byte order... " >&6; }
@@ -5417,7 +5585,9 @@ done
 
 
 
-for ac_header in zlib.h gif_lib.h io.h wchar.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/mman.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h sys/time.h sys/resource.h
+
+
+for ac_header in zlib.h gif_lib.h io.h wchar.h jpeglib.h assert.h signal.h pthread.h sys/stat.h sys/mman.h sys/types.h dirent.h sys/bsdtypes.h sys/ndir.h sys/dir.h ndir.h time.h sys/time.h sys/resource.h pdflib.h zzip/lib.h
 do
 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@@ -8889,17 +9059,16 @@ fi
 
 
 
-OLDCPPFLAGS="${CPPFLAGS}"
-OLDLIBS="${LIBS}"
-
+  OLDCPPFLAGS="${CPPFLAGS}"
+  OLDLIBS="${LIBS}"
 
-{ $as_echo "$as_me:$LINENO: checking for glBegin in -lGL" >&5
-$as_echo_n "checking for glBegin in -lGL... " >&6; }
-if test "${ac_cv_lib_GL_glBegin+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for fftw_plan_dft_r2c_2d in -lfftw3" >&5
+$as_echo_n "checking for fftw_plan_dft_r2c_2d in -lfftw3... " >&6; }
+if test "${ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d+set}" = set; then
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lGL  $LIBS"
+LIBS="-lfftw3  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -8913,11 +9082,11 @@ cat >>conftest.$ac_ext <<_ACEOF
 #ifdef __cplusplus
 extern "C"
 #endif
-char glBegin ();
+char fftw_plan_dft_r2c_2d ();
 int
 main ()
 {
-return glBegin ();
+return fftw_plan_dft_r2c_2d ();
   ;
   return 0;
 }
@@ -8943,12 +9112,12 @@ $as_echo "$ac_try_echo") >&5
         test "$cross_compiling" = yes ||
         $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_GL_glBegin=yes
+  ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_GL_glBegin=no
+       ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d=no
 fi
 
 rm -rf conftest.dSYM
@@ -8956,56 +9125,48 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GL_glBegin" >&5
-$as_echo "$ac_cv_lib_GL_glBegin" >&6; }
-if test "x$ac_cv_lib_GL_glBegin" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGL 1
-_ACEOF
-
-  LIBS="-lGL $LIBS"
-
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d" >&5
+$as_echo "$ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d" >&6; }
+if test "x$ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d" = x""yes; then
+  HAVE_LIBFFTW3=1
 fi
 
 
-{ $as_echo "$as_me:$LINENO: checking for gluBeginSurface in -lGLU" >&5
-$as_echo_n "checking for gluBeginSurface in -lGLU... " >&6; }
-if test "${ac_cv_lib_GLU_gluBeginSurface+set}" = set; then
+for ac_header in fftw3.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
   $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lGLU  $LIBS"
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gluBeginSurface ();
-int
-main ()
-{
-return gluBeginSurface ();
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -9014,206 +9175,58 @@ $as_echo "$ac_try_echo") >&5
   (exit $ac_status); } && {
         test -z "$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
-       }; then
-  ac_cv_lib_GLU_gluBeginSurface=yes
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_GLU_gluBeginSurface=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_gluBeginSurface" >&5
-$as_echo "$ac_cv_lib_GLU_gluBeginSurface" >&6; }
-if test "x$ac_cv_lib_GLU_gluBeginSurface" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGLU 1
-_ACEOF
-
-  LIBS="-lGLU $LIBS"
-
+       ac_header_compiler=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking for glutInit in -lglut" >&5
-$as_echo_n "checking for glutInit in -lglut... " >&6; }
-if test "${ac_cv_lib_glut_glutInit+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lglut  $LIBS"
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char glutInit ();
-int
-main ()
-{
-return glutInit ();
-  ;
-  return 0;
-}
+#include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   *) ac_try_echo=$ac_try;;
 esac
 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
 $as_echo "$ac_try_echo") >&5
-  (eval "$ac_link") 2>conftest.er1
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
         test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-        test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
        }; then
-  ac_cv_lib_glut_glutInit=yes
+  ac_header_preproc=yes
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       ac_cv_lib_glut_glutInit=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_glut_glutInit" >&5
-$as_echo "$ac_cv_lib_glut_glutInit" >&6; }
-if test "x$ac_cv_lib_glut_glutInit" = x""yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBGLUT 1
-_ACEOF
-
-  LIBS="-lglut $LIBS"
-
+  ac_header_preproc=no
 fi
 
-
-
-for ac_header in GL/gl.h GL/glut.h
-do
-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-$as_echo_n "checking for $ac_header... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  $as_echo_n "(cached) " >&6
-fi
-ac_res=`eval 'as_val=${'$as_ac_Header'}
-                $as_echo "$as_val"'`
-              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-$as_echo_n "checking $ac_header usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-        test -z "$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_header_compiler=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_header_compiler=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-$as_echo_n "checking $ac_header presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null && {
-        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-        test ! -s conftest.err
-       }; then
-  ac_header_preproc=yes
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -9259,67 +9272,69 @@ as_val=`eval 'as_val=${'$as_ac_Header'}
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-
+ HAVE_FFTW3_H=1
 fi
 
 done
 
 
-cat > conftest.c << EOF
-#include <GL/gl.h>
-#include <GL/glu.h>
-#include <GL/glut.h>
+  if test "x${HAVE_LIBFFTW3}" != "x";then
+    if test "x${HAVE_FFTW3_H}" != "x";then
+      HAVE_FFTW3=1
+    fi
+  fi
 
-int main(int argc, char*argv)
-{
-    glutInit(&argc, argv);
-    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
-    glutInitWindowSize(320,200);
-    glutInitWindowPosition(0,0);
-    glutCreateWindow("main");
-    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-    glShadeModel(GL_SMOOTH);
-    glEnable (GL_LINE_SMOOTH);
-    glEnable (GL_POLYGON_SMOOTH);
-    glEnable (GL_BLEND);
-    glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-    glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
-    glHint (GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);
-}
-EOF
+  if test "x${HAVE_FFTW3}" = "x1"; then
+    LIBS="$LIBS -lfftw3"
+    { $as_echo "$as_me:$LINENO: checking whether we can compile the fftw3 test program" >&5
+$as_echo_n "checking whether we can compile the fftw3 test program... " >&6; }
 
-{ $as_echo "$as_me:$LINENO: checking whether we can compile the opengl test program" >&5
-$as_echo_n "checking whether we can compile the opengl test program... " >&6; }
+    cat > conftest.c << EOF
+    #include <fftw3.h>
 
-ac_link='$CC $CPPFLAGS $CFLAGS conftest.c $LDFLAGS $LIBS -o conftest${ac_exeext}'
-if { (eval echo opengl.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-    { $as_echo "$as_me:$LINENO: result: yes" >&5
+    int main()
+    {
+       char*data = 0;
+       fftw_plan plan = fftw_plan_dft_2d(600, 800, (fftw_complex*)data, (fftw_complex*)data, FFTW_FORWARD, FFTW_ESTIMATE);
+       plan = fftw_plan_dft_r2c_2d(600, 800, (double*)data, (fftw_complex*)data, FFTW_ESTIMATE);
+       plan = fftw_plan_dft_c2r_2d(600, 800, (fftw_complex*)data, (double*)data, FFTW_ESTIMATE);
+       fftw_execute(plan);
+       fftw_destroy_plan(plan);
+    }
+EOF
+
+    ac_link='$CC $CPPFLAGS $CFLAGS conftest.c $LDFLAGS $LIBS -o conftest${ac_exeext}'
+    if { (eval echo fftw3.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+      { $as_echo "$as_me:$LINENO: result: yes" >&5
 $as_echo "yes" >&6; }
-    HAVE_OPENGL=1
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPENGL 1
+#define HAVE_FFTW3 1
 _ACEOF
 
-else
-    echo "configure: failed program was:" >&5
-    cat conftest.c >&5
-    HAVE_OPENGL=
-    { $as_echo "$as_me:$LINENO: result: no" >&5
+    else
+      echo "configure: failed program was:" >&5
+      cat conftest.c >&5
+      HAVE_FFTW3=0
+      { $as_echo "$as_me:$LINENO: result: no" >&5
 $as_echo "no" >&6; }
-fi
-rm -f conftest*
+    fi
+    rm -f conftest*
+  fi
 
-# if the above didn't work out, reset all changes to the compiler variables.
-if test "x${HAVE_OPENGL}" "!=" "x1"; then
-    CPPFLAGS=$OLDCPPFLAGS
-    LIBS=$OLDLIBS
-fi
+  # if the above didn't work out, reset all changes to the compiler variables.
+  if test "x${HAVE_FFTW3}" "!=" "x1"; then
+      CPPFLAGS=$OLDCPPFLAGS
+      LIBS=$OLDLIBS
+  fi
 
-if test "$HAVE_OPENGL";then
-    DEVICE_OPENGL='devices/opengl.$(O)'
 
-fi
+# RFX_CHECK_OPENGL
+# if test "$HAVE_OPENGL";then
+#     DEVICE_OPENGL='devices/opengl.$(O)'
+#     AC_SUBST(DEVICE_OPENGL)
+# fi
+
 
 lame_in_source=
 lame_makefile=
@@ -9578,12 +9593,6 @@ _ACEOF
 fi
 
 
-
-cat >>confdefs.h <<\_ACEOF
-#define INTERNAL_LIBART 1
-_ACEOF
-
-art_in_source='$(art_objects)'
 splash_in_source='$(splash_objects)'
 xpdf_in_source='$(xpdf_objects)'
 
@@ -9591,7 +9600,6 @@ xpdf_in_source='$(xpdf_objects)'
 
 
 
-
 # ------------------------------------------------------------------
 
 
@@ -10103,7 +10111,306 @@ if test "x$PYTHON_OK" '!=' "xyes";then
     # fail silently- the most users won't have any need for the
     # python interface anyway
 else
-    pythonrfxswf="lib/python/Makefile"
+    pythongfx="lib/python/Makefile"
+fi
+
+# ------------------------------------------------------------------
+
+
+# Extract the first word of "ruby", so it can be a program name with args.
+set dummy ruby; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_RUBY+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $RUBY in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_RUBY="$RUBY" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+RUBY=$ac_cv_path_RUBY
+if test -n "$RUBY"; then
+  { $as_echo "$as_me:$LINENO: result: $RUBY" >&5
+$as_echo "$RUBY" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+RUBY_CPPFLAGS=""
+RUBY_LDFLAGS=""
+RUBY_LIBS=""
+
+rubylib=ruby18
+
+{ $as_echo "$as_me:$LINENO: checking for ruby's include directory" >&5
+$as_echo_n "checking for ruby's include directory... " >&6; }
+if test "x$RUBY" '!=' "x";then
+    rubyinc=`$RUBY -e 'require "rbconfig";puts Config::expand(Config::CONFIG.send("\x5b\x5d", "archdir"))' 2>/dev/null`
+    if test -d $rubyinc;then
+       { $as_echo "$as_me:$LINENO: result: $rubyinc" >&5
+$as_echo "$rubyinc" >&6; }
+
+       # If we got a sensible archdir, we also ask ruby to supply us with CPPFLAGS
+       # and LDFLAGS.
+       { $as_echo "$as_me:$LINENO: checking for ruby's cpp flags" >&5
+$as_echo_n "checking for ruby's cpp flags... " >&6; }
+       rubycpp=`$RUBY -e 'require "rbconfig";puts Config::expand(Config::CONFIG.send("\x5b\x5d", "CPPFLAGS"))' 2>/dev/null`
+       { $as_echo "$as_me:$LINENO: result: $rubycpp" >&5
+$as_echo "$rubycpp" >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking for ruby's ld flags" >&5
+$as_echo_n "checking for ruby's ld flags... " >&6; }
+       rubyld=`$RUBY -e 'require "rbconfig";puts Config::expand(Config::CONFIG.send("\x5b\x5d", "LIBRUBYARG_SHARED"))' 2>/dev/null`
+       { $as_echo "$as_me:$LINENO: result: $rubyld" >&5
+$as_echo "$rubyld" >&6; }
+
+       { $as_echo "$as_me:$LINENO: checking for ruby library name" >&5
+$as_echo_n "checking for ruby library name... " >&6; }
+       rubylib=`$RUBY -e 'require "rbconfig";puts Config::expand(Config::CONFIG.send("\x5b\x5d", "RUBY_SO_NAME"))' 2>/dev/null`
+       { $as_echo "$as_me:$LINENO: result: $rubylib" >&5
+$as_echo "$rubylib" >&6; }
+
+       RUBY_CPPFLAGS="$rubycpp -I$rubyinc $RUBY_CPPFLAGS"
+       RUBY_LDFLAGS="$rubyld $RUBY_LDFLAGS"
+       RUBY_INSTALLDIR="$rubyinc"
+    else
+       { $as_echo "$as_me:$LINENO: result: 'unknown'" >&5
+$as_echo "'unknown'" >&6; }
+    fi
+else
+    { $as_echo "$as_me:$LINENO: result: 'unknown'" >&5
+$as_echo "'unknown'" >&6; }
+fi
+
+#OLDLDFLAGS="$LDFLAGS"
+#LDFLAGS="$LDFLAGS $RUBY_LDFLAGS"
+#AC_CHECK_LIB($rubylib, rb_define_method, HAVE_RUBY_LIB=1,)
+#LDFLAGS="$OLDLDFLAGS"
+
+OLDCPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $RUBY_CPPFLAGS"
+
+for ac_header in ruby.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+              { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+                $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ HAVE_RUBY_H=1
+fi
+
+done
+
+CPPFLAGS="$OLDCPPFLAGS"
+
+{ $as_echo "$as_me:$LINENO: checking whether we should compile the ruby module" >&5
+$as_echo_n "checking whether we should compile the ruby module... " >&6; }
+if test "x${HAVE_RUBY_H}" '!=' "x";then
+    #RUBY_LIBS="$RUBY_LIBS -l$rubylib"
+
+    cat > conftest.c << EOF
+#include <ruby.h>
+static VALUE foobar;
+VALUE foobar_set_foo(VALUE module, VALUE _key, VALUE _value)
+{
+    return Qnil;
+}
+int Init_foobar()
+{
+    foobar = rb_define_module("foobar");
+    rb_define_module_function(foobar, "set_foo", foobar_set_foo, 2);
+}
+int main() {return 0;}
+EOF
+    ac_link='$CC $SHARED $CPPFLAGS $RUBY_CPPFLAGS $CFLAGS conftest.c $LDFLAGS $RUBY_LDFLAGS $LIBS $RUBY_LIBS -o conftest${ac_exeext}'
+    if { (eval echo ruby.m4: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+       RUBY_OK=yes
+    else
+        echo "configure: failed program was:" >&5
+        cat conftest.c >&5
+    fi
+    rm -f conftest*
+fi
+
+if test "x${RUBY_OK}" '=' "xyes"; then
+    { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+
+
+
+else
+    { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+    RUBY_CPPFLAGS=""
+    RUBY_LDFLAGS=""
+    RUBY_LIBS=""
+    RUBY_INSTALLDIR=""
+fi
+
+
+if test "x$RUBY_OK" '!=' "xyes";then
+    echo all install uninstall clean: > lib/ruby/Makefile
+    # fail silently- the most users won't have any need for the
+    # ruby interface anyway
+else
+    rubygfx="lib/ruby/Makefile"
 fi
 
 # ------------------------------------------------------------------
@@ -10122,6 +10429,9 @@ if test "x$JPEGLIBMISSING" = "xtrue";then
     DISABLEJPEG2SWF=true
     PARTIAL=true
 fi
+if test "x$PDFLIBMISSING" = "xtrue";then
+    DISABLEPDF2PDF=true;
+fi
 #if test "x$T1LIBMISSING" = "xtrue";then
 #    MISSINGLIBS="${MISSINGLIBS} t1lib"
 #fi
@@ -10131,6 +10441,9 @@ if test "x$UNGIFMISSING" = "xtrue";then
     PARTIAL=true
 fi
 
+if test "x${ac_cv_header_pdflib_h}" '!=' "xyes";then
+    DISABLEPDF2PDF=true;
+fi
 if test "x${ac_cv_header_jpeglib_h}" '!=' "xyes"; then
     DISABLEPDF2SWF=true;
     DISABLEJPEG2SWF=true;
@@ -10184,7 +10497,7 @@ LIBPDF='libpdf$(A)'
 if test "x${DISABLEPDF2SWF}" = "xtrue"; then
   echo "* Disabling pdf2swf tool..."
   rm -f lib/pdf/Makefile
-  echo all install uninstall clean libpdf: > lib/pdf/Makefile
+  echo all install uninstall clean libpdf libgfxpdf: > lib/pdf/Makefile
   pdf2swf_makefile=""
   PDF2SWF=
   LIBPDF=
 
 
 
+PDF2PDF='pdf2pdf$(E)'
+DEVICE_PDF='devices/pdf.$(O)'
+if test "x${DISABLEPDF2PDF}" = "xtrue"; then
+  #echo "* Disabling pdf2pdf tool..."
+  PDF2PDF=
+  DEVICE_PDF=
+fi
+
+
+
 if test "x${ZLIBMISSING}" = "xtrue"; then
   echo
   echo "* Warning! Without zlib, you will not be able to read"
@@ -10239,7 +10562,7 @@ fi
 
 if test -f "release.in"; then release_in="./release"; fi
 if test -f "Makefile.new.in"; then mk_in="./Makefile.new"; fi
-FILES="$release_in $mk_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythonrfxswf} ${lame_makefile} lib/art/Makefile lib/readers/Makefile"
+FILES="$release_in $mk_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythongfx} ${rubygfx} ${lame_makefile} lib/readers/Makefile"
 ac_config_files="$ac_config_files ${FILES}"
 
 cat >confcache <<\_ACEOF