Update to 2.0.0 tree from current Fremantle build
[opencv] / configure.in
index 82ccfb6..5fbabbb 100644 (file)
@@ -1,8 +1,8 @@
 # Process this file with autoconf to produce a configure script.
 
 # Set various version strings
-m4_define([opencv_major_version],    [1])
-m4_define([opencv_minor_version],    [1])
+m4_define([opencv_major_version],    [2])
+m4_define([opencv_minor_version],    [0])
 m4_define([opencv_subminor_version], [0])
 m4_define([opencv_version],          [opencv_major_version.opencv_minor_version.opencv_subminor_version])
 
@@ -30,17 +30,18 @@ m4_define([opencv_version],          [opencv_major_version.opencv_minor_version.
 # This is an abuse that only fosters misunderstanding of the purpose of library versions. Instead,
 # use the -release flag (see Release numbers), but be warned that every release of your package will
 # not be binary compatible with any other release.
-m4_define([opencv_lt_version],       [2:0:0])
+m4_define([opencv_lt_version], [4:0:0])
 
 # init autotools
-AC_PREREQ(2.60)
+# we need autoconf >= 2.62 beause of several macros in there
+AC_PREREQ(2.63)
 AC_INIT([opencv],[opencv_version],[opencvlibrary-devel@lists.sourceforge.net])
 AC_CONFIG_SRCDIR([opencv.pc.in])
 AC_CONFIG_AUX_DIR([autotools])
 AC_CONFIG_MACRO_DIR([autotools/aclocal])
 
 # put CVS revision of this configure.in into the resulting configure script
-AC_REVISION($Revision: 1.58 $)
+AC_REVISION($Revision: 1.60 $)
 
 # Detect the canonical host and target build environment
 AC_CANONICAL_HOST
@@ -52,7 +53,7 @@ AC_CONFIG_HEADERS([cvconfig.h])
 AM_INIT_AUTOMAKE([1.9])
 AC_PROG_MAKE_SET
 
-# use 'gly maintainer-mode flag to help CVS users that do not want to
+# use ugly maintainer-mode flag to help CVS users that do not want to
 # help developing OpenCV but just need to compile the latest version
 # AM_MAINTAINER_MODE
 
@@ -68,13 +69,15 @@ AC_SUBST(LT_VERSION, [opencv_lt_version])
 AC_DISABLE_STATIC
 AC_LIBTOOL_WIN32_DLL
 
+# Do compilation tests using CXX and CXXCPP and use extension .C for test programs. 
+# Use compilation flags: CPPFLAGS with CXXCPP, and both CPPFLAGS and CXXFLAGS with CXX. 
+AC_LANG(C++)
+
 # checks for programs.
+AC_PROG_CXXCPP
 AC_PROG_CXX
-AC_PROG_CC
-AC_PROG_CPP
 AC_PROG_LIBTOOL
-# AC_SUBST(LD)
-# AC_SUBST(CXXLD)
+
 
 ######################################################################
 # the following interpret 'with' and 'enable' switches.
@@ -84,8 +87,20 @@ AC_PROG_LIBTOOL
 # does the user want aggressive optimization?
 AC_ARG_ENABLE([debug],
               [AS_HELP_STRING([--enable-debug],[build debug version without optimization [no]])],
-              [debug=$enableval],
-              [debug=no])
+              [enable_debug=$enableval],
+              [enable_debug=no])
+
+# does the user want to have automatic guess of suitable optimization options
+AC_ARG_ENABLE([optimization],
+              [AS_HELP_STRING([--enable-optimization],[automatic guess of suitable optimization options [yes]])],
+              [enable_optimization=$enableval],
+              [enable_optimization=yes])
+
+# does the user want to have SSE / SSE2 / SSE3 specified?
+AC_ARG_ENABLE([sse],
+              [AS_HELP_STRING([--enable-sse],[enable SSE(2) intrinsics [automatic]])],
+              [enable_sse=$enableval],
+              [enable_sse=auto])
 
 # does the user want to build demo applications?
 AC_ARG_ENABLE([apps],
@@ -102,6 +117,20 @@ AM_CONDITIONAL([BUILD_APPS], [test x"$enable_apps" = x"yes"])
 # later code lines that tries to do sensible decisions on what to use
 
 # does the user want to compile python modules as well?
+AC_ARG_WITH([native-lapack],
+            [AS_HELP_STRING([--with-native-lapack],[use platform native BLAS and LAPACK [no]])],
+            [with_native_lapack=$withval],
+            [with_native_lapack=no])
+
+# compile and link against OpenMP
+# because of this: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28482
+# we disable OpenMP by default. But one may enable it explicitly with --with-openmp
+#AC_ARG_WITH([openmp],
+#            [AS_HELP_STRING([--with-openmp],[use OpenMP threading [no]])],
+#            [with_openmp=$withval],
+#            [with_openmp=no])
+
+# does the user want to compile python modules as well?
 AC_ARG_WITH([swig],
             [AS_HELP_STRING([--with-swig],[use swig wrapper generator [no]])],
             [with_swig=$withval],
@@ -187,83 +216,129 @@ AC_ARG_WITH([gthread],
 
 
 ######################################################################
-# getting the code to compile
-
-# cure annoying default arguments for CFLAGS and CXXFLAGS
-# that autoconf automatically sets in GNU environments if
-# no CFLAGS or CXXFLAGS were manually given
-if test x"$CFLAGS" = "x-g -O2" ; then
-    CFLAGS=""
-fi
-if test x"$CXXFLAGS" = "x-g -O2" ; then
-    CXXFLAGS=""
+# Compiler options
+
+# OpenMP support
+# macro calls AC_SUBST(OPENMP_CXXFLAGS)
+# and brings its own enable/disable switch ("--disable-openmp")
+# AC_OPENMP
+
+# SSE/SSE2/SSE3 support
+if test x"$enable_sse" = "xauto"; then
+  # This macro calls:
+  #   AC_SUBST(SIMD_FLAGS)
+  # And defines:
+  #   HAVE_MMX / HAVE_SSE / HAVE_SSE2 / HAVE_SSE3 / HAVE_SSSE3
+  AX_EXT
+else
+  if test x"$enable_sse" = "xyes"; then
+    AC_DEFINE(HAVE_MMX,,[Support mmx instructions])
+    AC_DEFINE(HAVE_SSE,,[Support SSE (Streaming SIMD Extensions) instructions])
+    AC_DEFINE(HAVE_SSE2,,[Support SSE2 (Streaming SIMD Extensions 2) instructions])
+    #AC_DEFINE(HAVE_SSE3,,[Support SSE3 (Streaming SIMD Extensions 3) instructions])
+    #AC_DEFINE(HAVE_SSSE3,,[Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions])
+    
+    SIMD_FLAGS=" -mmmx -msse -msse2"
+    AC_SUBST(SIMD_FLAGS)
+  fi
 fi
 
-# set the default c++ flags for all the compilations
-# we don't append CXXFLAGS, because it's done at compile time
-# see http://www.gnu.org/software/libtool/manual/automake/Flag-Variables-Ordering.html
-# for more information
-DEFAULT_CXXFLAGS=""
-
-# see if the user wants aggressive optimizations of the code,
-# check whether to include debugging code
-AC_MSG_CHECKING([whether to build debug version (no optimization)])
-if test x"$debug" = "xyes"; then
-    AC_MSG_RESULT([yes])
-    if test x"$ac_cv_c_compiler_gnu" = "xyes"; then
-        CPPFLAGS="-DDEBUG -D_DEBUG $CPPFLAGS"
-        DEFAULT_CXXFLAGS="-ggdb -O0 $DEFAULT_CXXFLAGS"
-    fi
+
+## check whether to include debugging compiler flags
+AC_MSG_CHECKING([whether to build debug version])
+DEBUG_CPPFLAGS=""
+DEBUG_CXXFLAGS=""
+if test x"$enable_debug" = "xyes"; then
+  AC_MSG_RESULT([yes])
+  
+  if test x"$ac_cv_c_compiler_gnu" = "xyes"; then
+    DEBUG_CXXFLAGS="-ggdb"
+  fi
+  
+  DEBUG_CPPFLAGS="-DDEBUG -D_DEBUG"
 else
-    AC_MSG_RESULT([no])
-    AC_MSG_NOTICE( TARGET=$target )
-    case $target in
-    i*86-apple-*)
-        if test x"$ac_cv_c_compiler_gnu" = "xyes"; then
-            # apples g++ fails with '-march=i686' and there are no apple machines older than prescott/core anyway
-            DEFAULT_CXXFLAGS="-g -march=prescott -ffast-math -fomit-frame-pointer $DEFAULT_CXXFLAGS"
-        fi
-        ;;
-    i686-*-*)
-        if test x"$ac_cv_c_compiler_gnu" = "xyes"; then
-          # default to i686/pentiumpro -- people can override this
-          DEFAULT_CXXFLAGS="-g -march=i686 -ffast-math -fomit-frame-pointer $DEFAULT_CXXFLAGS"
-        fi
-        ;;
+  AC_MSG_RESULT([no])
+fi
+AC_SUBST(DEBUG_CPPFLAGS)
+AC_SUBST(DEBUG_CXXFLAGS)
+
+
+## see if the user wants aggressive optimizations of the code
+AC_MSG_CHECKING([whether to enable aggressive optimization flags])
+OPTIMIZATION_CPPFLAGS=""
+OPTIMIZATION_CXXFLAGS=""
+FLOAT_STORE_CFLAGS=""
+if test x"$enable_optimization" = "xyes"; then
+  AC_MSG_RESULT([yes])
+  
+  # cure annoying default arguments for CFLAGS and CXXFLAGS
+  # that autoconf automatically sets in GNU environments if
+  # no CFLAGS or CXXFLAGS were manually given
+  #
+  # this is a more or less a hack ...
+  if test x"$CFLAGS" = x"-g -O2" ; then
+    CFLAGS=""
+  fi
+  if test x"$CXXFLAGS" = x"-g -O2" ; then
+    CXXFLAGS=""
+  fi
+  
+  if test x"$ac_cv_c_compiler_gnu" = "xyes"; then
+    
+    # special flag for gcc to work around excess precision bug in cLapack
+    FLOAT_STORE_CFLAGS="-ffloat-store"
+
+    # Due to a misconception, until SVN revision r1713, the case statement
+    # used the value of '--target', not of '--host'
+    case $host in
+    i386-apple-*)
+      # all intel macs have at least prescott instruction set
+      OPTIMIZATION_CXXFLAGS="-fast -g"
+      ;;
+    x86_64-apple-*)
+      # all 64bit intel macs have at least nocona instruction set
+      OPTIMIZATION_CXXFLAGS="-fast -g -march=nocona"
+      ;;
+    i?86-*-*)
+      # okay, we use this default together with the specification of the target architecture
+      # let us just assume, a Pentium 4 would be the minimum platform for OpenCV,
+      # then SSE2 instruction set is available also
+      OPTIMIZATION_CXXFLAGS="-O3 -g -march=pentium4 -ffast-math -fomit-frame-pointer"
+      ;;
+    amd64-*-* | x86_64-*-*)
+      OPTIMIZATION_CXXFLAGS="-O3 -g -march=x86-64 -ffast-math -fomit-frame-pointer"
+      ;;
+    powerpc-apple-*)
+      # Mac OS X 10.4 runs on CPUs >= G4 only
+      OPTIMIZATION_CXXFLAGS="-O3 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -falign-loops=16 -falign-jumps=16 -falign-functions=16 -ffast-math -fstrict-aliasing -funroll-loops -ftree-loop-linear -ftree-loop-memset -mcpu=G4 -mpowerpc-gpopt -mtune=G5 -fsched-interblock -fgcse-sm -g"
+      ;;
+    powerpc64-apple-*)
+      # There are no 64bit Macs with a CPU that's not a G5
+      OPTIMIZATION_CXXFLAGS="-O3 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -falign-loops=16 -falign-jumps=16 -falign-functions=16 -ffast-math -fstrict-aliasing -funroll-loops -ftree-loop-linear -ftree-loop-memset -mcpu=G5 -mpowerpc-gpopt -fsched-interblock -fgcse-sm -m64 -g"
+      ;;
     powerpc-*-*)
