]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Better memory errors handler (added GSOCK_MEMERR)
[wxWidgets.git] / configure.in
index 15ded7e5ec6a6f80f06e6b3c8d5e03bb1ee1082e..ff1f4e831540d4dafd84082da5d6b04076bb8338 100644 (file)
@@ -18,7 +18,7 @@ dnl ---------------------------------------------------------------------------
 dnl the file passed to AC_INIT should be specific to our package
 AC_INIT(wx-config.in)
 
-AC_CANONICAL_HOST
+AC_CANONICAL_SYSTEM
 
 dnl When making releases do:
 dnl
@@ -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
   ;;
 
@@ -396,11 +406,11 @@ else
   DEFAULT_wxUSE_STARTUP_TIPS=yes
   DEFAULT_wxUSE_PROGRESSDLG=yes
   DEFAULT_wxUSE_MINIFRAME=yes
-  DEFAULT_wxUSE_HTML=no
-  DEFAULT_wxUSE_FS_INET=no
-  DEFAULT_wxUSE_FS_ZIP=no
-  DEFAULT_wxUSE_BUSYINFO=no
-  DEFAULT_wxUSE_ZIPSTREAM=no
+  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
@@ -760,11 +770,15 @@ AC_CACHE_SAVE
 dnl cross-compiling support: we're cross compiling if the build system is
 dnl different from the target one (assume host and target be always the same)
 if eval "test $host != $build"; then
-  if eval "test $build != NONE"; then
-    CC="$build-gcc"
-    CXX="$build-g++"
-    RANLIB="$build-ranlib"
-    NM="$build-nm"
+  if eval "test $host_alias != NONE"; then
+    CC=$host_alias-gcc 
+    CXX=$host_alias-c++ 
+    AR=$host_alias-ar
+    RANLIB=$host_alias-ranlib
+    DLLTOOL=$host_alias-dlltool 
+    LD=$host_alias-ld 
+    NM=$host_alias-nm
+    STRIP=$host_alias-strip
   fi
 fi
 
@@ -874,7 +888,53 @@ dnl DLLs under Win32.
 dnl AC_LIBTOOL_WIN32_DLL
 
 dnl disable static libs by default, this takes too much time...
-AM_DISABLE_STATIC
+dnl libtool doesn't work on anything but Linux and maybe
+dnl ***BSD
+
+case "${host}" in
+  *-hp-hpux* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-linux* )
+    AM_DISABLE_STATIC
+  ;;
+  *-*-irix5* | *-*-irix6* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-solaris2* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-sunos4* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-freebsd* | *-*-netbsd*)
+    AM_DISABLE_STATIC
+  ;;
+  *-*-osf* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-dgux5* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-sysv5* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-aix* )
+    AM_DISABLE_SHARED
+  ;;
+  *-*-cygwin32* )
+    AM_DISABLE_STATIC
+  ;;
+  *-*-mingw32* )
+    AM_DISABLE_STATIC
+  ;;
+  *-pc-os2_emx )
+    AM_DISABLE_SHARED
+  ;;
+  *)
+    AC_MSG_ERROR(unknown system type ${host}.)
+esac
+
 AM_PROG_LIBTOOL
 
 dnl ---------------------------------------------------------------------------
@@ -969,16 +1029,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
@@ -1668,6 +1735,9 @@ if test "$wxUSE_JOYSTICK" = 1; then
   fi
 fi
 
+
+AC_CHECK_FUNCS(vsscanf)
+
 dnl ------------------------------------------------------------------------
 dnl DLL support
 dnl ------------------------------------------------------------------------
@@ -1685,9 +1755,13 @@ if test "$wxUSE_DYNLIB_CLASS" = "yes"; then
                     [AC_DEFINE(HAVE_SHL_LOAD) HAVE_DL_FUNCS=1 HAVE_SHL_FUNCS=1])
 
     if test "$HAVE_DL_FUNCS" = 0; then
-        AC_MSG_WARN("--with-dynlib and --with-odbc will be disabled due to missing shared library support")
-        wxUSE_ODBC=no
-        wxUSE_DYNLIB_CLASS=no
+        if test "$USE_UNIX" = 1; then 
+            AC_MSG_WARN("--with-dynlib and --with-odbc will be disabled due to missing shared library support")
+            wxUSE_ODBC=no
+            wxUSE_DYNLIB_CLASS=no
+       else
+           AC_MSG_WARN("Cannot check dynlib requirements on non-Unix platforms. dynlib remains enabled.")
+       fi    
     fi
 fi
 
@@ -2142,6 +2216,7 @@ dnl (the original file name may be overriden by appending another name after a
 dnl colon)
 AC_OUTPUT([
             wx-config
+           makefile.unx
             Makefile
             src/Makefile
 
@@ -2160,6 +2235,8 @@ 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