]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
reduce flicker in header window when deleting items and let space select items even...
[wxWidgets.git] / configure.in
index a690aa9f5a9459174cd580a23552396d8872646a..38b5e1196155c2b91dfa0979c36470cd7a98bd65 100644 (file)
@@ -40,7 +40,7 @@ AC_DEFUN(WX_PATH_FIND_LIBRARIES,
 ac_find_libraries=
 for ac_dir in $1;
   do
 ac_find_libraries=
 for ac_dir in $1;
   do
-    for ac_extension in a so sl; do
+    for ac_extension in a so sl dylib; do
       if test -f "$ac_dir/lib$2.$ac_extension"; then
         ac_find_libraries=$ac_dir
         break 2
       if test -f "$ac_dir/lib$2.$ac_extension"; then
         ac_find_libraries=$ac_dir
         break 2
@@ -393,6 +393,7 @@ USE_SUNOS=
 USE_ALPHA=
 USE_OSF=
 USE_BSD=
 USE_ALPHA=
 USE_OSF=
 USE_BSD=
+USE_DARWIN=
 USE_FREEBSD=
 USE_OPENBSD=
 USE_NETBSD=
 USE_FREEBSD=
 USE_OPENBSD=
 USE_NETBSD=
@@ -556,9 +557,9 @@ case "${host}" in
 
   *-*-darwin* )
     USE_BSD=1
 
   *-*-darwin* )
     USE_BSD=1
-    USE_MAC=1
-    AC_DEFINE(__MAC__)
+    USE_DARWIN=1
     AC_DEFINE(__BSD__)
     AC_DEFINE(__BSD__)
+    AC_DEFINE(__DARWIN__)
     AC_DEFINE(__UNIX__)
     DEFAULT_DEFAULT_wxUSE_MAC=1
   ;;
     AC_DEFINE(__UNIX__)
     DEFAULT_DEFAULT_wxUSE_MAC=1
   ;;
@@ -586,9 +587,27 @@ if test "$USE_BEOS" = 1; then
     INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS be"
 fi
 
     INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS be"
 fi
 
-dnl Linux: test for libc5/glibc2: glibc2 has gettext() included
+dnl check for glibc version
 if test "$USE_LINUX" = 1; then
 if test "$USE_LINUX" = 1; then