-        if test x"$ac_cv_c_compiler_gnu" = "xyes"; then
-            # default to G3 processors -- people can override this
-            DEFAULT_CXXFLAGS="-g -mcpu=G3 -mtune=G5 -fomit-frame-pointer $DEFAULT_CXXFLAGS"
-        fi
-        ;;
+      # generic PowerPCs don't have Apple's 'fast' or 'fastf' switch
+      OPTIMIZATION_CXXFLAGS="-O3 -g -mcpu=G3 -mtune=G4 -fomit-frame-pointer"
+      ;;
     *-*-*)
-        if test x"$ac_cv_c_compiler_gnu" = "xyes"; then
-            DEFAULT_CXXFLAGS="-fomit-frame-pointer $DEFAULT_CXXFLAGS"
-        fi
-        ;;
+      OPTIMIZATION_CXXFLAGS="-O2 -fomit-frame-pointer"
+      ;;
     esac
-
-    CPPFLAGS="-DNDEBUG $CPPFLAGS"
-    DEFAULT_CXXFLAGS="-O3 $DEFAULT_CXXFLAGS"
-fi
-
-if test x"$ac_cv_c_compiler_gnu" = "xyes"; then
-    PY_CXXFLAGS="-Wall -pipe $DEFAULT_CXXFLAGS"
-    OCT_CXXFLAGS="-fno-strict-aliasing -Wall -Wno-uninitialized -pipe $DEFAULT_CXXFLAGS"
-    DEF_CXXFLAGS="-Wall -fno-rtti -pipe $DEFAULT_CXXFLAGS"
+  fi
+  
+  OPTIMIZATION_CPPFLAGS="-DNDEBUG"
 else
