diff options
author | Stu Grossman <grossman@cygnus> | 1997-01-22 02:33:50 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1997-01-22 02:33:50 +0000 |
commit | 95b475477e334703b3d4b5c2864e3e0525a27270 (patch) | |
tree | 866acde8f3406420bf1f0ac8df946d3986fd6131 /gdb/configure | |
parent | 95efddf268da4a4559d064ff02af6490afdb493f (diff) | |
download | gdb-95b475477e334703b3d4b5c2864e3e0525a27270.zip gdb-95b475477e334703b3d4b5c2864e3e0525a27270.tar.gz gdb-95b475477e334703b3d4b5c2864e3e0525a27270.tar.bz2 |
* configure.in configure: Check if host has libdl if doing
Solaris threads.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/gdb/configure b/gdb/configure index 3d97f2d..3ce4625 100755 --- a/gdb/configure +++ b/gdb/configure @@ -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* |