-  AC_CHECK_LIB(c,gettext,AC_DEFINE(wxHAVE_GLIBC2))
+    AC_CACHE_CHECK([for glibc 2.1 or later], wx_lib_glibc21,
+        AC_TRY_COMPILE([#include <features.h>],
+            [
+                #if !__GLIBC_PREREQ(2, 1)
+                    #error not glibc2.1
+                #endif
+            ],
+            [
+                wx_lib_glibc21=yes
+            ],
+            [
+                wx_lib_glibc21=no
+            ]
+        )
+    )
+
+    if test "$wx_lib_glibc21" = "yes"; then
+        AC_DEFINE(wxHAVE_GLIBC2)
+    fi
 fi
 
 dnl ---------------------------------------------------------------------------
 fi
 
 dnl ---------------------------------------------------------------------------
@@ -688,9 +707,8 @@ if test $DEBUG_CONFIGURE = 1; then
   DEFAULT_wxUSE_IPC=no
   DEFAULT_wxUSE_HELP=no
   DEFAULT_wxUSE_MS_HTML_HELP=no
   DEFAULT_wxUSE_IPC=no
   DEFAULT_wxUSE_HELP=no
   DEFAULT_wxUSE_MS_HTML_HELP=no
-
   DEFAULT_wxUSE_WXHTML_HELP=no
   DEFAULT_wxUSE_WXHTML_HELP=no
-  DEFAULT_wxUSE_WXTREE=no
+  DEFAULT_wxUSE_TREELAYOUT=no
   DEFAULT_wxUSE_METAFILE=no
   DEFAULT_wxUSE_MIMETYPE=no
   DEFAULT_wxUSE_SYSTEM_OPTIONS=yes
   DEFAULT_wxUSE_METAFILE=no
   DEFAULT_wxUSE_MIMETYPE=no
   DEFAULT_wxUSE_SYSTEM_OPTIONS=yes
@@ -700,10 +718,12 @@ if test $DEBUG_CONFIGURE = 1; then
   DEFAULT_wxUSE_COLOURDLG=no
   DEFAULT_wxUSE_DIRDLG=no
   DEFAULT_wxUSE_FILEDLG=no
   DEFAULT_wxUSE_COLOURDLG=no
   DEFAULT_wxUSE_DIRDLG=no
   DEFAULT_wxUSE_FILEDLG=no
+  DEFAULT_wxUSE_FINDREPLDLG=no
   DEFAULT_wxUSE_FONTDLG=no
   DEFAULT_wxUSE_MSGDLG=no
   DEFAULT_wxUSE_NUMBERDLG=no
   DEFAULT_wxUSE_TEXTDLG=no
   DEFAULT_wxUSE_FONTDLG=no
   DEFAULT_wxUSE_MSGDLG=no
   DEFAULT_wxUSE_NUMBERDLG=no
   DEFAULT_wxUSE_TEXTDLG=no
+  DEFAULT_wxUSE_SPLASH=no
   DEFAULT_wxUSE_STARTUP_TIPS=no
   DEFAULT_wxUSE_PROGRESSDLG=no
   DEFAULT_wxUSE_WIZARDDLG=no
   DEFAULT_wxUSE_STARTUP_TIPS=no
   DEFAULT_wxUSE_PROGRESSDLG=no
   DEFAULT_wxUSE_WIZARDDLG=no
@@ -734,6 +754,7 @@ if test $DEBUG_CONFIGURE = 1; then
   DEFAULT_wxUSE_LISTBOX=no
   DEFAULT_wxUSE_LISTCTRL=no
   DEFAULT_wxUSE_NOTEBOOK=no
   DEFAULT_wxUSE_LISTBOX=no
   DEFAULT_wxUSE_LISTCTRL=no
   DEFAULT_wxUSE_NOTEBOOK=no
+  DEFAULT_wxUSE_PROPSHEET=no
   DEFAULT_wxUSE_RADIOBOX=no
   DEFAULT_wxUSE_RADIOBTN=no
   DEFAULT_wxUSE_SASH=no
   DEFAULT_wxUSE_RADIOBOX=no
   DEFAULT_wxUSE_RADIOBTN=no
   DEFAULT_wxUSE_SASH=no
@@ -846,7 +867,7 @@ else
   DEFAULT_wxUSE_HELP=yes
   DEFAULT_wxUSE_MS_HTML_HELP=yes
   DEFAULT_wxUSE_WXHTML_HELP=yes
   DEFAULT_wxUSE_HELP=yes
   DEFAULT_wxUSE_MS_HTML_HELP=yes
   DEFAULT_wxUSE_WXHTML_HELP=yes
-  DEFAULT_wxUSE_WXTREE=yes
+  DEFAULT_wxUSE_TREELAYOUT=yes
   DEFAULT_wxUSE_METAFILE=yes
   DEFAULT_wxUSE_MIMETYPE=yes
   DEFAULT_wxUSE_SYSTEM_OPTIONS=yes
   DEFAULT_wxUSE_METAFILE=yes
   DEFAULT_wxUSE_MIMETYPE=yes
   DEFAULT_wxUSE_SYSTEM_OPTIONS=yes
@@ -856,10 +877,12 @@ else
   DEFAULT_wxUSE_COLOURDLG=yes
   DEFAULT_wxUSE_DIRDLG=yes
   DEFAULT_wxUSE_FILEDLG=yes
   DEFAULT_wxUSE_COLOURDLG=yes
   DEFAULT_wxUSE_DIRDLG=yes
   DEFAULT_wxUSE_FILEDLG=yes
+  DEFAULT_wxUSE_FINDREPLDLG=yes
   DEFAULT_wxUSE_FONTDLG=yes
   DEFAULT_wxUSE_MSGDLG=yes
   DEFAULT_wxUSE_NUMBERDLG=yes
   DEFAULT_wxUSE_TEXTDLG=yes
   DEFAULT_wxUSE_FONTDLG=yes
   DEFAULT_wxUSE_MSGDLG=yes
   DEFAULT_wxUSE_NUMBERDLG=yes
   DEFAULT_wxUSE_TEXTDLG=yes
+  DEFAULT_wxUSE_SPLASH=yes
   DEFAULT_wxUSE_STARTUP_TIPS=yes
   DEFAULT_wxUSE_PROGRESSDLG=yes
   DEFAULT_wxUSE_WIZARDDLG=yes
   DEFAULT_wxUSE_STARTUP_TIPS=yes
   DEFAULT_wxUSE_PROGRESSDLG=yes
   DEFAULT_wxUSE_WIZARDDLG=yes
@@ -890,6 +913,7 @@ else
   DEFAULT_wxUSE_LISTBOX=yes
   DEFAULT_wxUSE_LISTCTRL=yes
   DEFAULT_wxUSE_NOTEBOOK=yes
   DEFAULT_wxUSE_LISTBOX=yes
   DEFAULT_wxUSE_LISTCTRL=yes
   DEFAULT_wxUSE_NOTEBOOK=yes
+  DEFAULT_wxUSE_PROPSHEET=yes
   DEFAULT_wxUSE_RADIOBOX=yes
   DEFAULT_wxUSE_RADIOBTN=yes
   DEFAULT_wxUSE_SASH=yes
   DEFAULT_wxUSE_RADIOBOX=yes
   DEFAULT_wxUSE_RADIOBTN=yes
   DEFAULT_wxUSE_SASH=yes
@@ -1108,8 +1132,7 @@ WX_ARG_ENABLE(clipboard,   [  --enable-clipboard      use wxClipboard classes],
 WX_ARG_ENABLE(dnd,         [  --enable-dnd            use Drag'n'Drop classes], wxUSE_DRAG_AND_DROP)
 WX_ARG_ENABLE(metafile,    [  --enable-metafile       use win32 metafiles], wxUSE_METAFILE)
 
 WX_ARG_ENABLE(dnd,         [  --enable-dnd            use Drag'n'Drop classes], wxUSE_DRAG_AND_DROP)
 WX_ARG_ENABLE(metafile,    [  --enable-metafile       use win32 metafiles], wxUSE_METAFILE)
 
-dnl TODO: doesn't work yet
-WX_ARG_ENABLE(wxtree,      [  --enable-wxtree         make wxTree library], wxUSE_WXTREE)
+WX_ARG_ENABLE(treelayout,  [  --enable-treelayout     use wxTreeLayout classes], wxUSE_TREELAYOUT)
 
 dnl ---------------------------------------------------------------------------
 dnl optional GUI controls (in alphabetical order except the first one)
 
 dnl ---------------------------------------------------------------------------
 dnl optional GUI controls (in alphabetical order except the first one)
@@ -1137,6 +1160,7 @@ if test "$wxUSE_CONTROLS" = "yes"; then
   DEFAULT_wxUSE_LISTBOX=yes
   DEFAULT_wxUSE_LISTCTRL=yes
   DEFAULT_wxUSE_NOTEBOOK=yes
   DEFAULT_wxUSE_LISTBOX=yes
   DEFAULT_wxUSE_LISTCTRL=yes
   DEFAULT_wxUSE_NOTEBOOK=yes
+  DEFAULT_wxUSE_PROPSHEET=yes
   DEFAULT_wxUSE_RADIOBOX=yes
   DEFAULT_wxUSE_RADIOBTN=yes
   DEFAULT_wxUSE_SASH=yes
   DEFAULT_wxUSE_RADIOBOX=yes
   DEFAULT_wxUSE_RADIOBTN=yes
   DEFAULT_wxUSE_SASH=yes
@@ -1174,6 +1198,7 @@ elif test "$wxUSE_CONTROLS" = "no"; then
   DEFAULT_wxUSE_LISTBOX=no
   DEFAULT_wxUSE_LISTCTRL=no
   DEFAULT_wxUSE_NOTEBOOK=no
   DEFAULT_wxUSE_LISTBOX=no
   DEFAULT_wxUSE_LISTCTRL=no
   DEFAULT_wxUSE_NOTEBOOK=no
+  DEFAULT_wxUSE_PROPSHEET=no
   DEFAULT_wxUSE_RADIOBOX=no
   DEFAULT_wxUSE_RADIOBTN=no
   DEFAULT_wxUSE_SASH=no
   DEFAULT_wxUSE_RADIOBOX=no
   DEFAULT_wxUSE_RADIOBTN=no
   DEFAULT_wxUSE_SASH=no
@@ -1212,6 +1237,7 @@ WX_ARG_ENABLE(imaglist,    [  --enable-imaglist       use wxImageList class], wx
 WX_ARG_ENABLE(listbox,     [  --enable-listbox        use wxListBox class], wxUSE_LISTBOX)
 WX_ARG_ENABLE(listctrl,    [  --enable-listctrl       use wxListCtrl class], wxUSE_LISTCTRL)
 WX_ARG_ENABLE(notebook,    [  --enable-notebook       use wxNotebook class], wxUSE_NOTEBOOK)
 WX_ARG_ENABLE(listbox,     [  --enable-listbox        use wxListBox class], wxUSE_LISTBOX)
 WX_ARG_ENABLE(listctrl,    [  --enable-listctrl       use wxListCtrl class], wxUSE_LISTCTRL)
 WX_ARG_ENABLE(notebook,    [  --enable-notebook       use wxNotebook class], wxUSE_NOTEBOOK)
+WX_ARG_ENABLE(propsheet,   [  --enable-propsheet      use wxPropertySheet class], wxUSE_PROPSHEET)
 WX_ARG_ENABLE(radiobox,    [  --enable-radiobox       use wxRadioBox class], wxUSE_RADIOBOX)
 WX_ARG_ENABLE(radiobtn,    [  --enable-radiobtn       use wxRadioButton class], wxUSE_RADIOBTN)
 WX_ARG_ENABLE(sash,        [  --enable-sash           use wxSashWindow class], wxUSE_SASH)
 WX_ARG_ENABLE(radiobox,    [  --enable-radiobox       use wxRadioBox class], wxUSE_RADIOBOX)
 WX_ARG_ENABLE(radiobtn,    [  --enable-radiobtn       use wxRadioButton class], wxUSE_RADIOBTN)
 WX_ARG_ENABLE(sash,        [  --enable-sash           use wxSashWindow class], wxUSE_SASH)
@@ -1242,10 +1268,12 @@ WX_ARG_ENABLE(commondlg,   [  --enable-commondlg      use common dialogs (wxDirD
 WX_ARG_ENABLE(choicedlg,   [  --enable-choicedlg      use wxChoiceDialog], wxUSE_CHOICEDLG)
 WX_ARG_ENABLE(coldlg,      [  --enable-coldlg         use wxColourDialog], wxUSE_COLOURDLG)
 WX_ARG_ENABLE(filedlg,     [  --enable-filedlg        use wxFileDialog], wxUSE_FILEDLG)
 WX_ARG_ENABLE(choicedlg,   [  --enable-choicedlg      use wxChoiceDialog], wxUSE_CHOICEDLG)
 WX_ARG_ENABLE(coldlg,      [  --enable-coldlg         use wxColourDialog], wxUSE_COLOURDLG)
 WX_ARG_ENABLE(filedlg,     [  --enable-filedlg        use wxFileDialog], wxUSE_FILEDLG)
+WX_ARG_ENABLE(filedlg,     [  --enable-finddlg        use wxFindReplaceDialog], wxUSE_FINDREPLDLG)
 WX_ARG_ENABLE(fontdlg,     [  --enable-fontdlg        use wxFontDialog], wxUSE_FONTDLG)
 WX_ARG_ENABLE(dirdlg,      [  --enable-dirdlg         use wxDirDialog], wxUSE_DIRDLG)
 WX_ARG_ENABLE(msgdlg,      [  --enable-msgdlg         use wxMessageDialog], wxUSE_MSGDLG)
 WX_ARG_ENABLE(numberdlg,   [  --enable-numberdlg      use wxNumberEntryDialog], wxUSE_NUMBERDLG)
 WX_ARG_ENABLE(fontdlg,     [  --enable-fontdlg        use wxFontDialog], wxUSE_FONTDLG)
 WX_ARG_ENABLE(dirdlg,      [  --enable-dirdlg         use wxDirDialog], wxUSE_DIRDLG)
 WX_ARG_ENABLE(msgdlg,      [  --enable-msgdlg         use wxMessageDialog], wxUSE_MSGDLG)
 WX_ARG_ENABLE(numberdlg,   [  --enable-numberdlg      use wxNumberEntryDialog], wxUSE_NUMBERDLG)
+WX_ARG_ENABLE(splash,      [  --enable-splash         use wxSplashScreen], wxUSE_SPLASH)
 WX_ARG_ENABLE(textdlg,     [  --enable-textdlg        use wxTextDialog], wxUSE_TEXTDLG)
 WX_ARG_ENABLE(tipdlg,      [  --enable-tipdlg         use startup tips], wxUSE_STARTUP_TIPS)
 WX_ARG_ENABLE(progressdlg, [  --enable-progressdlg    use wxProgressDialog], wxUSE_PROGRESSDLG)
 WX_ARG_ENABLE(textdlg,     [  --enable-textdlg        use wxTextDialog], wxUSE_TEXTDLG)
 WX_ARG_ENABLE(tipdlg,      [  --enable-tipdlg         use startup tips], wxUSE_STARTUP_TIPS)
 WX_ARG_ENABLE(progressdlg, [  --enable-progressdlg    use wxProgressDialog], wxUSE_PROGRESSDLG)
@@ -1570,6 +1598,30 @@ dnl ------------------------------------------------------------------------
 dnl flush the cache because checking for libraries below might abort
 AC_CACHE_SAVE
 
 dnl flush the cache because checking for libraries below might abort
 AC_CACHE_SAVE
 
+dnl ------------------------------------------------------------------------
+dnl Check for regex libraries
+dnl ------------------------------------------------------------------------
+
+REGEX_INCLUDE=
+if test "$wxUSE_REGEX" != "no"; then
+    dnl according to Unix 98 specs, regcomp() is in libc but I believe that
+    dnl on some old systems it may be in libregex - check for it too?
+    AC_CHECK_HEADER(regex.h, AC_CHECK_FUNCS(regcomp))
+
+    if test "x$ac_cv_func_regcomp" != "xyes"; then
+        dnl we were asked to use the system version of regex lib only but it
+        dnl is not available
+        if test "$wxUSE_REGEX" = "sys"; then
+            AC_MSG_ERROR([system regex library not found! Use --with-regex to use the built-in regex library.])
+        fi
+
+        dnl fallback to the built in code
+        REGEX_INCLUDE="-I\${top_srcdir}/src/regex"
+    fi
+
+    AC_DEFINE(wxUSE_REGEX)
+fi
+
 dnl ----------------------------------------------------------------
 dnl search for toolkit (widget sets)
 dnl ----------------------------------------------------------------
 dnl ----------------------------------------------------------------
 dnl search for toolkit (widget sets)
 dnl ----------------------------------------------------------------
@@ -1592,15 +1644,16 @@ if test "$wxUSE_GUI" = "yes"; then
     WXWINE=
 
     if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then
     WXWINE=
 
     if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then
-        AC_CHECK_HEADER(windows.h, [], 
-            [
-                AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
-            ])
-        
+        AC_CHECK_HEADER(windows.h, [],
+        [
+            AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
+        ])
+
         INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS msw"
         INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS msw"
+
         dnl --- Quick & Dirty ; link against most/all libraries
         dnl --- This will bloat the executable, but it'll work for now...
         dnl --- Quick & Dirty ; link against most/all libraries
         dnl --- This will bloat the executable, but it'll work for now...
-        LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32"
+        LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32"
 
         dnl add extra odbc libs if we have compiled in odbc
         if test "$wxUSE_ODBC" = "yes" ; then
 
         dnl add extra odbc libs if we have compiled in odbc
         if test "$wxUSE_ODBC" = "yes" ; then
@@ -2130,8 +2183,15 @@ WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a"
 WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY}_gl.a"
 
 dnl the name of the shared library
 WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY}_gl.a"
 
 dnl the name of the shared library
-WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
-WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
+case "${host}" in
+  *-*-mingw32* )
+    WX_LIBRARY_NAME_SHARED="wx${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}_${WX_RELEASE_NUMBER}.dll"
+  ;;
+  * )
+    WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
+    WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
+  ;;
+esac
 
 dnl the name of the links to the shared library
 WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}"
 
 dnl the name of the links to the shared library
 WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}"
