From fe0bf96d27b7af11538533b4df9eca5cbc96eedf Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 1 Jun 2009 21:12:50 +0200 Subject: [PATCH] small build system fixes --- configure | 15 ++++----------- configure.in | 7 ++++--- setup.py | 4 +++- src/pdf2swf.c | 28 ++++++++++++++-------------- 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/configure b/configure index 89c2c7b..1abcce0 100755 --- a/configure +++ b/configure @@ -1311,11 +1311,6 @@ Optional Features: --enable-optimizations turn on compiler optimizations (recommended for avi2swf) --disable-lame don't compile any L.A.M.E. mp3 encoding code in -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-poppler use poppler instead of internal xpdf (currently broken) - Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -1779,13 +1774,11 @@ fi # Check whether --enable-lame was given. if test "${enable_lame+set}" = set; then - enableval=$enable_lame; DISABLE_LAME=true + enableval=$enable_lame; if test "x$enable_lame" = "xno";then + DISABLE_LAME=yes fi - - -# Check whether --with-poppler was given. -if test "${with_poppler+set}" = set; then - withval=$with_poppler; USE_POPPLER=true +else + DISABLE_LAME= fi diff --git a/configure.in b/configure.in index ea8a51f..3bad2e0 100644 --- a/configure.in +++ b/configure.in @@ -18,9 +18,10 @@ AC_ARG_ENABLE(warnings, AC_ARG_ENABLE(optimizations, [ --enable-optimizations turn on compiler optimizations (recommended for avi2swf)], OPTIMIZE=true) AC_ARG_ENABLE(lame, -[ --disable-lame don't compile any L.A.M.E. mp3 encoding code in], DISABLE_LAME=true) -AC_ARG_WITH([poppler], -[ --with-poppler use poppler instead of internal xpdf (currently broken)], [USE_POPPLER=true]) +[ --disable-lame don't compile any L.A.M.E. mp3 encoding code in], +if test "x$enable_lame" = "xno";then + DISABLE_LAME=yes +fi,DISABLE_LAME=) PACKAGE=swftools VERSION=0.9.0 diff --git a/setup.py b/setup.py index 2b88fc7..47ed12e 100644 --- a/setup.py +++ b/setup.py @@ -261,7 +261,9 @@ rfxswf_sources = [ "lib/action/lex.swf4.c", "lib/action/lex.swf5.c", "lib/action/libming.c", "lib/action/swf4compiler.tab.c", "lib/as3/abc.c", "lib/as3/code.c", "lib/as3/pool.c", "lib/as3/files.c", "lib/as3/opcodes.c", -"lib/action/swf5compiler.tab.c", "lib/action/actioncompiler.c" +"lib/as3/scripts.c", "lib/as3/common.c", "lib/as3/builtin.c", "lib/as3/compiler.c", "lib/as3/expr.c", "lib/as3/import.c", +"lib/as3/initcode.c", "lib/as3/parser.tab.c", "lib/as3/registry.c", "lib/as3/tokenizer.yy.c", +"lib/action/swf5compiler.tab.c", "lib/action/actioncompiler.c", ] libpdf_sources = [ "lib/pdf/GFXOutputDev.cc", "lib/pdf/InfoOutputDev.cc", "lib/pdf/BitmapOutputDev.cc", diff --git a/src/pdf2swf.c b/src/pdf2swf.c index 0e9e3e5..5b258d1 100644 --- a/src/pdf2swf.c +++ b/src/pdf2swf.c @@ -640,11 +640,6 @@ int main(int argn, char *argv[]) exit(1); } - if(info_only) { - show_info(driver, filename); - return 0; - } - if(!outputname) { if(filename) { @@ -662,24 +657,29 @@ int main(int argn, char *argv[]) // test if the page range is o.k. is_in_range(0x7fffffff, pagerange); - if(pagerange) - driver->set_parameter(driver, "pages", pagerange); - if (!filename) { args_callback_usage(argv[0]); exit(0); } - - /* add fonts */ - for(t=0;tset_parameter(driver, "fontdir", fontpaths[t]); - } - + char fullname[256]; if(password && *password) { sprintf(fullname, "%s|%s", filename, password); filename = fullname; } + + if(pagerange) + driver->set_parameter(driver, "pages", pagerange); + + if(info_only) { + show_info(driver, filename); + return 0; + } + + /* add fonts */ + for(t=0;tset_parameter(driver, "fontdir", fontpaths[t]); + } char*u = 0; if((u = strchr(outputname, '%'))) { -- 1.7.10.4