]> git.saurik.com Git - wxWidgets.git/commitdiff
extracted MSW-specific setup.h options to their own wx/msw/setup_inc.h file which...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 21 Jul 2007 12:56:22 +0000 (12:56 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 21 Jul 2007 12:56:22 +0000 (12:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/update-setup-h
configure
configure.in
include/wx/msw/setup0.h
include/wx/msw/setup_inc.h [new file with mode: 0644]

index 804b4f43ac1688b2daa5dee33240998e9ecb3d6d..894cd1611226d442266b8d92bc27cb42f555b7be 100755 (executable)
@@ -24,18 +24,19 @@ msg()
 }
 
 # write all the common options to stdout, massaging them specially if they are
-# meant to be included in a configure input file setup.h.in (the name of the
-# file the common options are meant to be included in is the parameter)
+# meant to be included in a configure input file setup.h.in
+#
+# usage: cat_common_options_for setup_inc.h setup0.h
 cat_common_options_for()
 {
     # get rid of the copyright header on top of the file
-    cmd="sed '1,/^$/d' include/wx/setup_inc.h"
+    cmd="sed '1,/^\$/d' $1"
 
     # the file used for configure is special: we need to get rid of C++
     # comments in it because it is included by some C code and we also have to
     # set all options to 0 by default as they're put to 1 only by configure
     # (and hence any #ifdefs setting default values for them become unneeded)
-    if [ $1 = "setup.h.in" ]; then
+    if [ $2 = "setup.h.in" ]; then
         cmd="$cmd | sed -e '/^\/\//d' \
                         -e 's@ *//.*\$@@' \
                         -e 's/# *define \(.\+\) \+1 *\$/#define \1 0/'"
@@ -46,9 +47,16 @@ cat_common_options_for()
 
 # update the single setup.h file passed in as the parameter if it is out of
 # date
+#
+# usage: update_single_setup_h {common|MSW} setup_inc.h setup0.h
 update_single_setup_h()
 {
-    if [ include/wx/setup_inc.h -ot $1 ]; then
+    section=$1
+    shift
+    setup_inc=$1
+    shift
+
+    if [ $setup_inc -ot $1 ]; then
         echo "Skipping $1 which is already up to date."
         return 0
     fi
@@ -56,9 +64,9 @@ update_single_setup_h()
     echo -n "Updating $1 ..."
 
     tmp=$i.$$.tmp
-    sed -e '/^\/\* --- start common options --- \*\/$/q' $1 > $tmp &&
-    cat_common_options_for $1 >> $tmp &&
-    sed -n -e '/^\/\* --- end common options --- \*\/$/,$p' $1 >> $tmp &&
+    sed -e "/^\/\* --- start $section options --- \*\/\$/q" $1 > $tmp &&
+    cat_common_options_for $setup_inc $1 >> $tmp &&
+    sed -n -e "/^\/\* --- end $section options --- \*\/\$/,\$p" $1 >> $tmp &&
     mv $tmp $1
 
     if [ $? -ne 0 ]; then
@@ -70,19 +78,34 @@ update_single_setup_h()
     fi
 }
 
+# wrapper for update_single_setup_h which only updates the common options
+update_common_setup_h()
+{
+    update_single_setup_h common include/wx/setup_inc.h $1
+}
+
+# wrapper for update_single_setup_h which only updates the MSW options
+update_msw_setup_h()
+{
+    update_single_setup_h MSW include/wx/msw/setup_inc.h $1
+}
+
 # entry point
 if [ ! -f wxwin.m4 ]; then
     error "$0: must be ran from root wx directory"
     exit 1
 fi
 
-update_single_setup_h include/wx/msw/setup0.h
-update_single_setup_h include/wx/msw/wince/setup.h
-update_single_setup_h include/wx/mac/setup0.h
-update_single_setup_h include/wx/palmos/setup0.h
-update_single_setup_h include/wx/os2/setup0.h
-update_single_setup_h include/wx/motif/setup0.h
-update_single_setup_h setup.h.in
+update_common_setup_h include/wx/msw/setup0.h
+update_common_setup_h include/wx/msw/wince/setup.h
+update_common_setup_h include/wx/mac/setup0.h
+update_common_setup_h include/wx/palmos/setup0.h
+update_common_setup_h include/wx/os2/setup0.h
+update_common_setup_h include/wx/motif/setup0.h
+update_common_setup_h setup.h.in
+
+update_msw_setup_h include/wx/msw/setup0.h
+update_msw_setup_h setup.h.in
 
 exit $rc
 
index 5e4a23456a1e4bc609b9894871f118fae2784e01..c322b4e0f40f492c6f9d1635eb80806be41197d9 100755 (executable)
--- a/configure
+++ b/configure
@@ -1848,6 +1848,7 @@ Optional Features:
   --enable-icocur         use Windows ICO and CUR formats
   --enable-dccache        cache temporary wxDC objects (Win32 only)
   --enable-uxtheme        enable support for Windows XP themed look (Win32 only)
+  --enable-wxdib          compile wxDIB class (Win32 only)
   --disable-largefile     omit support for large files
   --disable-gtktest       do not try to compile and run a test GTK+ program
   --disable-gtktest       Do not try to compile and run a test GTK program
 echo "${ECHO_T}$result" >&6; }
 
 
+          enablestring=
+          defaultval=$wxUSE_ALL_FEATURES
+          if test -z "$defaultval"; then
+              if test x"$enablestring" = xdisable; then
+                  defaultval=yes
+              else
+                  defaultval=no
+              fi
+          fi
+
+          { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-wxdib" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-wxdib... $ECHO_C" >&6; }
+          # Check whether --enable-wxdib was given.
+if test "${enable_wxdib+set}" = set; then
+  enableval=$enable_wxdib;
+                          if test "$enableval" = yes; then
+                            wx_cv_use_wxdib='wxUSE_DIB=yes'
+                          else
+                            wx_cv_use_wxdib='wxUSE_DIB=no'
+                          fi
+                          cache=yes
+
+else
+
+                          LINE=`grep "^wxUSE_DIB=" ${wx_arg_cache_file}`
+                          if test "x$LINE" != x ; then
+                            eval "DEFAULT_$LINE"
+                          fi
+
+                          wx_cv_use_wxdib='wxUSE_DIB=${'DEFAULT_wxUSE_DIB":-$defaultval}"
+
+fi
+
+
+          eval "$wx_cv_use_wxdib"
+          if test "x$cache" = xyes; then
+            echo "wxUSE_DIB=$wxUSE_DIB" >> ${wx_arg_cache_file}.tmp
+          fi
+
+          if test x"$enablestring" = xdisable; then
+            if test $wxUSE_DIB = yes; then
+              result=no
+            else
+              result=yes
+            fi
+          else
+            result=$wxUSE_DIB
+          fi
+
+          { echo "$as_me:$LINENO: result: $result" >&5
+echo "${ECHO_T}$result" >&6; }
+
+
 fi
 
 
@@ -48536,6 +48590,13 @@ _ACEOF
 
 fi
 
+if test "$wxUSE_DIB" = "yes"; then
+    cat >>confdefs.h <<\_ACEOF
+#define wxUSE_WXDIB 1
+_ACEOF
+
+fi
+
 fi
 
 
index 6bbc9538d6722a2c5cc1100fc9285d5d231462aa..5b8aaa5519f1083a424ace7d4e4559518db7f11e 100644 (file)
@@ -897,6 +897,7 @@ dnl ---------------------------------------------------------------------------
 
 WX_ARG_FEATURE(dccache,     [  --enable-dccache        cache temporary wxDC objects (Win32 only)], wxUSE_DC_CACHEING)
 WX_ARG_FEATURE(uxtheme,     [  --enable-uxtheme        enable support for Windows XP themed look (Win32 only)], wxUSE_UXTHEME)
+WX_ARG_FEATURE(wxdib,       [  --enable-wxdib          compile wxDIB class (Win32 only)], wxUSE_DIB)
 
 fi
 dnl for GUI only
@@ -7054,6 +7055,10 @@ if test "$wxUSE_UXTHEME" = "yes"; then
     AC_DEFINE(wxUSE_UXTHEME)
 fi
 
+if test "$wxUSE_DIB" = "yes"; then
+    AC_DEFINE(wxUSE_WXDIB)
+fi
+
 fi
 dnl wxUSE_MSW = 1
 
index 05010371f9a9ab64c64e56ad2d625748fdc82a2a..d043aafbdc6fabd8c0f3ec80a24cd257f96e2cc8 100644 (file)
 
 /* --- end common options --- */
 
+/* --- start MSW options --- */
 // ----------------------------------------------------------------------------
 // Windows-only settings
 // ----------------------------------------------------------------------------
 // Define 1 to use bitmap messages.
 #define wxUSE_BITMAP_MESSAGE         1
 
+/* --- end MSW options --- */
+
 #endif // _WX_SETUP_H_
 
diff --git a/include/wx/msw/setup_inc.h b/include/wx/msw/setup_inc.h
new file mode 100644 (file)
index 0000000..f9802d7
--- /dev/null
@@ -0,0 +1,149 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wx/msw/setup_inc.h
+// Purpose:     MSW-specific setup.h options
+// Author:      Vadim Zeitlin
+// Created:     2007-07-21 (extracted from wx/msw/setup0.h)
+// RCS-ID:      $Id$
+// Copyright:   (c) 2007 Vadim Zeitlin <vadim@wxwindows.org>
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// Windows-only settings
+// ----------------------------------------------------------------------------
+
+// Set wxUSE_UNICODE_MSLU to 1 if you're compiling wxWidgets in Unicode mode
+// and want to run your programs under Windows 9x and not only NT/2000/XP.
+// This setting enables use of unicows.dll from MSLU (MS Layer for Unicode, see
+// http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx). Note
+// that you will have to modify the makefiles to include unicows.lib import
+// library as the first library (see installation instructions in install.txt
+// to learn how to do it when building the library or samples).
+//
+// If your compiler doesn't have unicows.lib, you can get a version of it at
+// http://libunicows.sourceforge.net
+//
+// Default is 0
+//
+// Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems)
+#ifndef wxUSE_UNICODE_MSLU
+    #define wxUSE_UNICODE_MSLU 0
+#endif
+
+// Set this to 1 if you want to use wxWidgets and MFC in the same program. This
+// will override some other settings (see below)
+//
+// Default is 0.
+//
+// Recommended setting: 0 unless you really have to use MFC
+#define wxUSE_MFC           0
+
+// Set this to 1 for generic OLE support: this is required for drag-and-drop,
+// clipboard, OLE Automation. Only set it to 0 if your compiler is very old and
+// can't compile/doesn't have the OLE headers.
+//
+// Default is 1.
+//
+// Recommended setting: 1
+#define wxUSE_OLE           1
+
+// Set this to 1 to enable wxAutomationObject class.
+//
+// Default is 1.
+//
+// Recommended setting: 1 if you need to control other applications via OLE
+// Automation, can be safely set to 0 otherwise
+#define wxUSE_OLE_AUTOMATION 1
+
+// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE
+// controls in wx.
+//
+// Default is 1.
+//
+// Recommended setting: 1, required by wxMediaCtrl
+#define wxUSE_ACTIVEX 1
+
+// wxDC cacheing implementation
+#define wxUSE_DC_CACHEING 1
+
+// Set this to 1 to enable wxDIB class used internally for manipulating
+// wxBitmap data.
+//
+// Default is 1, set it to 0 only if you don't use wxImage neither
+//
+// Recommended setting: 1 (without it conversion to/from wxImage won't work)
+#define wxUSE_WXDIB 1
+
+// Set to 0 to disable PostScript print/preview architecture code under Windows
+// (just use Windows printing).
+#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
+
+// Set this to 1 to use RICHEDIT controls for wxTextCtrl with style wxTE_RICH
+// which allows to put more than ~32Kb of text in it even under Win9x (NT
+// doesn't have such limitation).
+//
+// Default is 1 for compilers which support it
+//
+// Recommended setting: 1, only set it to 0 if your compiler doesn't have
+//                      or can't compile <richedit.h>
+#define wxUSE_RICHEDIT  1
+
+// Set this to 1 to use extra features of richedit v2 and later controls
+//
+// Default is 1 for compilers which support it
+//
+// Recommended setting: 1
+#define wxUSE_RICHEDIT2 1
+
+// Set this to 1 to enable support for the owner-drawn menu and listboxes. This
+// is required by wxUSE_CHECKLISTBOX.
+//
+// Default is 1.
+//
+// Recommended setting: 1, set to 0 for a small library size reduction
+#define wxUSE_OWNER_DRAWN 1
+
+// Set to 1 to compile MS Windows XP theme engine support
+#define wxUSE_UXTHEME           1
+
+// Set to 1 to auto-adapt to MS Windows XP themes where possible
+// (notably, wxNotebook pages)
+#define wxUSE_UXTHEME_AUTO      1
+
+// Set to 1 to use InkEdit control (Tablet PC), if available
+#define wxUSE_INKEDIT  0
+
+// ----------------------------------------------------------------------------
+// Generic versions of native controls
+// ----------------------------------------------------------------------------
+
+// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the
+// native wxDatePickerCtrl
+//
+// Default is 0.
+//
+// Recommended setting: 0, this is mainly used for testing
+#define wxUSE_DATEPICKCTRL_GENERIC 0
+
+// ----------------------------------------------------------------------------
+// Crash debugging helpers
+// ----------------------------------------------------------------------------
+
+// Set this to 1 to be able to use wxCrashReport::Generate() to create mini
+// dumps of your program when it crashes (or at any other moment)
+//
+// Default is 1 if supported by the compiler (VC++ and recent BC++ only).
+//
+// Recommended setting: 1, set to 0 if your programs never crash
+#define wxUSE_CRASHREPORT 1
+
+// ----------------------------------------------------------------------------
+// obsolete settings
+// ----------------------------------------------------------------------------
+
+// NB: all settings in this section are obsolete and should not be used/changed
+//     at all, they will disappear
+
+// Define 1 to use bitmap messages.
+#define wxUSE_BITMAP_MESSAGE         1
+