@@ -2155,7 +2215,7 @@ if test "$wxUSE_SHARED" = "yes"; then
     case "${host}" in
       *-hp-hpux* )
         if test "$GCC" = yes ; then
     case "${host}" in
       *-hp-hpux* )
         if test "$GCC" = yes ; then
-            SHARED_LD="${CC} -shared -fPIC -o"
+            SHARED_LD="${CXX} -shared -fPIC -o"
             PIC_FLAG="-fPIC"
         else
             dnl no idea why it wants it, but it does
             PIC_FLAG="-fPIC"
         else
             dnl no idea why it wants it, but it does
@@ -2176,7 +2236,7 @@ if test "$wxUSE_SHARED" = "yes"; then
 
       dnl in fact, these settings are for any platform using gcc
       *-*-linux* )
 
       dnl in fact, these settings are for any platform using gcc
       *-*-linux* )
-        SHARED_LD="${CC} -shared -o"
+        SHARED_LD="${CXX} -shared -o"
         PIC_FLAG="-fPIC"
         if test "$wxUSE_BURNT_NAME" = "yes" ; then
             BURNT_LIBRARY_NAME="-Wl,-soname,${WX_LIBRARY_LINK1}"
         PIC_FLAG="-fPIC"
         if test "$wxUSE_BURNT_NAME" = "yes" ; then
             BURNT_LIBRARY_NAME="-Wl,-soname,${WX_LIBRARY_LINK1}"
