[pulseaudio-commits] 5 commits - configure.ac m4/acx_libwrap.m4 m4/ax_pthread.m4

Arun Raghavan arun at kemper.freedesktop.org
Tue Sep 17 07:10:50 PDT 2013


 configure.ac      |   20 ++++++++++----------
 m4/acx_libwrap.m4 |    4 ++--
 m4/ax_pthread.m4  |   47 +++++++++++++++++++++++++++++++----------------
 3 files changed, 43 insertions(+), 28 deletions(-)

New commits:
commit 2aecf0bc070f4a37104c4cb233827dbaee06502d
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date:   Tue Sep 17 19:13:44 2013 +0530

    build-sys: Fix warning in use-case.h configure check
    
    AC_CHECK_HEADER uses cpp for header checks, so in order for the check to use
    the right flags, we need to override CPPFLAGS and not CFLAGS.

diff --git a/configure.ac b/configure.ac
index 438fd06..15f2f99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -770,9 +770,9 @@ AS_IF([test "x$enable_alsa" = "xyes" && test "x$HAVE_ALSA" = "x0"],
 
 AS_IF([test "x$HAVE_ALSA" = "x1"],
     [
-        save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $ASOUNDLIB_CFLAGS"
+        save_CPPFLAGS="$CPPFLAGS"; CPPFLAGS="$CPPFLAGS $ASOUNDLIB_CFLAGS"
         AC_CHECK_HEADERS([use-case.h], HAVE_ALSA_UCM=1, HAVE_ALSA_UCM=0)
-        CFLAGS="$save_CFLAGS"
+        CPPFLAGS="$save_CPPFLAGS"
     ],
     HAVE_ALSA_UCM=0)
 

commit 14513b6b82eb25687767bc0091bc7824cf5738d1
Author: poljar (Damir Jelić) <poljarinho at gmail.com>
Date:   Mon Sep 16 02:00:36 2013 +0200

    build-sys: Update ax_pthread macro
    
    This patch updates the ax_pthread autoconf macro to the latest version
    shipped with autoconf-archive: 2013.06.09.13
    
    This also silences multiple warnings on autoconf 2.68+:
        configure.ac:471: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body

diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
index 94a3b0e..6d400ed 100644
--- a/m4/ax_pthread.m4
+++ b/m4/ax_pthread.m4
@@ -82,7 +82,7 @@
 #   modified version of the Autoconf Macro, you may extend this special
 #   exception to the GPL to apply to your modified version as well.
 
-#serial 14
+#serial 20
 
 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
 AC_DEFUN([AX_PTHREAD], [
@@ -145,8 +145,8 @@ ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt
 # --thread-safe: KAI C++
 # pthread-config: use pthread-config program (for GNU Pth library)
 
-case "${host_cpu}-${host_os}" in
-        *solaris*)
+case ${host_os} in
+        solaris*)
 
         # On Solaris (at least, for some versions), libc contains stubbed
         # (non-functional) versions of the pthreads routines, so link-based
@@ -159,7 +159,7 @@ case "${host_cpu}-${host_os}" in
         ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
         ;;
 
-        *-darwin*)
+        darwin*)
         ax_pthread_flags="-pthread $ax_pthread_flags"
         ;;
 esac
@@ -254,9 +254,16 @@ if test "x$ax_pthread_ok" = xyes; then
 
         AC_MSG_CHECKING([if more special flags are required for pthreads])
         flag=no
-        case "${host_cpu}-${host_os}" in
-            *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-            *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        case ${host_os} in
+            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+            osf* | hpux*) flag="-D_REENTRANT";;
+            solaris*)
+            if test "$GCC" = "yes"; then
+                flag="-D_REENTRANT"
+            else
+                flag="-mt -D_REENTRANT"
+            fi
+            ;;
         esac
         AC_MSG_RESULT(${flag})
         if test "x$flag" != xno; then
