From 1675d0eec5d8c10b82a7b1e6a882e8950b7abd75 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 8 Feb 2008 22:16:45 +0000 Subject: Add automake conditionals ARCH_X86_32 and ARCH_X86_64. --- configure.ac | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 45f262159..8099051c4 100644 --- a/configure.ac +++ b/configure.ac @@ -2212,7 +2212,7 @@ case "$host_or_hostalias" in dnl AC_DEFINE_UNQUOTED(ARCH_X86_32,,[Define this if you're running x86 architecture 32 bits]) AC_DEFINE(FPM_INTEL,1,[Define to select libmad fixed point arithmetic implementation]) - arch_x86="yes" + arch_x86="32" enable_impure_text="yes" case "$host_or_hostalias" in @@ -2224,7 +2224,7 @@ case "$host_or_hostalias" in x86_64-*) AC_DEFINE_UNQUOTED(ARCH_X86_64,,[Define this if you're running x86 architecture 64 bits]) AC_DEFINE(FPM_64BIT,1,[Define to select libmad fixed point arithmetic implementation]) - arch_x86="yes" + arch_x86="64" ;; powerpc-*-darwin*) dnl avoid ppc compilation crash @@ -2303,11 +2303,13 @@ if test "x$has_vis" = "xyes"; then fi AM_CONDITIONAL(ENABLE_VIS, test "x$has_vis" = "xyes") -if test "x$arch_x86" = "xyes"; then +if test "x$arch_x86" != "xno"; then AC_DEFINE_UNQUOTED(ARCH_X86,,[Define this if you're running x86 architecture]) AC_DEFINE_UNQUOTED(HAVE_MMX,,[Define this if you can compile MMX asm instructions]) fi -AM_CONDITIONAL(ARCH_X86, test "x$arch_x86" = "xyes") +AM_CONDITIONAL(ARCH_X86, test "x$arch_x86" != "xno") +AM_CONDITIONAL(ARCH_X86_32, test "x$arch_x86" = "x32") +AM_CONDITIONAL(ARCH_X86_64, test "x$arch_x86" = "x64") AM_CONDITIONAL(HAVE_MMX, test "x$arch_x86" = "xyes") case $host_os in -- cgit v1.2.3 From 91906eeb746d96a39560471e92431a0c6632c70a Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 8 Feb 2008 22:20:47 +0000 Subject: Avoid a build failure (affects gcc 4.0 on x86_32). --- src/post/deinterlace/plugins/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am index 17d170127..2bc8abd58 100644 --- a/src/post/deinterlace/plugins/Makefile.am +++ b/src/post/deinterlace/plugins/Makefile.am @@ -32,6 +32,9 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \ AM_CFLAGS = -I$(top_srcdir)/src/post/deinterlace \ -I$(top_srcdir)/src/libffmpeg/libavcodec/libpostproc +# Avoid "can't find register" failures with -O0, -O2, -O3 (gcc 4.0) +libdeinterlaceplugins_la-kdetv_greedyh.o libdeinterlaceplugins_la-kdetv_greedyh.lo: CFLAGS=$(shell echo @CFLAGS@ | sed -e 's/$$/ -O1/') + noinst_LTLIBRARIES = libdeinterlaceplugins.la libdeinterlaceplugins_la_SOURCES = \ -- cgit v1.2.3 From 34af4adde1c65495fa8948c482ef83bd73204d89 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 9 Feb 2008 16:51:19 +0000 Subject: Remove some unnecessary tests (which the compiler would discard). --- src/xine-utils/utils.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index c5f18a699..cc3ffdc2c 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -324,22 +324,18 @@ const char *xine_get_homedir(void) { char *s; int len; - if (!homedir[0]) { - len = xine_strcpy_command(GetCommandLine(), homedir, sizeof(homedir)); - s = strdup(homedir); - GetFullPathName(s, sizeof(homedir), homedir, NULL); - free(s); - if ((s = strrchr(homedir, '\\'))) *s = '\0'; - } + len = xine_strcpy_command(GetCommandLine(), homedir, sizeof(homedir)); + s = strdup(homedir); + GetFullPathName(s, sizeof(homedir), homedir, NULL); + free(s); + if ((s = strrchr(homedir, '\\'))) + *s = '\0'; return homedir; #else struct passwd pwd, *pw = NULL; static char homedir[BUFSIZ] = {0,}; - if(homedir[0]) - return homedir; - #ifdef HAVE_GETPWUID_R if(getpwuid_r(getuid(), &pwd, homedir, sizeof(homedir), &pw) != 0 || pw == NULL) { #else -- cgit v1.2.3 From dae0b9aa3ace07691519827151cffe667602d341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 9 Feb 2008 16:54:22 +0000 Subject: Make xine-config --version parsing more robust I think there's quite a bit more room for improvement in the sed expression: 1) The expression is not bound to start/end of line, and will thus pass possible leading/trailing garbage through. 2) It uses plain "." (== any character as far as sed is concerned) where it appears to search for the literal ".". 3) The whole "xine-config --version" output is assigned to all xine_config_*_version vars if there's no match. I think more intuitive would be them to be empty if parsing fails. 4) It uses * (0 or more) for matching digit sequences, where I think + (1 or more) would be desirable. This patch should fix issues 1 to 3. I suppose for 4) it would additionally take only replacing the first three "*" with "\+" but IIRC there are some portability issues related to "+" between different sed versions. --- m4/xine.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/m4/xine.m4 b/m4/xine.m4 index cb64bad1a..2842de621 100644 --- a/m4/xine.m4 +++ b/m4/xine.m4 @@ -69,11 +69,11 @@ AC_ARG_ENABLE(xinetest, XINE_LIBS=`$XINE_CONFIG $xine_config_args --libs` XINE_ACFLAGS=`$XINE_CONFIG $xine_config_args --acflags` xine_config_major_version=`$XINE_CONFIG $xine_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + sed -n 's/^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\1/p'` xine_config_minor_version=`$XINE_CONFIG $xine_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + sed -n 's/^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\2/p'` xine_config_sub_version=`$XINE_CONFIG $xine_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + sed -n 's/^\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*$/\3/p'` xine_data_dir=`$XINE_CONFIG $xine_config_args --datadir` xine_script_dir=`$XINE_CONFIG $xine_config_args --scriptdir` xine_plugin_dir=`$XINE_CONFIG $xine_config_args --plugindir` -- cgit v1.2.3 From 25a1e6cb1385e77a885fd7d1b8ed1da1ca06e4ca Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 9 Feb 2008 17:04:51 +0000 Subject: Changelog entry for the version-parsing fix. --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6cab98cc8..e0f73c3c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ xine-lib (1.1.11) unreleased plugin directory name is 1.19, and if this gets bumped to 1.20 in a future release, 1.19 will still be available for external plugins. (Any directories not 1.* won't be looked in.) + * Made the version parsing much more reliable; it wasn't properly coping + with four-part version numbers. This affects any program whose build + scripts use xine-lib's automake macros. xine-lib (1.1.10.1) 2008-02-07 * Security fixes: -- cgit v1.2.3 From c577d6a8073f9da8c528cce239b601e0e1366d65 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 9 Feb 2008 17:17:23 +0000 Subject: Fix a configure test which was left out of the arch_x86 changes. (Affects MMX.) --- ChangeLog | 1 + configure.ac | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e0f73c3c2..b5a41af89 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ xine-lib (1.1.11) unreleased * Made the version parsing much more reliable; it wasn't properly coping with four-part version numbers. This affects any program whose build scripts use xine-lib's automake macros. + * Whoops, broke MMX on x86 in 1.1.10.1. xine-lib (1.1.10.1) 2008-02-07 * Security fixes: diff --git a/configure.ac b/configure.ac index 8099051c4..0d51130b9 100644 --- a/configure.ac +++ b/configure.ac @@ -2310,7 +2310,7 @@ fi AM_CONDITIONAL(ARCH_X86, test "x$arch_x86" != "xno") AM_CONDITIONAL(ARCH_X86_32, test "x$arch_x86" = "x32") AM_CONDITIONAL(ARCH_X86_64, test "x$arch_x86" = "x64") -AM_CONDITIONAL(HAVE_MMX, test "x$arch_x86" = "xyes") +AM_CONDITIONAL(HAVE_MMX, test "x$arch_x86" != "xno") case $host_os in darwin*) -- cgit v1.2.3 From f0aef0a460f5fb86021e6ef13f391c9c15060302 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 9 Feb 2008 18:09:28 +0000 Subject: That last changelog entry is lying. Delete it. --- ChangeLog | 1 - 1 file changed, 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b5a41af89..e0f73c3c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,7 +8,6 @@ xine-lib (1.1.11) unreleased * Made the version parsing much more reliable; it wasn't properly coping with four-part version numbers. This affects any program whose build scripts use xine-lib's automake macros. - * Whoops, broke MMX on x86 in 1.1.10.1. xine-lib (1.1.10.1) 2008-02-07 * Security fixes: -- cgit v1.2.3 From cbbfd6efbf8b632fc039eb1fce729258b5ac3bdb Mon Sep 17 00:00:00 2001 From: Carlo Bramini Date: Mon, 11 Feb 2008 16:38:48 +0000 Subject: Fix to timegm.c timegm.c uses tzset(), but if host does not provide it, compilation or linking will fail. I fixed it by checking the status of HAVE_TZSET. If the function is not detected at configure time, it won't be used, like it has been done in other parts of xine-lib. --- lib/timegm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/timegm.c b/lib/timegm.c index 588131afb..e86e66370 100644 --- a/lib/timegm.c +++ b/lib/timegm.c @@ -5,15 +5,19 @@ time_t xine_private_timegm(struct tm *tm) { time_t ret; +#if defined(HAVE_TZSET) char *tz; tz = getenv("TZ"); setenv("TZ", "", 1); tzset(); +#endif ret = mktime(tm); +#if defined(HAVE_TZSET) if (tz) setenv("TZ", tz, 1); else unsetenv("TZ"); tzset(); +#endif return ret; } -- cgit v1.2.3 From c280370fa3ef304b9adc9d3cf36c9aeec27034e4 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 11 Feb 2008 16:42:28 +0000 Subject: Actually check for tzset. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0d51130b9..90a5f1b80 100644 --- a/configure.ac +++ b/configure.ac @@ -2117,7 +2117,7 @@ dnl --------------------------------------------- AC_SYS_LARGEFILE AC_CHECK_LIB(posix4, sched_get_priority_min) -AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep lstat memset readlink strchr va_copy]) +AC_CHECK_FUNCS([vsscanf sigaction sigset getpwuid_r nanosleep lstat memset readlink strchr tzset va_copy]) AC_CHECK_FUNCS([snprintf _snprintf], [some_snprintf="yes"; break]) AC_CHECK_FUNCS([vsnprintf _vsnprintf], [some_vsnprintf="yes"; break]) AC_CHECK_FUNCS([strcasecmp _stricmp], [some_strcasecmp="yes"; break]) -- cgit v1.2.3