[GnomeMeeting-devel-list] Cross-compilation of pwlib for win32
- From: Julien PUYDT <jpuydt free fr>
- To: GnomeMeeting development mailing list <gnomemeeting-devel-list gnome org>, Vox Gratia VoIP List <voip-select voxgratia org>
- Cc:
- Subject: [GnomeMeeting-devel-list] Cross-compilation of pwlib for win32
- Date: Fri, 14 Oct 2005 17:55:32 +0200
Hi,
since being able to cross-compile pwlib+opal+gnomemeeting would really
help the win32 port of the later, I am trying to write a new
configure.ac + Makefile.am for pwlib.
There's still much to do to make it a real replacement for the existing
build system, but this :
1. compiles on GNU/linux for win32 with mingw ;
2. makes it possible to compile and run (with wine) the
samples/hello_world program, compiling with :
$CXX -o hello.exe hello.cxx -I../../include -L../../.libs -lpt -L
/home/jpuydt/Gnomemeeting/Cross/windows/lib/ -lldap -lldap_r -llber
-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32 -lregex
I feel the need to make it public ; since I would like to also work on
the dbus component of gnomemeeting, I would be more than happy to have a
Snark on #gnomemeeting
PS: a ridiculous patch is needed, but I have high hopes it will be
applied by the end of the day, so it shouldn't be a problem soon.
COMPONENT_SRC_DIR = $(top_srcdir)/src/ptclib
COMMON_SRC_DIR = $(top_srcdir)/src/ptlib/common
BASE_SRC_DIR = $(top_srcdir)/src/ptlib/msos
#VPATH_CXX := $(COMMON_SRC_DIR) $(COMPONENT_SRC_DIR)
PLUGIN_DIR = ../../../plugins
lib_LTLIBRARIES = libpt.la
INCLUDES = -I$(top_srcdir)/include
libpt_la_SOURCES =
# try and keep the order of modules in reverse order of usage so any
# global statics will be constructed/destructed in the correct order
if COMPILE_SASL2
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/psasl.cxx
endif
if COMPILE_OPENLDAP
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/pldap.cxx \
$(COMPONENT_SRC_DIR)/pils.cxx
endif
if COMPILE_OPENSSL
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/pssl.cxx
endif
if COMPILE_SDL
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/vsdl.cxx
endif
if COMPILE_VIDEO
libpt_la_SOURCES += \
$(COMMON_SRC_DIR)/vfakeio.cxx \
$(COMMON_SRC_DIR)/videoio.cxx \
$(COMMON_SRC_DIR)/vconvert.cxx \
$(COMMON_SRC_DIR)/pvidchan.cxx
if COMPILE_SHM_VIDEO_DEVICES
libpt_la_SOURCES += $(BASE_SRC_DIR)/shmvideo.cxx
endif
if ! COMPILE_PLUGINS
if COMPILE_LINUX
#VPATH_CXX += $(PLUGIN_DIR)/vidinput_v4l
libpt_la_SOURCES += $(PLUGIN_DIR)/vidinput_v4l/vidinput_v4l.cxx
endif
endif # COMPILE_PLUGINS
endif # HAS_VIDEO
if COMPILE_AUDIO
libpt_la_SOURCES += $(COMMON_SRC_DIR)/sound.cxx
if ! COMPILE_PLUGINS
if COMPILE_LINUX
#VPATH_CXX += $(PLUGIN_DIR)/sound_oss
libpt_la_SOURCES += $(PLUGIN_DIR)/sound_oss/sound_oss.cxx
endif # linux
if COMPILE_ALSA
#VPATH_CXX += $(PLUGIN_DIR)/sound_alsa
libpt_la_SOURCES += $(PLUGIN_DIR)/sound_alsa/sound_alsa.cxx
endif # COMPILE_ALSA
if COMPILE_BEOS
libpt_la_SOURCES += $(BASE_SRC_DIR)/beaudio.cxx
endif # beos
endif # COMPILE_PLUGINS
if COMPILE_MACOSX
libpt_la_SOURCES += $(BASE_SRC_DIR)/maccoreaudio.cxx
endif # Darwin
endif # COMPILE_AUDIO
## Various modules
if COMPILE_EXPAT
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/pxml.cxx
if COMPILE_XMLRPC
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/pxmlrpc.cxx \
$(COMPONENT_SRC_DIR)/pxmlrpcs.cxx
endif
if COMPILE_SOAP
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/psoap.cxx
endif
if COMPILE_VXML
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/vxml.cxx
endif
endif # COMPILE_EXPAT
if COMPILE_SASL2
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/xmpp.cxx \
$(COMPONENT_SRC_DIR)/xmpp_c2s.cxx \
$(COMPONENT_SRC_DIR)/xmpp_muc.cxx \
$(COMPONENT_SRC_DIR)/xmpp_roster.cxx
endif
if COMPILE_RESOLVER
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/pdns.cxx \
$(COMPONENT_SRC_DIR)/enum.cxx
endif
if COMPILE_TTS
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/ptts.cxx
endif
if COMPILE_ASN
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/asner.cxx \
$(COMPONENT_SRC_DIR)/pasn.cxx
endif
if COMPILE_SNMP
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/snmpclnt.cxx \
$(COMPONENT_SRC_DIR)/snmpserv.cxx \
$(COMPONENT_SRC_DIR)/psnmp.cxx
endif
if COMPILE_FTP
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/ftpclnt.cxx \
$(COMPONENT_SRC_DIR)/ftpsrvr.cxx \
$(COMPONENT_SRC_DIR)/ftp.cxx
endif
if COMPILE_TELNET
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/telnet.cxx
endif
if COMPILE_STUN
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/pstun.cxx \
$(COMPONENT_SRC_DIR)/pnat.cxx
endif
if COMPILE_SOCKS
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/socks.cxx
endif
if COMPILE_PIPECHAN
libpt_la_SOURCES += $(COMMON_SRC_DIR)/pipechan.cxx
endif
if COMPILE_REMCONN
libpt_la_SOURCES += $(BASE_SRC_DIR)/remconn.cxx
endif
if COMPILE_WAVFILE
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/pwavfile.cxx
endif
if COMPILE_DTMF
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/dtmf.cxx
endif
if COMPILE_SERIAL
libpt_la_SOURCES += \
$(BASE_SRC_DIR)/winserial.cxx \
$(COMPONENT_SRC_DIR)/modem.cxx
endif
if COMPILE_POP3SMTP
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/inetmail.cxx
endif
if COMPILE_HTTP
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/http.cxx \
$(COMPONENT_SRC_DIR)/httpclnt.cxx
endif
if COMPILE_HTTPSVC
libpt_la_SOURCES += \
$(BASE_SRC_DIR)/svcproc.cxx \
$(COMPONENT_SRC_DIR)/httpsvc.cxx \
$(COMPONENT_SRC_DIR)/httpform.cxx \
$(COMPONENT_SRC_DIR)/httpsrvr.cxx \
$(COMPONENT_SRC_DIR)/html.cxx
if COMPILE_OPENSSL
libpt_la_SOURCES += $(COMPONENT_SRC_DIR)/shttpsvc.cxx
endif #COMPILE_OPENSSL
endif #COMPILE_HTTPSVC
if COMPILE_CONFIG_FILE
libpt_la_SOURCES += $(BASE_SRC_DIR)/wincfg.cxx
endif
libpt_la_SOURCES += \
$(COMPONENT_SRC_DIR)/ipacl.cxx \
$(COMPONENT_SRC_DIR)/qchannel.cxx \
$(COMPONENT_SRC_DIR)/delaychan.cxx \
$(COMPONENT_SRC_DIR)/memfile.cxx \
$(COMPONENT_SRC_DIR)/cypher.cxx \
$(COMPONENT_SRC_DIR)/random.cxx \
$(COMPONENT_SRC_DIR)/inetprot.cxx
if COMPILE_LINUX
libpt_la_SOURCES += \
$(BASE_SRC_DIR)/uicmp.cxx \
$(BASE_SRC_DIR)/socket.cxx \
$(BASE_SRC_DIR)/udll.cxx \
$(BASE_SRC_DIR)/channel.cxx \
$(BASE_SRC_DIR)/osutil.cxx \
$(BASE_SRC_DIR)/tlib.cxx \
$(BASE_SRC_DIR)/switch.cxx \
$(BASE_SRC_DIR)/assert.cxx
endif
if COMPILE_MINGW
libpt_la_SOURCES += \
$(BASE_SRC_DIR)/vfw.cxx \
$(BASE_SRC_DIR)/sound_win32.cxx \
$(BASE_SRC_DIR)/ptlib.cxx \
$(BASE_SRC_DIR)/icmp.cxx \
$(BASE_SRC_DIR)/winsock.cxx \
$(BASE_SRC_DIR)/win32.cxx \
$(BASE_SRC_DIR)/assert.cxx \
$(BASE_SRC_DIR)/dllmain.cxx \
$(BASE_SRC_DIR)/ethsock.cxx
endif
libpt_la_SOURCES += \
$(COMMON_SRC_DIR)/pethsock.cxx \
$(COMMON_SRC_DIR)/pluginmgr.cxx \
$(COMMON_SRC_DIR)/notifier_ext.cxx \
$(COMMON_SRC_DIR)/getdate.y \
$(COMMON_SRC_DIR)/pluginmgr.cxx \
$(COMMON_SRC_DIR)/sockets.cxx \
$(COMMON_SRC_DIR)/qos.cxx \
$(COMMON_SRC_DIR)/ptime.cxx \
$(COMMON_SRC_DIR)/pchannel.cxx \
$(COMMON_SRC_DIR)/pconfig.cxx \
$(COMMON_SRC_DIR)/osutils.cxx \
$(COMMON_SRC_DIR)/safecoll.cxx \
$(COMMON_SRC_DIR)/serial.cxx \
$(COMMON_SRC_DIR)/collect.cxx \
$(COMMON_SRC_DIR)/contain.cxx \
$(COMMON_SRC_DIR)/object.cxx # must be last module
if ! COMPILE_REGEX
OBJS = $(OBJDIR)/regcomp.o $(OBJDIR)/regexec.o $(OBJDIR)/regerror.o $(OBJDIR)/regfree.o
endif
AC_INIT(include/ptlib.h)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(libpt, 1.9.2)
AC_CONFIG_SUBDIRS(plugins)
dnl =======================================================================
dnl
dnl basics
dnl
dnl =======================================================================
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_PROG_YACC
AC_PROG_INSTALL
AC_LANG_CPLUSPLUS
dnl =======================================================================
dnl
dnl bare metal
dnl
dnl =======================================================================
dnl =======================================================================
dnl
dnl build tools
dnl
dnl =======================================================================
P_MINGW=1
AC_DEFINE(P_MINGW)
AM_CONDITIONAL(COMPILE_MINGW, test x"${P_MINGW}" = "x1")
AM_CONDITIONAL(COMPILE_LINUX, test x"${P_LINUX}" = "x1")
AM_CONDITIONAL(COMPILE_MACOSX, test x"${P_MACOSX}" = "x1")
AM_CONDITIONAL(COMPILE_BEOS, test x"${P_BEOS}" = "x1")
dnl =======================================================================
dnl
dnl features
dnl
dnl =======================================================================
dnl =======================================================================
dnl
dnl components
dnl
dnl =======================================================================
dnl BEGIN unsorted junk
dnl =======================================================================
dnl CATEGORY I
dnl
dnl P_PTHREADS
dnl PBYTE_ORDER, PBIG_ENDIAN, PLITTLE_ENDIAN (AC_C_BIGENDIAN())
dnl default_resolver
dnl default_openldap
dnl default_openssl
dnl default_expat
dnl default_sdl
dnl default_sasl
dnl default_plugins
dnl default_tts
dnl default_asn
dnl default_stun
dnl default_pipechan
dnl default_dtmf
dnl default_wavfile
dnl default_socks
dnl default_ftp
dnl default_snmp
dnl default_telnet
dnl default_remconn=no
dnl default_serial
dnl default_pop3smtp
dnl default_audio
dnl default_video
dnl default_http
dnl default_httpsvc
dnl default_soap
dnl default_xmlrpc
dnl default_jabber
dnl default_configfile
dnl default_alsa
dnl default_oss
dnl default_ipv6
dnl default_qos
dnl ==> there's nice code about this in pwlib's configure.ac
dnl P_HAS_RECVMSG
dnl recvmsg
dnl P_HAS_STL_STREAMS
dnl P_HAS_ATOMIC_INT / P_NEEDS_GNU_CXX_NAMESPACE
dnl select_large_fdset
dnl upad128_t
dnl
dnl =======================================================================
dnl CATEGORY II
dnl
dnl PWLIBDIR
dnl PWINSTDIR
dnl INSTALLPREFIX
dnl LIBDIR
dnl MAJOR_VERSION
dnl MINOR_VERSION
dnl BUILD_NUMBER
dnl PWLIB_VERSION
dnl STDCCFLAGS
dnl SHAREDLIBEXT
dnl ENDLDLIBS
dnl TARGETDIR
dnl MACHTYPE
dnl PHAS_TEMPLATES
dnl gcc_version
dnl
dnl =======================================================================
dnl CATEGORY III
dnl
dnl need_pragma
dnl NEEDS_PTHREADS
dnl OSTYPE
dnl OS_TAG
dnl OSRELEASE
dnl P_64BIT
dnl LIB64
dnl PHAS_TEMPLATES (defined as 1 !!!)
dnl SHAREDLIBEXT / P_SHAREDLIBEXT
dnl
dnl =======================================================================
dnl CATEGORY IV
dnl
dnl -felide-constructors
dnl -Wreorder
dnl -Woverloaded-virtual
dnl DEFAULT_RTTI
dnl AC_CHECK_SIZEOF(int)
dnl PNO_LONG_DOUBLE
dnl check for flex or lex?!
dnl check for ar/gar !?
dnl check for bison and not yacc ?!
dnl P_HAS_POSIX_READDIR_R
dnl --enable-minsize
dnl --enable-openh323
dnl
HAS_OPENLDAP=1
HAS_REGEX=1
HAS_PLUGINS=1
HAS_VIDEO_CAPTURE=1
HAS_TTS=1
HAS_ASN=1
HAS_STUN=1
HAS_PIPECHAN=1
HAS_DTMF=1
HAS_WAVFILE=1
HAS_SOCKS=1
HAS_FTP=1
HAS_SNMP=1
HAS_TELNET=1
HAS_SERIAL=1
HAS_POP3SMTP=1
HAS_AUDIO=1
HAS_VIDEO=1
HAS_HTTP=1
HAS_HTTPSVC=1
P_HTTP=1
P_HTTPSVC=1
HAS_CONFIG_FILE=1
P_CONFIG_FILE=1
P_LDAP=1
PHAS_TEMPLATES=1
AC_DEFINE(HAS_OPENLDAP)
AC_DEFINE(HAS_REGEX)
AC_DEFINE(HAS_PLUGINS)
AC_DEFINE(HAS_VIDEO_CAPTURE)
AC_DEFINE(HAS_TTS)
AC_DEFINE(HAS_ASN)
AC_DEFINE(HAS_STUN)
AC_DEFINE(HAS_PIPECHAN)
AC_DEFINE(HAS_DTMF)
AC_DEFINE(HAS_WAVFILE)
AC_DEFINE(HAS_SOCKS)
AC_DEFINE(HAS_FTP)
AC_DEFINE(HAS_SNMP)
AC_DEFINE(HAS_TELNET)
AC_DEFINE(HAS_SERIAL)
AC_DEFINE(HAS_POP3SMTP)
AC_DEFINE(HAS_AUDIO)
AC_DEFINE(HAS_VIDEO)
AC_DEFINE(HAS_HTTP)
AC_DEFINE(HAS_HTTPSVC)
AC_DEFINE(P_HTTP)
AC_DEFINE(P_HTTPSVC)
AC_DEFINE(HAS_CONFIG_FILE)
AC_DEFINE(P_CONFIG_FILE)
AC_DEFINE(P_LDAP)
AC_DEFINE(PHAS_TEMPLATES)
AM_CONDITIONAL(COMPILE_SASL2, test x"${HAS_SASL2}" = "x1")
AM_CONDITIONAL(COMPILE_OPENLDAP, test x"${HAS_OPENLDAP}" = "x1")
AM_CONDITIONAL(COMPILE_OPENSSL, test x"${HAS_OPENSSL}" = "x1")
AM_CONDITIONAL(COMPILE_SDL, test x"${HAS_SDL}" = "x1")
AM_CONDITIONAL(COMPILE_VIDEO, test x"${HAS_VIDEO}" = "x1")
AM_CONDITIONAL(COMPILE_SHM_VIDEO_DEVICES, test x"${USE_SHM_VIDEO_DEVICES}" = "x1")
AM_CONDITIONAL(COMPILE_PLUGINS, test x"${HAS_PLUGINS}" = "x1")
AM_CONDITIONAL(COMPILE_AUDIO, test x"${HAS_AUDIO}" = "x1")
AM_CONDITIONAL(COMPILE_ALSA, test x"${HAS_ALSA}" = "x1")
AM_CONDITIONAL(COMPILE_EXPAT, test x"${HAS_EXPAT}" = "x1")
AM_CONDITIONAL(COMPILE_XMLRPC, test x"${HAS_XMLRPC}" = "x1")
AM_CONDITIONAL(COMPILE_SOAP, test x"${HAS_SOAP}" = "x1")
AM_CONDITIONAL(COMPILE_VXML, test x"${HAS_VXML}" = "x1")
AM_CONDITIONAL(COMPILE_RESOLVER, test x"${HAS_RESOLVER}" = "x1")
AM_CONDITIONAL(COMPILE_TTS, test x"${HAS_TTS}" = "x1")
AM_CONDITIONAL(COMPILE_ASN, test x"${HAS_ASN}" = "x1")
AM_CONDITIONAL(COMPILE_SNMP, test x"${HAS_SNMP}" = "x1")
AM_CONDITIONAL(COMPILE_FTP, test x"${HAS_FTP}" = "x1")
AM_CONDITIONAL(COMPILE_TELNET, test x"${HAS_TELNET}" = "x1")
AM_CONDITIONAL(COMPILE_STUN, test x"${HAS_STUN}" = "x1")
AM_CONDITIONAL(COMPILE_SOCKS, test x"${HAS_SOCKS}" = "x1")
AM_CONDITIONAL(COMPILE_PIPECHAN, test x"${HAS_PIPECHAN}" = "x1")
AM_CONDITIONAL(COMPILE_REMCONN, test x"${HAS_REMCONN}" = "x1")
AM_CONDITIONAL(COMPILE_WAVFILE, test x"${HAS_WAVFILE}" = "x1")
AM_CONDITIONAL(COMPILE_DTMF, test x"${HAS_DTMF}" = "x1")
AM_CONDITIONAL(COMPILE_SERIAL, test x"${HAS_SERIAL}" = "x1")
AM_CONDITIONAL(COMPILE_POP3SMTP, test x"${HAS_POP3SMTP}" = "x1")
AM_CONDITIONAL(COMPILE_HTTP, test x"${HAS_HTTP}" = "x1")
AM_CONDITIONAL(COMPILE_HTTPSVC, test x"${HAS_HTTPSVC}" = "x1")
AM_CONDITIONAL(COMPILE_CONFIG_FILE, test x"${HAS_CONFIG_FILE}" = "x1")
AM_CONDITIONAL(COMPILE_REGEX, test x"${HAS_REGEX}" = "x1")
dnl END unsorted junk
AC_CONFIG_HEADER(include/ptbuildopts.h)
AC_OUTPUT(Makefile)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]