about summary refs log tree commit diff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac46
1 files changed, 44 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index e48957f318..d5a00461ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,6 +183,15 @@ AC_ARG_WITH([timeoutfactor],
 	    [timeoutfactor=1])
 AC_DEFINE_UNQUOTED(TIMEOUTFACTOR, $timeoutfactor)
 
+man_pages_version=6.9.1
+
+AC_ARG_WITH([man-pages],
+	    AS_HELP_STRING([--with-man-pages=VERSION],
+			   [tie manual to a specific man-pages version]),
+	    [man_pages_version=$withval],
+	    [])
+AC_SUBST(man_pages_version)
+
 AC_ARG_ENABLE([sanity-checks],
 	      AS_HELP_STRING([--disable-sanity-checks],
 			     [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]),
@@ -1459,6 +1468,15 @@ if test $libc_cv_cc_loop_to_function = yes; then
 fi
 AC_SUBST(libc_cv_cc_loop_to_function)
 
+AC_CACHE_CHECK([for -Wimplicit-fallthrough],
+	       libc_cv_cc_wimplicit_fallthrough, [dnl
+LIBC_TRY_CC_OPTION([-Werror -Wimplicit-fallthrough],
+		   [libc_cv_cc_wimplicit_fallthrough=-Wimplicit-fallthrough],
+		   [libc_cv_cc_wimplicit_fallthrough=])
+])
+LIBC_CONFIG_VAR([cc-option-wimplicit-fallthrough],
+		[$libc_cv_cc_wimplicit_fallthrough])
+
 dnl Check whether we have the gd library available.
 AC_MSG_CHECKING(for libgd)
 if test "$with_gd" != "no"; then
@@ -1518,7 +1536,7 @@ dnl If not, then don't use it.
 dnl Note that _FORTIFY_SOURCE may have been set through FLAGS too.
 dnl _FORTIFY_SOURCE value will be selectively disabled for function that can't
 dnl support it
-no_fortify_source="-Wp,-U_FORTIFY_SOURCE"
+no_fortify_source="-U_FORTIFY_SOURCE"
 fortify_source="${no_fortify_source}"
 
 AC_CACHE_CHECK([for maximum supported _FORTIFY_SOURCE level],
@@ -1537,7 +1555,7 @@ AS_CASE([$enable_fortify_source],
         [libc_cv_fortify_source=no])
 
 AS_IF([test "$libc_cv_fortify_source" = yes],
-      [fortify_source="${fortify_source},-D_FORTIFY_SOURCE=${enable_fortify_source}"]
+      [fortify_source="${fortify_source} -D_FORTIFY_SOURCE=${enable_fortify_source}"]
       )
 
 AC_SUBST(enable_fortify_source)
@@ -1546,6 +1564,30 @@ AC_SUBST(no_fortify_source)
 AC_SUBST(fortify_source)
 LIBC_CONFIG_VAR([supported-fortify], [$libc_cv_supported_fortify_source])
 
+dnl Check if compiler define _FILE_OFFSET_BITS by default
+AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[
+#ifndef _FILE_OFFSET_BITS
+# error _FILE_OFFSET_BITS not defined
+#endif]])],
+	       [libc_cv_compiler_default_file_offset_bits=yes],
+	       [libc_cv_compiler_default_file_offset_bits=no])
+AS_IF([test "$libc_cv_compiler_default_file_offset_bits" = yes],
+      [no_file_offset_bits_source="-U_FILE_OFFSET_BITS"])
+AC_SUBST(no_file_offset_bits_source)
+LIBC_CONFIG_VAR([no-file-offset-bits-source], [$no_file_offset_bits_source])
+
+dnl Check if compiler define _TIME_BITS by default
+AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[
+#ifndef _TIME_BITS
+# error _TIME_BITS not defined
+#endif]])],
+	       [libc_cv_compiler_default_time_bits=yes],
+	       [libc_cv_compiler_default_time_bits=no])
+AS_IF([test "$libc_cv_compiler_default_time_bits" = yes],
+      [no_time_bits_source="-U_TIME_BITS"])
+AC_SUBST(no_time_bits_source)
+LIBC_CONFIG_VAR([no-time-bits-source], [$no_time_bits_source])
+
 dnl Starting with binutils 2.35, GAS can attach multiple symbol versions
 dnl to one symbol (PR 23840).
 AC_CACHE_CHECK(whether the assembler requires one version per symbol,