DEVICE_PDF
LIBPDF
PDF2SWF
+RUBY_LDFLAGS
+RUBY_CPPFLAGS
+RUBY_LIBS
+RUBY
HAVE_PYTHON_IMAGING
PYTHON_INCLUDES
PYTHON_LIB
# 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"
+ 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=""
+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/python/Makefile"
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/readers/Makefile"
+FILES="$release_in $mk_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythongfx} ${lame_makefile} lib/readers/Makefile"
ac_config_files="$ac_config_files ${FILES}"
cat >confcache <<\_ACEOF
--- /dev/null
+AC_DEFUN([RFX_CHECK_RUBY],
+[
+AC_PATH_PROG([RUBY], [ruby],,)
+
+RUBY_CPPFLAGS=""
+RUBY_LDFLAGS=""
+RUBY_LIBS=""
+
+rubylib=ruby18
+
+AC_MSG_CHECKING([for ruby's include directory])
+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
+ AC_MSG_RESULT($rubyinc)
+
+ # If we got a sensible archdir, we also ask ruby to supply us with CPPFLAGS
+ # and LDFLAGS.
+ AC_MSG_CHECKING([for ruby's cpp flags])
+ rubycpp=`$RUBY -e 'require "rbconfig";puts Config::expand(Config::CONFIG.send("\x5b\x5d", "CPPFLAGS"))' 2>/dev/null`
+ AC_MSG_RESULT($rubycpp)
+
+ AC_MSG_CHECKING([for ruby's ld flags])
+ rubyld=`$RUBY -e 'require "rbconfig";puts Config::expand(Config::CONFIG.send("\x5b\x5d", "LIBRUBYARG_SHARED"))' 2>/dev/null`
+ AC_MSG_RESULT($rubyld)
+
+ AC_MSG_CHECKING([for ruby library name])
+ rubylib=`$RUBY -e 'require "rbconfig";puts Config::expand(Config::CONFIG.send("\x5b\x5d", "RUBY_SO_NAME"))' 2>/dev/null`
+ AC_MSG_RESULT($rubylib)
+
+ RUBY_CPPFLAGS="$rubycpp -I$rubyinc $RUBY_CPPFLAGS"
+ RUBY_LDFLAGS="$rubyld $RUBY_LDFLAGS"
+ else
+ AC_MSG_RESULT('unknown')
+ fi
+else
+ AC_MSG_RESULT('unknown')
+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"
+AC_CHECK_HEADERS([ruby.h],[HAVE_RUBY_H=1])
+CPPFLAGS="$OLDCPPFLAGS"
+
+AC_MSG_CHECKING([whether we should compile the ruby module])
+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
+ AC_MSG_RESULT([yes])
+ AC_SUBST(RUBY_LIBS)
+ AC_SUBST(RUBY_CPPFLAGS)
+ AC_SUBST(RUBY_LDFLAGS)
+else
+ AC_MSG_RESULT([no])
+ RUBY_CPPFLAGS=""
+ RUBY_LDFLAGS=""
+ RUBY_LIBS=""
+fi
+])