@@ -2194,7 +2254,7 @@ if test "$wxUSE_SHARED" = "yes"; then
       ;;
       *-*-irix5* | *-*-irix6* )
         if test "$GCC" = yes ; then
       ;;
       *-*-irix5* | *-*-irix6* )
         if test "$GCC" = yes ; then
-           SHARED_LD="${CC} -shared -o"
+           SHARED_LD="${CXX} -shared -o"
            PIC_FLAG="-fPIC"
         else
            SHARED_LD="${CXX} -shared -o"
            PIC_FLAG="-fPIC"
         else
            SHARED_LD="${CXX} -shared -o"
@@ -2209,7 +2269,7 @@ if test "$wxUSE_SHARED" = "yes"; then
       ;;
       *-*-solaris2* )
         if test "$GCC" = yes ; then
       ;;
       *-*-solaris2* )
         if test "$GCC" = yes ; then
-            SHARED_LD="${CC} -shared -o"
+            SHARED_LD="${CXX} -shared -o"
             PIC_FLAG="-fPIC"
 
             dnl newer versions of gcc need -isystem to compile X headers on
             PIC_FLAG="-fPIC"
 
             dnl newer versions of gcc need -isystem to compile X headers on
@@ -2228,13 +2288,13 @@ if test "$wxUSE_SHARED" = "yes"; then
         fi
       ;;
       *-*-sunos4* )
         fi
       ;;
       *-*-sunos4* )
-        SHARED_LD="${CC} -shared -o"
+        SHARED_LD="${CXX} -shared -o"
         PIC_FLAG="-fPIC"
         WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
         WX_ALL="CREATE_LINKS"
       ;;
       *-*-freebsd* | *-*-openbsd* | *-*-netbsd* )
         PIC_FLAG="-fPIC"
         WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
         WX_ALL="CREATE_LINKS"
       ;;
       *-*-freebsd* | *-*-openbsd* | *-*-netbsd* )
-        SHARED_LD="${CC} -shared -o"
+        SHARED_LD="${CXX} -shared -o"
         PIC_FLAG="-fPIC"
         if test "$wxUSE_OPENGL" = "yes"; then
             WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
         PIC_FLAG="-fPIC"
         if test "$wxUSE_OPENGL" = "yes"; then
             WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