@@ -265,8 +272,8 @@ if test "x$ax_pthread_ok" = xyes; then
 
         AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
             ax_cv_PTHREAD_PRIO_INHERIT, [
-                AC_LINK_IFELSE(
-                    AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]]),
+                AC_LINK_IFELSE([
+                    AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
                     [ax_cv_PTHREAD_PRIO_INHERIT=yes],
                     [ax_cv_PTHREAD_PRIO_INHERIT=no])
             ])
@@ -276,16 +283,24 @@ if test "x$ax_pthread_ok" = xyes; then
         LIBS="$save_LIBS"
         CFLAGS="$save_CFLAGS"
 
-        # More AIX lossage: must compile with xlc_r or cc_r
-        if test x"$GCC" != xyes; then
-          AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
-        else
-          PTHREAD_CC=$CC
+        # More AIX lossage: compile with *_r variant
+        if test "x$GCC" != xyes; then
+            case $host_os in
+                aix*)
+                AS_CASE(["x/$CC"],
+                  [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+                  [#handle absolute path differently from PATH based program lookup
+                   AS_CASE(["x$CC"],
+                     [x/*],
+                     [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
+                     [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
+                ;;
+            esac
         fi
-else
-        PTHREAD_CC="$CC"
 fi
 
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
 AC_SUBST(PTHREAD_LIBS)
 AC_SUBST(PTHREAD_CFLAGS)
 AC_SUBST(PTHREAD_CC)

commit f9a54a0d04a9d3bda229d751d43817ddde9e06fe
Author: poljar (Damir Jelić) <poljarinho at gmail.com>
Date:   Mon Sep 16 02:00:35 2013 +0200

    build-sys: Silence warning about missing AC_LANG_SOURCE call in acx_libwrap.m4
    
    This updates the acx_libwrap.m4 macro for autoconf 2.68 and fixes
    warnings like:
        configure.ac:471: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body

diff --git a/m4/acx_libwrap.m4 b/m4/acx_libwrap.m4
index e160214..ccf8afc 100644
--- a/m4/acx_libwrap.m4
+++ b/m4/acx_libwrap.m4
@@ -4,13 +4,13 @@ saved_LIBS="$LIBS"
 LIBS="$LIBS -lwrap"
 AC_MSG_CHECKING([for tcpwrap library and headers])
 AC_LINK_IFELSE(
-AC_LANG_PROGRAM(
+[AC_LANG_PROGRAM(
 [#include <tcpd.h>
 #include <syslog.h>
 int allow_severity = LOG_INFO;
 int deny_severity = LOG_WARNING;],
 [struct request_info *req;
-return hosts_access (req);]),
+return hosts_access (req);])],
 [AC_DEFINE(HAVE_LIBWRAP, [], [Have tcpwrap?])
 LIBWRAP_LIBS="-lwrap"
 AC_MSG_RESULT(yes)],

commit b58ab2b3514670d687cca46e18cfc49b9ee1ea25
Author: poljar (Damir Jelić) <poljarinho at gmail.com>
Date:   Mon Sep 16 02:00:34 2013 +0200

    build-sys: Silence warning about missing AC_LANG_SOURCE call in configure.ac
    
    This silences multiple warnings like this on autoconf 2.68+:
        configure.ac:471: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body

diff --git a/configure.ac b/configure.ac
index 5b052e2..438fd06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -225,7 +225,7 @@ need_libatomic_ops=yes
 AC_CACHE_CHECK([whether $CC knows __sync_bool_compare_and_swap()],
     pulseaudio_cv_sync_bool_compare_and_swap, [
     AC_LINK_IFELSE(
-        AC_LANG_PROGRAM([], [[int a = 4; __sync_bool_compare_and_swap(&a, 4, 5);]]),
+        [AC_LANG_PROGRAM([], [[int a = 4; __sync_bool_compare_and_swap(&a, 4, 5);]])],
         [pulseaudio_cv_sync_bool_compare_and_swap=yes],
         [pulseaudio_cv_sync_bool_compare_and_swap=no])
     ])
@@ -252,7 +252,7 @@ else
                 AC_CACHE_CHECK([compiler support for arm inline asm atomic operations],
                     pulseaudio_cv_support_arm_atomic_ops, [
                     AC_COMPILE_IFELSE(
-                        AC_LANG_PROGRAM([], [[
+                        [AC_LANG_PROGRAM([], [[
                             volatile int a=0;
                             int o=0, n=1, r;
                             asm volatile ("ldrex    %0, [%1]\n"
@@ -262,7 +262,7 @@ else
                                           : "r" (&a), "Ir" (o), "r" (n)
                                           : "cc");
                             return (a==1 ? 0 : -1);
-                        ]]),
+                        ]])],
                         [pulseaudio_cv_support_arm_atomic_ops=yes],
                         [pulseaudio_cv_support_arm_atomic_ops=no])
                 ])
@@ -292,7 +292,7 @@ case $host in
     AC_CACHE_CHECK([support for required armv6 instructions],
       pulseaudio_cv_support_armv6,
       [AC_COMPILE_IFELSE(
-         AC_LANG_PROGRAM([],
+         [AC_LANG_PROGRAM([],
            [[volatile int a = -60000, b = 0xaaaabbbb, c = 0xccccdddd;
              asm volatile ("ldr r0, %2 \n"
                            "ldr r2, %3 \n"
@@ -305,7 +305,7 @@ case $host in
                            : "m" (a), "m" (b), "m" (c)
                            : "r0", "r1", "r2", "r3", "cc");
              return (a == -128 && b == 0xaabbdddd) ? 0 : -1;
-           ]]),
+           ]])],
          [pulseaudio_cv_support_armv6=yes],
          [pulseaudio_cv_support_armv6=no])
       ])
@@ -324,7 +324,7 @@ AC_ARG_ENABLE([neon-opt],
 AS_IF([test "x$enable_neon_opt" != "xno"],
     [save_CFLAGS="$CFLAGS"; CFLAGS="-mfpu=neon $CFLAGS"
      AC_COMPILE_IFELSE(
-        AC_LANG_PROGRAM([[#include <arm_neon.h>]], []),
+        [AC_LANG_PROGRAM([[#include <arm_neon.h>]], [])],
         [
          HAVE_NEON=1
          NEON_CFLAGS="-mfpu=neon"
@@ -453,7 +453,7 @@ AX_CHECK_DEFINE([netinet/in.h], [INADDR_NONE], [],
 AC_CACHE_CHECK([whether $CC knows _Bool],
     pulseaudio_cv__Bool,
     [AC_COMPILE_IFELSE(
-        AC_LANG_PROGRAM([], [[_Bool b;]]),
+        [AC_LANG_PROGRAM([], [[_Bool b;]])],
         [pulseaudio_cv__Bool=yes],
         [pulseaudio_cv__Bool=no])
     ])

commit bb73f9335c657cbda727807ca53b336699d78a80
Author: poljar (Damir Jelić) <poljarinho at gmail.com>
Date:   Mon Sep 16 02:00:33 2013 +0200

    build-sys: Enable subdir-objects option
    
    Automake 1.14 throws a warning when source files are in a sub directory
    and the 'subdir-objecs' option is not enabled.
    
    News: https://lists.gnu.org/archive/html/automake/2013-06/msg00040.html

diff --git a/configure.ac b/configure.ac
index 616a990..5b052e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@ AC_CONFIG_SRCDIR([src/daemon/main.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules color-tests dist-xz tar-ustar])
+AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability subdir-objects silent-rules color-tests dist-xz tar-ustar])
 
 AS_IF([! test -n "$VERSION"], [
    AC_MSG_ERROR([git-version-gen failed])



More information about the pulseaudio-commits mailing list