* configure.in configure: Check if host has libdl if doing

Solaris threads.
This commit is contained in:
Stu Grossman 1997-01-22 02:33:50 +00:00
parent 95efddf268
commit 95b475477e
3 changed files with 54 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Tue Jan 21 18:32:23 1997 Stu Grossman (grossman@lisa.cygnus.com)
* configure.in configure: Check if host has libdl if doing
Solaris threads.
Tue Jan 21 17:03:26 1997 Geoffrey Noer <noer@cygnus.com>
* mn10300-tdep.c: wrote/fixed implementations of

52
gdb/configure vendored
View File

@ -2099,6 +2099,50 @@ EOF
EOF
CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
echo $ac_n "checking for -ldl""... $ac_c" 1>&6
ac_lib_var=`echo dl'_'dlopen | tr './+\055' '__p_'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2111 "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
builtin and then its argument prototype would still apply. */
char dlopen();
int main() { return 0; }
int t() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo dl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-ldl $LIBS"
else
echo "$ac_t""no" 1>&6
fi
if test "$GCC" = "yes" ; then
CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic"
fi
@ -2482,12 +2526,12 @@ 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 2486 "configure"
#line 2530 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2614,12 +2658,12 @@ 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 2618 "configure"
#line 2662 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*

View File

@ -178,6 +178,7 @@ if test ${build} = ${host} -a ${host} = ${target} ; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_THREAD_DB_LIB)
CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
AC_CHECK_LIB(dl, dlopen)
if test "$GCC" = "yes" ; then
CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic"
fi