@@ -2245,6 +2305,8 @@ if test "$wxUSE_SHARED" = "yes"; then
         fi
       ;;
       *-*-darwin* )
         fi
       ;;
       *-*-darwin* )
+        TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__DARWIN__ -D__POWERPC__"
+        CPPFLAGS="${CPPFLAGS} -fno-common"
         SHARED_LD="${CXX} -dynamiclib -o"
         PIC_FLAG="-dynamic -fPIC"
         if test "$wxUSE_OPENGL" = "yes"; then
         SHARED_LD="${CXX} -dynamiclib -o"
         PIC_FLAG="-dynamic -fPIC"
         if test "$wxUSE_OPENGL" = "yes"; then
@@ -2254,8 +2316,10 @@ if test "$wxUSE_SHARED" = "yes"; then
             WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
             WX_ALL="CREATE_LINKS"
         fi
             WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
             WX_ALL="CREATE_LINKS"
         fi
-        dnl add the resources target
-        WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.r"
+        dnl add the resources target for wxMac
+        if test "$wxUSE_MAC" = 1 ; then
+                WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.r"
+        fi
         dnl the name of the shared library
         WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
         WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
         dnl the name of the shared library
         WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
         WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
@@ -2280,7 +2344,7 @@ if test "$wxUSE_SHARED" = "yes"; then
         WX_ALL="CREATE_LINKS"
       ;;
       *-*-sysv5* )
         WX_ALL="CREATE_LINKS"
       ;;
       *-*-sysv5* )
-        SHARED_LD="${CC} -shared -o"
+        SHARED_LD="${CXX} -shared -o"
         PIC_FLAG="-fPIC"
         WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
         WX_ALL="CREATE_LINKS"
         PIC_FLAG="-fPIC"
         WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
         WX_ALL="CREATE_LINKS"
@@ -2301,14 +2365,17 @@ if test "$wxUSE_SHARED" = "yes"; then
         fi
       ;;
       *-*-mingw32* )
         fi
       ;;
       *-*-mingw32* )
-        dnl only static for now
-        WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
-        WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
+        WX_LIBRARY_NAME_STATIC="lib/libwx${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}_${WX_RELEASE_NUMBER}.a"
+        SHARED_LD="${CC} -shared -Wl,--out-implib,${WX_LIBRARY_NAME_STATIC} -o"
+        TOOLKIT_DEF="${TOOLKIT_DEF} -DWXUSINGDLL=1"
+        WXMSW_DLL_DEFINES="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1"
+        WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
+        WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}"
         if test "$wxUSE_OPENGL" = "yes"; then
             WX_ALL_INSTALLED="preinstall_gl"
         if test "$wxUSE_OPENGL" = "yes"; then
             WX_ALL_INSTALLED="preinstall_gl"
-            WX_ALL="${WX_LIBRARY_NAME_STATIC} ${WX_LIBRARY_NAME_STATIC_GL}"
+            WX_ALL="${WX_LIBRARY_NAME_SHARED} ${WX_LIBRARY_NAME_SHARED_GL}"
         else
         else
-            WX_ALL="${WX_LIBRARY_NAME_STATIC}"
+            WX_ALL="${WX_LIBRARY_NAME_SHARED}"
         fi
       ;;
       *-pc-os2_emx )
         fi
       ;;
       *-pc-os2_emx )
@@ -2575,6 +2642,11 @@ AC_CHECK_LIB(c, wcslen, [
             AC_CHECK_LIB(w, wcslen, [
                 AC_DEFINE(HAVE_WCSLEN)
                 WCHAR_LINK="-lw"
             AC_CHECK_LIB(w, wcslen, [
                 AC_DEFINE(HAVE_WCSLEN)
                 WCHAR_LINK="-lw"
+            ], [
+                AC_CHECK_LIB(msvcrt, wcslen, [
+                    AC_DEFINE(HAVE_WCSLEN)
+                    WCHAR_LINK=""
+                ])
             ])
         ])
 
             ])
         ])
 
@@ -2775,7 +2847,7 @@ if test "$USE_BEOS" = 1; then
     HAVE_SOME_SLEEP_FUNC=1
 fi
 
     HAVE_SOME_SLEEP_FUNC=1
 fi
 
-if test "$USE_MAC" = 1; then
+if test "$USE_DARWIN" = 1; then
     dnl Mac OS X has both nanosleep and usleep
     dnl but only usleep is defined in unistd.h
     AC_DEFINE(HAVE_USLEEP)
     dnl Mac OS X has both nanosleep and usleep
     dnl but only usleep is defined in unistd.h
     AC_DEFINE(HAVE_USLEEP)
@@ -2999,6 +3071,14 @@ if test "$wxUSE_THREADS" = "yes" ; then
   dnl defined, we do it by directly assigned
   dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
 
   dnl defined, we do it by directly assigned
   dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
 
