]> git.saurik.com Git - wxWidgets.git/commitdiff
Added some WINE things.
authorRobert Roebling <robert@roebling.de>
Mon, 7 Jun 1999 21:17:21 +0000 (21:17 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 7 Jun 1999 21:17:21 +0000 (21:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure.in
docs/symbols.txt
include/wx/gtk/.cvsignore
include/wx/gtk1/.cvsignore
samples/db/.cvsignore
samples/image/.cvsignore
samples/notebook/.cvsignore
src/common/parser.y
src/gtk/Makefile.am
src/gtk1/Makefile.am
src/msw/Makefile.am [new file with mode: 0644]

index 718f81becb1bfd90750aed2d82ce5fafc63b9964..fd9e0c5f96f56b2e189af38f1afd76de16da3226 100644 (file)
@@ -88,6 +88,7 @@ dnl     which are either yes or no
 DEFAULT_wxUSE_GTK=0
 DEFAULT_wxUSE_MOTIF=0
 DEFAULT_wxUSE_MSW=0
+DEFAULT_wxUSE_WINE=0
 
 dnl these are the values which are really default for the given platform -
 dnl they're not cached and are only used if no --with-toolkit was given *and*
@@ -95,6 +96,7 @@ dnl nothing was found in the cache
 DEFAULT_DEFAULT_wxUSE_GTK=0
 DEFAULT_DEFAULT_wxUSE_MOTIF=0
 DEFAULT_DEFAULT_wxUSE_MSW=0
+DEFAULT_DEFAULT_wxUSE_WINE=0
 
 case "${host}" in
   *-hp-hpux* )
@@ -426,6 +428,7 @@ done
 
 AC_ARG_WITH(gtk,           [  --with-gtk              use GTK+], [wxUSE_GTK="$withval" TOOLKIT_GIVEN=1])
 AC_ARG_WITH(motif,         [  --with-motif            use Motif/Lesstif], [wxUSE_MOTIF="$withval" TOOLKIT_GIVEN=1])
+AC_ARG_WITH(wine,          [  --with-wine             use WINE], [wxUSE_WINE="$withval" TOOLKIT_GIVEN=1])
 AC_ARG_WITH(cygwin,        [  --with-cygwin           use Cygwin for MS-Windows], [wxUSE_CYGWIN="$withval" TOOLKIT_GIVEN=1])
 AC_ARG_WITH(mingw,         [  --with-mingw            use GCC Minimal MS-Windows], [wxUSE_MINGW="$withval" TOOLKIT_GIVEN=1])
 
@@ -652,14 +655,14 @@ AC_MSG_CHECKING(for toolkit)
 
 if test "$TOOLKIT_GIVEN" = 1; then
   dnl convert "yes" to 1 and "no" to 0
-  for toolkit in GTK MOTIF MSW; do
+  for toolkit in GTK MOTIF MSW WINE; do
     var=wxUSE_$toolkit
     eval "value=\$${var}"
     eval "$var=`echo \$value | sed -e "s/yes/1/" -e "s/no/0/"`"
   done
 else
   dnl try to guess the most apropriate toolkit for this platform
-  for toolkit in GTK MOTIF MSW; do
+  for toolkit in GTK MOTIF MSW WINE; do
     if test "$has_toolkit_in_cache" != 1; then
       var=DEFAULT_DEFAULT_wxUSE_$toolkit
     else
@@ -671,7 +674,7 @@ fi
 
 dnl NB: this supposes that the shell is able to handle arithmetic expansion and
 dnl     the ${VAR:-VALUE} construction. It does simplify our life though...
-NUM_TOOLKITS="$((${wxUSE_GTK:-0}+${wxUSE_MOTIF:-0}+${wxUSE_MSW:-0}))"
+NUM_TOOLKITS="$((${wxUSE_GTK:-0}+${wxUSE_MOTIF:-0}+${wxUSE_WINE:-0}+${wxUSE_MSW:-0}))"
 
 case "$NUM_TOOLKITS" in
   1)
@@ -684,7 +687,7 @@ case "$NUM_TOOLKITS" in
 esac
 
 dnl cache the wxUSE_<TOOLKIT> values too
-for toolkit in GTK MOTIF MSW; do
+for toolkit in GTK MOTIF MSW WINE; do
   var=wxUSE_$toolkit
   eval "value=\$${var}"
   if test "x$value" != x; then
@@ -864,19 +867,24 @@ SEARCH_INCLUDE="\
     /usr/XFree86/include/X11  \
                               \
     /usr/include              \
+    /usr/local/include        \
+                              \
     /usr/include/gtk          \
-    /usr/include/gdk          \
+    /usr/local/include/gtk    \
     /usr/include/glib         \
-    /usr/local/include        \
+    /usr/local/include/glib   \
+                              \
+    /usr/include/qt           \
+    /usr/local/include/qt     \
+                              \
+    /usr/include/wine         \
+    /usr/local/include/wine   \
+                              \
     /usr/unsupported/include  \
     /usr/athena/include       \
     /usr/local/x11r5/include  \
     /usr/lpp/Xamples/include  \
                               \
-    /usr/local/include/gtk    \
-    /usr/local/include/qt     \
-    /usr/include/qt           \
-                              \
     /usr/openwin/include      \
     /usr/openwin/share/include \
     "