-    PY_CXXFLAGS="$DEFAULT_CXXFLAGS"
-    OCT_CXXFLAGS="$DEFAULT_CXXFLAGS"
-    DEF_CXXFLAGS="$DEFAULT_CXXFLAGS"
+  AC_MSG_RESULT([no])
 fi
-AC_SUBST(PY_CXXFLAGS)
-AC_SUBST(OCT_CXXFLAGS)
-AC_SUBST(DEF_CXXFLAGS)
+AC_SUBST(OPTIMIZATION_CPPFLAGS)
+AC_SUBST(OPTIMIZATION_CXXFLAGS)
+AC_SUBST(FLOAT_STORE_CFLAGS)
 
-# add libm because it is used by several libraries and OpenCV itself
+# basic libraries needed by OpenCV
 AC_CHECK_LIB(m,pow)
 AC_CHECK_LIB(dl,dlopen)
 AC_CHECK_LIB(pthread,pthread_create)
+AC_CHECK_LIB(z,gzputs)
 
 # check endianness
 AC_C_BIGENDIAN
@@ -274,6 +349,33 @@ AC_FUNC_ALLOCA
 AC_CHECK_HEADERS([malloc.h])
 AC_CHECK_HEADERS([assert.h])
 AC_CHECK_FUNCS(lrint)