+  dnl we need _GNU_SOURCE to get PTHREAD_MUTEX_RECURSIVE with glibc 2.1+
+  dnl (strictly speaking we only need _XOPEN_SOURCE=500 but just defining
+  dnl this disables _BSD_SOURCE which breaks libtiff compilation, so it is
+  dnl simpler to just define _GNU_SOURCE to get everything)
+  if test "x$wx_lib_glibc21" = "xyes"; then
+      CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+  fi
+
   AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
   [
     AC_TRY_COMPILE([#include <pthread.h>],
   AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
   [
     AC_TRY_COMPILE([#include <pthread.h>],
@@ -3043,7 +3123,7 @@ if test "$wxUSE_THREADS" = "yes" ; then
   dnl building MT programs under Solaris with the native compiler requires -mt
   dnl switch
   if test "$USE_SOLARIS" = "yes" -a "$GCC" != "yes"; then
   dnl building MT programs under Solaris with the native compiler requires -mt
   dnl switch
   if test "$USE_SOLARIS" = "yes" -a "$GCC" != "yes"; then
-      CFLAGS="${CFLAGS} -mt"
+      CPPFLAGS="${CFLAGS} -mt"
       CXXFLAGS="${CXXFLAGS} -mt"
       LDFLAGS="${LDFLAGS} -mt"
   fi
       CXXFLAGS="${CXXFLAGS} -mt"
       LDFLAGS="${LDFLAGS} -mt"
   fi
@@ -3055,10 +3135,9 @@ fi
 if test "$wxUSE_THREADS" = "yes"; then
   AC_DEFINE(wxUSE_THREADS)
 
 if test "$wxUSE_THREADS" = "yes"; then
   AC_DEFINE(wxUSE_THREADS)
 
-  dnl must define _REENTRANT for multithreaded code except for Mac OS X
-  if test "$wxUSE_MAC" = "0"; then
-    CFLAGS="${CFLAGS} -D_REENTRANT"
-    CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+  dnl must define _REENTRANT for multithreaded code except for Darwin/Mac OS X
+  if test "$USE_DARWIN" != 1; then
+    CPPFLAGS="${CPPFLAGS} -D_REENTRANT"
   fi
 
   SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
   fi
 
   SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
@@ -3068,8 +3147,7 @@ else
   if test "$ac_cv_func_strtok_r" = "yes"; then
     AC_MSG_CHECKING(if -D_REENTRANT is needed)
     if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
   if test "$ac_cv_func_strtok_r" = "yes"; then
     AC_MSG_CHECKING(if -D_REENTRANT is needed)
     if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
-        CFLAGS="${CFLAGS} -D_REENTRANT"
-        CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+        CPPFLAGS="${CPPFLAGS} -D_REENTRANT"
         AC_MSG_RESULT(yes)
     else
         AC_MSG_RESULT(no)
         AC_MSG_RESULT(yes)
     else
         AC_MSG_RESULT(no)
@@ -3095,9 +3173,9 @@ if test "$WXWINE" = 1 ; then
 fi
 
 if test "$wxUSE_MAC" = 1 ; then
 fi
 
 if test "$wxUSE_MAC" = 1 ; then
-  TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__POWERPC__ -DTARGET_CARBON"
-  CFLAGS="${CFLAGS} -fno-common -fpascal-strings"
-  CPPFLAGS="${CPPFLAGS} -cpp-precomp -fno-common -fpascal-strings"
+  TOOLKIT_DEF="${TOOLKIT_DEF} -DTARGET_CARBON"
+  CPPFLAGS="${CPPFLAGS} -fpascal-strings"
+  CXXFLAGS="${CXXFLAGS} -cpp-precomp"
   AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez)
   AC_CHECK_PROG(DEREZ, Derez, Derez, /Developer/Tools/Derez)
   RESCOMP=${REZ}
   AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez)
   AC_CHECK_PROG(DEREZ, Derez, Derez, /Developer/Tools/Derez)
   RESCOMP=${REZ}
@@ -3199,26 +3277,6 @@ dnl ---------------------------------------------------------------------------
 dnl Optional libraries
 dnl ---------------------------------------------------------------------------
 
 dnl Optional libraries
 dnl ---------------------------------------------------------------------------
 
-REGEX_INCLUDE=
-if test "$wxUSE_REGEX" != "no"; then
-    dnl according to Unix 98 specs, regcomp() is in libc but I believe that
-    dnl on some old systems it may be in libregex - check for it too?
-    AC_CHECK_HEADER(regex.h, AC_CHECK_FUNCS(regcomp))
-
-    if test "x$ac_cv_func_regcomp" != "xyes"; then
-        dnl we were asked to use the system version of regex lib only but it
-        dnl is not available
-        if test "$wxUSE_REGEX" = "sys"; then
-            AC_MSG_ERROR([system regex library not found! Use --with-regex to use the built-in regex library.])
-        fi
-
-        dnl fallback to the built in code
-        REGEX_INCLUDE="-I\${top_srcdir}/src/regex"
-    fi
-
-    AC_DEFINE(wxUSE_REGEX)
-fi
-
 ZLIB_INCLUDE=
 if test "$wxUSE_ZLIB" = "yes" -o "$wxUSE_ZLIB" = "sys" ; then
   AC_DEFINE(wxUSE_ZLIB)
 ZLIB_INCLUDE=
 if test "$wxUSE_ZLIB" = "yes" -o "$wxUSE_ZLIB" = "sys" ; then
   AC_DEFINE(wxUSE_ZLIB)
@@ -3334,17 +3392,25 @@ if test "$wxUSE_FREETYPE" = "yes" -o "$wxUSE_FREETYPE" = "sys" ; then
 fi
 
 if test "$wxUSE_OPENGL" = "yes"; then
 fi
 
 if test "$wxUSE_OPENGL" = "yes"; then
-  AC_CHECK_HEADER(GL/gl.h, [
+  if test "$wxUSE_MAC" = 1; then
     AC_DEFINE(wxUSE_OPENGL)
     AC_DEFINE(wxUSE_GLCANVAS)
     AC_DEFINE(wxUSE_OPENGL)
     AC_DEFINE(wxUSE_GLCANVAS)
-    AC_CHECK_LIB(GL, glFlush, [
-      OPENGL_LINK="-lGL -lGLU"
-    ],[
-        AC_CHECK_LIB(MesaGL, glFlush, [
-        OPENGL_LINK="-lMesaGL -lMesaGLU"
-      ],)
-     ],)
-    ],wxUSE_OPENGL=0)
+    OPENGL_LINK="-framework OpenGL -framework AGL"
+    SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl"
+  else
+    AC_CHECK_HEADER(GL/gl.h, [
+      AC_DEFINE(wxUSE_OPENGL)
+      AC_DEFINE(wxUSE_GLCANVAS)
+      SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl"
+      AC_CHECK_LIB(GL, glFlush, [
+        OPENGL_LINK="-lGL -lGLU"
+      ],[
+          AC_CHECK_LIB(MesaGL, glFlush, [
+          OPENGL_LINK="-lMesaGL -lMesaGLU"
+        ],)
+       ],)
+      ],wxUSE_OPENGL=0)
+  fi
 fi
 
 dnl ---------------------------------------------------------------------------
 fi
 
 dnl ---------------------------------------------------------------------------
@@ -3610,8 +3676,7 @@ if test "$wxUSE_DATETIME" = "yes"; then
                 ],
                 [
                     struct timeval tv;
                 ],
                 [
                     struct timeval tv;
-                    struct timezone tz;
-                    gettimeofday(&tv, &tz);
+                    gettimeofday(&tv, NULL);
                 ],
                 wx_cv_func_gettimeofday_has_2_args=yes,
                 AC_TRY_COMPILE(
                 ],
                 wx_cv_func_gettimeofday_has_2_args=yes,
                 AC_TRY_COMPILE(
@@ -3624,7 +3689,10 @@ if test "$wxUSE_DATETIME" = "yes"; then
                         gettimeofday(&tv);
                     ],
                     wx_cv_func_gettimeofday_has_2_args=no,
                         gettimeofday(&tv);
                     ],
                     wx_cv_func_gettimeofday_has_2_args=no,
-                    wx_cv_func_gettimeofday_has_2_args=unknown
+                    [
+                        AC_MSG_WARN([failed to determine number of gettimeofday() arguments])
+                        wx_cv_func_gettimeofday_has_2_args=unknown
+                    ]
                 )
             )
             AC_LANG_RESTORE
                 )
             )
             AC_LANG_RESTORE
