Generated from configure.in
[swftools.git] / configure
index 778079c..60f427e 100755 (executable)
--- a/configure
+++ b/configure
@@ -468,7 +468,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP RANLIB ac_ct_RANLIB SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S ECHO STRIP ac_ct_STRIP EGREP LIBTOOL UNCOMPRESS AR SLEXT target target_cpu target_vendor target_os WORDS_BIGENDIAN SYSTEM_BACKTICKS PACKAGE VERSION HAVE_UNISTD_H FREETYPE_CONFIG lame_objects AVIFILE_CONFIG USE_GZIP PYTHON_LIB PYTHON_INCLUDES JPEG2SWF PNG2SWF LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP RANLIB ac_ct_RANLIB SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S ECHO STRIP ac_ct_STRIP EGREP LIBTOOL UNCOMPRESS AR SLEXT target target_cpu target_vendor target_os WORDS_BIGENDIAN SYSTEM_BACKTICKS PACKAGE VERSION HAVE_UNISTD_H FREETYPE_CONFIG lame_objects AVIFILE_CONFIG VIDEO_LIBS VIDEO_CFLAGS USE_GZIP PYTHON_LIB PYTHON_INCLUDES JPEG2SWF PNG2SWF LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -10103,7 +10103,7 @@ done
 
 OLDCPPFLAGS="${CPPFLAGS}"
 OLDLIBS="${LIBS}"
-if test "x${FREETYPE_CONFIG}" != "x"; then
+if test "x${FREETYPE_CONFIG}" '!=' "x"; then
     CPPFLAGS="$CPPFLAGS "`freetype-config --cflags`
 else if test -d /usr/include/freetype2; then
     CPPFLAGS="$CPPFLAGS -I/usr/include/freetype2"
 done
 
 
-if test "x${HAVE_LIB_FREETYPE}" != "x";then
-if test "x${HAVE_FREETYPE_FREETYPE_H}" != "x";then
-    HAVE_FREETYPE=1
-fi
+if test "x${HAVE_LIB_FREETYPE}" '!=' "x";then
+    if test "x${HAVE_FREETYPE_FREETYPE_H}" '!=' "x";then
+       HAVE_FREETYPE=1
+    fi
+    if test "x${HAVE_FT2BUILD_H}" '!=' "x";then
+       HAVE_FREETYPE=1
+    fi
 fi
 
 if test "x${HAVE_FREETYPE}" = "x1"; then
-    if test "x{$FREETYPE_CONFIG}" != "x"; then
+    if test "x{$FREETYPE_CONFIG}" '!=' "x"; then
        LIBS="$LIBS "`freetype-config --libs`
     else
        LIBS="$LIBS -lfreetype"
@@ -10581,7 +10584,7 @@ echo "${ECHO_T}no" >&6
 fi
 
 # if the above didn't work out, reset all changes to the compiler variables.
-if test "x${HAVE_FREETYPE}" "!=" "x1"; then
+if test "x${HAVE_FREETYPE}" '!=' "x1"; then
     CPPFLAGS=$OLDCPPFLAGS
     LIBS=$OLDLIBS
 fi
@@ -10825,6 +10828,12 @@ if test "x${HAVE_FONTCONFIG}" = "x1"; then
 echo "$as_me:$LINENO: checking whether we can compile the fontconfig test program" >&5
 echo $ECHO_N "checking whether we can compile the fontconfig test program... $ECHO_C" >&6
 
+if (echo $LIBS | grep lfreetype >/dev/null 2>&1); then
+    #move freetype library to the end of libraries, otherwise fontconfig
+    #won't compile.
+    LIBS=`echo $LIBS | sed -e 's/-lfreetype//g' -e 's/$/ -lfreetype/'`
+fi
+
 cat > conftest.c << EOF
 #include <fontconfig.h>
 
@@ -11180,9 +11189,8 @@ done
 
 if test "x$AVIFILE_CONFIG" '!=' "x";then
     OLDCPPFLAGS="$CPPFLAGS"
-    #OLDLDFLAGS="$LDFLAGS"
+    # temporarily add avifile paths to CPPFLAGS...
     CPPFLAGS="$CPPFLAGS $CXXFLAGS "`$AVIFILE_CONFIG --cflags`
-    #LDFLAGS="$LDFLAGS `$AVIFILE_CONFIG --libs`"
 
 
 for ac_header in avifile/version.h version.h
@@ -11334,7 +11342,7 @@ fi
 
 done
 
-    #LDFLAGS="$OLDLDFLAGS"
+    # ... and reset
     CPPFLAGS="$OLDCPPFLAGS"
 fi
 
@@ -11429,8 +11437,10 @@ int main (int argc, char*argv)
 EOF
 
 if test "x$AVIFILE_CONFIG" '!=' "x";then
