Date: Mon, 22 Aug 2005 04:22:46 -0400
From: "Ryan C. Gordon" Subject: [Fwd: SDL patch: make usage of rpath optional] Here's a small patch against current SDL CVS that makes usage of rpath optional, by passing --disable-rpath to configure. This comes in handy when redistributing SDL -- the rpath setting prevents the lib being loaded if it's not in the rpath, which makes redistributing in packages to be installed by non-root users pretty much useless. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401128
This commit is contained in:
parent
3da700edc4
commit
f408fa8196
1 changed files with 24 additions and 5 deletions
29
configure.in
29
configure.in
|
@ -1864,6 +1864,14 @@ CheckLinuxVersion()
|
|||
fi
|
||||
}
|
||||
|
||||
dnl Check if we want to use RPATH
|
||||
CheckRPATH()
|
||||
{
|
||||
AC_ARG_ENABLE(rpath,
|
||||
[ --enable-rpath use an rpath when linking SDL [default=yes]],
|
||||
, enable_rpath=yes)
|
||||
}
|
||||
|
||||
case "$target" in
|
||||
*-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu)
|
||||
case "$target" in
|
||||
|
@ -1899,6 +1907,7 @@ case "$target" in
|
|||
CheckSIGACTION
|
||||
CheckAltivec
|
||||
CheckLinuxVersion
|
||||
CheckRPATH
|
||||
|
||||
# Set up files for the main() stub
|
||||
if test "x$video_qtopia" = "xyes"; then
|
||||
|
@ -1976,6 +1985,7 @@ case "$target" in
|
|||
CheckOpenGL
|
||||
CheckPTHREAD
|
||||
CheckSIGACTION
|
||||
CheckRPATH
|
||||
# Set up files for the audio library
|
||||
# We use the OSS and ALSA API's, not the Sun audio API
|
||||
#if test x$enable_audio = xyes; then
|
||||
|
@ -2022,6 +2032,7 @@ case "$target" in
|
|||
CheckPTHREAD
|
||||
CheckSIGACTION
|
||||
CheckUSBHID
|
||||
CheckRPATH
|
||||
# Set up files for the audio library
|
||||
# We use the OSS and ALSA API's, not the Sun audio API
|
||||
#if test x$enable_audio = xyes; then
|
||||
|
@ -2059,6 +2070,7 @@ case "$target" in
|
|||
CheckPTHREAD
|
||||
CheckSIGACTION
|
||||
CheckUSBHID
|
||||
CheckRPATH
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
||||
|
@ -2100,6 +2112,7 @@ case "$target" in
|
|||
CheckPTHREAD
|
||||
CheckSIGACTION
|
||||
CheckUSBHID
|
||||
CheckRPATH
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
|
||||
|
@ -2141,6 +2154,7 @@ case "$target" in
|
|||
CheckOpenGL
|
||||
CheckPTHREAD
|
||||
CheckSIGACTION
|
||||
CheckRPATH
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
||||
|
@ -2183,6 +2197,7 @@ case "$target" in
|
|||
CheckOpenGL
|
||||
CheckPTHREAD
|
||||
CheckSIGACTION
|
||||
CheckRPATH
|
||||
# Set up files for the audio library
|
||||
if test x$enable_audio = xyes; then
|
||||
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
||||
|
@ -2739,11 +2754,15 @@ AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
|
|||
|
||||
# Set runtime shared library paths as needed
|
||||
|
||||
if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
|
||||
SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
|
||||
fi
|
||||
if test $ARCH = solaris; then
|
||||
SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
|
||||
if test "x$enable_rpath" = "xyes"; then
|
||||
if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
|
||||
SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
|
||||
fi
|
||||
if test $ARCH = solaris; then
|
||||
SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
|
||||
fi
|
||||
else
|
||||
SDL_RLD_FLAGS=""
|
||||
fi
|
||||
|
||||
case "$ARCH" in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue