From a2df0544eebb05b5be78fe6ce6358688d7df7de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sat, 28 Aug 2004 20:03:42 +0000 Subject: Various fixes and improvements of mingw port: - HAVE_SETENV - Cygwin build - win32/contrib Makefile CVS patchset: 6915 CVS date: 2004/08/28 20:03:42 --- configure.ac | 9 +++++-- src/xine-engine/Makefile.am | 22 ++++++++++------- src/xine-engine/load_plugins.c | 6 ++--- win32/contrib/Makefile.am | 56 +++--------------------------------------- 4 files changed, 26 insertions(+), 67 deletions(-) diff --git a/configure.ac b/configure.ac index ebf25e9c3..1cd9acc52 100644 --- a/configure.ac +++ b/configure.ac @@ -1401,7 +1401,11 @@ dnl Some extra checks. dnl --------------------------------------------- AC_CHECK_LIB(posix4, sched_get_priority_min) -AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep strsep strpbrk setenv basename hstrerror memset]) +AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep strsep strpbrk basename hstrerror memset]) +AC_CHECK_FUNC(setenv, [ + AC_DEFINE(HAVE_SETENV, 1, [Define this if you have setenv function]) + ac_have_setenv=yes +]) AC_FUNC_FSEEKO AC_CHECK_HEADERS(byteswap.h malloc.h execinfo.h ucontext.h sys/mman.h sys/mixer.h libgen.h sys/times.h sys/ioctl.h) AM_CONDITIONAL(HAVE_SETENV, test x$ac_have_setenv = "xyes") @@ -1606,6 +1610,7 @@ case "$host_or_hostalias" in case "$host_or_hostalias" in *-*-cygwin) enable_w32dll="no" + LIBS="$LIBS @INTLLIBS@" ;; esac else @@ -2483,7 +2488,7 @@ fi dnl warn if no X11 plugins will be built if test x"$no_x" = "xyes" \ - -a x$SYS != "xmingw32" -a x$SYS = "xcygwin" ; then + -a x$SYS != "xmingw32" -a x$SYS != "xcygwin" ; then echo echo "****************************************************************" echo "WARNING! No X11 output plugins will be built." diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index 09d42fd49..982a93c62 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -6,15 +6,19 @@ 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 +if !HAVE_ZLIB +zlib_lib = $(INTERNAL_ZLIB_LIB) +endif +if WIN32 +dirent_lib = $(DIRENT_LIB) +pthread_lib = $(INTERNAL_PTHREAD_LIB) +endif +if !HAVE_SETENV +setenv_lib = $(SETENV_LIB) endif libxine_la_SOURCES = xine.c metronom.c configfile.c buffer.c \ @@ -27,12 +31,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) $(INTERNAL_ZLIB_LIB) \ - $(DIRENT_LIB) $(INTERNAL_PTHREAD_LIB) \ - $(SETENV_LIB) +libxine_la_DEPENDENCIES = @INTLLIBS@ $(XINEUTILS_LIB) $(zlib_lib) \ + $(dirent_lib) $(pthread_lib) \ + $(setenv_lib) libxine_la_LIBADD = $(THREAD_LIBS) $(DYNAMIC_LD_LIBS) @INTLLIBS@ $(ZLIB_LIBS) \ -lm $(XINEUTILS_LIB) $(LIBICONV) $(FT2_LIBS) \ - $(DIRENT_LIB) $(SETENV_LIB) + $(dirent_lib) $(setenv_lib) libxine_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index f72a9107f..b85b1920a 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.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: load_plugins.c,v 1.184 2004/07/22 14:27:48 mroi Exp $ + * $Id: load_plugins.c,v 1.185 2004/08/28 20:03:42 valtri Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -494,7 +494,7 @@ static void collect_plugins(xine_t *this, char *path){ */ #if defined(__hpux) if(!strstr(str, ".sl")) -#elif defined(__CYGWIN__) +#elif defined(__CYGWIN__) || defined(WIN32) if(!strstr(str, ".dll")) #else if(!strstr(str, ".so")) @@ -1001,7 +1001,7 @@ void _x_scan_plugins (xine_t *this) { load_cached_catalog (this); if ( !(pluginpath = getenv("XINE_PLUGIN_PATH")) ){ -#ifndef _MSC_VER +#ifndef WIN32 pluginpath = "~/.xine/plugins:" XINE_PLUGINDIR; #else pluginpath = XINE_PLUGINDIR; diff --git a/win32/contrib/Makefile.am b/win32/contrib/Makefile.am index 3e96887b5..433ea66e6 100644 --- a/win32/contrib/Makefile.am +++ b/win32/contrib/Makefile.am @@ -9,63 +9,13 @@ libsetenv = libsetenv.la endif if WIN32 -noinst_LTLIBRARIES = $(libsetenv) libtimer.la libdirent.la +win32libs = libtimer.la libdirent.la endif +noinst_LTLIBRARIES = $(libsetenv) $(win32libs) + libsetenv_la_SOURCES = setenv.c libtimer_la_SOURCES = timer/timer.c libdirent_la_SOURCES = dirent/dirent.c - -EXTRA_DIST = \ - pthreads/FAQ \ - pthreads/NEWS \ - pthreads/TODO \ - pthreads/barrier.c \ - pthreads/build.tar.gz \ - pthreads/cleanup.c \ - pthreads/pthread.h \ - pthreads/private.c \ - pthreads/CONTRIBUTORS \ - pthreads/dll.c \ - pthreads/README.CV \ - pthreads/tsd.c \ - pthreads/COPYING.LIB \ - pthreads/signal.c \ - pthreads/README \ - pthreads/condvar.c \ - pthreads/sched.c \ - pthreads/sched.h \ - pthreads/WinCE-PORT \ - pthreads/semaphore.c \ - pthreads/semaphore.h \ - pthreads/README.NONPORTABLE \ - pthreads/PROGRESS \ - pthreads/errno.c \ - pthreads/need_errno.h \ - pthreads/global.c \ - pthreads/cancel.c \ - pthreads/attr.c \ - pthreads/config.h \ - pthreads/nonportable.c \ - pthreads/exit.c \ - pthreads/fork.c \ - pthreads/README.WinCE \ - pthreads/config.h.in \ - pthreads/mutex.c \ - pthreads/misc.c \ - pthreads/pthread.def \ - pthreads/pthread.dsp \ - pthreads/pthread.dsw \ - pthreads/pthread.ncb \ - pthreads/pthread.opt \ - pthreads/spin.c \ - pthreads/sync.c \ - pthreads/rwlock.c \ - pthreads/ANNOUNCE \ - pthreads/MAINTAINERS \ - pthreads/create.c \ - pthreads/ChangeLog \ - pthreads/implement.h \ - pthreads/acconfig.h -- cgit v1.2.3