]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
MingW32 compilation fixes all over
[wxWidgets.git] / configure.in
index 21ffaa8a7b3c5da974c843bd721e8058baa8389c..32e622485d182ddaf5e47f136d477607832d6356 100644 (file)
@@ -80,7 +80,7 @@ USE_FREEBSD=
 USE_VMS=
 USE_ULTRIX=
 USE_CYGWIN=
-USE_MINGW32=
+USE_MINGW=
 USE_DATA_GENERAL=
 
 dnl the list of all available toolkits
@@ -186,6 +186,16 @@ case "${host}" in
     AC_DEFINE(__WIN95__)
     AC_DEFINE(__WINDOWS__)
     AC_DEFINE(__GNUWIN32__)
+    AC_DEFINE(WINVER, 0x0400)
+    DEFAULT_DEFAULT_wxUSE_MSW=1
+  ;;
+  *-*-mingw32* )
+    USE_UNIX=0
+    AC_DEFINE(__WIN32__)
+    AC_DEFINE(__WIN95__)
+    AC_DEFINE(__WINDOWS__)
+    AC_DEFINE(__GNUWIN32__)
+    AC_DEFINE(WINVER, 0x0400)
     DEFAULT_DEFAULT_wxUSE_MSW=1
   ;;
 
@@ -289,8 +299,14 @@ if test $DEBUG_CONFIGURE = 1; then
   DEFAULT_wxUSE_COMMONDLGS=no
   DEFAULT_wxUSE_DIRDLG=no
   DEFAULT_wxUSE_TEXTDLG=no
+  DEFAULT_wxUSE_STARTUP_TIPS=no
   DEFAULT_wxUSE_PROGRESSDLG=no
   DEFAULT_wxUSE_MINIFRAME=no
+  DEFAULT_wxUSE_HTML=no
+  DEFAULT_wxUSE_FS_INET=no
+  DEFAULT_wxUSE_FS_ZIP=no
+  DEFAULT_wxUSE_BUSYINFO=no
+  DEFAULT_wxUSE_ZIPSTREAM=no
   DEFAULT_wxUSE_VALIDATORS=yes
 
   DEFAULT_wxUSE_ACCEL=no
@@ -387,8 +403,14 @@ else
   DEFAULT_wxUSE_COMMONDLGS=yes
   DEFAULT_wxUSE_DIRDLG=yes
   DEFAULT_wxUSE_TEXTDLG=yes
+  DEFAULT_wxUSE_STARTUP_TIPS=yes
   DEFAULT_wxUSE_PROGRESSDLG=yes
   DEFAULT_wxUSE_MINIFRAME=yes
+  DEFAULT_wxUSE_HTML=yes
+  DEFAULT_wxUSE_FS_INET=yes
+  DEFAULT_wxUSE_FS_ZIP=yes
+  DEFAULT_wxUSE_BUSYINFO=yes
+  DEFAULT_wxUSE_ZIPSTREAM=yes
   DEFAULT_wxUSE_VALIDATORS=yes
 
   DEFAULT_wxUSE_ACCEL=yes
