Fix pulseaudio dynamic linking for Solaris builds. SDL-1.2
authorShawn Walker <eviltypeguy@icculus.org>
Tue, 19 Feb 2013 22:05:52 +0000
branchSDL-1.2
changeset 69096cccc0beb880
parent 6908 8b9fcdd925d8
child 6935 b6b2829cd7ef
Fix pulseaudio dynamic linking for Solaris builds.
Don't link to unnecessary filter libraries for pthread and rt on Solaris.
configure.in
     1.1 --- a/configure.in	Tue Feb 19 22:04:50 2013 +0000
     1.2 +++ b/configure.in	Tue Feb 19 22:05:52 2013 +0000
     1.3 @@ -553,6 +553,14 @@
     1.4                 test x$enable_pulseaudio_shared = xyes && test x$pulse_lib != x; then
     1.5                  echo "-- dynamic libpulse-simple -> $pulse_lib"
     1.6                  AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSE_DYNAMIC, "$pulse_lib")
     1.7 +
     1.8 +                case "$host" in
     1.9 +                    # On Solaris, pulseaudio must be linked deferred explicitly
    1.10 +                    # to prevent undefined symbol failures.
    1.11 +                    *-*-solaris*)
    1.12 +                        PULSE_LIBS=`echo $PULSE_LIBS | sed 's/\-l/-Wl,-l/g'`
    1.13 +                        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-zdeferred $PULSE_LIBS -Wl,-znodeferred"
    1.14 +                esac
    1.15              else
    1.16                  EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSE_LIBS"
    1.17              fi
    1.18 @@ -851,7 +859,7 @@
    1.19              have_altivec_h_hdr=yes
    1.20              ])
    1.21              AC_MSG_RESULT($have_gcc_altivec)
    1.22 -	fi
    1.23 +        fi
    1.24  
    1.25          if test x$have_gcc_altivec = xno; then
    1.26              AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
    1.27 @@ -1918,9 +1926,20 @@
    1.28              pthread_cflags="-D_REENTRANT"
    1.29              pthread_lib="-pthread"
    1.30              ;;
    1.31 +        *-*-solaris2.9)
    1.32 +            # From Solaris 9+, posix4's preferred name is rt.
    1.33 +            pthread_cflags="-D_REENTRANT"
    1.34 +            pthread_lib="-lpthread -lrt"
    1.35 +            ;;
    1.36 +        *-*-solaris2.10)
    1.37 +            # Solaris 10+ merged pthread into libc.
    1.38 +            pthread_cflags="-D_REENTRANT"
    1.39 +            pthread_lib="-lrt"
    1.40 +            ;;
    1.41          *-*-solaris*)
    1.42 +            # Solaris 11+ merged rt into libc.
    1.43              pthread_cflags="-D_REENTRANT"
    1.44 -            pthread_lib="-lpthread -lposix4"
    1.45 +            pthread_lib=""
    1.46              ;;
    1.47          *-*-sysv5*)
    1.48              pthread_cflags="-D_REENTRANT -Kthread"