@@ -904,6 +912,8 @@ GUI_TK_LINK=
 
 WXGTK12=
 
+WXWINE=
+
 if test "$wxUSE_GTK" = 1; then
   dnl avoid calling AM_PATH_GTK twice, so check first for the newer version and
   dnl only then, if it wasn't found, for an older one
@@ -917,6 +927,36 @@ if test "$wxUSE_GTK" = 1; then
   TOOLKIT=GTK
 fi
 
+if test "$wxUSE_WINE" = 1; then
+    AC_MSG_CHECKING(for WINE includes)
+    WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h)
+    if test "$ac_find_includes" != "" ; then
+        AC_MSG_RESULT(found $ac_find_includes)
+    else
+        AC_MSG_RESULT(no)
+        AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h)
+    fi
+
+    XPM_LINK=""
+    AC_MSG_CHECKING(for Xpm library)
+    WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
+    if test "$ac_find_libraries" != "" ; then
+        WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
+        CHECK_LINK="$GUI_TK_LIBRARY $ac_path_to_link"
+        XPM_LINK="-lXpm "
+        AC_DEFINE(wxHAVE_LIB_XPM)
+        AC_MSG_RESULT(found at $ac_find_libraries)
+    else
+        AC_MSG_RESULT(no)
+        AC_MSG_WARN(library will be compiled without support for images in XPM format)
+    fi
+
+    GUI_TK_LINK="-lwine $XPM_LINK -lXmu -lX11 -lm"
+    GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK"
+    WXWINE=1
+    TOOLKIT=MSW
+fi
+
 if test "$wxUSE_MOTIF" = 1; then
     dnl find the X11 include and library files
     dnl   defines x_includes and x_libraries
@@ -1228,6 +1268,10 @@ if test "$WXGTK12" = 1 ; then
   AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12)
 fi
 
+if test "$WXWINE" = 1 ; then
+  TOOLKIT_DEF="${TOOLKIT_DEF} -D__WXWINE__"
+fi
+
 WXDEBUG=
 if test "$wxUSE_DEBUG_GDB" = "yes" ; then
     wxUSE_DEBUG_INFO=yes
@@ -1620,6 +1664,9 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
   else
     AC_MSG_WARN(drag and drop is only supported under GTK 1.2)
   fi
+  if test "$WXWINE" = 1 ; then
+    AC_MSG_WARN(drag and drop is only supported under WINE)
+  fi
 fi
 
 if test "$wxUSE_SPLINES" = "yes" ; then