@@ -3765,8 +3833,8 @@ if test "$TOOLKIT" != "MSW"; then
 HAVE_DL_FUNCS=0
 HAVE_SHL_FUNCS=0
 if test "$wxUSE_DYNLIB_CLASS" = "yes"; then
 HAVE_DL_FUNCS=0
 HAVE_SHL_FUNCS=0
 if test "$wxUSE_DYNLIB_CLASS" = "yes"; then
-    if test "$USE_MAC" = 1; then
-        dnl Mac OS X needs dl_macosx.c to be compiled in to fake dlopen/dlerror
+    if test "$USE_DARWIN" = 1; then
+        dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X
         HAVE_DL_FUNCS=1
     else
         dnl the test is a bit complicated because we check for dlopen() both with
         HAVE_DL_FUNCS=1
     else
         dnl the test is a bit complicated because we check for dlopen() both with
@@ -3908,8 +3976,7 @@ if test "$wxUSE_HELP" = "yes"; then
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help"
 
     if test "$USE_WIN32" = 1; then
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help"
 
     if test "$USE_WIN32" = 1; then
-      if test "$wxUSE_WXHTML_HELP" = "yes"; then
-        AC_DEFINE(wxUSE_WXHTML_HELP)
+      if test "$wxUSE_MS_HTML_HELP" = "yes"; then
         AC_CHECK_HEADER(htmlhelp.h, 
             [
                 AC_DEFINE(wxUSE_MS_HTML_HELP)
         AC_CHECK_HEADER(htmlhelp.h, 
             [
                 AC_DEFINE(wxUSE_MS_HTML_HELP)
@@ -3920,6 +3987,15 @@ if test "$wxUSE_HELP" = "yes"; then
             ])
       fi
     fi
             ])
       fi
     fi
+
+    if test "$wxUSE_WXHTML_HELP" = "yes"; then
+      if test "$wxUSE_HTML" = "yes"; then
+        AC_DEFINE(wxUSE_WXHTML_HELP)
+      else
+        AC_MSG_WARN(Cannot use wxHTML-based help without wxHTML so it won't be compiled)
+        wxUSE_WXHTML_HELP=no
+      fi
+    fi
 fi
 
 if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
 fi
 
 if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then
@@ -3990,7 +4066,7 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
                 ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)"
                 ALL_DEPFILES="$ALL_DEPFILES \$(OLEDEPS)"
                 CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"
                 ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)"
                 ALL_DEPFILES="$ALL_DEPFILES \$(OLEDEPS)"
                 CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"
-                LIBS="$LIBS -lole32 -luuid"
+                LIBS="$LIBS -lrpcrt4 -loleaut32 -lole32 -luuid"
                 AC_DEFINE(wxUSE_OLE)
 
                 dnl metafiles need the ole code, right??  if not this
                 AC_DEFINE(wxUSE_OLE)
 
                 dnl metafiles need the ole code, right??  if not this
@@ -4118,6 +4194,12 @@ if test "$wxUSE_NOTEBOOK" = "yes"; then
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
 fi
 
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook"
 fi
 
+if test "$wxUSE_PROPSHEET" = "yes"; then
+    AC_DEFINE(wxUSE_PROPSHEET)
+    USES_CONTROLS=1
+    SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS proplist"
+fi
+
 if test "$wxUSE_RADIOBOX" = "yes"; then
     AC_DEFINE(wxUSE_RADIOBOX)
     USES_CONTROLS=1
 if test "$wxUSE_RADIOBOX" = "yes"; then
     AC_DEFINE(wxUSE_RADIOBOX)
     USES_CONTROLS=1
@@ -4275,10 +4357,10 @@ dnl ---------------------------------------------------------------------------
 dnl misc options
 dnl ---------------------------------------------------------------------------
 
 dnl misc options
 dnl ---------------------------------------------------------------------------
 
-dnl TODO this is unused for now...
-dnl if test "$wxUSE_WXTREE" = "yes"; then
-dnl   AC_DEFINE(wxUSE_WXTREE)
-dnl fi
+if test "$wxUSE_TREELAYOUT" = "yes"; then
+    AC_DEFINE(wxUSE_TREELAYOUT)
+    SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treelay"
+fi
 
 if test "$wxUSE_DRAGIMAGE" = "yes"; then
     AC_DEFINE(wxUSE_DRAGIMAGE)
 
 if test "$wxUSE_DRAGIMAGE" = "yes"; then
     AC_DEFINE(wxUSE_DRAGIMAGE)
@@ -4354,6 +4436,10 @@ if test "$wxUSE_FILEDLG" = "yes"; then
     AC_DEFINE(wxUSE_FILEDLG)
 fi
 
     AC_DEFINE(wxUSE_FILEDLG)
 fi
 
