Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move

svn path=/trunk/old-code/; revision=156202
  • Loading branch information...
commit ab0e0f57e60df09f7469b58387ce797791ed52f6 1 parent 7f5dcf5
@migueldeicaza migueldeicaza authored
View
27 winelib/ChangeLog
@@ -0,0 +1,27 @@
+2004-05-02 Duncan Mak <duncan@ximian.com>
+
+ * configure.ac (AC_OUTPUT): Remove dotnetctl/Makefile from here
+ as well. configure wouldn't run with the resulting tarball
+ wouldn't run otherwise.
+
+2004-04-30 Peter Bartok <pbartok@novell.com>
+ * Makefile.in: Commented out dotnetctl subdir until I have time to deal with
+ the new wine switches for newer wine versions
+
+2004-03-16 Peter Bartok <pbartok@novell.com>
+ * configure.ac: Fixed AC_INIT arguments
+ * Makefile.in: Added 'dist' and 'distcheck' rules (distcheck still needs work)
+
+2004-03-12 Peter Bartok <pbartok@novell.com>
+ * configure.ac: Removed wine_uuid check
+ * Make.rule.in: Removed wine_uuid reference
+
+
+2004-03-11 Peter Bartok <pbartok@novell.com>
+
+ * ChangeLog: Created
+ * configure.ac: Created
+ * Makefile.in: Changed to have rules for building subdirs
+ * Make.rules.in: Created
+ * aclocal.m4: Partially copied from wine
+ * autogen.sh: Copied from mono and stripped down
View
170 winelib/Make.rules.in
@@ -0,0 +1,170 @@
+# Copyright 2000 Francois Gouget for CodeWeavers
+# fgouget@codeweavers.com
+#
+# Modified by Peter Bartok <pbartok@novell.com> for use in mono project
+#
+# Global rules shared by all makefiles -*-Makefile-*-
+#
+# Each individual makefile must define the following variables:
+# TOPOBJDIR : top-level object directory
+# SRCDIR : source directory for this module
+#
+# Each individual makefile may define the following additional variables:
+#
+# SUBDIRS : subdirectories that contain a Makefile
+# DLLS : WineLib libraries to be built
+# EXES : WineLib executables to be built
+#
+# CEXTRA : extra c flags (e.g. '-Wall')
+# CXXEXTRA : extra c++ flags (e.g. '-Wall')
+# WRCEXTRA : extra wrc flags (e.g. '-p _SysRes')
+# DEFINES : defines (e.g. -DSTRICT)
+# INCLUDE_PATH : additional include path
+# LIBRARY_PATH : additional library path
+# LIBRARIES : additional Unix libraries to link with
+#
+# C_SRCS : C sources for the module
+# CXX_SRCS : C++ sources for the module
+# RC_SRCS : resource source files
+# SPEC_SRCS : interface definition files
+
+
+# Where is Wine
+
+WINE_INCLUDE_ROOT = @WINE_INCLUDE_ROOT@
+WINE_INCLUDE_PATH = @WINE_INCLUDE_PATH@
+WINE_LIBRARY_ROOT = @WINE_LIBRARY_ROOT@
+WINE_LIBRARY_PATH = @WINE_LIBRARY_PATH@
+WINE_DLL_ROOT = @WINE_DLL_ROOT@
+WINE_DLL_PATH = @WINE_DLL_PATH@
+
+LDPATH = @LDPATH@
+
+# Where are the MFC
+
+ATL_INCLUDE_ROOT = @ATL_INCLUDE_ROOT@
+ATL_INCLUDE_PATH = @ATL_INCLUDE_PATH@
+MFC_INCLUDE_ROOT = @MFC_INCLUDE_ROOT@
+MFC_INCLUDE_PATH = @MFC_INCLUDE_PATH@
+MFC_LIBRARY_ROOT = @MFC_LIBRARY_ROOT@
+MFC_LIBRARY_PATH = @MFC_LIBRARY_PATH@
+
+# Global definitions and options
+
+GLOBAL_DEFINES = -DDLLPATH=\"@WINE_DLL_ROOT@\" -DLIBPATH=\"@prefix@/lib\"
+GLOBAL_INCLUDE_PATH =
+GLOBAL_DLL_PATH =
+GLOBAL_DLLS =
+GLOBAL_LIBRARY_PATH =
+GLOBAL_LIBRARIES = dl pthread
+
+# First some useful definitions
+
+SHELL = /bin/sh
+CC = @CC@
+CPP = @CPP@
+CXX = @CXX@
+WRC = @WRC@
+CFLAGS = @CFLAGS@ $(CEXTRA)
+CXXFLAGS = @CXXFLAGS@ $(CXXEXTRA)
+WRCFLAGS = $(WRCEXTRA)
+OPTIONS = @OPTIONS@ -D_REENTRANT
+LIBS = @LIBS@ $(LIBRARY_PATH)
+DIVINCL = $(GLOBAL_INCLUDE_PATH) -I$(SRCDIR) $(INCLUDE_PATH) $(WINE_INCLUDE_PATH)
+ALLCFLAGS = $(DIVINCL) $(CFLAGS) $(GLOBAL_DEFINES) $(DEFINES) $(OPTIONS)
+ALLCXXFLAGS=$(DIVINCL) $(CXXFLAGS) $(GLOBAL_DEFINES) $(DEFINES) $(OPTIONS)
+ALL_DLL_PATH = $(DLL_PATH) $(GLOBAL_DLL_PATH) $(WINE_DLL_PATH)
+ALL_LIBRARY_PATH = $(LIBRARY_PATH) $(GLOBAL_LIBRARY_PATH) $(WINE_LIBRARY_PATH)
+WINE_LIBRARIES = -lwine -lwine_unicode
+ALL_LIBRARIES = $(LIBRARIES:%=-l%) $(GLOBAL_LIBRARIES:%=-l%) $(WINE_LIBRARIES)
+LDSHARED = @LDSHARED@
+LDXXSHARED= @LDXXSHARED@
+LDDLLFLAGS= @LDDLLFLAGS@
+LN_S = @LN_S@
+RM = rm -f
+MV = mv
+MKDIR = mkdir -p
+WINE = @WINE@
+WINEBUILD = @WINEBUILD@
+@SET_MAKE@
+
+# Installation infos
+
+INSTALL = install
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_SCRIPT = $(INSTALL)
+INSTALL_DATA = $(INSTALL) -m 644
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+dlldir = @libdir@/wine
+
+prog_manext = 1
+conf_manext = 5
+
+OBJS = $(C_SRCS:.c=.o) $(CXX_SRCS:.cpp=.o) \
+ $(SPEC_SRCS:.spec=.spec.o)
+CLEAN_FILES = *.spec.c y.tab.c y.tab.h lex.yy.c \
+ core *.orig *.rej \
+ \\\#*\\\# *~ *% .\\\#*
+
+# Implicit rules
+
+.SUFFIXES: .cpp .rc .res .spec .spec.c .spec.o
+
+.c.o:
+ $(CC) -c $(ALLCFLAGS) -o $@ $<
+
+.cpp.o:
+ $(CXX) -c $(ALLCXXFLAGS) -o $@ $<
+
+.cxx.o:
+ $(CXX) -c $(ALLCXXFLAGS) -o $@ $<
+
+.rc.res:
+ $(LDPATH) $(WRC) $(WRCFLAGS) $(DIVINCL) -o $@ $<
+
+.PHONY: all install uninstall clean distclean depend dummy
+
+# 'all' target first in case the enclosing Makefile didn't define any target
+
+all: Makefile
+
+# Rules for makefile
+
+Makefile: Makefile.in $(TOPSRCDIR)/configure
+ @echo $@ is older than $?, please rerun $(TOPSRCDIR)/configure
+ @exit 1
+
+# Rules for cleaning
+
+$(SUBDIRS:%=%/__clean__): dummy
+ cd `dirname $@` && $(MAKE) clean
+
+$(EXTRASUBDIRS:%=%/__clean__): dummy
+ -cd `dirname $@` && $(RM) $(CLEAN_FILES)
+
+clean:: $(SUBDIRS:%=%/__clean__) $(EXTRASUBDIRS:%=%/__clean__)
+ $(RM) $(CLEAN_FILES) $(RC_SRCS:.rc=.res) $(OBJS)
+ $(RM) $(DLLS:%=%.dbg.o) $(DLLS:%=%.spec.o) $(DLLS:%=%.so)
+ $(RM) $(EXES:%=%.dbg.o) $(EXES:%=%.spec.o) $(EXES:%=%.so) $(EXES:%.exe=%)
+
+# Rules for installing
+
+$(SUBDIRS:%=%/__install__): dummy
+ cd `dirname $@` && $(MAKE) install
+
+$(SUBDIRS:%=%/__uninstall__): dummy
+ cd `dirname $@` && $(MAKE) uninstall
+
+# Misc. rules
+
+$(SUBDIRS): dummy
+ @cd $@ && $(MAKE)
+
+dummy:
+
+# End of global rules
View
123 winelib/Makefile.in
@@ -0,0 +1,123 @@
+### Generated by Winemaker; modified for use in mono project
+
+
+### Generic autoconf variables
+
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = .
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+
+# SUBDIRS = dotnetctl \
+# winelib
+SUBDIRS = winelib
+
+
+
+### Generic autoconf targets
+
+all: $(SUBDIRS)
+
+@MAKE_RULES@
+
+install::
+ _list="$(SUBDIRS)"; for i in $$_list; do (cd $$i; $(MAKE) install) || exit 1; done
+
+uninstall::
+ _list="$(SUBDIRS)"; for i in $$_list; do (cd $$i; $(MAKE) uninstall) || exit 1; done
+
+
+### Distribution
+distclean: clean
+ $(RM) config.* configure.lineno Make.rules
+ $(RM) -r autom4te.cache
+ find . -name Makefile -exec $(RM) {} \;
+
+distdir = @PACKAGE_TARNAME@-@PACKAGE_VERSION@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+
+DISTFILES = aclocal.m4 autogen.sh ChangeLog configure configure.ac Makefile.in Make.rules.in
+
+distdir: $(DISTFILES)
+ $(RM) -r $(distdir)
+ mkdir $(distdir)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) \
+ top_distdir="$(top_distdir)" \
+ distdir=../$(distdir)/$$subdir \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+
+dist: distdir
+ tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(RM) -r $(distdir)
+
+distcheck: dist
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | tar xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`cd $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/dc-$$$$/" \
+ && cd $(distdir)/_build \
+ ../configure --srcdir=.. --prefix="$$dc_install_base" $(DISTCHECK_CONFIGURE_FLAGS) \
+ $(MAKE) \
+ && $(MAKE) install \
+ && $(MAKE) uninstall \
+ && $(MAKE) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
+ && $(MAKE) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) dist-gzip \
+ && rm -f $(distdir).tar.gz \
+ && $(MAKE) distcleancheck
+ $(am__remove_distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
+
+dist-gzip: distdir
+ tar chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+
View
34 winelib/aclocal.m4
@@ -0,0 +1,34 @@
+dnl Macros used to build the Wine configure script
+dnl
+dnl Copyright 2002 Alexandre Julliard
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later version.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+dnl
+dnl As a special exception to the GNU Lesser General Public License,
+dnl if you distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it
+dnl under the same distribution terms that you use for the rest of
+dnl that program.
+dnl
+dnl Modified for mono project
+
+dnl **** Link C code with an assembly file ****
+dnl
+dnl Usage: WINE_TRY_ASM_LINK(asm-code,includes,function,[action-if-found,[action-if-not-found]])
+dnl
+AC_DEFUN([WINE_TRY_ASM_LINK],
+[AC_TRY_LINK([void ac_asm(void) { asm([$1]); }
+[$2]],[$3],[$4],[$5])])
+
View
43 winelib/autogen.sh
@@ -0,0 +1,43 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+# Ripped off from mono version
+
+DIE=0
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`autoconf' installed to compile winelib."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+if test "$DIE" -eq 1; then
+ exit 1
+fi
+
+if test -z "$*"; then
+ echo "**Warning**: I am going to run \`configure' with no arguments."
+ echo "If you wish to pass any to it, please specify them on the"
+ echo \`$0\'" command line."
+ echo
+fi
+
+case $CC in
+xlc )
+ am_opt=--include-deps;;
+esac
+
+echo "Running autoconf ..."
+autoconf || { echo "**Error**: autoconf failed."; exit 1; }
+
+if test x$NOCONFIGURE = x; then
+ echo Running $srcdir/configure $conf_flags "$@" ...
+ $srcdir/configure $conf_flags "$@" \
+ && echo Now type \`make\' to compile $PKG_NAME || exit 1
+else
+ echo Skipping configure process.
+fi
View
900 winelib/configure.ac
@@ -0,0 +1,900 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl Author: Michael Patra <micky@marie.physik.tu-berlin.de>
+dnl <patra@itp1.physik.tu-berlin.de>
+dnl Francois Gouget <fgouget@codeweavers.com> for CodeWeavers
+dnl Modified by Peter Bartok <pbartok@novell.com> for mono project
+
+AC_PREREQ(2.53)
+AC_REVISION([configure.ac 1.00])
+AC_INIT(winelib,0.3)
+AC_CONFIG_HEADERS(winelib/include/config.h)
+
+NEEDS_MFC=0
+
+
+dnl **** Command-line arguments ****
+
+AC_SUBST(OPTIONS)
+
+dnl **** Check for some programs ****
+
+AC_PROG_MAKE_SET
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_CPP
+AC_PROG_LN_S
+
+dnl **** Check for some libraries ****
+
+dnl Check for -lm for BeOS
+AC_CHECK_LIB(m,sqrt)
+dnl Check for -lw for Solaris
+AC_CHECK_LIB(w,iswalnum)
+dnl Check for -lnsl for Solaris
+AC_CHECK_FUNCS(gethostbyname,, AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl", AC_CHECK_LIB(socket, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl", , -lnsl), -lsocket))
+dnl Check for -lsocket for Solaris
+AC_CHECK_FUNCS(connect,,AC_CHECK_LIB(socket,connect))
+dnl Check for -lpthread
+AC_CHECK_LIB(pthread,pthread_create,AC_SUBST(LIBPTHREAD,"-lpthread"))
+
+dnl **** Check for sigsetjmp ****
+AC_CACHE_CHECK([for sigsetjmp], ac_cv_c_sigsetjmp,
+ AC_TRY_LINK(
+ [#include <setjmp.h>],
+ [sigjmp_buf buf;
+ sigsetjmp( buf, 1 );
+ siglongjmp( buf, 1 );],
+ [ac_cv_c_sigsetjmp="yes"],
+ [ac_cv_c_sigsetjmp="no"])
+ )
+if test "$ac_cv_c_sigsetjmp" = "yes"
+then
+ AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have the sigsetjmp (and siglongjmp) function])
+fi
+
+dnl **** Check for pthread_rwlock_t ****
+AC_CHECK_TYPES([pthread_rwlock_t, pthread_rwlockattr_t],,,[#define _GNU_SOURCE
+#include <pthread.h>])
+
+dnl **** Check for pthread_getattr_np ****
+ac_save_LIBS="$LIBS"
+LIBS="$LIBS $LIBPTHREAD"
+AC_CHECK_FUNCS(pthread_getattr_np)
+LIBS="$ac_save_LIBS"
+
+
+AC_CHECK_HEADERS(dlfcn.h,
+ [AC_CHECK_FUNCS(dlopen,,
+ [AC_CHECK_LIB(dl,dlopen,
+ [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
+ DLLIBS="-ldl"],
+ [LIBEXT="a"])])],
+ [LIBEXT="a"])
+
+AC_CHECK_HEADERS(\
+ arpa/inet.h \
+ arpa/nameser.h \
+ cups/cups.h \
+ direct.h \
+ elf.h \
+ float.h \
+ fontconfig/fontconfig.h \
+ getopt.h \
+ ieeefp.h \
+ io.h \
+ jack/jack.h \
+ libio.h \
+ libutil.h \
+ link.h \
+ linux/cdrom.h \
+ linux/hdreg.h \
+ linux/input.h \
+ linux/ioctl.h \
+ linux/joystick.h \
+ linux/major.h \
+ linux/param.h \
+ linux/serial.h \
+ linux/ucdrom.h \
+ machine/cpu.h \
+ netdb.h \
+ netinet/in.h \
+ netinet/in_systm.h \
+ netinet/tcp.h \
+ netinet/tcp_fsm.h \
+ openssl/ssl.h \
+ process.h \
+ pthread.h \
+ pty.h \
+ pwd.h \
+ regex.h \
+ sched.h \
+ scsi/sg.h \
+ scsi/scsi.h \
+ scsi/scsi_ioctl.h \
+ socket.h \
+ stdint.h \
+ strings.h \
+ sys/cdio.h \
+ sys/elf32.h \
+ sys/errno.h \
+ sys/exec_elf.h \
+ sys/file.h \
+ sys/filio.h \
+ sys/inttypes.h \
+ sys/ioctl.h \
+ sys/ipc.h \
+ sys/link.h \
+ sys/lwp.h \
+ sys/mman.h \
+ sys/modem.h \
+ sys/msg.h \
+ sys/param.h \
+ sys/poll.h \
+ sys/ptrace.h \
+ sys/reg.h \
+ sys/scsiio.h \
+ sys/shm.h \
+ sys/signal.h \
+ sys/socket.h \
+ sys/sockio.h \
+ sys/statfs.h \
+ sys/strtio.h \
+ sys/syscall.h \
+ sys/sysctl.h \
+ sys/time.h \
+ sys/times.h \
+ sys/uio.h \
+ sys/un.h \
+ sys/v86.h \
+ sys/v86intr.h \
+ sys/vfs.h \
+ sys/vm86.h \
+ sys/wait.h \
+ syscall.h \
+ termios.h \
+ unistd.h \
+ utime.h \
+ valgrind/memcheck.h
+)
+AC_HEADER_STAT()
+dnl **** Check for functions ****
+
+AC_FUNC_ALLOCA()
+AC_CHECK_FUNCS(\
+ _lwp_create \
+ _lwp_self \
+ _pclose \
+ _popen \
+ _snprintf \
+ _spawnvp \
+ _stricmp \
+ _strnicmp \
+ _vsnprintf \
+ chsize \
+ clone \
+ finite \
+ fpclass \
+ ftruncate \
+ ftruncate64 \
+ getnetbyaddr \
+ getnetbyname \
+ getopt_long \
+ getpagesize \
+ getprotobyname \
+ getprotobynumber \
+ getpwuid \
+ getservbyport \
+ gettid \
+ gettimeofday \
+ inet_network \
+ lseek64 \
+ lstat \
+ memmove \
+ mmap \
+ pclose \
+ popen \
+ pread \
+ pwrite \
+ readlink \
+ rfork \
+ select \
+ sendmsg \
+ settimeofday \
+ sigaltstack \
+ snprintf \
+ spawnvp \
+ statfs \
+ strcasecmp \
+ strerror \
+ strncasecmp \
+ tcgetattr \
+ timegm \
+ usleep \
+ vfscanf \
+ vsnprintf \
+ wait4 \
+ waitpid \
+)
+
+
+
+dnl **** Check for types ****
+
+AC_C_CONST
+AC_C_INLINE
+AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long])
+
+
+dnl **** Check how to define a function in assembly code ****
+
+AC_CACHE_CHECK([how to define a function in assembly code], ac_cv_asm_func_def,
+ WINE_TRY_ASM_LINK(
+ ["\t.globl _ac_test\n\t.def _ac_test; .scl 2; .type 32; .endef\n_ac_test:\t.long 0"],,,
+ ac_cv_asm_func_def=".def",
+ [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,@function\n_ac_test:\t.long 0"],,,
+ ac_cv_asm_func_def=".type @function",
+ [WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,2\n_ac_test:\t.long 0"],,,
+ ac_cv_asm_func_def=".type 2",
+ ac_cv_asm_func_def="unknown")])]))
+
+AH_TEMPLATE(__ASM_FUNC,[Define to a macro to generate an assembly function directive])
+case "$ac_cv_asm_func_def" in
+ ".def")
+ AC_DEFINE([__ASM_FUNC(name)], [".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"]) ;;
+ ".type @function")
+ AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",@function"]) ;;
+ ".type 2")
+ AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",2"]) ;;
+ *)
+ AC_DEFINE([__ASM_FUNC(name)], [""]) ;;
+esac
+
+dnl **** Check for underscore on external symbols ****
+
+AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
+ WINE_TRY_ASM_LINK([".globl _ac_test\n_ac_test:\t.long 0"],
+ [extern int ac_test;],
+ [if (ac_test) return 1],
+ ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
+
+AH_TEMPLATE(__ASM_NAME,[Define to a macro to generate an assembly name from a C symbol])
+if test "$ac_cv_c_extern_prefix" = "yes"
+then
+ AC_DEFINE([__ASM_NAME(name)], ["_" name])
+else
+ AC_DEFINE([__ASM_NAME(name)], [name])
+fi
+
+
+dnl **** Check for gcc strength-reduce bug ****
+
+if test "x${GCC}" = "xyes"
+then
+ AC_CACHE_CHECK([for gcc strength-reduce bug], ac_cv_c_gcc_strength_bug,
+ AC_TRY_RUN([
+int main(void) {
+ static int Array[[3]];
+ unsigned int B = 3;
+ int i;
+ for(i=0; i<B; i++) Array[[i]] = i - 3;
+ exit( Array[[1]] != -2 );
+}],
+ ac_cv_c_gcc_strength_bug="no",
+ ac_cv_c_gcc_strength_bug="yes",
+ ac_cv_c_gcc_strength_bug="yes") )
+ if test "$ac_cv_c_gcc_strength_bug" = "yes"
+ then
+ CFLAGS="$CFLAGS -fno-strength-reduce"
+ fi
+fi
+
+dnl **** Check for working dll ****
+
+LDSHARED=""
+LDXXSHARED=""
+LDDLLFLAGS=""
+AC_CACHE_CHECK([whether we can build a Linux dll],
+ ac_cv_c_dll_linux,
+[saved_cflags=$CFLAGS
+CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic"
+AC_TRY_LINK(,[return 1],ac_cv_c_dll_linux="yes",ac_cv_c_dll_linux="no")
+CFLAGS=$saved_cflags
+])
+if test "$ac_cv_c_dll_linux" = "yes"
+then
+ LDSHARED="\$(CC) -shared"
+ LDXXSHARED="\$(CXX) -shared"
+ LDDLLFLAGS="-Wl,-Bsymbolic"
+else
+ AC_CACHE_CHECK([whether we can build a UnixWare (Solaris) dll],
+ ac_cv_c_dll_unixware,
+ [saved_cflags=$CFLAGS
+ CFLAGS="$CFLAGS -fPIC -Wl,-G,-h,conftest.so.1.0,-B,symbolic"
+ AC_TRY_LINK(,[return 1],ac_cv_c_dll_unixware="yes",ac_cv_c_dll_unixware="no")
+ CFLAGS=$saved_cflags
+ ])
+ if test "$ac_cv_c_dll_unixware" = "yes"
+ then
+ LDSHARED="\$(CC) -Wl,-G"
+ LDXXSHARED="\$(CXX) -Wl,-G"
+ LDDLLFLAGS="-Wl,-B,symbolic"
+ else
+ AC_CACHE_CHECK([whether we can build a NetBSD dll],
+ ac_cv_c_dll_netbsd,
+ [saved_cflags=$CFLAGS
+ CFLAGS="$CFLAGS -fPIC -Wl,-Bshareable,-Bforcearchive"
+ AC_TRY_LINK(,[return 1],ac_cv_c_dll_netbsd="yes",ac_cv_c_dll_netbsd="no")
+ CFLAGS=$saved_cflags
+ ])
+ if test "$ac_cv_c_dll_netbsd" = "yes"
+ then
+ LDSHARED="\$(CC) -Wl,-Bshareable,-Bforcearchive"
+ LDXXSHARED="\$(CXX) -Wl,-Bshareable,-Bforcearchive"
+ LDDLLFLAGS="" #FIXME
+ else
+ AC_CACHE_CHECK([whether we can build a Mach-O (Mac OS X/Darwin) dll],
+ ac_cv_c_dll_macho,
+ [saved_cflags=$CFLAGS
+ CFLAGS="$CFLAGS -bundle"
+ AC_TRY_LINK(,[return 1], ac_cv_c_dll_macho="yes", ac_cv_c_dll_macho="no")
+ CFLAGS=$saved_cflags
+ ])
+ if test "$ac_cv_c_dll_macho" = "yes"
+ then
+ LDSHARED="\$(CC) -bundle -flat_namespace -undefined suppress"
+ LDXXSHARED="\$(CXX) -bundle -flat_namespace -undefined suppress"
+ LDDLLFLAGS="-fno-common"
+ CFLAGS="$CFLAGS -ffixed-r13 -no-cpp-precomp -Dsocklen_t=u_int32_t"
+ CXXFLAGS="$CXXFLAGS -ffixed-r13 -no-cpp-precomp -Dsocklen_t=u_int32_t"
+ fi
+ fi
+ fi
+fi
+if test "$ac_cv_c_dll_linux" = "no" -a "$ac_cv_c_dll_unixware" = "no" -a "$ac_cv_c_dll_netbsd" = "no" -a "$ac_cv_c_dll_macho" = "no"
+then
+ AC_MSG_ERROR([Could not find how to build a dynamically linked library])
+fi
+
+CFLAGS="$CFLAGS -fPIC"
+
+AC_SUBST(LDSHARED)
+AC_SUBST(LDXXSHARED)
+AC_SUBST(LDDLLFLAGS)
+
+dnl *** check for the need to define __i386__
+
+AC_CACHE_CHECK([whether we need to define __i386__],ac_cv_cpp_def_i386,
+ AC_EGREP_CPP(yes,[#if (defined(i386) || defined(__i386)) && !defined(__i386__)
+yes
+#endif],
+ ac_cv_cpp_def_i386="yes", ac_cv_cpp_def_i386="no"))
+if test "$ac_cv_cpp_def_i386" = "yes"
+then
+ CFLAGS="$CFLAGS -D__i386__"
+fi
+
+dnl *** check for the need to define __sparc__
+
+AC_CACHE_CHECK([whether we need to define __sparc__],ac_cv_cpp_def_sparc,
+ AC_EGREP_CPP(yes,[#if (defined(sparc) || defined(__sparc)) && !defined(__sparc__)
+yes
+#endif],
+ ac_cv_cpp_def_sparc="yes", ac_cv_cpp_def_sparc="no"))
+if test "$ac_cv_cpp_def_sparc" = "yes"
+then
+ CFLAGS="$CFLAGS -D__sparc__"
+ CXXFLAGS="$CXXFLAGS -D__sparc__"
+fi
+
+dnl *** check for the need to define __sun__
+
+AC_CACHE_CHECK([whether we need to define __sun__],ac_cv_cpp_def_sun,
+ AC_EGREP_CPP(yes,[#if (defined(sun) || defined(__sun)) && !defined(__sun__)
+yes
+#endif],
+ ac_cv_cpp_def_sun="yes", ac_cv_cpp_def_sun="no"))
+if test "$ac_cv_cpp_def_sun" = "yes"
+then
+ CFLAGS="$CFLAGS -D__sun__"
+ CXXFLAGS="$CXXFLAGS -D__sun__"
+fi
+
+dnl *** check for the need to define __powerpc__
+
+AC_CACHE_CHECK(whether we need to define __powerpc__,ac_cv_cpp_def_powerpc,
+ AC_EGREP_CPP(yes,[#if (defined(__ppc__) || defined(__PPC__) || defined(__POWERPC__)) && !defined(__powerpc__)
+yes
+#endif],
+ ac_cv_cpp_def_powerpc="yes", ac_cv_cpp_def_powerpc="no"))
+if test "$ac_cv_cpp_def_powerpc" = "yes"
+then
+ CFLAGS="$CFLAGS -D__powerpc__"
+ CXXFLAGS="$CXXFLAGS -D__powerpc__"
+fi
+
+
+dnl **** Test Winelib-related features of the C++ compiler
+AC_LANG_CPLUSPLUS()
+if test "x${GCC}" = "xyes"
+then
+ OLDCXXFLAGS="$CXXFLAGS";
+ CXXFLAGS="-fpermissive";
+ AC_CACHE_CHECK([for g++ -fpermissive option], has_gxx_permissive,
+ AC_TRY_COMPILE(,[
+ for (int i=0;i<2;i++);
+ i=0;
+ ],
+ [has_gxx_permissive="yes"],
+ [has_gxx_permissive="no"])
+ )
+ CXXFLAGS="-fms-extensions";
+ AC_CACHE_CHECK([for g++ -fms-extensions option], has_gxx_msextensions,
+ AC_TRY_COMPILE(,[
+ ;
+ ],
+ [has_gxx_msextensions="yes"],
+ [has_gxx_msextensions="no"])
+ )
+ CXXFLAGS="-fno-for-scope";
+ AC_CACHE_CHECK([for g++ -fno-for-scope option], has_gxx_no_for_scope,
+ AC_TRY_COMPILE(,[
+ for (int i=0;i<2;i++);
+ i=0;
+ ],
+ [has_gxx_no_for_scope="yes"],
+ [has_gxx_no_for_scope="no"])
+ )
+ CXXFLAGS="$OLDCXXFLAGS";
+ if test "$has_gxx_permissive" = "yes"
+ then
+ CXXFLAGS="$CXXFLAGS -fpermissive"
+ fi
+ if test "$has_gxx_msextensions" = "yes"
+ then
+ CXXFLAGS="$CXXFLAGS -fms-extensions"
+ fi
+ if test "$has_gxx_no_for_scope" = "yes"
+ then
+ CXXFLAGS="$CXXFLAGS -fno-for-scope"
+ fi
+fi
+AC_LANG_C()
+
+dnl **** Test Winelib-related features of the C compiler
+dnl none for now
+
+dnl **** Macros for finding a headers/libraries in a collection of places
+
+dnl AC_PATH_FILE(variable,file,action-if-not-found,default-locations)
+AC_DEFUN(AC_PATH_FILE,[
+AC_MSG_CHECKING([for $2])
+AC_CACHE_VAL(ac_cv_pfile_$1,
+[
+ ac_found=
+ ac_dummy="ifelse([$4], , , [$4])"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ for ac_dir in $ac_dummy; do
+ IFS="$ac_save_ifs"
+ if test -z "$ac_dir"
+ then
+ ac_file="$2"
+ else
+ ac_file="$ac_dir/$2"
+ fi
+ if test -f "$ac_file"
+ then
+ ac_found=1
+ ac_cv_pfile_$1="$ac_dir"
+ break
+ fi
+ done
+ ifelse([$3],,,[if test -z "$ac_found"
+ then
+ $3
+ fi
+ ])
+])
+$1="$ac_cv_pfile_$1"
+if test -n "$ac_found" -o -n "[$]$1"
+then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)
+])
+
+dnl AC_PATH_HEADER(variable,header,action-if-not-found,default-locations)
+dnl Note that the above may set variable to an empty value if the header is
+dnl already in the include path
+AC_DEFUN(AC_PATH_HEADER,[
+AC_MSG_CHECKING([for $2 header])
+AC_CACHE_VAL(ac_cv_pheader_$1,
+[
+ ac_found=
+ ac_dummy="ifelse([$4], , :/usr/local/include, [$4])"
+ save_CPPFLAGS="$CPPFLAGS"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ for ac_dir in $ac_dummy; do
+ IFS="$ac_save_ifs"
+ if test -z "$ac_dir"
+ then
+ CPPFLAGS="$save_CPPFLAGS"
+ else
+ CPPFLAGS="-I$ac_dir $save_CPPFLAGS"
+ fi
+ AC_TRY_COMPILE([#include <$2>],,ac_found=1;ac_cv_pheader_$1="$ac_dir";break)
+ done
+ CPPFLAGS="$save_CPPFLAGS"
+ ifelse([$3],,,[if test -z "$ac_found"
+ then
+ $3
+ fi
+ ])
+])
+$1="$ac_cv_pheader_$1"
+if test -n "$ac_found" -o -n "[$]$1"
+then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)
+])
+
+dnl AC_PATH_LIBRARY(variable,libraries,extra libs,action-if-not-found,default-locations)
+AC_DEFUN(AC_PATH_LIBRARY,[
+AC_MSG_CHECKING([for $2])
+AC_CACHE_VAL(ac_cv_plibrary_$1,
+[
+ ac_found=
+ ac_dummy="ifelse([$5], , :/usr/local/lib, [$5])"
+ save_LIBS="$LIBS"
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ for ac_dir in $ac_dummy; do
+ IFS="$ac_save_ifs"
+ if test -z "$ac_dir"
+ then
+ LIBS="$2 $3 $save_LIBS"
+ else
+ LIBS="-L$ac_dir $2 $3 $save_LIBS"
+ fi
+ AC_TRY_LINK(,,ac_found=1;ac_cv_plibrary_$1="$ac_dir";break)
+ done
+ LIBS="$save_LIBS"
+ ifelse([$4],,,[if test -z "$ac_found"
+ then
+ $4
+ fi
+ ])
+])
+$1="$ac_cv_plibrary_$1"
+if test -n "$ac_found" -o -n "[$]$1"
+then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)
+])
+
+dnl **** Try to find where winelib is located ****
+
+LDPATH=""
+WINE_INCLUDE_ROOT=""
+WINE_INCLUDE_PATH=""
+WINE_LIBRARY_ROOT=""
+WINE_LIBRARY_PATH=""
+WINE_DLL_ROOT=""
+WINE_DLL_PATH=""
+WINE_TOOL_PATH=""
+WINE=""
+WINEBUILD=""
+WRC=""
+
+AC_ARG_WITH(wine,
+[ --with-wine=DIR the Wine package (or sources) is in DIR],
+[if test "$withval" != "no"; then
+ WINE_ROOT="$withval";
+ WINE_INCLUDES="";
+ WINE_LIBRARIES="";
+ WINE_TOOLS="";
+else
+ WINE_ROOT="";
+fi])
+if test -n "$WINE_ROOT"
+then
+ WINE_INCLUDE_ROOT="$WINE_ROOT/include:$WINE_ROOT/include/wine:$WINE_ROOT/include/wine/windows:$WINE_ROOT/include/windows"
+ WINE_LIBRARY_ROOT="$WINE_ROOT:$WINE_ROOT/libs:$WINE_ROOT/lib"
+ WINE_DLL_ROOT="$WINE_ROOT/dlls:$WINE_ROOT/lib:$WINE_ROOT/lib/wine"
+ WINE_TOOL_PATH="$WINE_ROOT:$WINE_ROOT/bin:$WINE_ROOT/tools/wrc:$WINE_ROOT/tools/winebuild"
+fi
+
+AC_ARG_WITH(wine-includes,
+[ --with-wine-includes=DIR the Wine includes are in DIR],
+[if test "$withval" != "no"; then
+ WINE_INCLUDES="$withval";
+else
+ WINE_INCLUDES="";
+fi])
+if test -n "$WINE_INCLUDES"
+then
+ WINE_INCLUDE_ROOT="$WINE_INCLUDES"
+fi
+
+AC_ARG_WITH(wine-libraries,
+[ --with-wine-libraries=DIR the Wine libraries are in DIR],
+[if test "$withval" != "no"; then
+ WINE_LIBRARIES="$withval";
+else
+ WINE_LIBRARIES="";
+fi])
+if test -n "$WINE_LIBRARIES"
+then
+ WINE_LIBRARY_ROOT="$WINE_LIBRARIES"
+fi
+
+AC_ARG_WITH(wine-dlls,
+[ --with-wine-dlls=DIR the Wine dlls are in DIR],
+[if test "$withval" != "no"; then
+ WINE_DLLS="$withval";
+else
+ WINE_DLLS="";
+fi])
+if test -n "$WINE_DLLS"
+then
+ WINE_DLL_ROOT="$WINE_DLLS"
+fi
+
+AC_ARG_WITH(wine-tools,
+[ --with-wine-tools=DIR the Wine tools are in DIR],
+[if test "$withval" != "no"; then
+ WINE_TOOLS="$withval";
+else
+ WINE_TOOLS="";
+fi])
+if test -n "$WINE_TOOLS"
+then
+ WINE_TOOL_PATH="$WINE_TOOLS:$WINE_TOOLS/tools/wrc:$WINE_TOOLS/tools/winebuild"
+fi
+
+if test -z "$WINE_INCLUDE_ROOT"
+then
+ WINE_INCLUDE_ROOT=":/usr/include/wine/windows:/usr/include/wine:/usr/local/include/wine/windows:/opt/wine/include/windows:/opt/wine/include/wine";
+else
+ AC_PATH_FILE(WINE_INCLUDE_ROOT,[windef.h],[
+ AC_MSG_ERROR([Could not find the Wine headers (windef.h)])
+ ],$WINE_INCLUDE_ROOT)
+fi
+AC_PATH_HEADER(WINE_INCLUDE_ROOT,[windef.h],[
+ AC_MSG_ERROR([Could not include the Wine headers (windef.h)])
+],$WINE_INCLUDE_ROOT)
+if test -n "$WINE_INCLUDE_ROOT"
+then
+ WINE_INCLUDE_PATH="-I$WINE_INCLUDE_ROOT"
+else
+ WINE_INCLUDE_PATH=""
+fi
+
+if test -z "$WINE_LIBRARY_ROOT"
+then
+ WINE_LIBRARY_ROOT=":/usr/lib/wine:/usr/local/lib:/usr/local/lib/wine:/opt/wine/lib"
+else
+ AC_PATH_FILE(WINE_LIBRARY_ROOT,[libwine.so],
+ [
+ AC_PATH_FILE(WINE_LIBRARY_ROOT,[libwine.dylib],
+ [AC_MSG_ERROR([Could not find the Wine libraries (libwine.dylib or libwine.so)])],
+ $WINE_LIBRARY_ROOT)
+ ], $WINE_LIBRARY_ROOT)
+fi
+AC_PATH_LIBRARY(WINE_LIBRARY_ROOT,[-lwine],[],[
+ AC_MSG_ERROR([Could not link with the Wine libraries (libwine.so)])
+],$WINE_LIBRARY_ROOT)
+if test -n "$WINE_LIBRARY_ROOT"
+then
+ WINE_LIBRARY_PATH="-L$WINE_LIBRARY_ROOT"
+ LDPATH="$WINE_LIBRARY_ROOT"
+else
+ WINE_LIBRARY_PATH=""
+fi
+
+save_LIBS="$LIBS"
+LIBS="$WINE_LIBRARY_PATH $LIBS"
+
+AC_CHECK_LIB(wine_unicode,wine_cp_wcstombs,[],[
+ AC_MSG_ERROR([Could not find the Wine dlls (libwine_unicode.so)])
+])
+
+LIBS="$save_LIBS"
+
+if test -z "$WINE_DLL_ROOT"
+then
+ if test -n "$WINE_LIBRARY_ROOT"
+ then
+ WINE_DLL_ROOT="$WINE_LIBRARY_ROOT:$WINE_LIBRARY_ROOT/dlls:$WINE_LIBRARY_ROOT/wine"
+ else
+ WINE_DLL_ROOT="/lib:/lib/wine:/usr/lib:/usr/lib/wine:/usr/local/lib:/usr/local/lib/wine"
+ fi
+fi
+
+AC_PATH_FILE(WINE_DLL_ROOT,[libntdll.def],[
+ AC_MSG_ERROR([Could not find the Wine dlls (libntdll.def)])
+],[$WINE_DLL_ROOT])
+WINE_DLL_PATH="-L$WINE_DLL_ROOT"
+
+if test -z "$WINE_TOOL_PATH"
+then
+ WINE_TOOL_PATH="$PATH:/usr/local/bin:/opt/wine/bin"
+fi
+AC_PATH_PROG(WINE,wine,,$WINE_TOOL_PATH)
+if test -z "$WINE"
+then
+ AC_MSG_ERROR([Could not find Wine's wine tool])
+fi
+AC_PATH_PROG(WINEBUILD,winebuild,,$WINE_TOOL_PATH)
+if test -z "$WINEBUILD"
+then
+ AC_MSG_ERROR([Could not find Wine's winebuild tool])
+fi
+AC_PATH_PROG(WRC,wrc,,$WINE_TOOL_PATH)
+if test -z "$WRC"
+then
+ AC_MSG_ERROR([Could not find Wine's wrc tool])
+fi
+
+case $build_os in
+ darwin*|macosx*)
+ LDPATH="DYLD_LIBRARY_PATH=\"$LDPATH:\$\$DYLD_LIBRARY_PATH\"";;
+ *)
+ LDPATH="LD_LIBRARY_PATH=\"$LDPATH:\$\$LD_LIBRARY_PATH\""
+esac
+
+AC_SUBST(LDPATH)
+AC_SUBST(WINE_INCLUDE_PATH)
+AC_SUBST(WINE_LIBRARY_PATH)
+AC_SUBST(WINE_DLL_PATH)
+AC_SUBST(WINE_DLL_ROOT)
+
+dnl **** Try to find where the MFC are located ****
+AC_LANG_CPLUSPLUS()
+
+if test "x$NEEDS_MFC" = "x1"
+then
+ ATL_INCLUDE_ROOT="";
+ ATL_INCLUDE_PATH="";
+ MFC_INCLUDE_ROOT="";
+ MFC_INCLUDE_PATH="";
+ MFC_LIBRARY_ROOT="";
+ MFC_LIBRARY_PATH="";
+
+ AC_ARG_WITH(mfc,
+ [ --with-mfc=DIR the MFC package (or sources) is in DIR],
+ [if test "$withval" != "no"; then
+ MFC_ROOT="$withval";
+ ATL_INCLUDES="";
+ MFC_INCLUDES="";
+ MFC_LIBRARIES="";
+ else
+ MFC_ROOT="";
+ fi])
+ if test -n "$MFC_ROOT"
+ then
+ ATL_INCLUDE_ROOT="$MFC_ROOT";
+ MFC_INCLUDE_ROOT="$MFC_ROOT";
+ MFC_LIBRARY_ROOT="$MFC_ROOT";
+ fi
+
+ AC_ARG_WITH(atl-includes,
+ [ --with-atl-includes=DIR the ATL includes are in DIR],
+ [if test "$withval" != "no"; then
+ ATL_INCLUDES="$withval";
+ else
+ ATL_INCLUDES="";
+ fi])
+ if test -n "$ATL_INCLUDES"
+ then
+ ATL_INCLUDE_ROOT="$ATL_INCLUDES";
+ fi
+
+ AC_ARG_WITH(mfc-includes,
+ [ --with-mfc-includes=DIR the MFC includes are in DIR],
+ [if test "$withval" != "no"; then
+ MFC_INCLUDES="$withval";
+ else
+ MFC_INCLUDES="";
+ fi])
+ if test -n "$MFC_INCLUDES"
+ then
+ MFC_INCLUDE_ROOT="$MFC_INCLUDES";
+ fi
+
+ AC_ARG_WITH(mfc-libraries,
+ [ --with-mfc-libraries=DIR the MFC libraries are in DIR],
+ [if test "$withval" != "no"; then
+ MFC_LIBRARIES="$withval";
+ else
+ MFC_LIBRARIES="";
+ fi])
+ if test -n "$MFC_LIBRARIES"
+ then
+ MFC_LIBRARY_ROOT="$MFC_LIBRARIES";
+ fi
+
+ OLDCPPFLAGS="$CPPFLAGS"
+ dnl FIXME: We should not have defines in any of the include paths
+ CPPFLAGS="$WINE_INCLUDE_PATH -I$WINE_INCLUDE_ROOT/msvcrt -D_DLL -D_MT $CPPFLAGS"
+ ATL_INCLUDE_PATH="-I\$(WINE_INCLUDE_ROOT)/msvcrt -D_DLL -D_MT"
+ if test -z "$ATL_INCLUDE_ROOT"
+ then
+ ATL_INCLUDE_ROOT=":$WINE_INCLUDE_ROOT/atl:/usr/include/atl:/usr/local/include/atl:/opt/mfc/include/atl:/opt/atl/include"
+ else
+ ATL_INCLUDE_ROOT="$ATL_INCLUDE_ROOT:$ATL_INCLUDE_ROOT/atl:$ATL_INCLUDE_ROOT/atl/include"
+ fi
+ AC_PATH_HEADER(ATL_INCLUDE_ROOT,atldef.h,[
+ AC_MSG_ERROR([Could not find the ATL includes])
+ ],$ATL_INCLUDE_ROOT)
+ if test -n "$ATL_INCLUDE_ROOT"
+ then
+ ATL_INCLUDE_PATH="$ATL_INCLUDE_PATH -I$ATL_INCLUDE_ROOT"
+ fi
+
+ MFC_INCLUDE_PATH="$ATL_INCLUDE_PATH"
+ if test -z "$MFC_INCLUDE_ROOT"
+ then
+ MFC_INCLUDE_ROOT=":$WINE_INCLUDE_ROOT/mfc:/usr/include/mfc:/usr/local/include/mfc:/opt/mfc/include/mfc:/opt/mfc/include"
+ else
+ MFC_INCLUDE_ROOT="$MFC_INCLUDE_ROOT:$MFC_INCLUDE_ROOT/mfc:$MFC_INCLUDE_ROOT/mfc/include:$MFC_INCLUDE_ROOT/Include"
+ fi
+ AC_PATH_HEADER(MFC_INCLUDE_ROOT,afx.h,[
+ AC_MSG_ERROR([Could not find the MFC includes])
+ ],$MFC_INCLUDE_ROOT)
+ if test -n "$MFC_INCLUDE_ROOT" -a "$ATL_INCLUDE_ROOT" != "$MFC_INCLUDE_ROOT"
+ then
+ MFC_INCLUDE_PATH="$MFC_INCLUDE_PATH -I$MFC_INCLUDE_ROOT"
+ fi
+ CPPFLAGS="$OLDCPPFLAGS"
+
+ if test -z "$MFC_LIBRARY_ROOT"
+ then
+ MFC_LIBRARY_ROOT=":$WINE_LIBRARY_ROOT:/usr/lib/mfc:/usr/local/lib:/usr/local/lib/mfc:/opt/mfc/lib";
+ else
+ MFC_LIBRARY_ROOT="$MFC_LIBRARY_ROOT:$MFC_LIBRARY_ROOT/lib:$MFC_LIBRARY_ROOT/mfc/src:$MFC_LIBRARY_ROOT/src";
+ fi
+ AC_PATH_LIBRARY(MFC_LIBRARY_ROOT,[-lmfc],[$WINE_LIBRARY_PATH -lwine -lwine_unicode],[
+ AC_MSG_ERROR([Could not find the MFC library])
+ ],$MFC_LIBRARY_ROOT)
+ if test -n "$MFC_LIBRARY_ROOT" -a "$MFC_LIBRARY_ROOT" != "$WINE_LIBRARY_ROOT"
+ then
+ MFC_LIBRARY_PATH="-L$MFC_LIBRARY_ROOT"
+ else
+ MFC_LIBRARY_PATH=""
+ fi
+
+ AC_SUBST(ATL_INCLUDE_PATH)
+ AC_SUBST(MFC_INCLUDE_PATH)
+ AC_SUBST(MFC_LIBRARY_PATH)
+fi
+
+AC_LANG_C()
+
+dnl **** Generate output files ****
+
+MAKE_RULES=Make.rules
+AC_SUBST_FILE(MAKE_RULES)
+
+AC_OUTPUT([
+Make.rules
+Makefile
+winelib/Makefile
+ ])
+
+echo
+echo "Configure finished. Do 'make' to build the project."
+echo
+
+dnl Local Variables:
+dnl comment-start: "dnl "
+dnl comment-end: ""
+dnl comment-start-skip: "\\bdnl\\b\\s *"
+dnl compile-command: "autoconf"
+dnl End:
View
11 winelib/dotnetctl/ChangeLog
@@ -0,0 +1,11 @@
+2004-04-12 Sachin Kumar <skumar1@novell.com>
+ * Makefile.in: Added dotnetctl.h and dotnetbutton.c in DISTFILES
+2004-03-16 Peter Bartok <pbartok@novell.com>
+ * Makefile.in: Added 'distdir' rule; fixed winebuild path setup
+
+2004-03-11 Peter Bartok <pbartok@novell.com>
+
+ * ChangeLog: Created
+ * dotnetctl.dll.spec.c: Created
+ * dotnetctl.c: Created stub sourcefile
+ * Makefile.in: Created autoconf Makefile to build dotnetctl library
View
116 winelib/dotnetctl/Makefile.in
@@ -0,0 +1,116 @@
+### Generated by Winemaker; modified for use in mono project
+
+
+### Generic autoconf variables
+
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+
+DLLS = dotnetctl.dll
+EXES =
+
+
+
+
+### Common settings
+
+DEFINES =
+INCLUDE_PATH =
+DLL_PATH =
+LIBRARY_PATH =
+LIBRARIES =
+
+DISTFILES = ChangeLog dotnetctl.c dotnetctl.dll.spec Makefile.in \
+ dotnetctl.h dotnetbutton.c
+
+### dotnetctl.exe sources and settings
+
+dotnetctl_dll_MODULE = dotnetctl.dll
+dotnetctl_dll_BASEMODULE= dotnetctl
+dotnetctl_dll_APPMODE =
+dotnetctl_dll_C_SRCS = dotnetctl.c dotnetbutton.c
+dotnetctl_dll_CXX_SRCS=
+dotnetctl_dll_RC_SRCS =
+dotnetctl_dll_SPEC_SRCS= dotnetctl.dll.spec
+dotnetctl_dll_DLL_PATH= -L$(WINE_DLL_ROOT)
+dotnetctl_dll_DLLS = advapi32 \
+ comdlg32 \
+ gdi32 \
+ kernel32 \
+ odbc32 \
+ ole32 \
+ oleaut32 \
+ shell32 \
+ user32 \
+ winspool
+dotnetctl_dll_LIBRARY_PATH=
+dotnetctl_dll_LIBRARIES=
+dotnetctl_dll_DEPENDS =
+
+dotnetctl_dll_OBJS = $(dotnetctl_dll_C_SRCS:.c=.o) \
+ $(dotnetctl_dll_CXX_SRCS:.cpp=.o) \
+ $(EXTRA_OBJS)
+
+
+
+### Global source lists
+
+C_SRCS = $(dotnetctl_dll_C_SRCS)
+CXX_SRCS = $(dotnetctl_dll_CXX_SRCS)
+RC_SRCS = $(dotnetctl_dll_RC_SRCS)
+SPEC_SRCS = $(dotnetctl_dll_SPEC_SRCS)
+
+
+
+### Generic autoconf targets
+
+all: $(DLLS:%=%.so) $(EXES:%=%.so)
+
+@MAKE_RULES@
+
+install::
+ _list="$(EXES:%=%.so) $(DLLS:%=%.so)"; for i in $$_list; do $(INSTALL_PROGRAM) $$i $(dlldir); done
+
+uninstall::
+ _list="$(EXES:%=%.so) $(DLLS:%=%.so)"; for i in $$_list; do $(RM) $(dlldir)/$$i;done
+
+### Target specific build rules
+
+$(dotnetctl_dll_MODULE).spec.c: $(dotnetctl_dll_SPEC_SRCS) $(dotnetctl_dll_RC_SRCS:.rc=.res) $(dotnetctl_dll_OBJS)
+ $(LDPATH) $(WINEBUILD) -fPIC -o $@ $(dotnetctl_dll_SPEC_SRCS:%=--spec $(SRCDIR)/%) $(dotnetctl_dll_RC_SRCS:%.rc=%.res) $(dotnetctl_dll_OBJS) $(dotnetctl_dll_DLL_PATH) $(WINE_DLL_PATH) $(GLOBAL_DLL_PATH) $(dotnetctl_dll_DLLS:%=-l%) $(GLOBAL_DLLS:%=-l%)
+
+$(dotnetctl_dll_MODULE).so: $(dotnetctl_dll_MODULE).spec.o $(dotnetctl_dll_OBJS) $(dotnetctl_dll_DEPENDS)
+ $(LDSHARED) $(LDDLLFLAGS) -o $@ $(dotnetctl_dll_OBJS) $(dotnetctl_dll_MODULE).spec.o $(dotnetctl_dll_LIBRARY_PATH) $(ALL_LIBRARY_PATH) $(dotnetctl_dll_LIBRARIES:%=-l%) $(ALL_LIBRARIES) $(LIBS)
+
+top_distdir = ..
+distdir = $(top_distdir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
+
+distdir:
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
View
188 winelib/dotnetctl/dotnetbutton.c
@@ -0,0 +1,188 @@
+/*
+ * dotnetbutton.c: .Net Button Class
+ *
+ * Authors:
+ * Peter Dennis Bartok (pbartok@novell.com)
+ *
+ * (C) 2004 Novell, Inc.
+ *
+ * $Revision: 1.1 $
+ * $Modtime: 11 Apr 2004 20:53:32 $
+ *
+ * $Log: dotnetbutton.c,v $
+ * Revision 1.1 2004/04/12 02:20:23 pbartok
+ * - More infrastructure for Win32 implementations of controls
+ *
+ *
+ *
+ */
+
+#include <windows.h>
+#include <windowsx.h>
+
+#include <stdio.h>
+
+#include "dotnetctl.h"
+
+#define BUTTON_CLASSNAME "DotNetButton"
+
+static BOOL ButtonInitialized = FALSE;
+static WNDPROC BaseButtonWndProc = NULL;
+static int ButtonStructIndex = 0;
+
+
+#define DNM_BTN_BASE WM_USER
+#define DNM_BTN_FLATSTYLE (DNM_BTN_BASE+1)
+#define DNM_BTN_FORECOLOR (DNM_BTN_BASE+2)
+#define DNM_BTN_BACKCOLOR (DNM_BTN_BASE+3)
+
+typedef struct {
+ /* Configuration */
+ HBRUSH Background;
+ HPEN Pen;
+ HFONT Font;
+ unsigned long FlatStyle;
+
+ /* Double buffering */
+ HDC BufferDC;
+ HBITMAP BufferBitmap;
+ HBITMAP OrgBitmap;
+ RECT ClientArea;
+} ButtonStruct;
+
+
+static BOOL
+DoubleBufferInit(HWND hwnd, ButtonStruct *BS)
+{
+ HDC hdc;
+
+ hdc = GetDC(hwnd);
+
+ GetClientRect(hwnd, &BS->ClientArea);
+ BS->BufferDC=CreateCompatibleDC(hdc);
+ BS->BufferBitmap=CreateCompatibleBitmap(hdc, BS->ClientArea.right, BS->ClientArea.bottom);
+ BS->OrgBitmap=SelectObject(BS->BufferDC, BS->BufferBitmap);
+ FillRect(BS->BufferDC, &BS->ClientArea, BS->Background);
+
+ ReleaseDC(hwnd, hdc);
+ return(TRUE);
+}
+
+
+LRESULT CALLBACK
+ButtonSuperclassWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ if (msg>=WM_USER) {
+ DebugOut("\nButton >=WM_USER received\n");
+ }
+
+ switch(msg) {
+ case WM_CREATE: {
+ ButtonStruct *BS, *BS2;
+
+ DebugOut("Button WM_CREATE entered\n");
+
+ BS=malloc(sizeof(ButtonStruct));
+ if (!BS) {
+ DebugOut("Button WM_CREATE failed [line %d]\n", __LINE__);
+ return(-1);
+ }
+
+ memset(BS, 0, sizeof(ButtonStruct));
+ SetWindowLong(hwnd, ButtonStructIndex, (LONG)BS);
+ BS2=(ButtonStruct *)GetWindowLong(hwnd, ButtonStructIndex);
+ break;
+ }
+
+ case DNM_BTN_FLATSTYLE: {
+ return(0);
+ }
+
+ case DNM_BTN_FORECOLOR: {
+ ButtonStruct *BS=(ButtonStruct *)GetWindowLong(hwnd, ButtonStructIndex);
+
+ BS->Pen=CreatePen(PS_SOLID, 1, (COLORREF)lParam);
+
+ return(0);
+ }
+
+ case DNM_BTN_BACKCOLOR: {
+ ButtonStruct *BS=(ButtonStruct *)GetWindowLong(hwnd, ButtonStructIndex);
+ LOGBRUSH lb;
+
+ lb.lbColor=(COLORREF)lParam;
+ lb.lbStyle=BS_SOLID;
+
+ BS->Background=CreateBrushIndirect(&lb);
+ return(0);
+ }
+
+ case WM_PAINT: {
+ ButtonStruct *BS=(ButtonStruct *)GetWindowLong(hwnd, ButtonStructIndex);
+ PAINTSTRUCT ps;
+ HDC hdc;
+ HDC PaintDC;
+ HPEN OrgPen;
+ HBRUSH OrgBrush;
+ HFONT OrgFont;
+
+ DebugOut("DotNetButton WM_PAINT entered\n");
+
+#if 0
+ PaintDC=BeginPaint(hwnd, &ps);
+
+ if (ps.fErase) {
+ FillRect(PaintDC, &ps.rcPaint, BS->Background);
+ }
+
+ hdc=BS->BufferDC;
+ OrgPen=SelectObject(hdc, BS->Pen);
+ OrgBrush=SelectObject(hdc, BS->Background);
+ OrgFont=SelectObject(hdc, BS->Font);
+
+ BitBlt(PaintDC, 0, 0, BS->ClientArea.right, BS->ClientArea.bottom, BS->BufferDC, 0, 0, SRCCOPY);
+
+ SelectObject(hdc, OrgPen);
+ SelectObject(hdc, OrgBrush);
+ SelectObject(hdc, OrgFont);
+
+ EndPaint(hwnd, &ps);
+
+ return(0);
+#endif
+ }
+ }
+ return(CallWindowProc(BaseButtonWndProc, hwnd, msg, wParam, lParam));
+}
+
+BOOL
+DotNetButtonInitialize(HINSTANCE Instance)
+{
+ WNDCLASS wndClass;
+
+ /* Superclass the Button control */
+ if (GetClassInfo(Instance, "BUTTON", &wndClass)==FALSE) {
+ return(FALSE);
+ }
+
+ wndClass.hInstance=Instance;
+ wndClass.lpszClassName=BUTTON_CLASSNAME;
+ BaseButtonWndProc=wndClass.lpfnWndProc;
+ wndClass.lpfnWndProc=ButtonSuperclassWndProc;
+ ButtonStructIndex=wndClass.cbWndExtra;
+ wndClass.cbWndExtra+=sizeof(ButtonStruct *);
+
+ if (RegisterClass(&wndClass)==0) {
+ return(FALSE);
+ }
+ ButtonInitialized=TRUE;
+
+ return(TRUE);
+}
+
+BOOL
+DotNetButtonShutdown(HINSTANCE Instance)
+{
+ UnregisterClass(BUTTON_CLASSNAME, Instance);
+ return(TRUE);
+}
View
55 winelib/dotnetctl/dotnetctl.c
@@ -0,0 +1,55 @@
+/*
+ * dotnetctl.c: .Net controls
+ *
+ * Authors:
+ * Peter Dennis Bartok (pbartok@novell.com)
+ *
+ * (C) 2004 Novell, Inc.
+ *
+ * $Revision: 1.2 $
+ * $Modtime: 11 Apr 2004 20:53:32 $
+ *
+ * $Log: dotnetctl.c,v $
+ * Revision 1.2 2004/04/12 02:21:36 pbartok
+ * - More infrastructure
+ *
+ *
+ */
+
+#include <windows.h>
+#include <windowsx.h>
+
+#include <stdio.h>
+
+#include "dotnetctl.h"
+
+#ifndef NDEBUG
+void __cdecl
+DebugOut(const char *Format, ...)
+{
+ unsigned char DebugBuffer[10240];
+ va_list argptr;
+
+ va_start(argptr, Format);
+ vsprintf(DebugBuffer, Format, argptr);
+ va_end(argptr);
+
+ OutputDebugString(DebugBuffer);
+ printf("%s", DebugBuffer);
+}
+#endif
+
+BOOL __declspec(dllexport)
+DotNetCtlInitialize(HINSTANCE Instance)
+{
+ DebugOut("DotNetCtlInitialize(%x) called\n", Instance);
+
+ DotNetButtonInitialize(Instance);
+ return(TRUE);
+}
+
+BOOL __declspec(dllexport)
+DotNetCtlShutdown(HINSTANCE Instance)
+{
+ return(TRUE);
+}
View
0  winelib/dotnetctl/dotnetctl.dll.spec
No changes.
View
31 winelib/dotnetctl/dotnetctl.h
@@ -0,0 +1,31 @@
+/*
+ * dotnetctl.h: .Net control definitions
+ *
+ * Authors:
+ * Peter Dennis Bartok (pbartok@novell.com)
+ *
+ * (C) 2004 Novell, Inc.
+ *
+ * $Revision: 1.1 $
+ * $Modtime: 11 Apr 2004 20:53:32 $
+ *
+ * $Log: dotnetctl.h,v $
+ * Revision 1.1 2004/04/12 02:20:23 pbartok
+ * - More infrastructure for Win32 implementations of controls
+ *
+ *
+ */
+
+#include <windows.h>
+#include <windowsx.h>
+
+#ifndef NDEBUG
+void __cdecl DebugOut(const char *Format, ...);
+#endif
+
+/* From dotnetctl.c */
+BOOL __declspec(dllexport) DotNetCtlInitialize(HINSTANCE Instance);
+BOOL __declspec(dllexport) DotNetCtlShutdown(HINSTANCE Instance);
+
+/* From dotnetbutton.c */
+BOOL DotNetButtonInitialize(HINSTANCE Instance);
View
46 winelib/winelib/ChangeLog
@@ -0,0 +1,46 @@
+2004-05-24 Peter Bartok <pbartok@novell.com>
+ * winelib.c: Added WineGetUnixPath() and WineReleaseUnixPath() functions
+ to allow translation from Windows(DOS) path to unix path no matter what
+ version of wine is used.
+
+2004-05-05 Peter Bartok <pbartok@novell.com>
+ * winelib.c: Removed references to NtCurrentTeb (which is available only
+ if we're compiling optimized. Instead uses the pthread equivalent func.
+
+2004-04-01 Peter Bartok <pbartok@novell.com>
+ * winelib.c: Added save/restore of signal actions around wine
+ initialization (Might have a few too many signals saved,
+ couldn't decide)
+
+2004-03-18 Duncan Mak <duncan@ximian.com>
+
+ * Makefile.in: Make sure the links are created inside $(DESTDIR), this is
+ necessary for making packages
+
+2004-03-17 Peter Bartok <pbartok@novell.com>
+ * Makefile.in: Added creation of symlinks for wine dlls on 'install' rule
+
+2004-03-16 Peter Bartok <pbartok@novell.com>
+ * Makefile.in: Added 'distdir' rule
+
+
+2004-03-13 Peter Bartok <pbartok@novell.com>
+ * Makefile.in: Added include reference required to find library.h in
+ Wine installation scenarios where non-default directories
+ are used
+ * pthread.c: Removed path for library.h include
+ * winelib.c: Removed library.h include
+ Added Alexandre Julliard's suggested TEB reset code
+ * winelib.exe.spec.c: Updated to have VirtualFree references
+
+
+2004-03-11 Peter Bartok <pbartok@novell.com>
+
+ * gettid.c: Added from wine
+ * winelib.c: Renamed from wine-sharedlib.c; streamlined code
+ * ChangeLog: Created
+ * winelib.exe.spec.c: Created
+ * pthread.c: Added from wine
+ * pthread.h: Added from wine
+ * Makefile.in: Created
+ * interlocked.c: Added from wine
View
122 winelib/winelib/Makefile.in
@@ -0,0 +1,122 @@
+### Generated by Winemaker; modified for use in mono project
+
+
+### Generic autoconf variables
+
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+
+DLLS =
+EXES = winelib.exe
+
+
+
+### Common settings
+
+DEFINES =
+INCLUDE_PATH = -Iinclude $(WINE_INCLUDE_PATH)/..
+DLL_PATH =
+LIBRARY_PATH =
+LIBRARIES =
+
+DISTFILES = ChangeLog gettid.c interlocked.c Makefile.in pthread.c \
+ pthread.h winelib.c winelib.exe.spec.c include/port.h \
+ include/config.h.in include/ChangeLog
+
+
+### winelib.exe sources and settings
+
+winelib_exe_MODULE = winelib.exe
+winelib_exe_BASEMODULE= winelib
+winelib_exe_APPMODE = gui
+winelib_exe_C_SRCS = pthread.c \
+ interlocked.c \
+ gettid.c \
+ winelib.c
+winelib_exe_CXX_SRCS =
+winelib_exe_RC_SRCS =
+winelib_exe_SPEC_SRCS =
+winelib_exe_DLL_PATH = -L$(WINE_DLL_ROOT)
+winelib_exe_DLLS = advapi32 \
+ comdlg32 \
+ gdi32 \
+ kernel32 \
+ odbc32 \
+ ole32 \
+ oleaut32 \
+ shell32 \
+ user32 \
+ winspool
+winelib_exe_LIBRARY_PATH=
+winelib_exe_LIBRARIES =
+winelib_exe_DEPENDS =
+
+winelib_exe_OBJS = $(winelib_exe_C_SRCS:.c=.o) \
+ $(winelib_exe_CXX_SRCS:.cpp=.o) \
+ $(EXTRA_OBJS)
+
+
+
+### Global source lists
+
+C_SRCS = $(winelib_exe_C_SRCS)
+CXX_SRCS = $(winelib_exe_CXX_SRCS)
+RC_SRCS = $(winelib_exe_RC_SRCS)
+SPEC_SRCS = $(winelib_exe_SPEC_SRCS)
+
+
+
+### Generic autoconf targets
+
+all: $(DLLS:%=%.so) $(EXES:%=%.so)
+
+@MAKE_RULES@
+
+install::
+ _list="$(EXES:%=%.so) $(DLLS:%=%.so)"; for i in $$_list; do $(INSTALL_PROGRAM) $$i $(libdir); done
+ (cd $(DESTDIR)/@prefix@/lib; for i in @WINE_DLL_ROOT@/*dll.so; do ln -fs $$i lib`basename $$i`; done)
+
+uninstall::
+ _list="$(EXES:%=%.so) $(DLLS:%=%.so)"; for i in $$_list; do $(RM) $(libdir)/$$i;done
+
+### Target specific build rules
+
+$(winelib_exe_MODULE).spec.c: $(winelib_exe_SPEC_SRCS) $(winelib_exe_RC_SRCS:.rc=.res) $(winelib_exe_OBJS)
+ $(LDPATH) $(WINEBUILD) -fPIC -o $@ --exe $(winelib_exe_MODULE) -m$(winelib_exe_APPMODE) $(winelib_exe_SPEC_SRCS:%=--spec %) $(winelib_exe_RC_SRCS:%.rc=%.res) $(winelib_exe_OBJS) $(winelib_exe_DLL_PATH) $(WINE_DLL_PATH) $(GLOBAL_DLL_PATH) $(winelib_exe_DLLS:%=-l%) $(GLOBAL_DLLS:%=-l%)
+
+$(winelib_exe_MODULE).so: $(winelib_exe_MODULE).spec.o $(winelib_exe_OBJS) $(winelib_exe_DEPENDS)
+ $(LDSHARED) $(LDDLLFLAGS) -o $@ $(winelib_exe_OBJS) $(winelib_exe_MODULE).spec.o $(winelib_exe_LIBRARY_PATH) $(ALL_LIBRARY_PATH) $(winelib_exe_LIBRARIES:%=-l%) $(ALL_LIBRARIES) $(LIBS)
+
+
+top_distdir = ..
+distdir = $(top_distdir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
+
+distdir:
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ mkdir -p "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
View
42 winelib/winelib/gettid.c
@@ -0,0 +1,42 @@
+/*
+ * gettid function
+ *
+ * Copyright 2003 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/* Modified for use in mono
+#include "config.h"
+#include "wine/port.h"
+*/
+#include "include/config.h"
+#include "include/port.h"
+
+#ifndef HAVE_GETTID
+
+pid_t gettid(void)
+{
+#if defined(__linux__) && defined(__i386__)
+ pid_t ret;
+ __asm__("int $0x80" : "=a" (ret) : "0" (224) /* SYS_gettid */);
+ if (ret < 0) ret = -1;
+ return ret;
+#else
+ return -1; /* FIXME */
+#endif
+}
+
+#endif /* HAVE_GETTID */
View
4 winelib/winelib/include/ChangeLog
@@ -0,0 +1,4 @@
+2004-03-11 Peter Bartok <pbartok@novell.com>
+
+ * config.h.in: Added from wine
+ * port.h: Added from wine
View
912 winelib/winelib/include/config.h.in
@@ -0,0 +1,912 @@
+/* include/config.h.in. Generated from configure.ac by autoheader. */
+
+#define __WINE_CONFIG_H
+
+/* Specifies the compiler flag that forces a short wchar_t */
+#undef CC_FLAG_SHORT_WCHAR
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
+
+/* Define if you have ALSA including devel headers */
+#undef HAVE_ALSA
+
+/* Define to 1 if you have the <alsa/asoundlib.h> header file. */
+#undef HAVE_ALSA_ASOUNDLIB_H
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define to 1 if you have the <arpa/nameser.h> header file. */
+#undef HAVE_ARPA_NAMESER_H
+
+/* Define if you have ARTS sound server */
+#undef HAVE_ARTS
+
+/* Define to 1 if you have the <audio/audiolib.h> header file. */
+#undef HAVE_AUDIO_AUDIOLIB_H
+
+/* Define to 1 if you have the <audio/soundlib.h> header file. */
+#undef HAVE_AUDIO_SOUNDLIB_H
+
+/* Define to 1 if you have the <capi20.h> header file. */
+#undef HAVE_CAPI20_H
+
+/* Define if you have capi4linux libs and headers */
+#undef HAVE_CAPI4LINUX
+
+/* Define to 1 if you have the `chsize' function. */
+#undef HAVE_CHSIZE
+
+/* Define to 1 if you have the `clone' function. */
+#undef HAVE_CLONE
+
+/* Define to 1 if you have the `connect' function. */
+#undef HAVE_CONNECT
+
+/* Define if we have linux/input.h AND it contains the INPUT event API */
+#undef HAVE_CORRECT_LINUXINPUT_H
+
+/* Define to 1 if you have the <cups/cups.h> header file. */
+#undef HAVE_CUPS_CUPS_H
+
+/* Define to 1 if you have the <curses.h> header file. */
+#undef HAVE_CURSES_H
+
+/* Define to 1 if you have the <direct.h> header file. */
+#undef HAVE_DIRECT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define if you have dlopen */
+#undef HAVE_DLOPEN
+
+/* Define to 1 if you have the <elf.h> header file. */
+#undef HAVE_ELF_H
+
+/* Define to 1 if you have the `finite' function. */
+#undef HAVE_FINITE
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the <fontconfig/fontconfig.h> header file. */
+#undef HAVE_FONTCONFIG_FONTCONFIG_H
+
+/* Define to 1 if you have the `fpclass' function. */
+#undef HAVE_FPCLASS
+
+/* Define if FreeType 2 is installed */
+#undef HAVE_FREETYPE
+
+/* Define to 1 if you have the <freetype/freetype.h> header file. */
+#undef HAVE_FREETYPE_FREETYPE_H
+
+/* Define to 1 if you have the <freetype/ftglyph.h> header file. */
+#undef HAVE_FREETYPE_FTGLYPH_H
+
+/* Define to 1 if you have the <freetype/ftnames.h> header file. */
+#undef HAVE_FREETYPE_FTNAMES_H
+
+/* Define to 1 if you have the <freetype/ftoutln.h> header file. */
+#undef HAVE_FREETYPE_FTOUTLN_H
+
+/* Define to 1 if you have the <freetype/ftsnames.h> header file. */
+#undef HAVE_FREETYPE_FTSNAMES_H
+
+/* Define if you have the <freetype/fttrigon.h> header file. */
+#undef HAVE_FREETYPE_FTTRIGON_H
+
+/* Define to 1 if you have the <freetype/internal/sfnt.h> header file. */
+#undef HAVE_FREETYPE_INTERNAL_SFNT_H
+
+/* Define to 1 if you have the <freetype/ttnameid.h> header file. */
+#undef HAVE_FREETYPE_TTNAMEID_H
+
+/* Define to 1 if you have the <freetype/tttables.h> header file. */
+#undef HAVE_FREETYPE_TTTABLES_H
+
+/* Define to 1 if you have the <ft2build.h> header file. */
+#undef HAVE_FT2BUILD_H
+
+/* Define to 1 if you have the `ftruncate' function. */
+#undef HAVE_FTRUNCATE
+
+/* Define to 1 if you have the `ftruncate64' function. */
+#undef HAVE_FTRUNCATE64
+
+/* Define to 1 if you have the `getbkgd' function. */
+#undef HAVE_GETBKGD
+
+/* Define to 1 if you have the `gethostbyname' function. */
+#undef HAVE_GETHOSTBYNAME
+
+/* Define to 1 if you have the `getnetbyaddr' function. */
+#undef HAVE_GETNETBYADDR
+
+/* Define to 1 if you have the `getnetbyname' function. */
+#undef HAVE_GETNETBYNAME
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long' function. */
+#undef HAVE_GETOPT_LONG
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getprotobyname' function. */
+#undef HAVE_GETPROTOBYNAME
+
+/* Define to 1 if you have the `getprotobynumber' function. */
+#undef HAVE_GETPROTOBYNUMBER
+
+/* Define to 1 if you have the `getpwuid' function. */
+#undef HAVE_GETPWUID
+
+/* Define to 1 if you have the `getservbyport' function. */
+#undef HAVE_GETSERVBYPORT
+
+/* Define to 1 if you have the `gettid' function. */
+#undef HAVE_GETTID
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <gif_lib.h> header file. */
+#undef HAVE_GIF_LIB_H
+
+/* Define if the OpenGL headers define extension typedefs */
+#undef HAVE_GLEXT_PROTOTYPES
+
+/* Define if the OpenGL library supports the glXGetProcAddressARB call */
+#undef HAVE_GLX_GETPROCADDRESS
+
+/* Define to 1 if you have the <GL/glext.h> header file. */
+#undef HAVE_GL_GLEXT_H
+
+/* Define to 1 if you have the <GL/glx.h> header file. */
+#undef HAVE_GL_GLX_H
+
+/* Define to 1 if you have the <GL/gl.h> header file. */
+#undef HAVE_GL_GL_H
+
+/* Define to 1 if the ICU libraries are installed */
+#undef HAVE_ICU
+
+/* Define to 1 if you have the <ieeefp.h> header file. */
+#undef HAVE_IEEEFP_H
+
+/* Define to 1 if you have the `inet_aton' function. */
+#undef HAVE_INET_ATON
+
+/* Define to 1 if you have the `inet_network' function. */
+#undef HAVE_INET_NETWORK
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <io.h> header file. */
+#undef HAVE_IO_H
+
+/* Define if IPX should use netipx/ipx.h from libc */
+#undef HAVE_IPX_GNU
+
+/* Define if IPX includes are taken from Linux kernel */
+#undef HAVE_IPX_LINUX
+
+/* Define to 1 if you have the `iswalnum' function. */
+#undef HAVE_ISWALNUM
+
+/* Define to 1 if you have the <jack/jack.h> header file. */
+#undef HAVE_JACK_JACK_H
+
+/* Define to 1 if you have the <jpeglib.h> header file. */
+#undef HAVE_JPEGLIB_H
+
+/* Define if you have libaudioIO */
+#undef HAVE_LIBAUDIOIO
+
+/* Define to 1 if you have the <libaudioio.h> header file. */
+#undef HAVE_LIBAUDIOIO_H
+
+/* Define if you have the curses library (-lcurses) */
+#undef HAVE_LIBCURSES
+
+/* Define if you have libgif/libungif including devel headers */
+#undef HAVE_LIBGIF
+
+/* Define to 1 if you have the `i386' library (-li386). */
+#undef HAVE_LIBI386
+
+/* Define to 1 if you have the <libio.h> header file. */
+#undef HAVE_LIBIO_H
+
+/* Define if you have libjpeg including devel headers */
+#undef HAVE_LIBJPEG
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define if you have the ncurses library (-lncurses) */
+#undef HAVE_LIBNCURSES
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define to 1 if you have the `ossaudio' library (-lossaudio). */
+#undef HAVE_LIBOSSAUDIO
+
+/* Define to 1 if you have the `poll' library (-lpoll). */
+#undef HAVE_LIBPOLL
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+#undef HAVE_LIBRESOLV
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+#undef HAVE_LIBSOCKET
+
+/* Define to 1 if you have the <libutil.h> header file. */
+#undef HAVE_LIBUTIL_H
+
+/* Define to 1 if you have the `w' library (-lw). */
+#undef HAVE_LIBW
+
+/* Define to 1 if you have the `xpg4' library (-lxpg4). */
+#undef HAVE_LIBXPG4
+
+/* Define if you have the Xrandr library */
+#undef HAVE_LIBXRANDR
+
+/* Define if you have the X Shape extension */
+#undef HAVE_LIBXSHAPE
+
+/* Define if you have the Xxf86dga library version 1 */
+#undef HAVE_LIBXXF86DGA
+
+/* Define if you have the Xxf86dga library version 2 */
+#undef HAVE_LIBXXF86DGA2
+
+/* Define if you have the Xxf86vm library */
+#undef HAVE_LIBXXF86VM
+
+/* Define if you have the X Shm extension */
+#undef HAVE_LIBXXSHM
+
+/* Define to 1 if you have the <link.h> header file. */
+#undef HAVE_LINK_H
+
+/* Define if <linux/joystick.h> defines the Linux 2.2 joystick API */
+#undef HAVE_LINUX_22_JOYSTICK_API
+
+/* Define to 1 if you have the <linux/capi.h> header file. */
+#undef HAVE_LINUX_CAPI_H
+
+/* Define to 1 if you have the <linux/cdrom.h> header file. */
+#undef HAVE_LINUX_CDROM_H
+
+/* Define if Linux-style gethostbyname_r and gethostbyaddr_r are available */
+#undef HAVE_LINUX_GETHOSTBYNAME_R_6
+
+/* Define to 1 if you have the <linux/hdreg.h> header file. */
+#undef HAVE_LINUX_HDREG_H
+
+/* Define to 1 if you have the <linux/input.h> header file. */
+#undef HAVE_LINUX_INPUT_H
+
+/* Define to 1 if you have the <linux/ioctl.h> header file. */
+#undef HAVE_LINUX_IOCTL_H
+
+/* Define to 1 if you have the <linux/joystick.h> header file. */
+#undef HAVE_LINUX_JOYSTICK_H
+
+/* Define to 1 if you have the <linux/major.h> header file. */
+#undef HAVE_LINUX_MAJOR_H
+
+/* Define to 1 if you have the <linux/param.h> header file. */
+#undef HAVE_LINUX_PARAM_H
+
+/* Define to 1 if you have the <linux/serial.h> header file. */
+#undef HAVE_LINUX_SERIAL_H
+
+/* Define to 1 if you have the <linux/ucdrom.h> header file. */
+#undef HAVE_LINUX_UCDROM_H
+
+/* Define to 1 if the system has the type `long long'. */
+#undef HAVE_LONG_LONG
+
+/* Define to 1 if you have the `lseek64' function. */
+#undef HAVE_LSEEK64
+
+/* Define to 1 if you have the `lstat' function. */
+#undef HAVE_LSTAT
+
+/* Define to 1 if you have the <machine/cpu.h> header file. */
+#undef HAVE_MACHINE_CPU_H
+
+/* Define to 1 if you have the <machine/soundcard.h> header file. */
+#undef HAVE_MACHINE_SOUNDCARD_H
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mmap' function. */
+#undef HAVE_MMAP
+
+/* Define to 1 if the system has the type `mode_t'. */
+#undef HAVE_MODE_T
+
+/* Define if you have NAS including devel headers */
+#undef HAVE_NAS
+
+/* Define to 1 if you have the <ncurses.h> header file. */
+#undef HAVE_NCURSES_H
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <netinet/in_systm.h> header file. */
+#undef HAVE_NETINET_IN_SYSTM_H
+
+/* Define to 1 if you have the <netinet/ip.h> header file. */
+#undef HAVE_NETINET_IP_H
+
+/* Define to 1 if you have the <netinet/tcp_fsm.h> header file. */
+#undef HAVE_NETINET_TCP_FSM_H
+
+/* Define to 1 if you have the <netinet/tcp.h> header file. */
+#undef HAVE_NETINET_TCP_H
+
+/* Define to 1 if you have the <net/if_arp.h> header file. */
+#undef HAVE_NET_IF_ARP_H
+
+/* Define to 1 if you have the <net/if_dl.h> header file. */
+#undef HAVE_NET_IF_DL_H
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
+
+/* Define to 1 if you have the <net/if_types.h> header file. */
+#undef HAVE_NET_IF_TYPES_H
+
+/* Define to 1 if you have the <net/route.h> header file. */
+#undef HAVE_NET_ROUTE_H
+
+/* Define to 1 if the system has the type `off_t'. */
+#undef HAVE_OFF_T
+
+/* Define if OpenGL is present on the system */
+#undef HAVE_OPENGL
+
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+#undef HAVE_OPENSSL_SSL_H
+
+/* Define if you have the Open Sound system */
+#undef HAVE_OSS
+
+/* Define if you have the Open Sound system (MIDI interface) */
+#undef HAVE_OSS_MIDI
+
+/* Define to 1 if you have the `pclose' function. */
+#undef HAVE_PCLOSE
+
+/* Define to 1 if the system has the type `pid_t'. */
+#undef HAVE_PID_T
+
+/* Define to 1 if you have the `popen' function. */
+#undef HAVE_POPEN
+
+/* Define if we can use ppdev.h for parallel port access */
+#undef HAVE_PPDEV
+
+/* Define to 1 if you have the `pread' function. */
+#undef HAVE_PREAD
+
+/* Define to 1 if you have the <process.h> header file. */
+#undef HAVE_PROCESS_H
+
+/* Define to 1 if you have the `pthread_getattr_np' function. */
+#undef HAVE_PTHREAD_GETATTR_NP
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if the system has the type `pthread_rwlockattr_t'. */
+#undef HAVE_PTHREAD_RWLOCKATTR_T
+
+/* Define to 1 if the system has the type `pthread_rwlock_t'. */
+#undef HAVE_PTHREAD_RWLOCK_T
+
+/* Define to 1 if you have the <pty.h> header file. */
+#undef HAVE_PTY_H
+
+/* Define to 1 if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
+/* Define to 1 if you have the `pwrite' function. */
+#undef HAVE_PWRITE
+
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
+/* Define to 1 if you have the `resizeterm' function. */
+#undef HAVE_RESIZETERM
+
+/* Define to 1 if you have the <resolv.h> header file. */
+#undef HAVE_RESOLV_H
+
+/* Define to 1 if you have the `rfork' function. */
+#undef HAVE_RFORK
+
+/* Define if we have SANE development environment */
+#undef HAVE_SANE
+
+/* Define to 1 if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
+/* Define to 1 if you have the <scsi/scsi.h> header file. */
+#undef HAVE_SCSI_SCSI_H
+
+/* Define to 1 if you have the <scsi/scsi_ioctl.h> header file. */
+#undef HAVE_SCSI_SCSI_IOCTL_H
+
+/* Define to 1 if you have the <scsi/sg.h> header file. */
+#undef HAVE_SCSI_SG_H
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the `sendmsg' function. */
+#undef HAVE_SENDMSG
+
+/* Define to 1 if you have the `settimeofday' function. */
+#undef HAVE_SETTIMEOFDAY
+
+/* Define to 1 if you have the `sigaltstack' function. */
+#undef HAVE_SIGALTSTACK
+
+/* Define to 1 if `si_fd' is member of `siginfo_t'. */
+#undef HAVE_SIGINFO_T_SI_FD
+
+/* Define to 1 if you have the sigsetjmp (and siglongjmp) function */
+#undef HAVE_SIGSETJMP
+
+/* Define to 1 if the system has the type `size_t'. */
+#undef HAVE_SIZE_T
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the <socket.h> header file. */
+#undef HAVE_SOCKET_H
+
+/* Define to 1 if you have the <soundcard.h> header file. */
+#undef HAVE_SOUNDCARD_H
+
+/* Define to 1 if you have the `spawnvp' function. */
+#undef HAVE_SPAWNVP
+
+/* Define to 1 if the system has the type `ssize_t'. */
+#undef HAVE_SSIZE_T
+
+/* Define to 1 if you have the `statfs' function. */
+#undef HAVE_STATFS
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if `msg_accrights' is member of `struct msghdr'. */
+#undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS
+
+/* Define to 1 if `name' is member of `struct option'. */
+#undef HAVE_STRUCT_OPTION_NAME
+
+/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
+#undef HAVE_STRUCT_SOCKADDR_SA_LEN
+
+/* Define to 1 if `sun_len' is member of `struct sockaddr_un'. */
+#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
+
+/* Define to 1 if `f_bavail' is member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_BAVAIL
+
+/* Define to 1 if `f_bfree' is member of `struct statfs'. */
+#undef HAVE_STRUCT_STATFS_F_BFREE
+
+/* Define to 1 if `st_blocks' is member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_BLOCKS
+
+/* Define to 1 if you have the <syscall.h> header file. */
+#undef HAVE_SYSCALL_H
+
+/* Define to 1 if you have the <sys/asoundlib.h> header file. */
+#undef HAVE_SYS_ASOUNDLIB_H
+
+/* Define to 1 if you have the <sys/cdio.h> header file. */
+#undef HAVE_SYS_CDIO_H
+
+/* Define to 1 if you have the <sys/elf32.h> header file. */
+#undef HAVE_SYS_ELF32_H
+
+/* Define to 1 if you have the <sys/errno.h> header file. */
+#undef HAVE_SYS_ERRNO_H
+
+/* Define to 1 if you have the <sys/exec_elf.h> header file. */
+#undef HAVE_SYS_EXEC_ELF_H
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+#undef HAVE_SYS_FILIO_H
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#undef HAVE_SYS_INTTYPES_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/ipc.h> header file. */
+#undef HAVE_SYS_IPC_H
+
+/* Define to 1 if you have the <sys/link.h> header file. */
+#undef HAVE_SYS_LINK_H
+
+/* Define to 1 if you have the <sys/lwp.h> header file. */
+#undef HAVE_SYS_LWP_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/modem.h> header file. */
+#undef HAVE_SYS_MODEM_H
+
+/* Define to 1 if you have the <sys/mount.h> header file. */
+#undef HAVE_SYS_MOUNT_H
+
+/* Define to 1 if you have the <sys/msg.h> header file. */
+#undef HAVE_SYS_MSG_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#undef HAVE_SYS_POLL_H
+
+/* Define to 1 if you have the <sys/ptrace.h> header file. */
+#undef HAVE_SYS_PTRACE_H
+
+/* Define to 1 if you have the <sys/reg.h> header file. */
+#undef HAVE_SYS_REG_H
+
+/* Define to 1 if you have the <sys/scsiio.h> header file. */
+#undef HAVE_SYS_SCSIIO_H
+
+/* Define to 1 if you have the <sys/shm.h> header file. */
+#undef HAVE_SYS_SHM_H
+
+/* Define to 1 if you have the <sys/signal.h> header file. */
+#undef HAVE_SYS_SIGNAL_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+#undef HAVE_SYS_SOCKIO_H
+
+/* Define to 1 if you have the <sys/soundcard.h> header file. */
+#undef HAVE_SYS_SOUNDCARD_H
+
+/* Define to 1 if you have the <sys/statfs.h> header file. */
+#undef HAVE_SYS_STATFS_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/strtio.h> header file. */
+#undef HAVE_SYS_STRTIO_H
+
+/* Define to 1 if you have the <sys/syscall.h> header file. */
+#undef HAVE_SYS_SYSCALL_H
+
+/* Define to 1 if you have the <sys/sysctl.h> header file. */
+#undef HAVE_SYS_SYSCTL_H
+
+/* Define to 1 if you have the <sys/times.h> header file. */
+#undef HAVE_SYS_TIMES_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#undef HAVE_SYS_UIO_H
+
+/* Define to 1 if you have the <sys/un.h> header file. */
+#undef HAVE_SYS_UN_H
+
+/* Define to 1 if you have the <sys/user.h> header file. */
+#undef HAVE_SYS_USER_H
+
+/* Define to 1 if you have the <sys/v86intr.h> header file. */
+#undef HAVE_SYS_V86INTR_H
+
+/* Define to 1 if you have the <sys/v86.h> header file. */
+#undef HAVE_SYS_V86_H
+
+/* Define to 1 if you have the <sys/vfs.h> header file. */
+#undef HAVE_SYS_VFS_H
+
+/* Define to 1 if you have the <sys/vm86.h> header file. */
+#undef HAVE_SYS_VM86_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the `tcgetattr' function. */
+#undef HAVE_TCGETATTR
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the `timegm' function. */
+#undef HAVE_TIMEGM
+
+/* Define to 1 if you have the <ucontext.h> header file. */
+#undef HAVE_UCONTEXT_H
+
+/* Define to 1 if you have the <unicode/ubidi.h> header file. */
+#undef HAVE_UNICODE_UBIDI_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `usleep' function. */
+#undef HAVE_USLEEP
+
+/* Define to 1 if you have the <utime.h> header file. */
+#undef HAVE_UTIME_H
+
+/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
+#undef HAVE_VALGRIND_MEMCHECK_H
+
+/* Define if we have va_copy */
+#undef HAVE_VA_COPY
+
+/* Define to 1 if you have the `vfscanf' function. */
+#undef HAVE_VFSCANF
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define to 1 if you have the `wait4' function. */
+#undef HAVE_WAIT4
+
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <X11/extensions/shape.h> header file. */
+#undef HAVE_X11_EXTENSIONS_SHAPE_H
+
+/* Define to 1 if you have the <X11/extensions/xf86dga.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XF86DGA_H
+
+/* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XF86VMODE_H
+
+/* Define to 1 if you have the <X11/extensions/XInput.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XINPUT_H
+
+/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XRANDR_H
+
+/* Define to 1 if you have the <X11/extensions/Xrender.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XRENDER_H
+
+/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XSHM_H
+
+/* Define to 1 if you have the <X11/extensions/Xvlib.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XVLIB_H
+
+/* Define to 1 if you have the <X11/XKBlib.h> header file. */
+#undef HAVE_X11_XKBLIB_H
+
+/* Define to 1 if you have the <X11/Xlib.h> header file. */
+#undef HAVE_X11_XLIB_H
+
+/* Define to 1 if you have the <X11/Xutil.h> header file. */
+#undef HAVE_X11_XUTIL_H
+
+/* Define if you have the XKB extension */
+#undef HAVE_XKB
+
+/* Define if the X libraries support XVideo */
+#undef HAVE_XVIDEO
+
+/* Define to 1 if you have the `_lwp_create' function. */
+#undef HAVE__LWP_CREATE
+
+/* Define to 1 if you have the `_lwp_self' function. */
+#undef HAVE__LWP_SELF
+
+/* Define to 1 if you have the `_pclose' function. */
+#undef HAVE__PCLOSE
+
+/* Define to 1 if you have the `_popen' function. */
+#undef HAVE__POPEN
+
+/* Define to 1 if you have the `_snprintf' function. */
+#undef HAVE__SNPRINTF
+
+/* Define to 1 if you have the `_spawnvp' function. */
+#undef HAVE__SPAWNVP
+
+/* Define to 1 if you have the `_stricmp' function. */
+#undef HAVE__STRICMP
+
+/* Define to 1 if you have the `_strnicmp' function. */
+#undef HAVE__STRNICMP
+
+/* Define to 1 if you have the `_vsnprintf' function. */
+#undef HAVE__VSNPRINTF
+
+/* Define if we have __va_copy */
+#undef HAVE___VA_COPY
+
+/* Define to disable all debug messages. */
+#undef NO_DEBUG_MSGS
+
+/* Define to disable trace messages. */
+#undef NO_TRACE_MSGS
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to the soname of the libcrypto library. */
+#undef SONAME_LIBCRYPTO
+
+/* Define to the soname of the libcups library. */
+#undef SONAME_LIBCUPS
+
+/* Define to the soname of the libcurses library. */
+#undef SONAME_LIBCURSES
+
+/* Define to the soname of the libfontconfig library. */
+#undef SONAME_LIBFONTCONFIG
+
+/* Define to the soname of the libfreetype library. */
+#undef SONAME_LIBFREETYPE
+
+/* Define to the soname of the libGL library. */
+#undef SONAME_LIBGL
+
+/* Define to the soname of the libjack library. */
+#undef SONAME_LIBJACK
+
+/* Define to the soname of the libncurses library. */
+#undef SONAME_LIBNCURSES
+
+/* Define to the soname of the libssl library. */
+#undef SONAME_LIBSSL
+
+/* Define to the soname of the libX11 library. */
+#undef SONAME_LIBX11
+
+/* Define to the soname of the libXext library. */
+#undef SONAME_LIBXEXT
+
+/* Define to the soname of the libXi library. */
+#undef SONAME_LIBXI
+
+/* Define to the soname of the libXrender library. */
+#undef SONAME_LIBXRENDER
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define if the struct statfs is defined by <sys/mount.h> */
+#undef STATFS_DEFINED_BY_SYS_MOUNT
+
+/* Define if the struct statfs is defined by <sys/statfs.h> */
+#undef STATFS_DEFINED_BY_SYS_STATFS
+
+/* Define if the struct statfs is defined by <sys/vfs.h> */
+#undef STATFS_DEFINED_BY_SYS_VFS
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#undef STAT_MACROS_BROKEN
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+#undef YYTEXT_POINTER
+
+/* Set this to 64 to enable 64-bit file support on Linux */
+#undef _FILE_OFFSET_BITS
+
+/* Define to a macro to generate an assembly function directive */
+#undef __ASM_FUNC
+
+/* Define to a macro to generate an assembly name from a C symbol */
+#undef __ASM_NAME
+
+/* Define to the assembler keyword used to specify a word value */
+#undef __ASM_SHORT
+
+/* Define to the assembler keyword used to specify an ASCII string */
+#undef __ASM_STRING
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
View
396 winelib/winelib/include/port.h
@@ -0,0 +1,396 @@
+/*
+ * Wine porting definitions
+ *
+ * Copyright 1996 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __WINE_WINE_PORT_H
+#define __WINE_WINE_PORT_H
+
+#ifndef __WINE_CONFIG_H
+# error You must include config.h to use this header
+#endif
+
+#define _GNU_SOURCE /* for pread/pwrite */
+#include <fcntl.h>
+#include <math.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_DIRECT_H
+# include <direct.h>
+#endif
+#ifdef HAVE_IO_H
+# include <io.h>
+#endif
+#ifdef HAVE_PROCESS_H
+# include <process.h>
+#endif
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+
+/****************************************************************
+ * Type definitions
+ */
+
+#ifndef HAVE_MODE_T
+typedef int mode_t;
+#endif
+#ifndef HAVE_OFF_T
+typedef long off_t;
+#endif
+#ifndef HAVE_PID_T
+typedef int pid_t;
+#endif
+#ifndef HAVE_SIZE_T
+typedef unsigned int size_t;
+#endif
+#ifndef HAVE_SSIZE_T
+typedef int ssize_t;
+#endif
+
+#ifndef HAVE_STATFS
+# ifdef __BEOS__
+# define HAVE_STRUCT_STATFS_F_BFREE
+struct statfs {
+ long f_bsize; /* block_size */
+ long f_blocks; /* total_blocks */
+ long f_bfree; /* free_blocks */
+};
+# else /* defined(__BEOS__) */
+struct statfs;
+# endif /* defined(__BEOS__) */
+#endif /* !defined(HAVE_STATFS) */
+
+
+/****************************************************************
+ * Macro definitions
+ */
+
+#ifdef HAVE_DLFCN_H
+#include <dlfcn.h>
+#else
+#define RTLD_LAZY 0x001
+#define RTLD_NOW 0x002
+#define RTLD_GLOBAL 0x100
+#endif
+
+#if !defined(HAVE_FTRUNCATE) && defined(HAVE_CHSIZE)
+#define ftruncate chsize
+#endif
+
+#if !defined(HAVE_POPEN) && defined(HAVE__POPEN)
+#define popen _popen
+#endif
+
+#if !defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE)
+#define pclose _pclose
+#endif
+
+#if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF)
+#define snprintf _snprintf
+#endif
+
+#if !defined(HAVE_VSNPRINTF) && defined(HAVE__VSNPRINTF)
+#define vsnprintf _vsnprintf
+#endif
+
+#ifndef S_ISLNK
+# define S_ISLNK(mod) (0)
+#endif /* S_ISLNK */
+
+/* So we open files in 64 bit access mode on Linux */
+#ifndef O_LARGEFILE
+# define O_LARGEFILE 0