@@ -1915,6 +1962,7 @@ AC_OUTPUT([
             src/Makefile
             src/gtk/Makefile
             src/motif/Makefile
+            src/msw/Makefile
             include/Makefile
             include/wx/Makefile
             include/wx/generic/Makefile
index 1b2865d1cf8cd49680309865a622ac07acf3b1e9..2eb06a06f2b3d2e60643e87d59b6e7e67e5313d3 100644 (file)
@@ -9,6 +9,7 @@ __WXXT__        Xt; mutually exclusive with WX_MOTIF (?)
 __WXGTK__       GTK
 __WXGTK12__     GTK 1.2 or higher
 __WXMSW__       Any Windows
+__WXWINE__      WINE (i.e. Win32 on Unix)
 __WXMAC__       MacOS
 __UNIX__        any Unix
 __WINDOWS__     any Windows
index 3f915354e805c9af2e0df86528eec76254d449b0..6d050a0ed7e3606105940db34d61880833ef1f2b 100644 (file)
@@ -1 +1,2 @@
 setup.h
+Makefile.in
index 3f915354e805c9af2e0df86528eec76254d449b0..6d050a0ed7e3606105940db34d61880833ef1f2b 100644 (file)
@@ -1 +1,2 @@
 setup.h
+Makefile.in
index f5eaa1a85937ad3c039965403e248ee9192db378..b97957c729ffdf390362f4dc95852f593cb7d599 100644 (file)
@@ -1,2 +1,3 @@
 Makefile.in
+database.cfg
 
index f5eaa1a85937ad3c039965403e248ee9192db378..4b34ba88ecb7c3f32ffbac22e65af8711487c827 100644 (file)
@@ -1,2 +1,3 @@
 Makefile.in
+test.png
 
index 7957c412169679bb2eccea94b77186fa52bde6b5..70845e08eb0b807b1022dc47cd27e67f726d4a0f 100644 (file)
@@ -1,3 +1 @@
-Linux
-linux-gnu
-linux
\ No newline at end of file
+Makefile.in
index d02184cfd668bda601ebf4255dfe433311e9c88d..cea8e3a3bbb61625cc7e4e9adebeb8f948accdce 100644 (file)
@@ -119,7 +119,7 @@ arg1        :       WORD
 
 %%
 
-#if (defined(__WXGTK__) || defined(__WXMOTIF__)) && !defined(NO_CONFIGURE)
+#if (defined(__WXGTK__) || defined(__WXWINE__) || defined(__WXMOTIF__)) && !defined(NO_CONFIGURE)
 #include "lexer.c"
 #else
 #if (defined(__MWERKS__))
index 067a612827c16204d7c44737e9cb1458c6196685..4af3fb61fb082c1bdddeb06981993c8b20ff662b 100644 (file)
@@ -14,7 +14,7 @@ VPATH = .:${srcdir}:${srcdir}/../common:${srcdir}/../generic:${EXTRA_VPATH}
 EXTRA_DIST = "${srcdir}/../common ${srcdir}/../generic ${srcdir}"
 
 lib_LTLIBRARIES = @WX_LIBRARY_NAME@
-EXTRA_LTLIBRARIES = libwx_gtk.la libwx_motif.la
+EXTRA_LTLIBRARIES = libwx_gtk.la libwx_motif.la libwx_msw.la
 
 # these are the common files which always make part of the library
 libwx_gtk_la_SOURCES = \
index 067a612827c16204d7c44737e9cb1458c6196685..4af3fb61fb082c1bdddeb06981993c8b20ff662b 100644 (file)
@@ -14,7 +14,7 @@ VPATH = .:${srcdir}:${srcdir}/../common:${srcdir}/../generic:${EXTRA_VPATH}
 EXTRA_DIST = "${srcdir}/../common ${srcdir}/../generic ${srcdir}"
 
 lib_LTLIBRARIES = @WX_LIBRARY_NAME@
-EXTRA_LTLIBRARIES = libwx_gtk.la libwx_motif.la
+EXTRA_LTLIBRARIES = libwx_gtk.la libwx_motif.la libwx_msw.la
 
 # these are the common files which always make part of the library
 libwx_gtk_la_SOURCES = \
diff --git a/src/msw/Makefile.am b/src/msw/Makefile.am
new file mode 100644 (file)
index 0000000..fc82203
--- /dev/null
@@ -0,0 +1,59 @@
+## Purpose: The automake makefile for wxWindows (src/msw subdirectory)
+## Author:  Phil Blecker, Vadim Zeitlin
+## Version: $Id$
+##
+## Process this file with automake to produce Makefile.in
+
+SUFFIXES = .cpp .c
+
+DEFS = $(TOOLKIT_DEF) $(WXDEBUG_DEFINE)
+LIBS = $(GUILIBS)
+
+VPATH = .:${srcdir}:${srcdir}/../common:${srcdir}/../generic:${EXTRA_VPATH}
+
+EXTRA_DIST = "${srcdir}/../common ${srcdir}/../generic ${srcdir}"
+
+lib_LTLIBRARIES = @WX_LIBRARY_NAME@
+EXTRA_LTLIBRARIES = libwx_gtk.la libwx_motif.la libwx_msw.la
+
+# these are the common files which always make part of the library
+libwx_msw_la_SOURCES = \
+\
+ extended.c \
+ parser.c \
+\
+ list.cpp \
+ object.cpp \
+\
+ wincmn.cpp \
+ window.cpp
+
+# these are the sources which we build by our own rules
+#
+# TODO: parser.y can be included into SOURCES, but for the sake of my life I
+#       don't know where to put lexer.l - if I put it in the sources too,
+#       automake tries to build lexer.lo... and fails, of course. (VZ)
+BUILT_SOURCES = parser.c lexer.c
+parser.c: $(srcdir)/../common/parser.y lexer.c
+       $(YACC) $(srcdir)/../common/parser.y
+       @sed -e "s;$(srcdir)/../common/y.tab.c;parser.y;g" < y.tab.c | \
+       sed -e "s/BUFSIZ/5000/g"            | \
+       sed -e "s/YYLMAX 200/YYLMAX 5000/g" | \
+       sed -e "s/yy/PROIO_yy/g"            | \
+       sed -e "s/input/PROIO_input/g"      | \
+       sed -e "s/unput/PROIO_unput/g"      > parser.c
+       @$(RM) y.tab.c
+
+lexer.c: $(srcdir)/../common/lexer.l
+       $(LEX) $(srcdir)/../common/lexer.l
+       @sed -e "s;$(srcdir)/../common/lex.yy.c;lexer.l;g" < lex.yy.c | \
+       sed -e "s/yy/PROIO_yy/g"            | \
+       sed -e "s/input/PROIO_input/g"      | \
+       sed -e "s/unput/PROIO_unput/g"      > lexer.c
+       @$(RM) lex.yy.c
+
+libwx_msw_la_LDFLAGS = -rpath @libdir@ \
+       -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+       -release $(LT_RELEASE)
+libwx_msw_la_LIBADD = $(LTLIBOBJS)
+libwx_msw_la_DEPENDENCIES = $(libwx_msw_la_LIBADD) lexer.l parser.y