+if test "$wxUSE_FINDREPLDLG" = "yes"; then
+    AC_DEFINE(wxUSE_FINDREPLDLG)
+fi
+
 if test "$wxUSE_FONTDLG" = "yes"; then
     AC_DEFINE(wxUSE_FONTDLG)
 fi
 if test "$wxUSE_FONTDLG" = "yes"; then
     AC_DEFINE(wxUSE_FONTDLG)
 fi
@@ -4386,6 +4472,10 @@ if test "$wxUSE_PROGRESSDLG" = "yes"; then
     fi
 fi
 
     fi
 fi
 
+if test "$wxUSE_SPLASH" = "yes"; then
+    AC_DEFINE(wxUSE_SPLASH)
+fi
+
 if test "$wxUSE_STARTUP_TIPS" = "yes"; then
     if test "$wxUSE_CONSTRAINTS" != "yes"; then
        AC_MSG_WARN(Startup tips requires constraints and won't be compiled without them)
 if test "$wxUSE_STARTUP_TIPS" = "yes"; then
     if test "$wxUSE_CONSTRAINTS" != "yes"; then
        AC_MSG_WARN(Startup tips requires constraints and won't be compiled without them)
@@ -4418,6 +4508,18 @@ fi
 
 AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO)
 
 
 AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO)
 
+dnl ---------------------------------------------------------------------------
+dnl define the variable containing the installation prefix (used in dcpsg.cpp)
+dnl ---------------------------------------------------------------------------
+
+if test "x$prefix" != "xNONE"; then
+    wxPREFIX=$prefix
+else
+    wxPREFIX=$ac_default_prefix
+fi
+
+AC_DEFINE_UNQUOTED(wxINSTALL_PREFIX, "$wxPREFIX")
+
 dnl ---------------------------------------------------------------------------
 dnl Output the makefiles and such from the results found above
 dnl ---------------------------------------------------------------------------
 dnl ---------------------------------------------------------------------------
 dnl Output the makefiles and such from the results found above
 dnl ---------------------------------------------------------------------------
@@ -4430,7 +4532,7 @@ dnl
 dnl note that we always link with -lm except for Mac OS X
 dnl extended.c uses floor() and is always linked in
 EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -lm"
 dnl note that we always link with -lm except for Mac OS X
 dnl extended.c uses floor() and is always linked in
 EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -lm"
-if test "$USE_MAC" = 1 ; then
+if test "$wxUSE_MAC" = 1 ; then
     EXTRA_LIBS="$EXTRA_LIBS -framework Carbon -framework System"
 fi
 if test "$wxUSE_GUI" = "yes"; then
     EXTRA_LIBS="$EXTRA_LIBS -framework Carbon -framework System"
 fi
 if test "$wxUSE_GUI" = "yes"; then
@@ -4472,10 +4574,10 @@ if test "$wxUSE_GUI" = "yes"; then
     dnl      library features they need are present)
 
     dnl TODO some samples are never built so far:
     dnl      library features they need are present)
 
     dnl TODO some samples are never built so far:
-    dnl      ipc, mfc, nativdlg, oleauto, ownerdrw, proplist
+    dnl      ipc, mfc, nativdlg, oleauto, ownerdrw
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs \
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs \
-                     drawing dynamic event font fractal image \
-                     minimal richedit widgets"
+                     drawing dynamic erase event exec font image \
+                     minimal richedit rotate widgets"
 
     if test "$wxUSE_UNIVERSAL" = "yes" ; then
         SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS univ"
 
     if test "$wxUSE_UNIVERSAL" = "yes" ; then
         SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS univ"
@@ -4484,7 +4586,7 @@ if test "$wxUSE_GUI" = "yes"; then
     dnl this is needed to be able to find AFM files
     CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)"
 else
     dnl this is needed to be able to find AFM files
     CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)"
 else
-    SAMPLES_SUBDIRS=""
+    SAMPLES_SUBDIRS="console"
 fi
 
 dnl for convenience, sort the samples in alphabetical order
 fi
 
 dnl for convenience, sort the samples in alphabetical order
@@ -4580,6 +4682,7 @@ AC_SUBST(OPENGL_LIBS)
 AC_SUBST(EXTRADEFS)
 AC_SUBST(LIBS)
 AC_SUBST(LD_LIBS)
 AC_SUBST(EXTRADEFS)
 AC_SUBST(LIBS)
 AC_SUBST(LD_LIBS)
+AC_SUBST(WXMSW_DLL_DEFINES)
 
 dnl additional resurces settings
 AC_SUBST(RCINPUTSWITCH)
 
 dnl additional resurces settings
 AC_SUBST(RCINPUTSWITCH)
@@ -4629,11 +4732,12 @@ if test "$wxUSE_GUI" = "yes"; then
     wx_cv_path_ifs=$PATH_IFS
     wx_cv_program_ext=$PROGRAM_EXT
     wx_cv_target_library=$WX_TARGET_LIBRARY
     wx_cv_path_ifs=$PATH_IFS
     wx_cv_program_ext=$PROGRAM_EXT
     wx_cv_target_library=$WX_TARGET_LIBRARY
+    wx_cv_target_library_gl=$WX_TARGET_LIBRARY_GL
     wx_cv_target_libtype=$WX_TARGET_LIBRARY_TYPE
     dnl we need to export them because passing them through cache won't
     dnl work when cache=/dev/null (which is default for autoconf 2.50)
     export wx_cv_path_samplesubdirs wx_cv_path_ifs wx_cv_program_ext \
     wx_cv_target_libtype=$WX_TARGET_LIBRARY_TYPE
     dnl we need to export them because passing them through cache won't
     dnl work when cache=/dev/null (which is default for autoconf 2.50)
     export wx_cv_path_samplesubdirs wx_cv_path_ifs wx_cv_program_ext \
-           wx_cv_target_library wx_cv_target_libtype
+           wx_cv_target_library wx_cv_target_library_gl wx_cv_target_libtype
     AC_CONFIG_SUBDIRS(demos samples utils contrib)
 fi
 dnl from wxUSE_GUI
     AC_CONFIG_SUBDIRS(demos samples utils contrib)
 fi
 dnl from wxUSE_GUI