configure: fixed LDFLAGS passing, added -Wno-write-strings
[swftools.git] / configure.in
index 5dae635..4ed3ada 100644 (file)
@@ -7,6 +7,15 @@ dnl new autoconf
 dnl AC_INIT
 dnl AC_CONFIG_SRCDIR([src/])
 
+# ------------------- option parsing -------------------------------
+
+DEBUG=
+CHECKMEM=
+PROFILING=
+ENABLE_WARNINGS=
+OPTIMIZE=
+DISABLE_LAME=
+
 AC_ARG_ENABLE(checkmem,
 [  --enable-checkmem       turn on ccmalloc debugging], CHECKMEM=true)
 AC_ARG_ENABLE(debug,
@@ -19,6 +28,7 @@ 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],
+
 if test "x$enable_lame" = "xno";then
     DISABLE_LAME=yes
 fi,DISABLE_LAME=)
@@ -26,7 +36,6 @@ fi,DISABLE_LAME=)
 PACKAGE=swftools
 VERSION=2009-08-12-1514
 
-
 # ------------------------------------------------------------------
 
 if test "x${srcdir}" != "x."; then
@@ -34,9 +43,9 @@ if test "x${srcdir}" != "x."; then
     exit 1
 fi
 
-WARNINGS="-Wparentheses -Wimplicit -Wreturn-type"
+WARNINGS="-Wparentheses -Wimplicit -Wreturn-type -Wno-write-strings"
 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
@@ -49,11 +58,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"
@@ -273,11 +282,14 @@ RFX_CHECK_FREETYPE
 
 RFX_CHECK_FONTCONFIG
 
-RFX_CHECK_OPENGL
-if test "$HAVE_OPENGL";then
-    DEVICE_OPENGL='devices/opengl.$(O)'
-    AC_SUBST(DEVICE_OPENGL)
-fi
+RFX_CHECK_FFTW
+
+# RFX_CHECK_OPENGL
+# if test "$HAVE_OPENGL";then
+#     DEVICE_OPENGL='devices/opengl.$(O)'
+#     AC_SUBST(DEVICE_OPENGL)
+# fi
+AC_SUBST(DEVICE_OPENGL)
 
 lame_in_source= 
 lame_makefile=
@@ -308,8 +320,6 @@ else
 fi
 AC_SUBST(lame_in_source)
 
-AC_DEFINE([INTERNAL_LIBART], [1], [use internal libart library])
-art_in_source='$(art_objects)'
 splash_in_source='$(splash_objects)'
 xpdf_in_source='$(xpdf_objects)'
 
@@ -331,7 +341,6 @@ dnl         LIBS="$LIBS $POPPLER_LIBS"
 dnl     fi
 dnl fi
 
-AC_SUBST([art_in_source])
 AC_SUBST([xpdf_in_source])
 AC_SUBST([splash_in_source])
 
@@ -457,7 +466,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=