3958
echo "$as_me:$LINENO: checking whether weak symbol works" >&5
3959
echo $ECHO_N "checking whether weak symbol works... $ECHO_C" >&6
3960
if test "${libiberty_cv_have_weak_symbol+set}" = set; then
3961
echo $ECHO_N "(cached) $ECHO_C" >&6
3963
cat >conftest.$ac_ext <<_ACEOF
3964
#line $LINENO "configure"
3967
cat confdefs.h >>conftest.$ac_ext
3968
cat >>conftest.$ac_ext <<_ACEOF
3969
/* end confdefs.h. */
3971
#pragma weak liberty_weak_symbol_test
3972
extern void liberty_weak_symbol_test ();
3976
if (return &liberty_weak_symbol_test != NULL) return 1
3981
rm -f conftest.$ac_objext
3982
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3983
(eval $ac_compile) 2>&5
3985
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3986
(exit $ac_status); } &&
3987
{ ac_try='test -s conftest.$ac_objext'
3988
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3991
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3992
(exit $ac_status); }; }; then
3993
libiberty_cv_have_weak_symbol=no
3995
echo "$as_me: failed program was:" >&5
3996
sed 's/^/| /' conftest.$ac_ext >&5
3998
libiberty_cv_have_weak_symbol=yes
4000
rm -f conftest.$ac_objext conftest.$ac_ext
4003
echo "$as_me:$LINENO: result: $libiberty_cv_have_weak_symbol" >&5
4004
echo "${ECHO_T}$libiberty_cv_have_weak_symbol" >&6
4005
if test $libiberty_cv_have_weak_symbol = yes; then
4007
cat >>confdefs.h <<\_ACEOF
4008
#define HAVE_WEAK_SYMBOL 1
4013
if test $libiberty_cv_have_weak_symbol = yes; then
4014
# demangler may use dlopen.
4015
echo "$as_me:$LINENO: checking for library containing dlopen" >&5
4016
echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6
4017
if test "${ac_cv_search_dlopen+set}" = set; then
4018
echo $ECHO_N "(cached) $ECHO_C" >&6
4020
ac_func_search_save_LIBS=$LIBS
4021
ac_cv_search_dlopen=no
4022
if test x$gcc_no_link = xyes; then
4023
{ { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4024
echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4025
{ (exit 1); exit 1; }; }
4027
cat >conftest.$ac_ext <<_ACEOF
4028
#line $LINENO "configure"
4031
cat confdefs.h >>conftest.$ac_ext
4032
cat >>conftest.$ac_ext <<_ACEOF
4033
/* end confdefs.h. */
4035
/* Override any gcc2 internal prototype to avoid an error. */
4039
/* We use char because int might match the return type of a gcc2
4040
builtin and then its argument prototype would still apply. */
4050
rm -f conftest.$ac_objext conftest$ac_exeext
4051
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4052
(eval $ac_link) 2>&5
4054
echo "$as_me:$LINENO: \$? = $ac_status" >&5
4055
(exit $ac_status); } &&
4056
{ ac_try='test -s conftest$ac_exeext'
4057
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4060
echo "$as_me:$LINENO: \$? = $ac_status" >&5
4061
(exit $ac_status); }; }; then
4062
ac_cv_search_dlopen="none required"
4064
echo "$as_me: failed program was:" >&5
4065
sed 's/^/| /' conftest.$ac_ext >&5
4068
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4069
if test "$ac_cv_search_dlopen" = no; then
4070
for ac_lib in dl; do
4071
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4072
if test x$gcc_no_link = xyes; then
4073
{ { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
4074
echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
4075
{ (exit 1); exit 1; }; }
4077
cat >conftest.$ac_ext <<_ACEOF
4078
#line $LINENO "configure"
4081
cat confdefs.h >>conftest.$ac_ext
4082
cat >>conftest.$ac_ext <<_ACEOF
4083
/* end confdefs.h. */
4085
/* Override any gcc2 internal prototype to avoid an error. */
4089
/* We use char because int might match the return type of a gcc2
4090
builtin and then its argument prototype would still apply. */
4100
rm -f conftest.$ac_objext conftest$ac_exeext
4101
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4102
(eval $ac_link) 2>&5
4104
echo "$as_me:$LINENO: \$? = $ac_status" >&5
4105
(exit $ac_status); } &&
4106
{ ac_try='test -s conftest$ac_exeext'
4107
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4110
echo "$as_me:$LINENO: \$? = $ac_status" >&5
4111
(exit $ac_status); }; }; then
4112
ac_cv_search_dlopen="-l$ac_lib"
4115
echo "$as_me: failed program was:" >&5
4116
sed 's/^/| /' conftest.$ac_ext >&5
4119
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4122
LIBS=$ac_func_search_save_LIBS
4124
echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
4125
echo "${ECHO_T}$ac_cv_search_dlopen" >&6
4126
if test "$ac_cv_search_dlopen" != no; then
4127
test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
4128
libiberty_cv_have_dlopen=yes
4130
libiberty_cv_have_dlopen=no
4133
if test $libiberty_cv_have_dlopen = yes; then
4135
cat >>confdefs.h <<\_ACEOF
4136
#define HAVE_DLOPEN 1
4142
3938
echo "$as_me:$LINENO: checking for pid_t" >&5
4143
3939
echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4144
3940
if test "${ac_cv_type_pid_t+set}" = set; then