aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>1998-01-28 00:17:53 +0000
committerJason Molenda <jmolenda@apple.com>1998-01-28 00:17:53 +0000
commit4b95e9a13ddec5ea161db5624a0ea7451d94237d (patch)
tree5549b0190ef8ed46e3b34137388da75debedf10e /gdb/configure
parent53a560f95a552b1b2bb017db9614b6bade78dafb (diff)
downloadgdb-4b95e9a13ddec5ea161db5624a0ea7451d94237d.zip
gdb-4b95e9a13ddec5ea161db5624a0ea7451d94237d.tar.gz
gdb-4b95e9a13ddec5ea161db5624a0ea7451d94237d.tar.bz2
* configure.in (CONFIG_LDFLAGS): Only add -export-dynamic
when using GNU ld. A little longer patch than necessary due to some whitespace reformatting.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-xgdb/configure134
1 files changed, 81 insertions, 53 deletions
diff --git a/gdb/configure b/gdb/configure
index ff655d9..07d99d3 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -2358,36 +2358,36 @@ fi
if test ${build} = ${host} -a ${host} = ${target} ; then
- case ${host_os} in
- hpux*)
- echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
+ case ${host_os} in
+ hpux*)
+ echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
echo "configure:2365: checking for HPUX/OSF thread support" >&5
- if test -f /usr/include/dce/cma_config.h ; then
- if test "$GCC" = "yes" ; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ if test -f /usr/include/dce/cma_config.h ; then
+ if test "$GCC" = "yes" ; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
#define HAVE_HPUX_THREAD_SUPPORT 1
EOF
- CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
- else
- echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- ;;
- solaris*)
- echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
+ CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
+ else
+ echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
+ fi
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ ;;
+ solaris*)
+ echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
echo "configure:2383: checking for Solaris thread debugging library" >&5
- if test -f /usr/lib/libthread_db.so.1 ; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
+ if test -f /usr/lib/libthread_db.so.1 ; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
#define HAVE_THREAD_DB_LIB 1
EOF
- CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
- echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+ CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
+ echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:2392: 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
@@ -2434,15 +2434,43 @@ else
echo "$ac_t""no" 1>&6
fi
- if test "$GCC" = "yes" ; then
- CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic"
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- ;;
- esac
-
+ if test "$GCC" = "yes" ; then
+ # The GNU linker requires the -export-dynamic option to make
+ # all symbols visible in the dynamic symbol table.
+ hold_ldflags=$LDFLAGS
+ echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
+echo "configure:2443: checking for the ld -export-dynamic flag" >&5
+ LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
+ cat > conftest.$ac_ext <<EOF
+#line 2446 "configure"
+#include "confdefs.h"
+
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:2453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ found=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ found=no
+fi
+rm -f conftest*
+ LDFLAGS=$hold_ldflags
+ echo "$ac_t""$found" 1>&6
+ if test $found = yes; then
+ CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
+ fi
+ fi
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ ;;
+ esac
+
fi
ENABLE_CFLAGS=
@@ -2545,12 +2573,12 @@ fi
# In the cygwin32 environment, we need some additional flags.
echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
-echo "configure:2549: checking for cygwin32" >&5
+echo "configure:2577: checking for cygwin32" >&5
if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2554 "configure"
+#line 2582 "configure"
#include "confdefs.h"
#ifdef __CYGWIN32__
@@ -2603,7 +2631,7 @@ if test "${with_tclconfig+set}" = set; then
fi
echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
-echo "configure:2607: checking for Tcl configuration" >&5
+echo "configure:2635: checking for Tcl configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2711,7 +2739,7 @@ if test "${with_tkconfig+set}" = set; then
fi
echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
-echo "configure:2715: checking for Tk configuration" >&5
+echo "configure:2743: checking for Tk configuration" >&5
if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2807,7 +2835,7 @@ fi
no_tcl=true
echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
-echo "configure:2811: checking for Tcl private headers. dir=${configdir}" >&5
+echo "configure:2839: checking for Tcl private headers. dir=${configdir}" >&5
# Check whether --with-tclinclude or --without-tclinclude was given.
if test "${with_tclinclude+set}" = set; then
withval="$with_tclinclude"
@@ -2873,17 +2901,17 @@ fi
if test x"${ac_cv_c_tclh}" = x ; then
ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
-echo "configure:2877: checking for tclInt.h" >&5
+echo "configure:2905: checking for tclInt.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 2882 "configure"
+#line 2910 "configure"
#include "confdefs.h"
#include <tclInt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2943,7 +2971,7 @@ fi
#
no_tk=true
echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
-echo "configure:2947: checking for Tk private headers" >&5
+echo "configure:2975: checking for Tk private headers" >&5
# Check whether --with-tkinclude or --without-tkinclude was given.
if test "${with_tkinclude+set}" = set; then
withval="$with_tkinclude"
@@ -3009,17 +3037,17 @@ fi
if test x"${ac_cv_c_tkh}" = x ; then
ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tk.h""... $ac_c" 1>&6
-echo "configure:3013: checking for tk.h" >&5
+echo "configure:3041: checking for tk.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 3018 "configure"
+#line 3046 "configure"
#include "confdefs.h"
#include <tk.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3065,7 +3093,7 @@ fi
echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:3069: checking for Itcl private headers. srcdir=${srcdir}" >&5
+echo "configure:3097: checking for Itcl private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_itclh}" = x ; then
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
if test -f $i/src/itcl.h ; then
@@ -3088,7 +3116,7 @@ fi
echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
-echo "configure:3092: checking for Tix private headers. srcdir=${srcdir}" >&5
+echo "configure:3120: checking for Tix private headers. srcdir=${srcdir}" >&5
if test x"${ac_cv_c_tixh}" = x ; then
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
if test -f $i/generic/tix.h ; then
@@ -3314,7 +3342,7 @@ links="${links} nm.h"
fi
# start-sanitize-gdbtk
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:3318: checking whether ln -s works" >&5
+echo "configure:3346: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3349,19 +3377,19 @@ fi
echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
-echo "configure:3353: checking for Cygwin32 environment" >&5
+echo "configure:3381: checking for Cygwin32 environment" >&5
if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3358 "configure"
+#line 3386 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN32__;
; return 0; }
EOF
-if { (eval echo configure:3365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_cygwin32=yes
else
@@ -3378,19 +3406,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6
CYGWIN32=
test "$am_cv_cygwin32" = yes && CYGWIN32=yes
echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6
-echo "configure:3382: checking for Mingw32 environment" >&5
+echo "configure:3410: checking for Mingw32 environment" >&5
if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3387 "configure"
+#line 3415 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:3394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_mingw32=yes
else
@@ -3409,7 +3437,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:3413: checking for executable suffix" >&5
+echo "configure:3441: checking for executable suffix" >&5
if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else