-    ac_link='$CXX $CPPFLAGS $CXXFLAGS `$AVIFILE_CONFIG --cflags` conftest.cpp `$AVIFILE_CONFIG --libs` -o conftest${ac_exeext}'
-    if { (eval echo avi2swf.m4:71: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && ./conftest${ac_exeext}; then
+    AVIFILE_LIBS=`$AVIFILE_CONFIG --libs`
+    AVIFILE_CFLAGS=`$AVIFILE_CONFIG --cflags`
+    avifile_link='$CXX $CPPFLAGS $CXXFLAGS $AVIFILE_CFLAGS conftest.cpp $AVIFILE_LIBS -o conftest${ac_exeext}'
+    if { (eval echo avi2swf.m4:71: \"$avifile_link\") 1>&5; (eval $avifile_link) 2>&5; } && test -s conftest${ac_exeext} && ./conftest${ac_exeext}; then
       echo "$as_me:$LINENO: result: yes" >&5
 echo "${ECHO_T}yes" >&6
       AVIFILE=true
@@ -11451,6 +11461,25 @@ echo "${ECHO_T}no" >&6
 fi
 rm -f conftest*
 
+if test "x${AVIFILE}" = "xtrue"; then
+    VIDEO_LIBS="$VIDEO_LIBS $AVIFILE_LIBS"
+    VIDEO_CFLAGS="$VIDEO_CFLAGS $AVIFILE_CFLAGS"
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_AVIFILE 1
+_ACEOF
+
+fi
+
+if test "x${WIN32}" != "x"; then
+    #AC_CHECK_LIB(vfw32, AVIFileInit,VFW32=true)
+    #if test "x${VFW32}" != "x"; then
+    #  VIDEO_LIBS="$VIDEO_LIBS -lvfw32"
+    #fi
+    VIDEO_LIBS="$VIDEO_LIBS -lvfw32"
+    VFW32=true
+fi
+
+
 
 # ------------------------------------------------------------------
 
@@ -11499,9 +11528,11 @@ echo $ECHO_N "checking whether we can compile the python test program... $ECHO_C
 
 int main(int argn, char*argv)
 {
-    return Py_Main(argn, argv);
+    int ret;
+    ret = Py_Main(argn, argv);
+    int x; // check also for gcc 2.95.x incompatibilities
+    return ret;
 }
-bli bla blo
 EOF
     ac_link='$CC $CPPFLAGS $CFLAGS $PYTHON_INCLUDES conftest.c $LDFLAGS $PYTHON_LIB $LIBS -o conftest${ac_exeext}'
     if { (eval echo python.m4: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
@@ -11547,24 +11578,24 @@ if test "x$T1LIBMISSING" = "xtrue";then
     MISSINGLIBS="${MISSINGLIBS} t1lib"
 fi
 
-if test "x${ac_cv_header_jpeglib_h}" != "xyes"; then
+if test "x${ac_cv_header_jpeglib_h}" '!=' "xyes"; then
  DISABLEPDF2SWF=true;
  DISABLEJPEG2SWF=true;
  MISSINGLIBS="${MISSINGLIBS} jpeglib.h"
 fi
-if test "x$HAVE_FREETYPE" != "x1"; then
+if test "x$HAVE_FREETYPE" '!=' "x1"; then
  DISABLEPDF2SWF=true;
  MISSINGLIBS="${MISSINGLIBS} freetype"
 fi
-if test "x${ac_cv_header_t1lib_h}" != "xyes"; then
+if test "x${ac_cv_header_t1lib_h}" '!=' "xyes"; then
  DISABLEPDF2SWF=true;
  MISSINGLIBS="${MISSINGLIBS} t1lib.h"
 fi
-if test "x${ac_cv_header_zlib_h}" != "xyes"; then
+if test "x${ac_cv_header_zlib_h}" '!=' "xyes"; then
  DISABLEPNG2SWF=true;
  MISSINGLIBS="${MISSINGLIBS} zlib.h"
 fi
-if test "x${AVIFILE}" != "xtrue"; then
+if test "x${AVIFILE}" '!=' "xtrue" -a "x${VFW32}" '!=' "xtrue"; then
  MISSINGLIBS="${MISSINGLIBS} avifile"
 fi
 
@@ -11579,7 +11610,7 @@ if test "x${MISSINGLIBS}" '!=' "x"; then
 fi
 
 avi2swf="avi2swf/Makefile"
-if test "x${AVIFILE}" != "xtrue"; then
+if test "x${AVIFILE}" '!=' "xtrue" -a "x${VFW32}" '!=' "xtrue"; then
  echo "* Disabling avi2swf tool..."
  echo all install uninstall clean: > avi2swf/Makefile
  avi2swf=
@@ -11621,7 +11652,8 @@ fi
 
 # ------------------------------------------------------------------
 
-FILES="./release Makefile.common ${avi2swf} Makefile lib/Makefile lib/action/Makefile src/Makefile ${pdf2swf_makefile} swfs/Makefile ${pythonrfxswf} ${lame_makefile}"
+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}"
 
           ac_config_files="$ac_config_files ${FILES}"
 
@@ -12282,6 +12314,8 @@ s,@HAVE_UNISTD_H@,$HAVE_UNISTD_H,;t t
 s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
 s,@lame_objects@,$lame_objects,;t t
 s,@AVIFILE_CONFIG@,$AVIFILE_CONFIG,;t t
+s,@VIDEO_LIBS@,$VIDEO_LIBS,;t t
+s,@VIDEO_CFLAGS@,$VIDEO_CFLAGS,;t t
 s,@USE_GZIP@,$USE_GZIP,;t t
 s,@PYTHON_LIB@,$PYTHON_LIB,;t t
 s,@PYTHON_INCLUDES@,$PYTHON_INCLUDES,;t t