]> git.saurik.com Git - wxWidgets.git/blobdiff - configure
[wxGTK2] Plug memory leak in wxFontEnumerator::EnumerateFacenames()
[wxWidgets.git] / configure
index cf13c77855f970470fb2b35fc430a2931b761524..6331bb8866f4a916012f028f8f426b6ee66cd652 100755 (executable)
--- a/configure
+++ b/configure
@@ -1029,9 +1029,10 @@ Optional Features:
   --enable-validators     use wxValidator and derived classes
   --enable-busyinfo       use wxBusyInfo
   --enable-joystick       use wxJoystick
-  --enable-metafiles      use wxMetaFile (Windows only)
+  --enable-metafiles      use wxMetaFile (Win32 only)
   --enable-dragimage      use wxDragImage
   --enable-accessibility  enable accessibility support
+  --enable-dccache        cache temporary wxDC objects (Win32 only)
   --enable-palette        use wxPalette class
   --enable-image          use wxImage class
   --enable-gif            use gif images (GIF file format)
@@ -1974,7 +1975,7 @@ _ACEOF
     DEFAULT_STD_FLAG=no
   ;;
 
-  powerpc-*-darwin* )
+  *-*-darwin* )
         USE_BSD=1
     USE_DARWIN=1
     SO_SUFFIX=dylib
@@ -10044,6 +10045,50 @@ echo "${ECHO_T}no" >&6
           fi
 
 
+if test "$wxUSE_MSW" = "1"; then
+
+         enablestring=
+          echo "$as_me:$LINENO: checking for --${enablestring:-enable}-dccache" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-dccache... $ECHO_C" >&6
+          no_cache=0
+          # Check whether --enable-dccache or --disable-dccache was given.
+if test "${enable_dccache+set}" = set; then
+  enableval="$enable_dccache"
+
+                          if test "$enableval" = yes; then
+                            ac_cv_use_dccache='wxUSE_DC_CACHEING=yes'
+                          else
+                            ac_cv_use_dccache='wxUSE_DC_CACHEING=no'
+                          fi
+
+else
+
+                          LINE=`grep "wxUSE_DC_CACHEING" ${wx_arg_cache_file}`
+                          if test "x$LINE" != x ; then
+                            eval "DEFAULT_$LINE"
+                          else
+                            no_cache=1
+                          fi
+
+                          ac_cv_use_dccache='wxUSE_DC_CACHEING='$DEFAULT_wxUSE_DC_CACHEING
+
+fi;
+
+          eval "$ac_cv_use_dccache"
+          if test "$no_cache" != 1; then
+            echo $ac_cv_use_dccache >> ${wx_arg_cache_file}.tmp
+          fi
+
+          if test "$wxUSE_DC_CACHEING" = yes; then
+            echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+          else
+            echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+          fi
+
+fi
+
 
 
          enablestring=
@@ -13218,7 +13263,7 @@ esac
 
 case "${host}" in
 
-                powerpc-*-darwin* )
+                *-*-darwin* )
         INSTALL_PROGRAM="cp -fp"
         INSTALL_DATA="cp -fp"
         ;;
@@ -13420,6 +13465,11 @@ _ACEOF
 
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  ;;
+esac
+
+case "${host}" in
+  *-*-darwin* )
     echo "$as_me:$LINENO: checking if CoreFoundation/CFBase.h is usable" >&5
 echo $ECHO_N "checking if CoreFoundation/CFBase.h is usable... $ECHO_C" >&6
     cat >conftest.$ac_ext <<_ACEOF
@@ -21241,6 +21291,10 @@ _ACEOF
 fi
 
 
+if test "x$SUNCXX" = xyes; then
+    CXXFLAGS="$CXXFLAGS -features=tmplife"
+fi
+
 if test "$wxUSE_STD_STRING" = "yes" -o "$wxUSE_STL" = "yes"; then
     ac_ext=cc
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -29934,7 +29988,7 @@ rm -f conftest.err conftest.$ac_objext \
         fi
       ;;
 
-      powerpc-*-darwin* )
+      *-*-darwin* )
         install_name_tool=`which install_name_tool`
         if test "$install_name_tool" -a -x "$install_name_tool"; then
             SAMPLES_RPATH_POSTLINK="\$(top_builddir)change-install-names \$(LIBDIRNAME) \$(prefix) \$@"
@@ -31144,10 +31198,72 @@ _ACEOF
 
     fi
 
-        if test "$USE_HPUX" = 1; then
+                    if test "$USE_HPUX" = 1 -a "$GCC" != "yes"; then
         CPPFLAGS="$CPPFLAGS -D_INCLUDE__STDC_A1_SOURCE "
     fi
 
