added pdf2pdf tool
[swftools.git] / configure
index 28644c5..c804ce3 100755 (executable)
--- a/configure
+++ b/configure
@@ -640,6 +640,8 @@ LIBOBJS
 PNG2SWF
 GIF2SWF
 JPEG2SWF
+PDF2PDF
+DEVICE_PDF
 LIBPDF
 PDF2SWF
 HAVE_PYTHON_IMAGING
@@ -4288,6 +4290,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
@@ -5417,7 +5496,8 @@ 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
 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
@@ -10122,6 +10202,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 +10214,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;
 
 
 
+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"