X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=configure.in;h=47fac70a31f374757c2ef17cb765a1ea330f1d40;hp=89bd3b7745cb328b4c74775df278ba3bb94a034d;hb=3cd41fca50349a2e03d5bca74fc5b38d76a4238a;hpb=eea310f329b7409684f825c92a58dcc22b1de506 diff --git a/configure.in b/configure.in index 89bd3b7..47fac70 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,11 @@ dnl Process this file with autoconf to produce a configure script. -dnl AC_INIT(src/) # old autoconf -AC_INIT -AC_CONFIG_SRCDIR([src/]) +dnl old autoconf +AC_INIT(src/) + +dnl new autoconf +dnl AC_INIT +dnl AC_CONFIG_SRCDIR([src/]) AC_ARG_ENABLE(checkmem, [ --enable-checkmem turn on ccmalloc debugging], CHECKMEM=true) @@ -18,7 +21,7 @@ AC_ARG_ENABLE(lame, [ --disable-lame don't compile any L.A.M.E. mp3 encoding code in], DISABLE_LAME=true) PACKAGE=swftools -VERSION=2005-01-21-2006 +VERSION=2006-12-02-1537 # ------------------------------------------------------------------ @@ -41,8 +44,8 @@ if test "x$PROFILING" '!=' "x";then fi if test "x$DEBUG" '!=' "x";then if test "x$PROFILING" = "x";then - CFLAGS="$WARNINGS -g $CFLAGS" - CXXFLAGS="$WARNINGS -g $CXXFLAGS" + CFLAGS="$WARNINGS -O2 -g -D_FORTIFY_SOURCE=2 $CFLAGS" + CXXFLAGS="$WARNINGS -O2 -g -D_FORTIFY_SOURCE=2 $CXXFLAGS" else CFLAGS="$WARNINGS -O2 -g -pg $CFLAGS" CXXFLAGS="$WARNINGS -O2 -g -pg $CXXFLAGS" @@ -75,9 +78,14 @@ MACOSX= case $host_os in *darwin* ) MACOSX=yes - CFLAGS="$CFLAGS -fno-rtti" + CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS -fno-rtti" SHARED="-bundle" + # Use fink packages if available. + #if test -d /sw/include && test -d /sw/lib; then + # CPPFLAGS="${CPPFLAGS} -I/sw/include" + # LDFLAGS="${LDFLAGS} -L/sw/lib" + #fi ;; esac @@ -86,6 +94,22 @@ AC_SUBST(SHARED) dnl Checks for programs. AC_PROG_CC AC_PROG_CXX + + +RFX_CHECK_OLDGCC + +if test "x$GCC_IS_OK" '=' "x";then + echo "***************************************************" + echo "* Your gcc is too old to compile this!" + echo "* " + echo "* The last version compilable by this compiler is " + echo "* swftools 0.7.0, which you can download from " + echo "* http://www.swftools.org/swftools-0.7.0.tar.gz " + echo "* ." + echo "* Newer versions require at least gcc 3.0.0 " + echo "***************************************************" + exit 1 +fi if test "x$CHECKMEM" '!=' "x";then CC="ccmalloc $CC" @@ -102,18 +126,19 @@ fi AC_PROG_MAKE_SET AC_PROG_INSTALL AC_PROG_LN_S - AC_PROG_LIBTOOL AC_CHECK_PROGS(UNCOMPRESS, gzip uncompress compress, ) dnl Checks for system services OBJEXT="o" AREXT=".a" +CXXLIBS="-lstdc++" AC_EXEEXT if test "x$EXEEXT" = "x.exe";then OBJEXT="obj" AREXT=".lib" + CXXLIBS="" fi AC_SUBST(OBJEXT) AC_SUBST(AREXT) @@ -127,9 +152,11 @@ if test "x${MINGW}" != "xyes"; then else # mingW SLEXT="dll" + CXXLIBS="" fi export SLEXT AC_SUBST(SLEXT) +AC_SUBST(CXXLIBS) # The following tries to make use of includes and libraries in # /usr/local, too. Notice: A -I/usr/local/include might break @@ -172,7 +199,7 @@ dnl Checks for libraries. AC_CHECK_LIB(z, deflate,, ZLIBMISSING=true) AC_CHECK_LIB(jpeg, jpeg_write_raw_data,, JPEGLIBMISSING=true) AC_CHECK_LIB(t1, T1_LoadFont,, T1LIBMISSING=true) - AC_CHECK_LIB(ungif, EGifOpenFileName,, UNGIFMISSING=true) + AC_CHECK_LIB(ungif, DGifOpen,, UNGIFMISSING=true) RFX_CHECK_BYTEORDER AC_SUBST(WORDS_BIGENDIAN) @@ -216,7 +243,7 @@ dnl Checks for library functions. RFX_CHECK_FREETYPE -RFX_CHECK_FONTCONFIG +#RFX_CHECK_FONTCONFIG # ------------------------------------------------------------------ @@ -356,13 +383,20 @@ if test "x${AVIFILE}" '!=' "xtrue" -a "x${AVIFIL32}" '!=' "xtrue"; then avi2swf= fi -pdf2swf_makefile="pdf2swf/Makefile pdf2swf/xpdf/Makefile" +pdf2swf_makefile="lib/pdf/Makefile" +PDF2SWF='pdf2swf$(E)' +LIBPDF='libpdf$(A)' + if test "x${DISABLEPDF2SWF}" = "xtrue"; then echo "* Disabling pdf2swf tool..." - rm -f pdf2swf/Makefile - echo all install uninstall clean: > pdf2swf/Makefile + rm -f lib/pdf/Makefile + echo all install uninstall clean: > lib/pdf/Makefile pdf2swf_makefile="" + PDF2SWF= + LIBPDF= fi +AC_SUBST(PDF2SWF) +AC_SUBST(LIBPDF) if test "x${ZLIBMISSING}" = "xtrue"; then echo @@ -404,9 +438,34 @@ fi # ------------------------------------------------------------------ if test -f "release.in"; then release_in="./release"; fi -FILES="$release_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythonrfxswf} ${lame_makefile}" - -dnl AC_OUTPUT(${FILES}) old autoconf -AC_CONFIG_FILES([${FILES}]) -AC_OUTPUT - +FILES="$release_in Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile pdf2swf/fonts/Makefile ${pythonrfxswf} ${lame_makefile} lib/art/Makefile" + +dnl old autoconf +AC_OUTPUT(${FILES}) + +dnl new autoconf +dnl AC_CONFIG_FILES([${FILES}]) +dnl AC_OUTPUT + +# +# On development trees, create snapshots of config.status +# +if test -f snapshot -a "x$CHECKMEM" = "x" -a "x$PROFILING" = "x";then + if test "x${MINGW}" = "xyes"; then + echo cp config.status config.status.win32 + cp config.status config.status.win32 + else + if test "x$DEBUG" '=' "x" -a "x$OPTIMIZE" '=' "x";then + echo cp config.status config.status.linux + cp config.status config.status.linux + fi + if test "x$DEBUG" '!=' "x" -a "x$OPTIMIZE" '=' "x";then + echo cp config.status config.status.debug + cp config.status config.status.debug + fi + if test "x$DEBUG" = "x" -a "x$OPTIMIZE" '!=' "x"; then + echo cp config.status config.status.optimize + cp config.status config.status.optimize + fi + fi +fi