Fix Description: The default now is to not use RPATH when building shared libraries and executables.  The configure flag --with-rpath[=dir] has been added.  The dir is optional, and a default will be used if not given.
This commit is contained in:
richm%stanfordalumni.org 2006-08-01 15:47:14 +00:00
Родитель ccf1c3e5de
Коммит 74356e6d35
4 изменённых файлов: 125 добавлений и 62 удалений

Просмотреть файл

@ -320,7 +320,9 @@ endif
ifeq ($(OS_ARCH),ReliantUNIX)
DL=-ldl
ifdef RPATHFLAG
USE_LD_RUN_PATH=1
endif
USE_CCC_TO_LINK=1
CCC=$(CXX)
endif
@ -329,30 +331,34 @@ ifeq ($(OS_ARCH),UnixWare)
DL=
endif
RPATHFLAG = ..:../lib:../../lib:../../../lib:../../../../lib
ifeq ($(OS_ARCH), SunOS)
# include $ORIGIN in run time library path (works on Solaris 8 10/01 and later)
RPATHFLAG := \$$ORIGIN/../lib:\$$ORIGIN/../../lib:$(RPATHFLAG)
# flag to pass to cc when linking to set runtime shared library search path
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
# Also, use the C++ compiler to link for 64-bit builds.
ifeq ($(USE_64), 1)
USE_CCC_TO_LINK=1
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-R:
endif
else
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-Wl,-R,
endif
endif
ifdef NS_USE_GCC
USE_CCC_TO_LINK=1
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-Wl,-R,
endif
endif
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
ifdef RPATHFLAG
LDRPATHFLAG_PREFIX=-R
endif
# OS network libraries
PLATFORMLIBS+=-lresolv -lsocket -lnsl -lgen -ldl -lposix4
@ -364,11 +370,13 @@ USE_CCC_TO_LINK=1
# flag to pass to cc when linking to set runtime shared library search path
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-Wl,-rpath,
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
LDRPATHFLAG_PREFIX=-rpath
endif
# allow for unresolved symbols
DLL_LDFLAGS += -expect_unresolved "*"
@ -377,12 +385,15 @@ endif # OSF1
ifeq ($(OS_ARCH), AIX)
# Flags to set runtime shared library search path. For example:
# $(CC) $(RPATHFLAG_PREFIX)../..$(RPATHFLAG_EXTRAS)
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-blibpath:
RPATHFLAG_EXTRAS=:/usr/lib:/lib
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
LDRPATHFLAG_PREFIX=-blibpath:/usr/lib:/lib:
endif
DLL_LDFLAGS= -bM:SRE -bnoentry \
-L.:/usr/lib/threads:/usr/lpp/xlC/lib:/usr/lib:/lib
DLL_EXTRA_LIBS= -bI:/usr/lib/lowsys.exp -lC_r -lC -lpthreads -lc_r -lm \
@ -395,14 +406,7 @@ ifeq ($(OS_ARCH), HP-UX)
# Use the C++ compiler to link
USE_CCC_TO_LINK=1
# include $ORIGIN in run time library path (works on HP-UX 11.11 with latest patches and later)
ifeq ($(OS_RELEASE), B.11.11)
RPATHFLAG := \$$ORIGIN/../lib:\$$ORIGIN/../../lib:$(RPATHFLAG)
endif
ifeq ($(OS_RELEASE), B.11.23)
RPATHFLAG := \$$ORIGIN/../lib:\$$ORIGIN/../../lib:$(RPATHFLAG)
endif
ifdef RPATHFLAG
# flag to pass to cc when linking to set runtime shared library search path
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
RPATHFLAG_PREFIX=-Wl,+s,+b,
@ -410,6 +414,7 @@ RPATHFLAG_PREFIX=-Wl,+s,+b,
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
LDRPATHFLAG_PREFIX=+s +b
endif
# we need to link in the rt library to get sem_*()
PLATFORMLIBS += -lrt
@ -423,18 +428,21 @@ USE_CCC_TO_LINK=1
# flag to pass to cc when linking to set runtime shared library search path
# this is used like this, for example: $(RPATHFLAG_PREFIX)../..
ifdef RPATHFLAG
RPATHFLAG_PREFIX=-Wl,-rpath,
# flag to pass to ld when linking to set runtime shared library search path
# this is used like this, for example: $(LDRPATHFLAG_PREFIX)../..
# note, there is a trailing space
LDRPATHFLAG_PREFIX=-rpath
endif # RPATHFLAG
endif # Linux
ifeq ($(OS_ARCH), Darwin)
# Darwin doesn't use RPATH.
#ifdef RPATHFLAG
RPATHFLAG_PREFIX=
RPATHFLAG=
#endif
# Use the C++ compiler to link
USE_CCC_TO_LINK=1