+AC_SEARCH_LIBS([clock_gettime],[rt])
+
+######################################################################
+# BLAS and LAPACK
+
+LAPACK_LIBS=""
+have_native_lapack=no
+if test x"$with_native_lapack" = "xyes"; then
+  # check for Accellerate framework on Mac OS X
+  # 
+  # As of Mac OS X 10.5 blas and lapack exist as standard shared 
+  # libraries, so this check could be replaced by separate checks for
+  # those two libraries as it may be helpful for Linux/Unix variants
+  # as well.
+  AC_CHECK_HEADER([vecLib/clapack.h],
+                [
+                  AC_DEFINE(HAVE_VECLIB,,[BLAS and LAPACK from Accelerate/vecLib framework])
+                  LAPACK_LIBS="-Xlinker -framework -Xlinker vecLib"
+                  have_native_lapack=yes
+                ],
+                [
+                  have_native_lapack=no
+                ])
+fi
+
+AC_SUBST(LAPACK_LIBS)
+AM_CONDITIONAL([NATIVE_LAPACK], [test x"$have_native_lapack" = "xyes"])
 
 
 ######################################################################
@@ -338,17 +440,16 @@ else
 
         # pkg-config is needed for GTK+
         AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-        if test x"$PKG_CONFIG" == "xno"; then
