aboutsummaryrefslogtreecommitdiff
path: root/libctf/configure
diff options
context:
space:
mode:
Diffstat (limited to 'libctf/configure')
-rwxr-xr-xlibctf/configure157
1 files changed, 109 insertions, 48 deletions
diff --git a/libctf/configure b/libctf/configure
index 38855e1..1bed5e1 100755
--- a/libctf/configure
+++ b/libctf/configure
@@ -635,6 +635,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+VERSION_FLAGS_NOBFD
VERSION_FLAGS
TCL_TRY_FALSE
TCL_TRY_TRUE
@@ -5901,48 +5902,49 @@ if ${lt_cv_path_NM+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi
+ # Let the user override the nm to test.
+ lt_nm_to_check="$NM"
+ else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ case "$lt_tmp_nm" in
+ */*|*\\*) tmp_nm="$lt_tmp_nm";;
+ *) tmp_nm="$ac_dir/$lt_tmp_nm";;
+ esac
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+ *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+ *$tmp_nm*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
$as_echo "$lt_cv_path_NM" >&6; }
@@ -7101,7 +7103,7 @@ osf*)
symcode='[BCDEGQRST]'
;;
solaris*)
- symcode='[BDRT]'
+ symcode='[BCDRT]'
;;
sco3.2v5*)
symcode='[DT]'
@@ -11586,7 +11588,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11589 "configure"
+#line 11591 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11692,7 +11694,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11695 "configure"
+#line 11697 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13502,10 +13504,69 @@ fi
# Use a version script, if possible, or an -export-symbols-regex otherwise.
-VERSION_FLAGS='-export-symbols-regex ctf_.*'
-if $LD --help 2>&1 | grep -- --version-script >/dev/null; then
- VERSION_FLAGS="-Wl,--version-script='$srcdir/libctf.ver'"
+decommented_version_script=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker versioning flags" >&5
+$as_echo_n "checking for linker versioning flags... " >&6; }
+if ${ac_cv_libctf_version_script+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ echo 'FOO { global: mai*; local: ctf_fo*; };' > conftest.ver
+ old_LDFLAGS="$LDFLAGS"
+ old_CFLAGS="$CFLAGS"
+ LDFLAGS="$LDFLAGS -shared -Wl,--version-script=conftest.ver"
+ CFLAGS="$CFLAGS -fPIC"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int ctf_foo (void) { return 0; }
+ int main (void) { return ctf_foo(); }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_libctf_version_script="-Wl,--version-script='$srcdir/libctf.ver'"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$old_LDFLAGS"
+
+ if test -z "$ac_cv_libctf_version_script"; then
+ LDFLAGS="$LDFLAGS -shared -Wl,-B,local -Wl,-z,gnu-version-script=conftest.ver"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int ctf_foo (void) { return 0; }
+ int main (void) { return ctf_foo(); }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_libctf_version_script="-Wl,-B,local -Wl,-z,gnu-version-script"
+ decommented_version_script=t
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$old_LDFLAGS"
+ fi
+ CFLAGS="$old_CFLAGS"
+
+ if test -z "$ac_cv_libctf_version_script"; then
+ ac_cv_libctf_version_script='-export-symbols-regex ctf_.*'
+ fi
+ rm -f conftest.ver
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libctf_version_script" >&5
+$as_echo "$ac_cv_libctf_version_script" >&6; }
+if test -n "$decommented_version_script"; then
+ # Solaris's version scripts use shell-style comments rather than the C-style
+ # used by GNU ld. Use cpp to strip the comments out. (cpp exists under this
+ # name on all platforms that support ld -z gnu-version-script.)
+ # Also ensure that no symbols exist in the version script for libctf-nobfd.so
+ # that do not exist in the shared library itself, since some linkers add such
+ # symbols with type NOTYPE.
+ /lib/cpp < $srcdir/libctf.ver > libctf-decommented.ver
+ grep -v 'libctf only' $srcdir/libctf.ver | /lib/cpp > libctf-nobfd-decommented.ver
+ VERSION_FLAGS="$ac_cv_libctf_version_script='libctf-decommented.ver'"
+ VERSION_FLAGS_NOBFD="$ac_cv_libctf_version_script='libctf-nobfd-decommented.ver'"
+else
+ VERSION_FLAGS="$ac_cv_libctf_version_script"
+ VERSION_FLAGS_NOBFD="$ac_cv_libctf_version_script"
+fi
+
ac_config_files="$ac_config_files Makefile"