30
30
# Check for a --with-gd argument and set libgd-LDFLAGS in config.make.
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]),
41
41
AC_ARG_WITH([gd-include],
42
AC_HELP_STRING([--with-gd-include=DIR],
43
[find libgd include files in DIR]),
42
AC_HELP_STRING([--with-gd-include=DIR],
43
[find libgd include files in DIR]),
45
45
case "$with_gd_include" in
47
47
*) libgd_include="-I$withval" ;;
50
50
AC_ARG_WITH([gd-lib],
51
AC_HELP_STRING([--with-gd-lib=DIR],
52
[find libgd library files in DIR]),
51
AC_HELP_STRING([--with-gd-lib=DIR],
52
[find libgd library files in DIR]),
54
54
case "$with_gd_lib" in
56
56
*) libgd_ldflags="-L$withval" ;;
69
69
dnl Arguments to specify presence of other packages/features.
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],
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=''])
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]),
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]),
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],
101
101
if test "$with_cvs" = yes; then
107
107
AC_SUBST(with_cvs)
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],
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])
139
139
dnl [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],
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],
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],
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])
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],
172
172
if test "$oldest_abi" = yes || test "$oldest_abi" = no; then
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])
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],
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])
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],
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],
231
231
dnl Enable static NSS also if we build no shared objects.
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
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],
251
251
dnl Prevent unreasonable values.
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],
269
269
AC_SUBST(all_warnings)
608
605
AC_DEFINE(USE_REGPARMS)
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
614
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
616
libc_cv_asm_gnu_indirect_function=yes
618
libc_cv_asm_gnu_indirect_function=no
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
628
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
629
libc_cv_dot_text=.text
632
if test -z "$libc_cv_dot_text"; then
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
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}
651
test $libc_cv_asm_global_directive != UNKNOWN && break
653
if test $libc_cv_asm_global_directive = UNKNOWN; then
654
AC_MSG_ERROR(cannot determine asm global directive)
656
AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
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
665
${libc_cv_asm_global_directive} foo
666
.type foo, ${ac_try_prefix}object
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}
675
test "x$libc_cv_asm_type_prefix" != xno && break
677
if test "x$libc_cv_asm_type_prefix" != xno; then
678
AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
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])
688
if test x"$multi_arch" != xno; then
689
multi_arch_d=/multiarch
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
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
736
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
738
libc_cv_asm_gnu_indirect_function=yes
740
libc_cv_asm_gnu_indirect_function=no
744
if test "$libc_cv_asm_gnu_indirect_function" = yes; then
745
case $sysnames_add_ons$sysnames in
752
if test x"$multi_arch" = xyes; then
811
case $sysnames_add_ons$sysnames in
815
test x"$multi_arch" = xdefault && multi_arch=no
818
if test x"$multi_arch" != xno; then
753
819
AC_DEFINE(USE_MULTIARCH)
755
821
AC_SUBST(multi_arch)
1186
1252
#error stddef.h ignored __need_*
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."
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
1219
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
1220
libc_cv_dot_text=.text
1223
if test -z "$libc_cv_dot_text"; then
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
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}
1242
test $libc_cv_asm_global_directive != UNKNOWN && break
1244
if test $libc_cv_asm_global_directive = UNKNOWN; then
1245
AC_MSG_ERROR(cannot determine asm global directive)
1247
AC_DEFINE_UNQUOTED(ASM_GLOBAL_DIRECTIVE, ${libc_cv_asm_global_directive})
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)
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
1281
${libc_cv_asm_global_directive} foo
1282
.type foo, ${ac_try_prefix}object
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}
1291
test "x$libc_cv_asm_type_prefix" != xno && break
1293
if test "x$libc_cv_asm_type_prefix" != xno; then
1294
AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
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)
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
1322
if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
1324
libc_cv_asm_gnu_indirect_function=yes
1326
libc_cv_asm_gnu_indirect_function=no
1330
libc_cv_asm_gnu_indirect_function=no
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])
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}
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)
1556
1542
AC_CACHE_CHECK(for libunwind-support in compiler,
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
1832
libc_cv_gnu89_inline=
1834
AC_SUBST(libc_cv_gnu89_inline)
1820
AC_SUBST(gnu89_inline)
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)])
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)])
1912
1898
if test $libc_cv_asm_underscores = no; then
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])
2243
2228
AC_MSG_RESULT(running configure fragment for $dir)
2244
2229
. $dest/configure
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
2258
2233
if test x$libc_cv_gcc_unwind_find_fde = xyes; then
2261
2236
AC_SUBST(libc_cv_gcc_unwind_find_fde)
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
2268
uname_sysname=`echo $config_os | sed 's/[0-9.]*$//'`
2270
if test $uname_sysname != $config_os; then
2271
config_release=`echo $config_os | sed s/$uname_sysname//`
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`
2284
AC_CACHE_CHECK(OS release for uname, libc_cv_uname_release, [dnl
2287
kernel_release=`echo "$kernel_id" | sed 's/^[^0-9.]*\([0-9.]*\).*$/\1/'`
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
2298
libc_cv_uname_release=unknown
2300
uname_release="$libc_cv_uname_release"
2302
AC_CACHE_CHECK(OS version for uname, libc_cv_uname_version, [dnl
2305
kernel_version=`echo "$kernel_id" | sed 's/^[^#]*#\([0-9]*\).*$/\1/'`
2307
if test -n "$kernel_version"; then
2308
libc_cv_uname_version="$kernel_version"
2310
libc_cv_uname_version=unknown
2312
uname_version="$libc_cv_uname_version"
2314
AC_SUBST(uname_sysname) AC_SUBST(uname_release) AC_SUBST(uname_version)dnl
2315
config_uname=config-name.h:config-name.in
2317
# For non-generic uname, we don't need to create config-name.h at all.
2321
2238
dnl This is tested by existing code and it's simpler to avoid changing it.
2322
2239
AC_DEFINE(USE_IN_LIBIO)