-            AC_MSG_ERROR([You have to install pkg-config to compile OpenCV with GTK+])
+        if test x"$PKG_CONFIG" = x"no"; then
+            AC_MSG_WARN([You have to install pkg-config to compile OpenCV with GTK+])
+        else
+            PKG_CHECK_MODULES(GTK, "gtk+-2.0 gdk-pixbuf-2.0",
+                              [
+                                have_gtk=yes
+                                AC_DEFINE(HAVE_GTK,,[GTK+ 2.x toolkit])
+                              ],
+                              [ have_gtk=no ])
         fi
-
-        PKG_CHECK_MODULES(GTK, "gtk+-2.0 gdk-pixbuf-2.0",
-                          [
-                            have_gtk=yes
-                            AC_DEFINE(HAVE_GTK,,[GTK+ 2.x toolkit])
-                          ],
-                          [ have_gtk=no ])
-
     else
         # if we get here then --with-gtk was not called with 'yes','no' or 'auto'
         AC_MSG_WARN([unexpected arguments for option --with-gtk, continuing assuming 'no'])
@@ -545,25 +646,34 @@ if test x"$with_ffmpeg" = "xno"; then
     have_ffmpeg=no
     # FFMPEGLIBS=""
 else
-
+    
+    have_ffmpeg=no
+    have_avcodec=no
+    have_avformat=no
+    
     # check if ./configure arguments are valid
     if test x"$with_ffmpeg" = "xauto"; then
        with_ffmpeg=yes
     fi
+    
     if test x"$with_ffmpeg" = "xyes"; then
-        AC_CHECK_HEADER(ffmpeg/avcodec.h,
-                        AC_SEARCH_LIBS([avcodec_decode_video],[avcodec_pic avcodec],                                      [
-                                       AC_SEARCH_LIBS([av_open_input_file], [avformat_pic avformat],
-                                                    [
-                                                      have_ffmpeg=yes
-                                                      AC_DEFINE(HAVE_FFMPEG,,[FFMpeg video library])
-                                                      FFMPEGLIBS="-lavcodec -lavformat"
-                                                    ],
-                                                    [ have_ffmpeg=no ],
-                                                    [-lavcodec])
-                                     ],
-                                     [ have_ffmpeg=no ]),
-                        [ have_ffmpeg=no ])
+        AC_CHECK_HEADERS([ffmpeg/avcodec.h libavcodec/avcodec.h],[have_avcodec=yes])
+        AC_CHECK_HEADERS([ffmpeg/avformat.h libavformat/avformat.h],[have_avformat=yes])
+        
+        if test x"$have_avcodec"x"$have_avformat" = "xyesxyes" ; then
+            AC_SEARCH_LIBS([avcodec_decode_video],[avcodec_pic avcodec],[
+                AC_SEARCH_LIBS([av_open_input_file], [avformat_pic avformat],[have_ffmpeg=yes],[],[-lavcodec])])
+        fi
+        
+        if test x"$have_ffmpeg" = "xyes" ; then
+            # libswscale is not always necessary, but if it is there, we want to use it
+            AC_CHECK_HEADERS([ffmpeg/swscale.h libswscale/swscale.h],[
+                AC_CHECK_LIB([swscale],[sws_getContext],[FFMPEG_SWSCALE_LIBS="-lswscale"
+                    AC_DEFINE(HAVE_FFMPEG_SWSCALE,,[FFMPEG helper library])])])
+            
+            AC_DEFINE(HAVE_FFMPEG,,[FFMPEG video library])
+            FFMPEGLIBS="-lavcodec -lavformat $FFMPEG_SWSCALE_LIBS"
+        fi
     else
         # if we get here then --with-ffmpeg was not called with 'yes','no' or 'auto'
         AC_MSG_WARN([unexpected arguments for option --with-ffmpeg, continuing assuming 'no'])
@@ -578,6 +688,7 @@ AM_CONDITIONAL([BUILD_FFMPEG], [test x"$have_ffmpeg" = "xyes"])
 if test x"$with_1394libs" = "xno"; then
     have_raw1394=no
     have_dc1394=no
+    have_dc1394_2=no
     # IEEE1394LIBS=""
 else
 
@@ -590,24 +701,35 @@ else
         SAVELIBS="$LIBS"
         have_raw1394=no
         have_dc1394=no
