X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=configure.in;h=27b4b6ce475fd2c51ecb6f138c3dde270849f3fc;hb=17ae0051305cc00129547f0e9a5fdf646540abe5;hp=0033be08bb7239792f4ce5811d58875a37ce57a9;hpb=cdd7e09da262a1d0b6eefea4f121ccbd539596da;p=swftools.git diff --git a/configure.in b/configure.in index 0033be0..27b4b6c 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=2004-02-13-2131 +VERSION=2007-01-13-1826 # ------------------------------------------------------------------ @@ -28,9 +31,9 @@ if test "x${srcdir}" != "x."; then exit 1 fi -WARNINGS="-Wparentheses -Wimplicit -Wreturn-type" +WARNINGS="-Wparentheses -Wimplicit -Wreturn-type -Wno-unused-value" if test "x$ENABLE_WARNINGS" '!=' "x";then - WARNINGS="-Wall -Wno-unused -Wno-format -Wno-redundant-decls" + WARNINGS="-Wall -Wno-unused -Wno-format -Wno-redundant-decls -D_FORTIFY_SOURCE=2 " fi if test "x$CHECKMEM" '!=' "x";then @@ -43,6 +46,7 @@ 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" else CFLAGS="$WARNINGS -O2 -g -pg $CFLAGS" CXXFLAGS="$WARNINGS -O2 -g -pg $CXXFLAGS" @@ -91,6 +95,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" @@ -107,18 +127,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) @@ -132,9 +153,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 @@ -163,7 +186,7 @@ fi # this must be done after (I believe) AC_PROG_MAKE_SET -if test "x$DEBUG" '!=' "x";then +if test "x$DEBUG" '!=' "x" -o "x$STRIP" = "x";then STRIP="@echo debug enabled, not stripping " export STRIP AC_SUBST(STRIP) @@ -175,9 +198,22 @@ dnl Checks for libraries. exit; ) 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, DGifOpen,, UNGIFMISSING=true) + +if test "x$ZLIBMISSING" = "xtrue";then + echo + echo "ERROR:" + echo "You need zlib to compile swftools" + echo + exit +fi + +AC_CHECK_LIB(jpeg, jpeg_write_raw_data,, JPEGLIBMISSING=true) +AC_CHECK_LIB(t1, T1_LoadFont,, T1LIBMISSING=true) +AC_CHECK_LIB(ungif, DGifOpen,, UNGIFMISSING=true) +if "$UNGIFMISSING";then + UNGIFMISSING= + AC_CHECK_LIB(gif, DGifOpen,, UNGIFMISSING=true) +fi RFX_CHECK_BYTEORDER AC_SUBST(WORDS_BIGENDIAN) @@ -221,7 +257,7 @@ dnl Checks for library functions. RFX_CHECK_FREETYPE -RFX_CHECK_FONTCONFIG +#RFX_CHECK_FONTCONFIG # ------------------------------------------------------------------ @@ -361,13 +397,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 @@ -409,11 +452,14 @@ 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} lib/art/Makefile" +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 AC_OUTPUT(${FILES}) old autoconf -AC_CONFIG_FILES([${FILES}]) -AC_OUTPUT +dnl new autoconf +dnl AC_CONFIG_FILES([${FILES}]) +dnl AC_OUTPUT # # On development trees, create snapshots of config.status