+                echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+if test "${ac_cv_type_mbstate_t+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <wchar.h>
+
+int
+main ()
+{
+if ((mbstate_t *) 0)
+  return 0;
+if (sizeof (mbstate_t))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"                   || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_mbstate_t=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_mbstate_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
+echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
+if test $ac_cv_type_mbstate_t = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
 
 for ac_func in wcsrtombs
 do
@@ -31249,6 +31365,8 @@ _ACEOF
 fi
 done
 
+fi
+
 else
     { echo "$as_me:$LINENO: WARNING: Wide character support is unavailable" >&5
 echo "$as_me: WARNING: Wide character support is unavailable" >&2;}
@@ -31372,7 +31490,7 @@ if test "${wx_cv_func_vsnprintf_decl+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-            cat >conftest.$ac_ext <<_ACEOF
+                                                            cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -31381,6 +31499,12 @@ cat >>conftest.$ac_ext <<_ACEOF
 
                     #include <stdio.h>
                     #include <stdarg.h>
+                    #ifdef __MSL__
+                    #if __MSL__ >= 0x6000
+                    namespace std {}
+                    using namespace std;
+                    #endif
+                    #endif
 
 int
 main ()
@@ -31388,57 +31512,8 @@ main ()
 
                     char *buf;
                     va_list ap;
-                    vsnprintf(buf, 10u, "%s", ap);
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_cxx_werror_flag"                         || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  wx_cv_func_vsnprintf_decl=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-                                                                                                                        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-                            #include <stdio.h>
-                            #include <stdarg.h>
-                            using namespace std;
-
-int
-main ()
-{
-
-                            char *buf;
-                            va_list ap;
-                            vsnprintf(buf, 10u, "%s", ap);
+                    const char *fmt = "%s";
+                    vsnprintf(buf, 10u, fmt, ap);
 
   ;
   return 0;
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
 fi
 echo "$as_me:$LINENO: result: $wx_cv_func_vsnprintf_decl" >&5
 echo "${ECHO_T}$wx_cv_func_vsnprintf_decl" >&6
@@ -34602,8 +34673,8 @@ echo "$as_me: WARNING: BeOS threads are not yet supported... disabled" >&2;}
                                 THREAD_OPTS="pthreads"
                 ;;
           *-hp-hpux* )
-                                                                if test "x$GCC" != "xyes"; then
-                    THREAD_OPTS=""
+                if test "x$GCC" != "xyes"; then
+                                                                                THREAD_OPTS=""
                 fi
                 ;;
 
@@ -39464,6 +39535,15 @@ echo "$as_me: error: wxExpr and old-style resources are now available in contrib
 fi
 
 
+if test "$wxUSE_METAFILE" = "yes"; then
+    if test "$wxUSE_MSW" != 1 -a "$wxUSE_MAC" != 1 -a "$wxUSE_PM" != 1; then
+        { echo "$as_me:$LINENO: WARNING: wxMetafile is not available on this system... disabled" >&5
+echo "$as_me: WARNING: wxMetafile is not available on this system... disabled" >&2;}
+        wxUSE_METAFILE=no
+    fi
+fi
+
+
 if test "$USE_WIN32" = 1 -a \( "$wxUSE_DATAOBJ"       = "yes" \
                           -o "$wxUSE_CLIPBOARD"     = "yes" \
                           -o "$wxUSE_OLE"     = "yes" \
@@ -40268,6 +40348,13 @@ _ACEOF
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS access"
 fi
 
+if test "$wxUSE_DC_CACHEING" = "yes"; then
+    cat >>confdefs.h <<\_ACEOF
+#define wxUSE_DC_CACHEING 1
+_ACEOF
+
+fi
+
 if test "$wxUSE_DRAGIMAGE" = "yes"; then
     cat >>confdefs.h <<\_ACEOF
 #define wxUSE_DRAGIMAGE 1
@@ -42101,7 +42188,7 @@ echo "${ECHO_T}$bakefile_cv_prog_makeisgnu" >&6
             *-pc-os2_emx | *-pc-os2-emx )
                 PLATFORM_OS2=1
             ;;
-            powerpc-*-darwin* )
+            *-*-darwin* )
                 PLATFORM_MAC=1
                 PLATFORM_MACOSX=1
             ;;
@@ -42163,8 +42250,14 @@ fi;
 
     case "${BAKEFILE_HOST}" in
       *-*-darwin* )
-                        CFLAGS="$CFLAGS -fno-common"
-        CXXFLAGS="$CXXFLAGS -fno-common"
+                        if test "x$GCC" = "xyes"; then
+            CFLAGS="$CFLAGS -fno-common"
+            CXXFLAGS="$CXXFLAGS -fno-common"
+        fi
+        if test "x$XLCC" = "xyes"; then
+            CFLAGS="$CFLAGS -qnocommon"
+            CXXFLAGS="$CXXFLAGS -qnocommon"
+        fi
         ;;
 
       *-pc-os2_emx | *-pc-os2-emx )
@@ -42236,7 +42329,7 @@ fi;
             LIBEXT=".$OS2_LIBEXT"
             dlldir="$bindir"
         ;;
-        powerpc-*-darwin* )
+        *-*-darwin* )
             SO_SUFFIX="dylib"
             SO_SUFFIX_MODULE="bundle"
         ;;
@@ -42527,7 +42620,12 @@ EOF
             SHARED_LD_MODULE_CXX="\${CXX} -bundle -single_module -headerpad_max_install_names -o"
         fi
 
-        PIC_FLAG="-dynamic -fPIC"
+        if test "x$GCC" == "xyes"; then
+            PIC_FLAG="-dynamic -fPIC"
+        fi
+        if test "x$XLCC" = "xyes"; then
+            PIC_FLAG="-dynamic -DPIC"
+        fi
       ;;
 
       *-*-aix* )
@@ -43162,7 +43260,7 @@ echo $ECHO_N "checking for dependency tracking method... $ECHO_C" >&6
         DEPSMODE=gcc
         DEPS_TRACKING=1
         case "${BAKEFILE_HOST}" in
-            powerpc-*-darwin* )
+            *-*-darwin* )
                                                 DEPSFLAG_GCC="-no-cpp-precomp -MMD"
             ;;
             * )
@@ -44344,7 +44442,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6
             case "${host}" in
-                powerpc-*-darwin* )
+                *-*-darwin* )
                                                             GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
                 ;;
                 *-*-mingw32* )