+        have_dc1394_2=no
 
         AC_CHECK_HEADER(libraw1394/raw1394.h,
                         AC_CHECK_LIB(raw1394, raw1394_new_handle,
                                      [
                                        have_raw1394=yes
-                                       LIBS="-lm -lraw1394 $LIBS"
+                                       LIBS="-lraw1394 $LIBS"
                                      ]))
 
         if test x"$have_raw1394" = "xyes"; then
-            AC_CHECK_HEADER(libdc1394/dc1394_control.h,
-                            AC_CHECK_LIB(dc1394_control, dc1394_camera_on,
+            AC_CHECK_HEADER(dc1394/dc1394.h,
+                            AC_CHECK_LIB(dc1394, dc1394_camera_enumerate,
                                          [
-                                           have_dc1394=yes
-                                           AC_DEFINE(HAVE_DC1394,,[IEEE1394 capturing support])
-                                           AC_EGREP_HEADER(do_extra_buffering, libdc1394/dc1394_control.h,
-                                                           [AC_DEFINE(HAVE_DC1394_095,,[libdc1394 0.9.4 or 0.9.5])])
-                                           IEEE1394LIBS="-lm -lraw1394 -ldc1394_control"
+                                           have_dc1394_2=yes
+                                           AC_DEFINE(HAVE_DC1394_2,,[IEEE1394 capturing support])
+                                           IEEE1394LIBS="-lraw1394 -ldc1394"
                                          ]))
+            
+            if test x"$have_dc1394_2" = "xno"; then
+                AC_CHECK_HEADER(libdc1394/dc1394_control.h,
+                                AC_CHECK_LIB(dc1394_control, dc1394_camera_on,
+                                             [
+                                               have_dc1394=yes
+                                               AC_DEFINE(HAVE_DC1394,,[IEEE1394 capturing support])
+                                               AC_EGREP_HEADER(do_extra_buffering, libdc1394/dc1394_control.h,
+                                                               [AC_DEFINE(HAVE_DC1394_095,,[libdc1394 0.9.4 or 0.9.5])])
+                                               IEEE1394LIBS="-lraw1394 -ldc1394_control"
+                                             ]))
+            fi
         fi
 
         LIBS="$SAVELIBS"
@@ -619,6 +741,7 @@ else
 fi
 AC_SUBST(IEEE1394LIBS)
 AM_CONDITIONAL([BUILD_DC1394], [test x"$have_dc1394" = "xyes"])
+AM_CONDITIONAL([BUILD_DC1394_2], [test x"$have_dc1394_2" = "xyes"])
 
 # Video for Linux (V4L)
 # we support version 1 and 2 currently
@@ -712,8 +835,8 @@ if test x"$have_imageio" = "xno" ; then
                                [
                                  have_zlib=yes
                                  AC_DEFINE(HAVE_ZLIB,,[LZ77 compression/decompression library (used for PNG)])
-                                 IMAGELIBS="$IMAGELIBS -lz -lm"
-                                 LIBS="$LIBS -lz -lm"
+                                 IMAGELIBS="$IMAGELIBS -lz"
+                                 LIBS="$LIBS -lz"
                                ]))
 
   AC_CHECK_HEADER(png.h,
@@ -874,7 +997,7 @@ if test x"$with_octave" = "xyes"; then
           AC_MSG_WARN([Octave headers not found, disabling octave wrappers])
           have_octave=no
         ])
-
+    
     # restore the old CPPFLAGS
     CPPFLAGS=$OLD_CPPFLAGS
 
