X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=configure;h=4ca02585c73e34d866528f19c81e2697e2ec3aca;hp=c804ce3eca80b188cdd8cd7c164c27a377a87da1;hb=e3f4172c72818b50c8be86ea072da5f3eadb2b62;hpb=580c48fef10df9184cf2728338e89f7db0fef2f5 diff --git a/configure b/configure index c804ce3..4ca0258 100755 --- a/configure +++ b/configure @@ -653,7 +653,6 @@ VIDEO_LIBS AVIFILE_CONFIG splash_in_source xpdf_in_source -art_in_source lame_in_source DEVICE_OPENGL FREETYPE_CONFIG @@ -1848,6 +1847,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 @@ -1886,7 +1894,6 @@ fi PACKAGE=swftools VERSION=2009-08-12-1514 - # ------------------------------------------------------------------ if test "x${srcdir}" != "x."; then @@ -1894,9 +1901,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 @@ -1909,11 +1916,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" @@ -4601,6 +4608,83 @@ fi fi +{ $as_echo "$as_me:$LINENO: checking for zzip_dir_fdopen in -lzzip" >&5 +$as_echo_n "checking for zzip_dir_fdopen in -lzzip... " >&6; } +if test "${ac_cv_lib_zzip_zzip_dir_fdopen+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_dir_fdopen (); +int +main () +{ +return zzip_dir_fdopen (); + ; + 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_dir_fdopen=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_zzip_zzip_dir_fdopen=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_dir_fdopen" >&5 +$as_echo "$ac_cv_lib_zzip_zzip_dir_fdopen" >&6; } +if test "x$ac_cv_lib_zzip_zzip_dir_fdopen" = 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; } @@ -5497,7 +5581,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 pdflib.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 @@ -8969,167 +9054,16 @@ fi -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_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lGL $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 glBegin (); -int -main () -{ -return glBegin (); - ; - 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_GL_glBegin=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_GL_glBegin=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_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" - -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 - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lGLU $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 gluBeginSurface (); -int -main () -{ -return gluBeginSurface (); - ; - 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_GLU_gluBeginSurface=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" - -fi - + OLDCPPFLAGS="${CPPFLAGS}" + OLDLIBS="${LIBS}" -{ $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 "$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="-lglut $LIBS" +LIBS="-lfftw3 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -9143,11 +9077,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char glutInit (); +char fftw_plan_dft_r2c_2d (); int main () { -return glutInit (); +return fftw_plan_dft_r2c_2d (); ; return 0; } @@ -9173,12 +9107,12 @@ $as_echo "$ac_try_echo") >&5 test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then - ac_cv_lib_glut_glutInit=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_glut_glutInit=no + ac_cv_lib_fftw3_fftw_plan_dft_r2c_2d=no fi rm -rf conftest.dSYM @@ -9186,20 +9120,14 @@ 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" - +{ $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 - -for ac_header in GL/gl.h GL/glut.h +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 @@ -9339,67 +9267,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 -#include -#include + 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 -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= @@ -9658,12 +9588,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)' @@ -9671,7 +9595,6 @@ xpdf_in_source='$(xpdf_objects)' - # ------------------------------------------------------------------ @@ -10270,7 +10193,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=