+echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&4
+if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&4
+else
+ libc_cv_asm_global_directive=UNKNOWN
+for ac_globl in .globl .global; do
+ cat > conftest.s <<EOF
+.text
+${ac_globl} foo
+foo: .long 0
+EOF
+ if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
+ libc_cv_asm_global_directive=${ac_globl}
+ fi
+ rm -f conftest*
+ test $libc_cv_asm_global_directive != UNKNOWN && break
+done
+fi
+
+echo "$ac_t""$libc_cv_asm_global_directive" 1>&4
+if test $libc_cv_asm_global_directive = UNKNOWN; then
+ { echo "configure: error: cannot determine asm global directive" 1>&2; exit 1; }
+else
+ cat >> confdefs.h <<EOF
+#define ASM_GLOBAL_DIRECTIVE ${libc_cv_asm_global_directive}
+EOF
+
+fi
+
+echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&4
+if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&4
+else
+ cat > conftest.s <<EOF
+.text
+foo: .long 0
+.set glibc_conftest_frobozz,foo
+$libc_cv_asm_global_directive glibc_conftest_frobozz
+EOF
+# The alpha-dec-osf1 assembler gives only a warning for `.set'
+# (but it doesn't work), so we must do a linking check to be sure.
+cat > conftest1.c <<\EOF
+extern int glibc_conftest_frobozz;
+main () { printf ("%d\n", glibc_conftest_frobozz); }
+EOF
+if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
+ -o conftest conftest.s conftest1.c 1>&5 2>&5; then
+ libc_cv_asm_set_directive=yes
+else
+ libc_cv_asm_set_directive=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$libc_cv_asm_set_directive" 1>&4
+if test $libc_cv_asm_set_directive = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_ASM_SET_DIRECTIVE 1
+EOF
+
+fi
+
+if test $elf != yes; then
+ echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&4
+if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&4
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1345 "configure"
+#include "confdefs.h"
+
+int main() { return 0; }
+int t() {
+asm (".section .init");
+ asm (".section .fini");
+; return 0; }
+EOF
+if eval $ac_compile; then
+ rm -rf conftest*
+ libc_cv_have_initfini=yes
+else
+ rm -rf conftest*
+ libc_cv_have_initfini=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$libc_cv_have_initfini" 1>&4
+ if test $libc_cv_have_initfini = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_INITFINI 1
+EOF
+
+ fi
+fi
+