@@ -923,7 +1046,7 @@ EOF
           $SWIG -c++ -octave conftest.i || AC_MSG_ERROR(SWIG doesn't support Octave modules)
           AC_MSG_RESULT([yes])
           rm -f conftest.*
-    
+
         # specify the flags for swig
         AC_SUBST([SWIG_OCTAVE_OPT], "-octave")
 
@@ -955,46 +1078,16 @@ else
 fi
 AM_CONDITIONAL([UPDATE_SWIG_WRAPPERS], [test x"$have_swig" = "xyes"])
 
-
-######################################################################
-# Parallelization
-#
-#CXXOPENMP="no"
-#
-#AC_ARG_WITH(openmp, dnl
-#  [--with-openmp=COMPILER  use OpenMP supporting compiler [default=no] ],
-#    [CXXOPENMP="$withval"],[CXXOPENMP="no"])
-#if test "$CXXOPENMP" = "no"; then
-#    CXXOPENMP="$CXX"
-#fi
-#
-#AC_SUBST(CXXOPENMP)
-
 AC_SUBST(DEBUG)
 
 AC_CONFIG_FILES([Makefile
 opencv.pc
 opencv.spec
-docs/Makefile
 data/Makefile
-cxcore/Makefile
-cxcore/include/Makefile
-cxcore/src/Makefile
-cv/Makefile
-cv/include/Makefile
-cv/src/Makefile
-cvaux/Makefile
-cvaux/include/Makefile
-cvaux/src/Makefile
-ml/Makefile
-ml/include/Makefile
-ml/src/Makefile
-otherlibs/Makefile
-otherlibs/highgui/Makefile
+include/Makefile
+3rdparty/Makefile
+src/Makefile
 apps/Makefile
-apps/haartraining/Makefile
-apps/haartraining/include/Makefile
-apps/haartraining/src/Makefile
 interfaces/Makefile
 interfaces/swig/Makefile
 interfaces/swig/filtered/Makefile
@@ -1002,32 +1095,29 @@ interfaces/swig/general/Makefile
 interfaces/swig/python/Makefile
 interfaces/swig/octave/Makefile
 tests/Makefile
-tests/python/Makefile
-tests/octave/Makefile
-tests/cv/Makefile
-tests/cv/src/Makefile
-tests/cxts/Makefile
-tests/cxcore/Makefile
-tests/cxcore/src/Makefile
 utils/Makefile
 samples/Makefile
-samples/c/Makefile
-samples/python/Makefile
-samples/octave/Makefile
 ])
 
 AC_OUTPUT
 
 AC_MSG_RESULT([
 General configuration ================================================
-    Compiler:                 ${CXX}
+
+    CXX:                      ${CXX}
+    CXXCPP:                   ${CXXCPP}
+    CPPFLAGS:                 ${CPPFLAGS}
     CXXFLAGS:                 ${CXXFLAGS}
-    DEF_CXXFLAGS:             ${DEF_CXXFLAGS}
-    PY_CXXFLAGS:              ${PY_CXXFLAGS}
-    OCT_CXXFLAGS:             ${OCT_CXXFLAGS}
+    LDFLAGS:                  ${LDFLAGS}
 
     Install path:             ${prefix}
 
+    Debug flags               ${DEBUG_CPPFLAGS} ${DEBUG_CXXFLAGS}
+    Optimization flags        ${OPTIMIZATION_CPPFLAGS} ${OPTIMIZATION_CXXFLAGS}
+    MMX/SSE/SSE2/SSE3:        ${SIMD_FLAGS}
+    OpenMP support:           ${OPENMP_CXXFLAGS}
+    External BLAS & LAPACK:   ${have_native_lapack}
+
 HighGUI configuration ================================================
 
     Windowing system --------------
@@ -1042,7 +1132,7 @@ HighGUI configuration ================================================
     Use libpng:               ${have_png}
     Use libtiff:              ${have_tiff}
     Use libjasper:            ${have_jasper}
-    Use libIlmImf:            ${have_ilmimf}
+    Use libIlmImf/OpenEXR:    ${have_ilmimf}
 
     Video I/O ---------------------
     Use QuickTime / Mac OS X: ${have_quicktime}
@@ -1050,16 +1140,19 @@ HighGUI configuration ================================================
     Use gstreamer:            ${have_gstreamer}
     Use ffmpeg:               ${have_ffmpeg}
     Use dc1394 & raw1394:     ${have_dc1394}
+    Use dc1394_v2 & raw1394:  ${have_dc1394_2}
     Use v4l:                  ${have_v4l}
     Use v4l2:                 ${have_v4l2}
     Use unicap:               ${have_unicap}
 
 Wrappers for other languages =========================================
+
     SWIG                      ${SWIG}
     Python                    ${have_python}
     Octave                    ${have_octave}
 
 Additional build settings ============================================
+
     Build demo apps           ${enable_apps}
 
 Now run make ...