@@ -521,6 +543,9 @@ WX_ARG_ENABLE(wcsrtombs,     [  --enable-wcsrtombs      use wcsrtombs instead of
 WX_ARG_ENABLE(wxprintfv,     [  --enable-wxprintfv      use wxWindows implementation of vprintf()], wxUSE_EXPERIMENTAL_PRINTF)
 WX_ARG_ENABLE(joystick,      [  --enable-joystick       compile in joystick support (Linux only)], wxUSE_JOYSTICK)
 WX_ARG_ENABLE(std_iostreams, [  --enable-std_iostreams  use standard C++ stream classes], wxUSE_STD_IOSTREAM)
+WX_ARG_ENABLE(fs_inet,       [  --enable-fs_inet        use virtual HTTP/FTP filesystems], wxUSE_FS_INET)
+WX_ARG_ENABLE(fs_zip,        [  --enable-fs_zip         use virtual ZIP filesystems], wxUSE_FS_ZIP)
+WX_ARG_ENABLE(zipstream,     [  --enable-zipstream      use wxZipInputStream], wxUSE_ZIPSTREAM)
 
 dnl ---------------------------------------------------------------------------
 dnl "big" options (i.e. those which change a lot of things throughout the library)
@@ -670,11 +695,14 @@ dnl ---------------------------------------------------------------------------
 WX_ARG_ENABLE(commondlg,   [  --enable-commondlg      use common dialogs (wxDirDialog, wxProgressDialog, wxTextDialog, ...)], wxUSE_COMMONDLGS)
 WX_ARG_ENABLE(dirdlg,      [  --enable-dirdlg         use wxDirDialog], wxUSE_DIRDLG)
 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(miniframe,   [  --enable-miniframe      use wxMiniFrame class], wxUSE_MINIFRAME)
+WX_ARG_ENABLE(html,        [  --enable-html           use wxHTML sub-library], wxUSE_HTML)
 WX_ARG_ENABLE(tooltips,    [  --enable-tooltips       use wxToolTip class], wxUSE_TOOLTIPS)
 WX_ARG_ENABLE(splines,     [  --enable-splines        use spline drawing code], wxUSE_SPLINES)
 WX_ARG_ENABLE(validators,  [  --enable-validators     use wxValidator and derived classes], wxUSE_VALIDATORS)
+WX_ARG_ENABLE(busyinfo,    [  --enable-busyinfo       use wxBusyInfo], wxUSE_BUSYINFO)
 
 dnl cache the options values before (may be) aborting below
 WX_ARG_CACHE_FLUSH
@@ -951,16 +979,23 @@ WXGTK12=
 
 WXWINE=
 
-if test "$wxUSE_CYGWIN" = 1; then
+if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then
   AC_MSG_CHECKING(for Windows headers)
   WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h)
+  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...
+  LIBS="$LIBS  -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -loldnames -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32"
 
   if test "$ac_find_includes" != "" ; then
     AC_MSG_RESULT(found $ac_find_includes)
     TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes"
   else
     AC_MSG_RESULT(no)
-    AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
+    if test "$cross_compiling" != "yes" ; then
+      AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
+    fi  
   fi
 
   TOOLKIT=MSW
@@ -1536,6 +1571,22 @@ if test "$wxUSE_FILE" = "yes"; then
   AC_DEFINE(wxUSE_FILE)
 fi
 
+if test "$wxUSE_FS_INET" = "yes"; then
+  AC_DEFINE(wxUSE_FS_INET)
+fi
+
+if test "$wxUSE_FS_ZIP" = "yes"; then
+  AC_DEFINE(wxUSE_FS_ZIP)
+fi
+
+if test "$wxUSE_ZIPSTREAM" = "yes"; then
+  AC_DEFINE(wxUSE_ZIPSTREAM)
+fi
+
+if test "$wxUSE_BUSYINFO" = "yes"; then
+  AC_DEFINE(wxUSE_BUSYINFO)
+fi
+
 if test "$wxUSE_STD_IOSTREAM" = "yes"; then
   AC_DEFINE(wxUSE_STD_IOSTREAM)
 fi
@@ -1634,6 +1685,9 @@ if test "$wxUSE_JOYSTICK" = 1; then
   fi
 fi
 
+
+AC_CHECK_FUNCS(vsscanf)
+
 dnl ------------------------------------------------------------------------
 dnl DLL support
 dnl ------------------------------------------------------------------------
@@ -1969,6 +2023,14 @@ if test "$wxUSE_TEXTDLG" = "yes"; then
     AC_DEFINE(wxUSE_TEXTDLG)
 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)
+    else
+        AC_DEFINE(wxUSE_STARTUP_TIPS)
+    fi
+fi
+
 if test "$wxUSE_PROGRESSDLG" = "yes"; then
     if test "$wxUSE_CONSTRAINTS" != "yes"; then
        AC_MSG_WARN(wxProgressDialog requires constraints so it won't be compiled without them)
@@ -1982,6 +2044,12 @@ if test "$wxUSE_MINIFRAME" = "yes"; then
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS minifram"
 fi
 
+if test "$wxUSE_HTML" = "yes"; then
+    AC_DEFINE(wxUSE_HTML)
+    SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html"
+    INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS html"
+fi
+
 if test "$wxUSE_VALIDATORS" = "yes"; then
     AC_DEFINE(wxUSE_VALIDATORS)
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate"
@@ -2112,8 +2180,11 @@ dnl             samples/Makefile samples/minimal/Makefile
             include/wx/gtk/Makefile
             include/wx/motif/Makefile
             include/wx/msw/Makefile
+            include/wx/msw/gnuwin32/Makefile
+            include/wx/msw/ctl3d/Makefile
             include/wx/protocol/Makefile
             include/wx/unix/Makefile
+            include/wx/html/Makefile
             misc/Makefile
             misc/afm/Makefile
             misc/gs_afm/Makefile
@@ -2167,6 +2238,14 @@ dnl             samples/Makefile samples/minimal/Makefile
             samples/validate/Makefile
             samples/wxpoem/Makefile
             samples/wxsocket/Makefile
+            samples/html/Makefile
+            samples/html/about/Makefile
+            samples/html/help/Makefile
+            samples/html/test/Makefile
+            samples/html/printing/Makefile
+            samples/html/widget/Makefile
+            samples/html/virtual/Makefile
+            samples/html/zip/Makefile
           ],
           [
             chmod +x wx-config