Просмотреть файл

@ -151,3 +151,5 @@ NEXT_ROOT = @NEXT_ROOT@
ifdef NEXT_ROOT
export NEXT_ROOT
endif
RPATHFLAG = @RPATHFLAG@

125
directory/c-sdk/configure поставляемый
Просмотреть файл

@ -72,6 +72,8 @@ ac_help="$ac_help
Exec prefix where NSPR is installed"
ac_help="$ac_help
--with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)"
ac_help="$ac_help
--with-rpath[[=dir]] Build the shared libs and cmd lines progs with an RPATH (default dir is ..:../lib:../../lib:../../../lib:../../../../lib)"
ac_help="$ac_help
--enable-strip Enable stripping of shared libs and programs"
ac_help="$ac_help
@ -646,7 +648,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:650: checking host system type" >&5
echo "configure:652: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@ -667,7 +669,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
echo "configure:671: checking target system type" >&5
echo "configure:673: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@ -685,7 +687,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:689: checking build system type" >&5
echo "configure:691: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@ -744,7 +746,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:748: checking for $ac_word" >&5
echo "configure:750: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -943,7 +945,7 @@ fi
if test -z "$_SYSTEM_SVRCORE" ; then
echo $ac_n "checking for --with-svrcore""... $ac_c" 1>&6
echo "configure:947: checking for --with-svrcore" >&5
echo "configure:949: checking for --with-svrcore" >&5
# Check whether --with-svrcore or --without-svrcore was given.
if test "${with_svrcore+set}" = set; then
withval="$with_svrcore"
@ -1011,11 +1013,11 @@ fi
if test -n "$HAVE_SVRCORE" ; then
no_svrcore=""
echo $ac_n "checking Trying pkg-config svrcore""... $ac_c" 1>&6
echo "configure:1015: checking Trying pkg-config svrcore" >&5
echo "configure:1017: checking Trying pkg-config svrcore" >&5
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1019: checking for $ac_word" >&5
echo "configure:1021: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1048,13 +1050,12 @@ else
fi
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists svrcore; then
if $PKG_CONFIG --exists svrcore-devel; then
echo $ac_n "checking using SVRCORE from package svrcore""... $ac_c" 1>&6
echo "configure:1054: checking using SVRCORE from package svrcore" >&5
SVRCORE_CFLAGS=`$PKG_CONFIG --cflags-only-I svrcore`
SVRCORE_LIBS=`$PKG_CONFIG --libs-only-L svrcore`
echo "configure:1056: checking using SVRCORE from package svrcore" >&5
SVRCORE_CFLAGS=`$PKG_CONFIG --cflags-only-I svrcore-devel`
SVRCORE_LIBS=`$PKG_CONFIG --libs-only-L svrcore-devel`
else
# AC_MSG_NOTICE([system SVRCORE not found])
no_svrcore="yes"
fi
else
@ -1094,13 +1095,13 @@ echo "configure:1054: checking using SVRCORE from package svrcore" >&5
fi
if test -n "$SVRCORE_CFLAGS" -a -n "$SVRCORE_LIBS" ; then
echo $ac_n "checking using in-tree SVRCORE from $svrcoreincpath $svrcorelibpath""... $ac_c" 1>&6
echo "configure:1098: checking using in-tree SVRCORE from $svrcoreincpath $svrcorelibpath" >&5
echo "configure:1099: checking using in-tree SVRCORE from $svrcoreincpath $svrcorelibpath" >&5
echo "$ac_t""yes" 1>&6
elif test -n "$HAVE_SVRCORE" ; then
echo $ac_n "checking could not find in-tree SVRCORE in ../../dist""... $ac_c" 1>&6
echo "configure:1104: checking could not find in-tree SVRCORE in ../../dist" >&5
echo "configure:1105: checking could not find in-tree SVRCORE in ../../dist" >&5
echo "$ac_t""no" 1>&6
else
# If user didn't ask for it, don't complain (really!)
@ -1113,11 +1114,11 @@ echo "configure:1104: checking could not find in-tree SVRCORE in ../../dist" >&5
if test -n "$HAVE_SVRCORE" ; then
no_svrcore=""
echo $ac_n "checking Trying pkg-config svrcore""... $ac_c" 1>&6
echo "configure:1117: checking Trying pkg-config svrcore" >&5
echo "configure:1118: checking Trying pkg-config svrcore" >&5
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1121: checking for $ac_word" >&5
echo "configure:1122: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1150,13 +1151,12 @@ else
fi
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists svrcore; then
if $PKG_CONFIG --exists svrcore-devel; then
echo $ac_n "checking using SVRCORE from package svrcore""... $ac_c" 1>&6
echo "configure:1156: checking using SVRCORE from package svrcore" >&5
SVRCORE_CFLAGS=`$PKG_CONFIG --cflags-only-I svrcore`
SVRCORE_LIBS=`$PKG_CONFIG --libs-only-L svrcore`
echo "configure:1157: checking using SVRCORE from package svrcore" >&5
SVRCORE_CFLAGS=`$PKG_CONFIG --cflags-only-I svrcore-devel`
SVRCORE_LIBS=`$PKG_CONFIG --libs-only-L svrcore-devel`
else
# AC_MSG_NOTICE([system SVRCORE not found])
no_svrcore="yes"
fi
else
@ -3803,6 +3803,20 @@ case "$host" in
;;
esac
DEFAULT_RPATHFLAG=..:../lib:../../lib:../../../lib:../../../../lib
# Check whether --with-rpath or --without-rpath was given.
if test "${with_rpath+set}" = set; then
withval="$with_rpath"
if test "$withval" = "yes" ; then # set default
RPATHFLAG="$DEFAULT_RPATHFLAG"
elif test -n "$withval" ; then # user supplied
RPATHFLAG="$withval"
fi
fi
case "$target" in
*-aix*)
@ -3821,17 +3835,17 @@ EOF
DSO_LDOPTS='-brtl -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
echo "configure:3825: checking for sys/atomic_op.h" >&5
echo "configure:3839: checking for sys/atomic_op.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3830 "configure"
#line 3844 "configure"
#include "confdefs.h"
#include <sys/atomic_op.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3973,7 +3987,7 @@ EOF
_DEBUG_FLAGS='-gdwarf-2 -O0'
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
echo "configure:3977: checking for gethostbyaddr in -lbind" >&5
echo "configure:3991: checking for gethostbyaddr in -lbind" >&5
ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3981,7 +3995,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3985 "configure"
#line 3999 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -3992,7 +4006,7 @@ int main() {
gethostbyaddr()
; return 0; }
EOF
if { (eval echo configure:3996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -4510,6 +4524,13 @@ EOF
DEFAULT_IMPL_STRATEGY=_PTH
fi
if test "$DEFAULT_RPATHFLAG" = "$RPATHFLAG" ; then
if test "$OS_RELEASE" = "B.11.23" -o "$OS_RELEASE" = "B.11.11" ; then
# add ORIGIN to default rpath
RPATHFLAG="\\\$\$ORIGIN/../lib:\\\$\$ORIGIN/../../lib:$RPATHFLAG"
fi
fi
if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
USE_NSPR_THREADS=1
USE_PTHREADS=
@ -4764,7 +4785,7 @@ EOF
# Extract the first word of "lib", so it can be a program name with args.
set dummy lib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4768: checking for $ac_word" >&5
echo "configure:4789: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HAVE_MSVC_LIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -5279,17 +5300,17 @@ EOF
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
echo "configure:5283: checking for machine/builtins.h" >&5
echo "configure:5304: checking for machine/builtins.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5288 "configure"
#line 5309 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:5293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:5314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -5543,6 +5564,10 @@ EOF
CXXFLAGS="$CXXFLAGS -xs"
fi
fi
if test "$DEFAULT_RPATHFLAG" = "$RPATHFLAG" ; then
# add origin stuff
RPATHFLAG="\\\$\$ORIGIN/../lib:\\\$\$ORIGIN/../../lib:$RPATHFLAG"
fi
if test -z "$GNU_AS"; then
ASFLAGS="$ASFLAGS -Wa,-P"
fi
@ -5668,12 +5693,12 @@ esac
if test -z "$SKIP_LIBRARY_CHECKS"; then
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
echo "configure:5672: checking for dlopen" >&5
echo "configure:5697: checking for dlopen" >&5
if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5677 "configure"
#line 5702 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
@ -5696,7 +5721,7 @@ dlopen();
; return 0; }
EOF
if { (eval echo configure:5700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dlopen=yes"
else
@ -5715,7 +5740,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:5719: checking for dlopen in -ldl" >&5
echo "configure:5744: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -5723,7 +5748,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 5727 "configure"
#line 5752 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -5734,7 +5759,7 @@ int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -5762,13 +5787,13 @@ fi
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
echo "configure:5766: checking whether ${CC-cc} needs -traditional" >&5
echo "configure:5791: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
#line 5772 "configure"
#line 5797 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@ -5786,7 +5811,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
#line 5790 "configure"
#line 5815 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@ -5810,12 +5835,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:5814: checking for $ac_func" >&5
echo "configure:5839: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 5819 "configure"
#line 5844 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -5838,7 +5863,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:5842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:5867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -5876,7 +5901,7 @@ fi
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
echo "configure:5880: checking for pthread_create in -lpthreads" >&5
echo "configure:5905: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5898,7 +5923,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:5902: checking for pthread_create in -lpthread" >&5
echo "configure:5927: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5920,7 +5945,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
echo "configure:5924: checking for pthread_create in -lc_r" >&5
echo "configure:5949: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -5942,7 +5967,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
echo "configure:5946: checking for pthread_create in -lc" >&5
echo "configure:5971: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { int a = 1; }
@ -6078,7 +6103,7 @@ if test -n "$USE_PTHREADS"; then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
echo "configure:6082: checking whether ${CC-cc} accepts -pthread" >&5
echo "configure:6107: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@ -6094,7 +6119,7 @@ echo "configure:6082: checking whether ${CC-cc} accepts -pthread" >&5
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
echo "configure:6098: checking whether ${CC-cc} accepts -pthreads" >&5
echo "configure:6123: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@ -6433,6 +6458,7 @@ esac
MAKEFILES="
@ -6714,6 +6740,7 @@ s%@OS_DLLFLAGS@%$OS_DLLFLAGS%g
s%@CYGWIN_WRAPPER@%$CYGWIN_WRAPPER%g
s%@WIN_TOP_SRC@%$WIN_TOP_SRC%g
s%@NEXT_ROOT@%$NEXT_ROOT%g
s%@RPATHFLAG@%$RPATHFLAG%g
CEOF
EOF

Просмотреть файл

@ -903,6 +903,20 @@ case "$host" in
;;
esac
dnl ========================================================
dnl Check for --with-rpath and user supplied rpath
dnl ========================================================
DEFAULT_RPATHFLAG=..:../lib:../../lib:../../../lib:../../../../lib
AC_ARG_WITH(rpath,
[ --with-rpath[[=dir]] Build the shared libs and cmd lines progs with an RPATH (default dir is ..:../lib:../../lib:../../../lib:../../../../lib)],
[
if test "$withval" = "yes" ; then # set default
RPATHFLAG="$DEFAULT_RPATHFLAG"
elif test -n "$withval" ; then # user supplied
RPATHFLAG="$withval"
fi
])
dnl ========================================================
dnl Override of system specific target options
dnl ========================================================
@ -1304,6 +1318,13 @@ tools are selected during the Xcode/Developer Tools installation.])
DEFAULT_IMPL_STRATEGY=_PTH
fi
if test "$DEFAULT_RPATHFLAG" = "$RPATHFLAG" ; then
if test "$OS_RELEASE" = "B.11.23" -o "$OS_RELEASE" = "B.11.11" ; then
# add ORIGIN to default rpath
RPATHFLAG="\\\$\$ORIGIN/../lib:\\\$\$ORIGIN/../../lib:$RPATHFLAG"
fi
fi
if test "$DEFAULT_IMPL_STRATEGY" = "_EMU"; then
USE_NSPR_THREADS=1
USE_PTHREADS=
@ -1945,6 +1966,10 @@ mips-sony-newsos*)
CXXFLAGS="$CXXFLAGS -xs"
fi
fi
if test "$DEFAULT_RPATHFLAG" = "$RPATHFLAG" ; then
# add origin stuff
RPATHFLAG="\\\$\$ORIGIN/../lib:\\\$\$ORIGIN/../../lib:$RPATHFLAG"
fi
if test -z "$GNU_AS"; then
ASFLAGS="$ASFLAGS -Wa,-P"
fi
@ -2520,6 +2545,7 @@ AC_SUBST(OS_DLLFLAGS)
AC_SUBST(CYGWIN_WRAPPER)
AC_SUBST(WIN_TOP_SRC)
AC_SUBST(NEXT_ROOT)
AC_SUBST(RPATHFLAG)
dnl ========================================================
dnl Generate output files.