diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/demuxers/Makefile.am | 2 | ||||
-rw-r--r-- | src/input/Makefile.am | 10 | ||||
-rw-r--r-- | src/input/input_cdda.c | 29 | ||||
-rw-r--r-- | src/input/libreal/Makefile.am | 2 | ||||
-rw-r--r-- | src/input/librtsp/Makefile.am | 2 | ||||
-rw-r--r-- | src/input/media_helper.c | 4 | ||||
-rw-r--r-- | src/libfaad/bits.h | 6 | ||||
-rw-r--r-- | src/libfaad/common.h | 34 | ||||
-rw-r--r-- | src/libfaad/diff_to_faad2_cvs.patch | 85 | ||||
-rw-r--r-- | src/libffmpeg/Makefile.am | 3 | ||||
-rw-r--r-- | src/libspucc/cc_decoder.c | 4 | ||||
-rw-r--r-- | src/libxineadec/nosefart/diff_to_nosefart_cvs.patch | 46 | ||||
-rw-r--r-- | src/libxineadec/nosefart/types.h | 31 | ||||
-rw-r--r-- | src/post/goom/Makefile.am | 2 | ||||
-rw-r--r-- | src/xine-engine/Makefile.am | 31 | ||||
-rw-r--r-- | src/xine-utils/Makefile.am | 14 | ||||
-rw-r--r-- | src/xine-utils/memcpy.c | 10 | ||||
-rw-r--r-- | src/xine-utils/utils.c | 4 | ||||
-rw-r--r-- | src/xine-utils/xineutils.h | 13 |
20 files changed, 277 insertions, 61 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index f35db8cb7..d63729331 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,9 @@ include $(top_srcdir)/misc/Makefile.common +if !WIN32 + w32dll = libw32dll +endif + # Order is important be careful changing SUBDIRS SUBDIRS = \ xine-utils \ @@ -17,7 +21,7 @@ SUBDIRS = \ libsputext \ libdts \ libmad \ - libw32dll \ + $(w32dll) \ liblpcm \ libxinevdec \ libxineadec \ diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am index 96643b6c9..3fc0accec 100644 --- a/src/demuxers/Makefile.am +++ b/src/demuxers/Makefile.am @@ -142,7 +142,7 @@ xineplug_dmx_nsv_la_LIBADD = $(XINE_LIB) xineplug_dmx_nsv_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_dmx_matroska_la_SOURCES = demux_matroska.c ebml.c -xineplug_dmx_matroska_la_LIBADD = $(XINE_LIB) +xineplug_dmx_matroska_la_LIBADD = $(XINE_LIB) $(ZLIB_LIBS) xineplug_dmx_matroska_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_dmx_iff_la_SOURCES = demux_iff.c diff --git a/src/input/Makefile.am b/src/input/Makefile.am index 35672d934..04c418a15 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -44,6 +44,12 @@ DVD_CFLAGS = -I$(top_srcdir)/src/input/libdvdnav/ link_dvdnav = libdvdnav/libdvdnav.la endif +# not ported to native Windows +if !WIN32 +in_rtp = xineplug_inp_rtp.la +in_dvb = xineplug_inp_dvb.la +endif + AM_CFLAGS = -D_LARGEFILE64_SOURCE $(GNOME_VFS_CFLAGS) $(ALSA_CFLAGS) $(DVD_CFLAGS) lib_LTLIBRARIES = \ @@ -56,11 +62,11 @@ lib_LTLIBRARIES = \ xineplug_inp_mms.la \ xineplug_inp_stdin_fifo.la \ xineplug_inp_pnm.la \ - xineplug_inp_rtp.la \ + $(in_rtp) \ xineplug_inp_rtsp.la \ xineplug_inp_net.la \ $(in_pvr) \ - xineplug_inp_dvb.la \ + $(in_dvb) \ xineplug_inp_cdda.la diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 4b3c40d92..43c5f98c0 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.63 2004/07/27 18:06:45 mroi Exp $ + * $Id: input_cdda.c,v 1.64 2004/08/27 19:33:20 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -37,11 +37,17 @@ #include <fcntl.h> #include <errno.h> -#ifndef _MSC_VER -#include <sys/ioctl.h> -#include <netdb.h> +#ifdef HAVE_SYS_IOCTL_H +# include <sys/ioctl.h> #else -#include <timer.h> /* alarm() */ +/* for WIN32 */ +# include <winioctl.h> +#endif + +#include <netdb.h> + +#ifdef _MSC_VER +# include <timer.h> /* alarm() */ #endif /* _MSC_VER */ #include <signal.h> @@ -61,10 +67,6 @@ #include "input_plugin.h" #include "media_helper.h" -#ifdef WIN32 -#include <winioctl.h> -#endif - #if defined(__sun) #define DEFAULT_CDDA_DEVICE "/vol/dev/aliases/cdrom0" #elif defined(WIN32) @@ -942,6 +944,7 @@ static int network_command( xine_stream_t *stream, int socket, char *data_buf, c } +#ifndef WIN32 static int network_connect(xine_stream_t *stream, char *url ) { char *host; @@ -970,7 +973,7 @@ static int network_connect(xine_stream_t *stream, char *url ) } return fd; } - + static int network_read_cdrom_toc(xine_stream_t *stream, int fd, cdrom_toc *toc) { char buf[_BUFSIZ]; @@ -1033,6 +1036,8 @@ static int network_read_cdrom_toc(xine_stream_t *stream, int fd, cdrom_toc *toc) return 0; } +#endif /* WIN32 */ + static int network_read_cdrom_frames(xine_stream_t *stream, int fd, int first_frame, int num_frames, unsigned char data[CD_RAW_FRAME_SIZE]) { @@ -1812,9 +1817,8 @@ static int cdda_open(cdda_input_plugin_t *this_gen, int fd = -1; - if ( !cdda_device ) return -1; - #ifndef WIN32 + if ( !cdda_device ) return -1; *fdd = -1; @@ -1846,6 +1850,7 @@ static int cdda_open(cdda_input_plugin_t *this_gen, return 0; #else /* WIN32 */ + if ( !cdda_device ) return -1; *fdd = -1; diff --git a/src/input/libreal/Makefile.am b/src/input/libreal/Makefile.am index 8dd4a9258..57928e26c 100644 --- a/src/input/libreal/Makefile.am +++ b/src/input/libreal/Makefile.am @@ -10,7 +10,7 @@ libreal_la_SOURCES = \ rmff.c \ sdpplin.c -libreal_la_LDFLAGS = $(THREAD_LIBS) -avoid-version -module +libreal_la_LDFLAGS = -avoid-version -module noinst_HEADERS = \ real.h \ diff --git a/src/input/librtsp/Makefile.am b/src/input/librtsp/Makefile.am index 096d47182..2207482b6 100644 --- a/src/input/librtsp/Makefile.am +++ b/src/input/librtsp/Makefile.am @@ -8,7 +8,7 @@ librtsp_la_SOURCES = \ rtsp.c \ rtsp_session.c -librtsp_la_LDFLAGS = $(THREAD_LIBS) -avoid-version -module +librtsp_la_LDFLAGS = -avoid-version -module noinst_HEADERS = \ rtsp.h \ diff --git a/src/input/media_helper.c b/src/input/media_helper.c index 3a016b12f..d07acbab6 100644 --- a/src/input/media_helper.c +++ b/src/input/media_helper.c @@ -53,6 +53,7 @@ static int media_umount_media(const char *device) { +#ifndef WIN32 pid_t pid; int status; @@ -72,6 +73,9 @@ static int media_umount_media(const char *device) } while(1); return -1; +#else + return 0; +#endif } int media_eject_media (xine_t *xine, const char *device) diff --git a/src/libfaad/bits.h b/src/libfaad/bits.h index 7c1080967..68153dd5f 100644 --- a/src/libfaad/bits.h +++ b/src/libfaad/bits.h @@ -22,7 +22,7 @@ ** Commercial non-GPL licensing of this software is possible. ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. ** -** $Id: bits.h,v 1.7 2004/01/26 22:34:10 jstembridge Exp $ +** $Id: bits.h,v 1.8 2004/08/27 19:33:20 valtri Exp $ **/ #ifndef __BITS_H__ @@ -56,9 +56,9 @@ typedef struct _bitfile } bitfile; -#if defined (_WIN32) && !defined(_WIN32_WCE) +#if defined(_MSC_VER) #define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax -#elif defined(LINUX) || defined(DJGPP) +#elif defined(LINUX) || defined(DJGPP) || defined (__MINGW32__) || defined (__CYGWIN__) #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) #else #define BSWAP(a) \ diff --git a/src/libfaad/common.h b/src/libfaad/common.h index a1dbe00f6..744df0e45 100644 --- a/src/libfaad/common.h +++ b/src/libfaad/common.h @@ -22,7 +22,7 @@ ** Commercial non-GPL licensing of this software is possible. ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. ** -** $Id: common.h,v 1.12 2004/01/27 19:13:05 jstembridge Exp $ +** $Id: common.h,v 1.13 2004/08/27 19:33:20 valtri Exp $ **/ #ifndef __COMMON_H__ @@ -145,22 +145,6 @@ extern "C" { /* END COMPILE TIME DEFINITIONS */ -#if defined(_WIN32) - - -typedef unsigned __int64 uint64_t; -typedef unsigned __int32 uint32_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int8 uint8_t; -typedef __int64 int64_t; -typedef __int32 int32_t; -typedef __int16 int16_t; -typedef __int8 int8_t; -typedef float float32_t; - - -#else - #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -189,6 +173,8 @@ typedef float float32_t; #if HAVE_STRINGS_H # include <strings.h> #endif + +/* precedence defining int-types by header files for all platforms */ #if HAVE_INTTYPES_H # include <inttypes.h> #else @@ -196,6 +182,17 @@ typedef float float32_t; # include <stdint.h> # else /* we need these... */ +# ifdef WIN32 +typedef unsigned __int64 uint64_t; +typedef unsigned __int32 uint32_t; +typedef unsigned __int16 uint16_t; +typedef unsigned __int8 uint8_t; +typedef __int64 int64_t; +typedef __int32 int32_t; +typedef __int16 int16_t; +typedef __int8 int8_t; +# else /* WIN32 */ +typedef float float32_t; typedef unsigned long long uint64_t; typedef unsigned long uint32_t; typedef unsigned short uint16_t; @@ -204,6 +201,7 @@ typedef long long int64_t; typedef long int32_t; typedef short int16_t; typedef char int8_t; +# endif /* WIN32 */ # endif #endif #if HAVE_UNISTD_H @@ -228,8 +226,6 @@ char *strchr(), *strrchr(); # endif #endif -#endif - #ifdef WORDS_BIGENDIAN #define ARCH_IS_BIG_ENDIAN #endif diff --git a/src/libfaad/diff_to_faad2_cvs.patch b/src/libfaad/diff_to_faad2_cvs.patch index 86dc8aa69..df7a6db7b 100644 --- a/src/libfaad/diff_to_faad2_cvs.patch +++ b/src/libfaad/diff_to_faad2_cvs.patch @@ -16,3 +16,88 @@ #ifdef __ICL /* only Intel C compiler has fmath ??? */ +diff -u -p -r1.1.1.1 common.h +--- common.h 26 Jul 2004 15:27:56 -0000 1.1.1.1 ++++ common.h 30 Jul 2004 00:08:55 -0000 +@@ -145,22 +145,6 @@ extern "C" { + + /* END COMPILE TIME DEFINITIONS */ + +-#if defined(_WIN32) +- +- +-typedef unsigned __int64 uint64_t; +-typedef unsigned __int32 uint32_t; +-typedef unsigned __int16 uint16_t; +-typedef unsigned __int8 uint8_t; +-typedef __int64 int64_t; +-typedef __int32 int32_t; +-typedef __int16 int16_t; +-typedef __int8 int8_t; +-typedef float float32_t; +- +- +-#else +- + #ifdef HAVE_CONFIG_H + # include "config.h" + #endif +@@ -189,6 +173,8 @@ typedef float float32_t; + #if HAVE_STRINGS_H + # include <strings.h> + #endif ++ ++/* precedence defining int-types by header files for all platforms */ + #if HAVE_INTTYPES_H + # include <inttypes.h> + #else +@@ -196,6 +182,17 @@ typedef float float32_t; + # include <stdint.h> + # else + /* we need these... */ ++# ifdef WIN32 ++typedef unsigned __int64 uint64_t; ++typedef unsigned __int32 uint32_t; ++typedef unsigned __int16 uint16_t; ++typedef unsigned __int8 uint8_t; ++typedef __int64 int64_t; ++typedef __int32 int32_t; ++typedef __int16 int16_t; ++typedef __int8 int8_t; ++# else /* WIN32 */ ++typedef float float32_t; + typedef unsigned long long uint64_t; + typedef unsigned long uint32_t; + typedef unsigned short uint16_t; +@@ -204,6 +201,7 @@ typedef long long int64_t; + typedef long int32_t; + typedef short int16_t; + typedef char int8_t; ++# endif /* WIN32 */ + # endif + #endif + #if HAVE_UNISTD_H +@@ -226,8 +224,6 @@ char *strchr(), *strrchr(); + # define memcpy(d, s, n) bcopy((s), (d), (n)) + # define memmove(d, s, n) bcopy((s), (d), (n)) + # endif +-#endif +- + #endif + + #ifdef WORDS_BIGENDIAN +diff -u -p -r1.1.1.1 bits.h +--- bits.h 26 Jul 2004 15:27:56 -0000 1.1.1.1 ++++ bits.h 30 Jul 2004 09:35:55 -0000 +@@ -56,9 +56,9 @@ typedef struct _bitfile + } bitfile; + + +-#if defined (_WIN32) && !defined(_WIN32_WCE) ++#if defined(_MSC_VER) + #define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax +-#elif defined(LINUX) || defined(DJGPP) ++#elif defined(LINUX) || defined(DJGPP) || defined (__MINGW32__) || defined (__CYGWIN__) + #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) + #else + #define BSWAP(a) \ diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am index 756b954e5..cf1ec66e8 100644 --- a/src/libffmpeg/Makefile.am +++ b/src/libffmpeg/Makefile.am @@ -29,7 +29,8 @@ xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \ xineplug_decode_ff_la_LDFLAGS = -avoid-version -module else AM_CPPFLAGS = $(FF_CPPFLAGS) -xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c +xineplug_decode_ff_la_SOURCES = xine_decoder.c audio_decoder.c video_decoder.c \ + mpeg_parser.c xineplug_decode_ff_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ endif diff --git a/src/libspucc/cc_decoder.c b/src/libspucc/cc_decoder.c index ace2b8df3..1f7dda890 100644 --- a/src/libspucc/cc_decoder.c +++ b/src/libspucc/cc_decoder.c @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: cc_decoder.c,v 1.25 2004/05/05 17:36:48 mroi Exp $ + * $Id: cc_decoder.c,v 1.26 2004/08/27 19:33:21 valtri Exp $ * * stuff needed to provide closed captioning decoding and display * @@ -62,7 +62,7 @@ /* number of text colors specified by EIA-608 standard */ #define NUM_FG_COL 7 -#ifndef _MSC_VER +#ifndef WIN32 /* colors specified by the EIA 608 standard */ enum { WHITE, GREEN, BLUE, CYAN, RED, YELLOW, MAGENTA, BLACK, TRANSPARENT }; #else diff --git a/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch b/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch new file mode 100644 index 000000000..9ae52bbce --- /dev/null +++ b/src/libxineadec/nosefart/diff_to_nosefart_cvs.patch @@ -0,0 +1,46 @@ +diff -u -p -r1.1.1.1 types.h +--- types.h 26 Jul 2004 15:27:59 -0000 1.1.1.1 ++++ types.h 26 Aug 2004 16:00:07 -0000 +@@ -23,8 +23,8 @@ + ** $Id: diff_to_nosefart_cvs.patch,v 1.1 2004/08/27 19:33:37 valtri Exp $ + */ + +-#ifndef _TYPES_H_ +-#define _TYPES_H_ ++#ifndef _NOSEFART_TYPES_H_ ++#define _NOSEFART_TYPES_H_ + + #ifdef HAVE_CONFIG_H + #include "config.h" +@@ -88,7 +88,7 @@ typedef uint8 boolean; + #define ASSERT_MSG(msg) + #endif + +-#endif /* _TYPES_H_ */ ++#endif /* _NOSEFART_TYPES_H_ */ + + /* + ** $Log: diff_to_nosefart_cvs.patch,v $ + ** Revision 1.1 2004/08/27 19:33:37 valtri + ** MINGW32 port. Engine library and most of plugins compiles now. + ** + ** List of some changes: + ** - replaced some _MSC_VER by more common WIN32 + ** - define INTLDIR, remove -static flag for included intl + ** - shared more common CFLAGS with DEBUG_CFLAGS + ** - use WIN32_CFLAGS for all building + ** - separate some flags into THREAD_CFLAGS_CONFIG, + ** THREAD_CFLAGS_CONFIG and ZLIB_LIB_CONFIG for public xine-config, + ** automatically use internal libs if necessary + ** - don't warn about missing X for mingw and cygwin + ** - libw32dll disabled for WIN32 (making native loader would be + ** interesting, or porting wine code to Windows? :->) + ** - DVB and RTP disabled for WIN32, not ported yet + ** - fix build and fix a warning in cdda + ** - fix build for nosefart and libfaad + ** - implement configure option --disable-freetype + ** - sync libxine.pc and xine-config.in + ** - add -liberty to goom under WIN32 + ** - move original build files from included phread and zlib into archives + ** and replace them by autotools + ** diff --git a/src/libxineadec/nosefart/types.h b/src/libxineadec/nosefart/types.h index a61f16a55..01f196035 100644 --- a/src/libxineadec/nosefart/types.h +++ b/src/libxineadec/nosefart/types.h @@ -20,11 +20,11 @@ ** types.h ** ** Data type definitions -** $Id: types.h,v 1.3 2003/01/11 15:53:53 tmmm Exp $ +** $Id: types.h,v 1.4 2004/08/27 19:33:37 valtri Exp $ */ -#ifndef _TYPES_H_ -#define _TYPES_H_ +#ifndef _NOSEFART_TYPES_H_ +#define _NOSEFART_TYPES_H_ #ifdef HAVE_CONFIG_H #include "config.h" @@ -88,10 +88,33 @@ typedef uint8 boolean; #define ASSERT_MSG(msg) #endif -#endif /* _TYPES_H_ */ +#endif /* _NOSEFART_TYPES_H_ */ /* ** $Log: types.h,v $ +** Revision 1.4 2004/08/27 19:33:37 valtri +** MINGW32 port. Engine library and most of plugins compiles now. +** +** List of some changes: +** - replaced some _MSC_VER by more common WIN32 +** - define INTLDIR, remove -static flag for included intl +** - shared more common CFLAGS with DEBUG_CFLAGS +** - use WIN32_CFLAGS for all building +** - separate some flags into THREAD_CFLAGS_CONFIG, +** THREAD_CFLAGS_CONFIG and ZLIB_LIB_CONFIG for public xine-config, +** automatically use internal libs if necessary +** - don't warn about missing X for mingw and cygwin +** - libw32dll disabled for WIN32 (making native loader would be +** interesting, or porting wine code to Windows? :->) +** - DVB and RTP disabled for WIN32, not ported yet +** - fix build and fix a warning in cdda +** - fix build for nosefart and libfaad +** - implement configure option --disable-freetype +** - sync libxine.pc and xine-config.in +** - add -liberty to goom under WIN32 +** - move original build files from included phread and zlib into archives +** and replace them by autotools +** ** Revision 1.3 2003/01/11 15:53:53 tmmm ** make the Nosefart engine aware of the config's WORDS_BIGENDIAN #define ** diff --git a/src/post/goom/Makefile.am b/src/post/goom/Makefile.am index 69891f709..9b2cc3695 100644 --- a/src/post/goom/Makefile.am +++ b/src/post/goom/Makefile.am @@ -25,7 +25,7 @@ xineplug_post_goom_la_SOURCES = $(extra_files) xine_goom.c \ gfontlib.c gfontrle.c goom_core.c goom_hash.c goom_script.c goom_script_lex.c \ goom_script_yacc.c goom_tools.c graphic.c ifs.c lines.c mathtools.c \ plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c -xineplug_post_goom_la_LIBADD = $(XINE_LIB) +xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) xineplug_post_goom_la_LDFLAGS = -avoid-version -module $(XINE_PLUGIN_MIN_SYMS) noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h gfontrle.h goom.h \ diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index 120808132..09d42fd49 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -6,6 +6,16 @@ LIBTOOL = $(SHELL) $(top_builddir)/libtool lib_LTLIBRARIES = libxine.la XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la +if !HAVE_ZLIB +INTERNAL_ZLIB_LIB = $(top_builddir)/win32/contrib/zlib/libzlib.la +endif +if WIN32 +DIRENT_LIB = $(top_builddir)/win32/contrib/libdirent.la +INTERNAL_PTHREAD_LIB = $(top_builddir)/win32/contrib/pthreads/libpthread.la +endif +if !SETENV +SETENV_LIB = $(top_builddir)/win32/contrib/libsetenv.la +endif libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \ load_plugins.c video_decoder.c buffer_types.c \ @@ -17,9 +27,12 @@ libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \ # FIXME: these are currently unused: EXTRA_DIST = lrb.c lrb.h -libxine_la_DEPENDENCIES = @INTLLIBS@ $(XINEUTILS_LIB) +libxine_la_DEPENDENCIES = @INTLLIBS@ $(XINEUTILS_LIB) $(INTERNAL_ZLIB_LIB) \ + $(DIRENT_LIB) $(INTERNAL_PTHREAD_LIB) \ + $(SETENV_LIB) libxine_la_LIBADD = $(THREAD_LIBS) $(DYNAMIC_LD_LIBS) @INTLLIBS@ $(ZLIB_LIBS) \ - -lm $(XINEUTILS_LIB) $(LIBICONV) $(FT2_LIBS) + -lm $(XINEUTILS_LIB) $(LIBICONV) $(FT2_LIBS) \ + $(DIRENT_LIB) $(SETENV_LIB) libxine_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) @@ -37,4 +50,16 @@ noinst_HEADERS = bswap.h @INCLUDED_INTL_TRUE@ @cd $(top_builddir)/intl && $(MAKE) libintl.la $(XINEUTILS_LIB): - cd $(top_srcdir)/src/xine-utils && $(MAKE) libxineutils.la + $(MAKE) -C $(top_builddir)/src/xine-utils libxineutils.la + +$(INTERNAL_PTHREAD_LIB): + $(MAKE) -C $(top_builddir)/win32/contrib/pthreads libpthread.la + +$(INTERNAL_ZLIB_LIB): + $(MAKE) -C $(top_builddir)/win32/contrib/zlib libzlib.la + +$(DIRENT_LIB): + $(MAKE) -C $(top_builddir)/win32/contrib libdirent.la + +$(SETENV_LIB): + $(MAKE) -C $(top_builddir)/win32/contrib libsetenv.la diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index 412817b6b..d2d9699ed 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -9,7 +9,13 @@ if PPC_ARCH pppc_files = ppcasm_string.S endif -AM_CFLAGS = $(THREAD_CFLAGS) $(X_CFLAGS) +if WIN32 +TIMER_LIB = $(top_builddir)/win32/contrib/libtimer.la +else +#lib_thr = $(THREAD_LIBS) +endif + +AM_CFLAGS = $(X_CFLAGS) libxineutils_la_SOURCES = $(pppc_files) \ cpu_accel.c \ @@ -25,7 +31,8 @@ libxineutils_la_SOURCES = $(pppc_files) \ xmlparser.c \ xine_buffer.c -libxineutils_la_LIBADD = $(THREAD_LIBS) +libxineutils_la_DEPENDENCIES = $(TIMER_LIB) +libxineutils_la_LIBADD = $(lib_thr) $(TIMER_LIB) include_HEADERS = \ attributes.h \ @@ -36,3 +43,6 @@ include_HEADERS = \ xmlparser.h noinst_HEADERS = ppcasm_string.h xine_check.h + +$(TIMER_LIB): + $(MAKE) -C $(top_builddir)/win32/contrib libtimer.la diff --git a/src/xine-utils/memcpy.c b/src/xine-utils/memcpy.c index e49398f48..79a74c9d5 100644 --- a/src/xine-utils/memcpy.c +++ b/src/xine-utils/memcpy.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2003 the xine project + * Copyright (C) 2001-2004 the xine project * * This file is part of xine, a free video player. * @@ -37,7 +37,7 @@ #include "ppcasm_string.h" #endif -#ifndef _MSC_VER +#ifdef HAVE_SYS_TIMES_H #include <sys/times.h> #endif @@ -408,7 +408,7 @@ static struct { { NULL, NULL, 0, 0 } }; -#if defined(ARCH_X86) && !defined(_MSC_VER) +#if defined(ARCH_X86) && defined(HAVE_SYS_TIMES_H) static unsigned long long int rdtsc(int config_flags) { unsigned long long int x; @@ -427,12 +427,12 @@ static uint64_t rdtsc(int config_flags) { /* FIXME: implement an equivalent for using optimized memcpy on other architectures */ -#ifndef _MSC_VER +#ifdef HAVE_SYS_TIMES_H struct tms tp; return times(&tp); #else return ((uint64_t)0); -#endif /* _MSC_VER */ +#endif /* HAVE_SYS_TIMES_H */ } #endif diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index 59fb8a4a1..70bb406fa 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: utils.c,v 1.29 2004/07/25 17:47:01 mroi Exp $ + * $Id: utils.c,v 1.30 2004/08/27 19:33:37 valtri Exp $ * */ #define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */ @@ -349,7 +349,7 @@ char *exec_path_append_subdir(char *string) { const char *xine_get_homedir(void) { #ifdef WIN32 - return XINE_HOMEDIR; + return exec_path_append_subdir(NULL); #else struct passwd pwd, *pw = NULL; diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h index 91d02d480..77a9c9217 100644 --- a/src/xine-utils/xineutils.h +++ b/src/xine-utils/xineutils.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xineutils.h,v 1.89 2004/07/14 18:51:29 valtri Exp $ + * $Id: xineutils.h,v 1.90 2004/08/27 19:33:37 valtri Exp $ * */ #ifndef XINEUTILS_H @@ -55,6 +55,17 @@ extern "C" { #include <stdio.h> #include <string.h> +#ifdef WIN32 +/* Ridiculous hack to return valid xine support + * directories. These should be read from + * a registry entry set at install time. + */ + /* +# define XINE_PLUGINDIR exec_path_append_subdir( "plugins" ) +# define XINE_FONTDIR exec_path_append_subdir( "plugins" ) +# define XINE_LOCALEDIR exec_path_append_subdir( "plugins" )*/ +#endif + /* * debugable mutexes */ |