~vorlon/ubuntu/natty/eglibc/multiarch

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Steve Langasek
  • Date: 2011-02-18 21:18:44 UTC
  • mfrom: (103.1.7 eglibc)
  • Revision ID: steve.langasek@linaro.org-20110218211844-lodmi8b1qhyq3f3x
Tags: 2.13~pre1-0ubuntu1+multiarch.1
merge from natty

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
# Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
31
31
AC_ARG_WITH([gd],
32
 
            AC_HELP_STRING([--with-gd=DIR],
33
 
                           [find libgd include dir and library with prefix DIR]),
 
32
            AC_HELP_STRING([--with-gd=DIR],
 
33
                           [find libgd include dir and library with prefix DIR]),
34
34
            [dnl
35
35
case "$with_gd" in
36
36
yes|''|no) ;;
39
39
esac
40
40
])
41
41
AC_ARG_WITH([gd-include],
42
 
            AC_HELP_STRING([--with-gd-include=DIR],
43
 
                           [find libgd include files in DIR]),
44
 
            [dnl
 
42
            AC_HELP_STRING([--with-gd-include=DIR],
 
43
                           [find libgd include files in DIR]),
 
44
            [dnl
45
45
case "$with_gd_include" in
46
46
''|no) ;;
47
47
*) libgd_include="-I$withval" ;;
48
48
esac
49
49
])
50
50
AC_ARG_WITH([gd-lib],
51
 
            AC_HELP_STRING([--with-gd-lib=DIR],
52
 
                           [find libgd library files in DIR]),
53
 
            [dnl
 
51
            AC_HELP_STRING([--with-gd-lib=DIR],
 
52
                           [find libgd library files in DIR]),
 
53
            [dnl
54
54
case "$with_gd_lib" in
55
55
''|no) ;;
56
56
*) libgd_ldflags="-L$withval" ;;
68
68
 
69
69
dnl Arguments to specify presence of other packages/features.
70
70
AC_ARG_WITH([fp],
71
 
            AC_HELP_STRING([--with-fp],
72
 
                           [if using floating-point hardware @<:@default=yes@:>@]),
 
71
            AC_HELP_STRING([--with-fp],
 
72
                           [if using floating-point hardware @<:@default=yes@:>@]),
73
73
            [with_fp=$withval],
74
74
            [with_fp=yes])
75
75
AC_SUBST(with_fp)
76
76
AC_ARG_WITH([binutils],
77
 
            AC_HELP_STRING([--with-binutils=PATH],
78
 
                           [specify location of binutils (as and ld)]),
 
77
            AC_HELP_STRING([--with-binutils=PATH],
 
78
                           [specify location of binutils (as and ld)]),
79
79
            [path_binutils=$withval],
80
80
            [path_binutils=''])
81
81
AC_ARG_WITH([elf],
82
 
            AC_HELP_STRING([--with-elf],
83
 
                           [if using the ELF object format]),
 
82
            AC_HELP_STRING([--with-elf],
 
83
                           [if using the ELF object format]),
84
84
            [elf=$withval],
85
85
            [elf=no])
86
86
AC_ARG_WITH([selinux],
87
 
            AC_HELP_STRING([--with-selinux],
88
 
                           [if building with SELinux support]),
 
87
            AC_HELP_STRING([--with-selinux],
 
88
                           [if building with SELinux support]),
89
89
            [with_selinux=$withval],
90
90
            [with_selinux=auto])
91
91
AC_ARG_WITH([xcoff],
92
 
            AC_HELP_STRING([--with-xcoff],
93
 
                           [if using the XCOFF object format]),
 
92
            AC_HELP_STRING([--with-xcoff],
 
93
                           [if using the XCOFF object format]),
94
94
            [xcoff=$withval],
95
95
            [xcoff=no])
96
96
AC_ARG_WITH([cvs],
97
 
            AC_HELP_STRING([--without-cvs],
98
 
                           [if CVS should not be used]),
 
97
            AC_HELP_STRING([--without-cvs],
 
98
                           [if CVS should not be used]),
99
99
            [with_cvs=$withval],
100
100
            [with_cvs=yes])
101
101
if test "$with_cvs" = yes; then
107
107
AC_SUBST(with_cvs)
108
108
 
109
109
AC_ARG_WITH([headers],
110
 
            AC_HELP_STRING([--with-headers=PATH],
111
 
                           [location of system headers to use
 
110
            AC_HELP_STRING([--with-headers=PATH],
 
111
                           [location of system headers to use
112
112
                            (for example /usr/src/linux/include)
113
113
                            @<:@default=compiler default@:>@]),
114
114
            [sysheaders=$withval],
115
115
            [sysheaders=''])
116
116
 
117
117
AC_ARG_ENABLE([sanity-checks],
118
 
              AC_HELP_STRING([--disable-sanity-checks],
119
 
                             [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]),
 
118
              AC_HELP_STRING([--disable-sanity-checks],
 
119
                             [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]),
120
120
              [enable_sanity=$enableval],
121
121
              [enable_sanity=yes])
122
122
 
139
139
dnl               [static=yes])
140
140
static=yes
141
141
AC_ARG_ENABLE([shared],
142
 
              AC_HELP_STRING([--enable-shared],
143
 
                             [build shared library @<:@default=yes if GNU ld & ELF@:>@]),
 
142
              AC_HELP_STRING([--enable-shared],
 
143
                             [build shared library @<:@default=yes if GNU ld & ELF@:>@]),
144
144
              [shared=$enableval],
145
145
              [shared=default])
146
146
AC_ARG_ENABLE([profile],
147
 
              AC_HELP_STRING([--enable-profile],
148
 
                             [build profiled library @<:@default=no@:>@]),
 
147
              AC_HELP_STRING([--enable-profile],
 
148
                             [build profiled library @<:@default=no@:>@]),
149
149
              [profile=$enableval],
150
150
              [profile=no])
151
151
AC_ARG_ENABLE([omitfp],
152
 
              AC_HELP_STRING([--enable-omitfp],
153
 
                             [build undebuggable optimized library @<:@default=no@:>@]),
 
152
              AC_HELP_STRING([--enable-omitfp],
 
153
                             [build undebuggable optimized library @<:@default=no@:>@]),
154
154
              [omitfp=$enableval],
155
155
              [omitfp=no])
156
156
AC_ARG_ENABLE([bounded],
157
 
              AC_HELP_STRING([--enable-bounded],
158
 
                             [build with runtime bounds checking @<:@default=no@:>@]),
 
157
              AC_HELP_STRING([--enable-bounded],
 
158
                             [build with runtime bounds checking @<:@default=no@:>@]),
159
159
              [bounded=$enableval],
160
160
              [bounded=no])
161
161
AC_ARG_ENABLE([versioning],
162
 
              AC_HELP_STRING([--disable-versioning],
163
 
                             [do not include versioning information in the library objects @<:@default=yes if supported@:>@]),
 
162
              AC_HELP_STRING([--disable-versioning],
 
163
                             [do not include versioning information in the library objects @<:@default=yes if supported@:>@]),
164
164
              [enable_versioning=$enableval],
165
165
              [enable_versioning=yes])
166
166
 
167
167
AC_ARG_ENABLE([oldest-abi],
168
 
              AC_HELP_STRING([--enable-oldest-abi=ABI],
169
 
                             [configure the oldest ABI supported @<:@e.g. 2.2@:>@ @<:@default=glibc default@:>@]),
 
168
              AC_HELP_STRING([--enable-oldest-abi=ABI],
 
169
                             [configure the oldest ABI supported @<:@e.g. 2.2@:>@ @<:@default=glibc default@:>@]),
170
170
              [oldest_abi=$enableval],
171
171
              [oldest_abi=no])
172
172
if test "$oldest_abi" = yes || test "$oldest_abi" = no; then
187
187
 
188
188
dnl Generic infrastructure for drop-in additions to libc.
189
189
AC_ARG_ENABLE([add-ons],
190
 
              AC_HELP_STRING([--enable-add-ons@<:@=DIRS...@:>@],
191
 
                             [configure and build add-ons in DIR1,DIR2,...
192
 
                              search for add-ons if no parameter given]),
 
190
              AC_HELP_STRING([--enable-add-ons@<:@=DIRS...@:>@],
 
191
                             [configure and build add-ons in DIR1,DIR2,...
 
192
                              search for add-ons if no parameter given]),
193
193
                             , [enable_add_ons=yes])
194
194
 
195
195
dnl Let the user avoid using TLS.  Don't know why but...
196
196
AC_ARG_WITH([tls],
197
 
            AC_HELP_STRING([--with-tls],
198
 
                           [enable support for TLS]),
 
197
            AC_HELP_STRING([--with-tls],
 
198
                           [enable support for TLS]),
199
199
            [usetls=$withval],
200
200
            [usetls=yes])
201
201
 
202
202
AC_ARG_WITH([__thread],
203
 
            AC_HELP_STRING([--without-__thread],
204
 
                           [do not use TLS features even when supporting them]),
 
203
            AC_HELP_STRING([--without-__thread],
 
204
                           [do not use TLS features even when supporting them]),
205
205
            [use__thread=$withval],
206
206
            [use__thread=yes])
207
207
 
208
208
AC_ARG_ENABLE([hidden-plt],
209
 
              AC_HELP_STRING([--disable-hidden-plt],
210
 
                             [do not hide internal function calls to avoid PLT]),
 
209
              AC_HELP_STRING([--disable-hidden-plt],
 
210
                             [do not hide internal function calls to avoid PLT]),
211
211
              [hidden=$enableval],
212
212
              [hidden=yes])
213
213
if test "x$hidden" = xno; then
224
224
dnl On some platforms we cannot use dynamic loading.  We must provide
225
225
dnl static NSS modules.
226
226
AC_ARG_ENABLE([static-nss],
227
 
              AC_HELP_STRING([--enable-static-nss],
228
 
                             [build static NSS modules @<:@default=no@:>@]),
 
227
              AC_HELP_STRING([--enable-static-nss],
 
228
                             [build static NSS modules @<:@default=no@:>@]),
229
229
              [static_nss=$enableval],
230
230
              [static_nss=no])
231
231
dnl Enable static NSS also if we build no shared objects.
235
235
fi
236
236
 
237
237
AC_ARG_ENABLE([force-install],
238
 
              AC_HELP_STRING([--disable-force-install],
239
 
                             [don't force installation of files from this package, even if they are older than the installed files]),
 
238
              AC_HELP_STRING([--disable-force-install],
 
239
                             [don't force installation of files from this package, even if they are older than the installed files]),
240
240
              [force_install=$enableval],
241
241
              [force_install=yes])
242
242
AC_SUBST(force_install)
244
244
dnl On some platforms we allow dropping compatibility with all kernel
245
245
dnl versions.
246
246
AC_ARG_ENABLE([kernel],
247
 
              AC_HELP_STRING([--enable-kernel=VERSION],
248
 
                             [compile for compatibility with kernel not older than VERSION]),
 
247
              AC_HELP_STRING([--enable-kernel=VERSION],
 
248
                             [compile for compatibility with kernel not older than VERSION]),
249
249
              [minimum_kernel=$enableval],
250
250
              [])
251
251
dnl Prevent unreasonable values.
263
263
dnl appropriate.
264
264
AC_ARG_ENABLE([all-warnings],
265
265
              AC_HELP_STRING([--enable-all-warnings],
266
 
                             [enable all useful warnings gcc can issue]),
 
266
                             [enable all useful warnings gcc can issue]),
267
267
              [all_warnings=$enableval],
268
268
              [])
269
269
AC_SUBST(all_warnings)
278
278
                             [enable single DSO with optimizations for multiple architectures]),
279
279
              [multi_arch=$enableval],
280
280
              [multi_arch=default])
281
 
if test x"$multi_arch" != xno; then
282
 
  multi_arch_d=/multiarch
283
 
fi
284
281
 
285
282
AC_ARG_ENABLE([experimental-malloc],
286
283
              AC_HELP_STRING([--enable-experimental-malloc],
452
449
      ;;
453
450
    *)
454
451
      test -d "$srcdir/$libc_add_on" || {
455
 
        if test -d "$libc_add_on"; then
 
452
        if test -d "$libc_add_on"; then
456
453
          libc_add_on="`pwd`/$libc_add_on"
457
454
        else
458
455
          AC_MSG_ERROR(add-on directory \"$libc_add_on\" does not exist)
471
468
      libc_add_on_subdirs=
472
469
      . "$libc_add_on_frag"
473
470
      test -z "$libc_add_on" || {
474
 
        configured_add_ons="$configured_add_ons $libc_add_on"
 
471
        configured_add_ons="$configured_add_ons $libc_add_on"
475
472
        if test "x$libc_add_on_canonical" = xunknown; then
476
473
          AC_MSG_ERROR(fragment must set \$libc_add_on_canonical)
477
474
        fi
608
605
  AC_DEFINE(USE_REGPARMS)
609
606
fi
610
607
 
 
608
# For the multi-arch option we need support in the assembler.
 
609
AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
 
610
               libc_cv_asm_gnu_indirect_function, [dnl
 
611
cat > conftest.s <<EOF
 
612
.type foo,%gnu_indirect_function
 
613
EOF
 
614
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
 
615
then
 
616
  libc_cv_asm_gnu_indirect_function=yes
 
617
else
 
618
  libc_cv_asm_gnu_indirect_function=no
 
619
fi
 
620
rm -f conftest*])
 
621
 
 
622
AC_MSG_CHECKING(whether .text pseudo-op must be used)
 
623
AC_CACHE_VAL(libc_cv_dot_text, [dnl
 
624
cat > conftest.s <<EOF
 
625
.text
 
626
EOF
 
627
libc_cv_dot_text=
 
628
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
 
629
  libc_cv_dot_text=.text
 
630
fi
 
631
rm -f conftest*])
 
632
if test -z "$libc_cv_dot_text"; then
 
633
  AC_MSG_RESULT(no)
 
634
else
 
635
  AC_MSG_RESULT(yes)
 
636
fi
 
637
 
 
638
AC_CACHE_CHECK(for assembler global-symbol directive,
 
639
               libc_cv_asm_global_directive, [dnl
 
640
libc_cv_asm_global_directive=UNKNOWN
 
641
for ac_globl in .globl .global .EXPORT; do
 
642
  cat > conftest.s <<EOF
 
643
        ${libc_cv_dot_text}
 
644
        ${ac_globl} foo
 
645
foo:
 
646
EOF
 
647
  if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
 
648
    libc_cv_asm_global_directive=${ac_globl}
 
649
  fi
 
650
  rm -f conftest*
 
651
  test $libc_cv_asm_global_directive != UNKNOWN && break
 
652
done])
 
653
if test $libc_cv_asm_global_directive = UNKNOWN; then
 
654
  AC_MSG_ERROR(cannot determine asm global directive)
 
655
else
 
656
  AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
 
657
fi
 
658
 
 
659
AC_CACHE_CHECK(for assembler .type directive prefix,
 
660
               libc_cv_asm_type_prefix, [dnl
 
661
libc_cv_asm_type_prefix=no
 
662
for ac_try_prefix in '@' '%' '#'; do
 
663
  cat > conftest.s <<EOF
 
664
        ${libc_cv_dot_text}
 
665
        ${libc_cv_asm_global_directive} foo
 
666
        .type foo, ${ac_try_prefix}object
 
667
        .size foo, 1
 
668
foo:
 
669
        .byte 1
 
670
EOF
 
671
  if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
 
672
    libc_cv_asm_type_prefix=${ac_try_prefix}
 
673
  fi
 
674
  rm -f conftest*
 
675
  test "x$libc_cv_asm_type_prefix" != xno && break
 
676
done])
 
677
if test "x$libc_cv_asm_type_prefix" != xno; then
 
678
  AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
 
679
fi
 
680
 
 
681
if test x"$libc_cv_asm_gnu_indirect_function" != xyes -a x"$libc_cv_asm_type_prefix" = xno; then
 
682
  if test x"$multi_arch" = xyes; then
 
683
    AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
 
684
  else
 
685
    multi_arch=no
 
686
  fi
 
687
fi
 
688
if test x"$multi_arch" != xno; then
 
689
  multi_arch_d=/multiarch
 
690
fi
 
691
 
611
692
# Compute the list of sysdep directories for this configuration.
612
693
# This can take a while to compute.
613
694
sysdep_dir=$srcdir/sysdeps
695
776
          for d in $add_ons_pfx ''; do
696
777
            for a in $add_ons_sfx ''; do
697
778
              if test -n "$m0$m0sub$b$v$o$m$msub"; then
698
 
                try_srcdir="${srcdir}/"
699
 
                case "$d" in
 
779
                try_srcdir="${srcdir}/"
 
780
                case "$d" in
700
781
                /*) try_srcdir= ;;
701
782
                esac
702
783
                try="${d}sysdeps$m0$m0sub$b$v$o$m$msub$a"
727
808
 
728
809
# If the assembler supports gnu_indirect_function symbol type and the
729
810
# architecture supports multi-arch, we enable multi-arch by default.
730
 
if test "$multi_arch" = default; then
731
 
AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
732
 
               libc_cv_asm_gnu_indirect_function, [dnl
733
 
cat > conftest.s <<EOF
734
 
.type foo,%gnu_indirect_function
735
 
EOF
736
 
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
737
 
then
738
 
  libc_cv_asm_gnu_indirect_function=yes
739
 
else
740
 
  libc_cv_asm_gnu_indirect_function=no
741
 
fi
742
 
rm -f conftest*])
743
 
  multi_arch=no
744
 
  if test "$libc_cv_asm_gnu_indirect_function" = yes; then
745
 
    case $sysnames_add_ons$sysnames in
746
 
    *"$multi_arch_d"*)
747
 
       multi_arch=yes
748
 
      ;;
749
 
    esac
750
 
  fi
751
 
fi
752
 
if test x"$multi_arch" = xyes; then
 
811
case $sysnames_add_ons$sysnames in
 
812
*"$multi_arch_d"*)
 
813
  ;;
 
814
*)
 
815
  test x"$multi_arch" = xdefault && multi_arch=no
 
816
  ;;
 
817
esac
 
818
if test x"$multi_arch" != xno; then
753
819
  AC_DEFINE(USE_MULTIARCH)
754
820
fi
755
821
AC_SUBST(multi_arch)
867
933
        fi
868
934
      done
869
935
      if test $found = no; then
870
 
        AC_MSG_WARN($name/Implies specifies nonexistent $x)
 
936
        AC_MSG_WARN($name/Implies specifies nonexistent $x)
871
937
      fi
872
938
    done
873
939
  else
943
1009
         done
944
1010
         ;;
945
1011
       *)
946
 
         test -d "$f" || { test -e "$f" && exit 88; }
 
1012
         test -d "$f" || { test -e "$f" && exit 88; }
947
1013
         ;;
948
1014
       esac
949
1015
     done)
1186
1252
#error stddef.h ignored __need_*
1187
1253
#endif
1188
1254
if (&size == NULL || &wchar == NULL) abort ();],
1189
 
               libc_cv_friendly_stddef=yes,
1190
 
               libc_cv_friendly_stddef=no)])
 
1255
               libc_cv_friendly_stddef=yes,
 
1256
               libc_cv_friendly_stddef=no)])
1191
1257
if test $libc_cv_friendly_stddef = yes; then
1192
1258
  config_vars="$config_vars
1193
1259
override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
1210
1276
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
1211
1277
fi
1212
1278
 
1213
 
AC_MSG_CHECKING(whether .text pseudo-op must be used)
1214
 
AC_CACHE_VAL(libc_cv_dot_text, [dnl
1215
 
cat > conftest.s <<EOF
1216
 
.text
1217
 
EOF
1218
 
libc_cv_dot_text=
1219
 
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1220
 
  libc_cv_dot_text=.text
1221
 
fi
1222
 
rm -f conftest*])
1223
 
if test -z "$libc_cv_dot_text"; then
1224
 
  AC_MSG_RESULT(no)
1225
 
else
1226
 
  AC_MSG_RESULT(yes)
1227
 
fi
1228
 
 
1229
 
AC_CACHE_CHECK(for assembler global-symbol directive,
1230
 
               libc_cv_asm_global_directive, [dnl
1231
 
libc_cv_asm_global_directive=UNKNOWN
1232
 
for ac_globl in .globl .global .EXPORT; do
1233
 
  cat > conftest.s <<EOF
1234
 
        ${libc_cv_dot_text}
1235
 
        ${ac_globl} foo
1236
 
foo:
1237
 
EOF
1238
 
  if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1239
 
    libc_cv_asm_global_directive=${ac_globl}
1240
 
  fi
1241
 
  rm -f conftest*
1242
 
  test $libc_cv_asm_global_directive != UNKNOWN && break
1243
 
done])
1244
 
if test $libc_cv_asm_global_directive = UNKNOWN; then
1245
 
  AC_MSG_ERROR(cannot determine asm global directive)
1246
 
else
1247
 
  AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
1248
 
fi
1249
 
 
1250
1279
AC_CACHE_CHECK(for .set assembler directive, libc_cv_asm_set_directive, [dnl
1251
1280
cat > conftest.s <<EOF
1252
1281
${libc_cv_dot_text}
1272
1301
  AC_DEFINE(HAVE_ASM_SET_DIRECTIVE)
1273
1302
fi
1274
1303
 
1275
 
AC_CACHE_CHECK(for assembler .type directive prefix,
1276
 
               libc_cv_asm_type_prefix, [dnl
1277
 
libc_cv_asm_type_prefix=no
1278
 
for ac_try_prefix in '@' '%' '#'; do
1279
 
  cat > conftest.s <<EOF
1280
 
        ${libc_cv_dot_text}
1281
 
        ${libc_cv_asm_global_directive} foo
1282
 
        .type foo, ${ac_try_prefix}object
1283
 
        .size foo, 1
1284
 
foo:
1285
 
        .byte 1
1286
 
EOF
1287
 
  if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1288
 
    libc_cv_asm_type_prefix=${ac_try_prefix}
1289
 
  fi
1290
 
  rm -f conftest*
1291
 
  test "x$libc_cv_asm_type_prefix" != xno && break
1292
 
done])
1293
 
if test "x$libc_cv_asm_type_prefix" != xno; then
1294
 
  AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
1295
 
fi
1296
 
 
1297
1304
AC_CACHE_CHECK(for assembler gnu_unique_object symbol type,
1298
1305
               libc_cv_asm_unique_object, [dnl
1299
1306
cat > conftest.s <<EOF
1311
1318
  AC_DEFINE(HAVE_ASM_UNIQUE_OBJECT)
1312
1319
fi
1313
1320
 
1314
 
# For the multi-arch option we need support in the assembler.
1315
 
if test "$multi_arch" = yes; then
1316
 
  if test "x$libc_cv_asm_type_prefix" != xno; then
1317
 
AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
1318
 
               libc_cv_asm_gnu_indirect_function, [dnl
1319
 
cat > conftest.s <<EOF
1320
 
.type foo,%gnu_indirect_function
1321
 
EOF
1322
 
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
1323
 
then
1324
 
  libc_cv_asm_gnu_indirect_function=yes
1325
 
else
1326
 
  libc_cv_asm_gnu_indirect_function=no
1327
 
fi
1328
 
rm -f conftest*])
1329
 
  else
1330
 
    libc_cv_asm_gnu_indirect_function=no
1331
 
  fi
1332
 
  if test x"$libc_cv_asm_gnu_indirect_function" != xyes; then
1333
 
    AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
1334
 
  fi
1335
 
fi
1336
 
 
1337
1321
AC_CACHE_CHECK(for .symver assembler directive, libc_cv_asm_symver_directive,
1338
1322
[cat > conftest.s <<EOF
1339
1323
${libc_cv_dot_text}
1359
1343
};
1360
1344
 
1361
1345
VERS_2 {
1362
 
        global: sym;
 
1346
        global: sym;
1363
1347
} VERS_1;
1364
1348
EOF
1365
1349
  if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
1551
1535
  rm -f conftest*])
1552
1536
  if test $libc_cv_initfini_array != yes; then
1553
1537
    AC_MSG_ERROR([Need linker with .init_array/.fini_array support.])
 
1538
  elif AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep SORT_BY_INIT_PRIORITY 1>&AS_MESSAGE_LOG_FD]); then
 
1539
    AC_DEFINE(NO_CTORS_DTORS_SECTIONS)
1554
1540
  fi
1555
1541
 
1556
1542
  AC_CACHE_CHECK(for libunwind-support in compiler,
1633
1619
    fi
1634
1620
  fi])
1635
1621
      if test "$libc_cv_z_relro" = no; then
1636
 
        AC_MSG_ERROR(linker with -z relro support required)
 
1622
        AC_MSG_ERROR(linker with -z relro support required)
1637
1623
      fi
1638
1624
      ;;
1639
1625
    *) ;;
1827
1813
fi
1828
1814
rm -f conftest*])
1829
1815
if test $libc_cv_gnu89_inline = yes; then
1830
 
  libc_cv_gnu89_inline=-fgnu89-inline
 
1816
  gnu89_inline=-fgnu89-inline
1831
1817
else
1832
 
  libc_cv_gnu89_inline=
 
1818
  gnu89_inline=
1833
1819
fi
1834
 
AC_SUBST(libc_cv_gnu89_inline)
 
1820
AC_SUBST(gnu89_inline)
1835
1821
 
1836
1822
if test $elf != yes; then
1837
1823
  AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
1901
1887
  if test $ac_cv_prog_cc_works = yes; then
1902
1888
    AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
1903
1889
                   [AC_TRY_LINK([asm ("_glibc_foobar:");], [glibc_foobar ();],
1904
 
                                libc_cv_asm_underscores=yes,
1905
 
                                libc_cv_asm_underscores=no)])
 
1890
                                libc_cv_asm_underscores=yes,
 
1891
                                libc_cv_asm_underscores=no)])
1906
1892
  else
1907
1893
    AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
1908
1894
                   [AC_CHECK_ASM_UNDERSCORE(libc_cv_asm_underscores=yes,
1909
 
                                            libc_cv_asm_underscores=no)])
 
1895
                                            libc_cv_asm_underscores=no)])
1910
1896
  fi
1911
1897
fi
1912
1898
if test $libc_cv_asm_underscores = no; then
1967
1953
  *) cfi_offset=0;;
1968
1954
esac
1969
1955
cat > conftest.s <<EOF
1970
 
        .text
1971
 
        .type   func,%function
 
1956
        .text
 
1957
        .type   func,%function
1972
1958
func:
1973
 
        .cfi_startproc
 
1959
        .cfi_startproc
1974
1960
        .cfi_remember_state
1975
1961
        .cfi_rel_offset 1, $cfi_offset
1976
 
        .cfi_endproc
 
1962
        .cfi_endproc
1977
1963
EOF
1978
1964
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1979
1965
  libc_cv_asm_cfi_directives=yes
2201
2187
 
2202
2188
  # See if we have the libaudit library
2203
2189
  AC_CHECK_LIB(audit, audit_log_user_avc_message,
2204
 
               have_libaudit=yes, have_libaudit=no)
 
2190
               have_libaudit=yes, have_libaudit=no)
2205
2191
  if test "x$have_libaudit" = xyes; then
2206
2192
    AC_DEFINE(HAVE_LIBAUDIT, 1, [SELinux libaudit support])
2207
2193
  fi
2232
2218
libc_cv_idn=no
2233
2219
 
2234
2220
# Iterate over all the sysdep directories we will use, running their
2235
 
# configure fragments, and looking for a uname implementation.
2236
 
uname=
 
2221
# configure fragments.
2237
2222
for dir in $sysnames; do
2238
2223
  case $dir in
2239
2224
    /*) dest=$dir ;;
2243
2228
    AC_MSG_RESULT(running configure fragment for $dir)
2244
2229
    . $dest/configure
2245
2230
  fi
2246
 
[
2247
 
  if test -z "$uname"; then
2248
 
    if test -r $dest/uname.c ||
2249
 
       test -r $dest/uname.S ||
2250
 
       { test -r $dest/syscalls.list &&
2251
 
         grep '^uname[  ]' $dest/syscalls.list >/dev/null; }; then
2252
 
      uname=$dir
2253
 
    fi
2254
 
  fi
2255
 
]dnl
2256
2231
done
2257
2232
 
2258
2233
if test x$libc_cv_gcc_unwind_find_fde = xyes; then
2260
2235
fi
2261
2236
AC_SUBST(libc_cv_gcc_unwind_find_fde)
2262
2237
 
2263
 
# If we will use the generic uname implementation, we must figure out what
2264
 
# it will say by examining the system, and write the results in config-name.h.
2265
 
if test "$uname" = "sysdeps/generic"; then
2266
 
 
2267
 
changequote(,)dnl
2268
 
  uname_sysname=`echo $config_os | sed 's/[0-9.]*$//'`
2269
 
changequote([,])dnl
2270
 
  if test $uname_sysname != $config_os; then
2271
 
    config_release=`echo $config_os | sed s/$uname_sysname//`
2272
 
  fi
2273
 
dnl
2274
 
AC_DEFUN(LIBC_KERNEL_ID, [dnl
2275
 
    if test -r /vmunix; then
2276
 
      kernel_id=`strings /vmunix | grep UNIX`
2277
 
    elif test -r /dynix; then
2278
 
      kernel_id=`strings /dynix | grep DYNIX`
2279
 
    else
2280
 
      kernel_id=
2281
 
    fi
2282
 
])dnl
2283
 
 
2284
 
  AC_CACHE_CHECK(OS release for uname, libc_cv_uname_release, [dnl
2285
 
LIBC_KERNEL_ID
2286
 
changequote(,)dnl
2287
 
  kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
2288
 
changequote([,])dnl
2289
 
  if test x`echo "$config_release" | sed "s/^$kernel_release//"` \
2290
 
         != x$config_release; then
2291
 
    # The configuration release is a substring of the kernel release.
2292
 
    libc_cv_uname_release=$kernel_release
2293
 
  elif test x$config_release != x; then
2294
 
    libc_cv_uname_release=$config_release
2295
 
  elif test x$kernel_release != x; then
2296
 
    libc_cv_uname_release=$kernel_release
2297
 
  else
2298
 
    libc_cv_uname_release=unknown
2299
 
  fi])
2300
 
  uname_release="$libc_cv_uname_release"
2301
 
 
2302
 
  AC_CACHE_CHECK(OS version for uname, libc_cv_uname_version, [dnl
2303
 
LIBC_KERNEL_ID
2304
 
changequote(,)dnl
2305
 
  kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
2306
 
changequote([,])dnl
2307
 
  if test -n "$kernel_version"; then
2308
 
    libc_cv_uname_version="$kernel_version"
2309
 
  else
2310
 
    libc_cv_uname_version=unknown
2311
 
  fi])
2312
 
  uname_version="$libc_cv_uname_version"
2313
 
 
2314
 
AC_SUBST(uname_sysname) AC_SUBST(uname_release) AC_SUBST(uname_version)dnl
2315
 
  config_uname=config-name.h:config-name.in
2316
 
else
2317
 
  # For non-generic uname, we don't need to create config-name.h at all.
2318
 
  config_uname=
2319
 
fi
2320
 
 
2321
2238
dnl This is tested by existing code and it's simpler to avoid changing it.
2322
2239
AC_DEFINE(USE_IN_LIBIO)
2323
2240
 
2401
2318
AC_SUBST(VERSION)
2402
2319
AC_SUBST(RELEASE)
2403
2320
 
2404
 
AC_CONFIG_FILES([config.make ${config_makefile} ${config_uname}])
 
2321
AC_CONFIG_FILES([config.make ${config_makefile}])
2405
2322
AC_CONFIG_COMMANDS([default],[[
2406
2323
case $CONFIG_FILES in *config.make*)
2407
2324
echo "$config_vars" >> config.make;;