This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, roland/systemtap, created. glibc-2.12-71-ga5be4b6
- From: roland at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 23 Jul 2010 09:46:36 -0000
- Subject: GNU C Library master sources branch, roland/systemtap, created. glibc-2.12-71-ga5be4b6
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, roland/systemtap has been created
at a5be4b6b848681542b8a7fb578b4b9fcdd9db60a (commit)
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5be4b6b848681542b8a7fb578b4b9fcdd9db60a
commit a5be4b6b848681542b8a7fb578b4b9fcdd9db60a
Author: Roland McGrath <roland@redhat.com>
Date: Fri Jul 23 02:32:50 2010 -0700
Add --enable-systemtap configuration to define static probe points.
diff --git a/ChangeLog b/ChangeLog
index 1b06065..aec0ac8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-07-23 Roland McGrath <roland@redhat.com>
+
+ * include/stap-probe.h: New file.
+ * configure.in: Handle --enable-systemtap.
+ * configure: Regenerated.
+ * config.h.in (USE_STAP_PROBE): New #undef.
+ * extra-lib.mk (CPPFLAGS-$(lib)): Add -DIN_LIB=$(lib).
+
2010-07-21 Andreas Schwab <schwab@redhat.com>
* sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
diff --git a/config.h.in b/config.h.in
index 18bf01a..8591593 100644
--- a/config.h.in
+++ b/config.h.in
@@ -201,6 +201,9 @@
/* Define if multi-arch DSOs should be generated. */
#undef USE_MULTIARCH
+/* Define if Systemtap <sys/sdt.h> probes should be defined. */
+#undef USE_STAP_PROBE
+
/*
*/
diff --git a/configure b/configure
index dd33760..4626dcd 100755
--- a/configure
+++ b/configure
@@ -628,8 +628,6 @@ uname_release
uname_sysname
libc_cv_gcc_unwind_find_fde
sizeof_long_double
-EGREP
-GREP
have_selinux
have_libcap
have_libaudit
@@ -685,6 +683,8 @@ multi_arch
base_machine
add_on_subdirs
add_ons
+EGREP
+GREP
libc_cv_nss_crypt
experimental_malloc
all_warnings
@@ -787,6 +787,7 @@ enable_all_warnings
enable_multi_arch
enable_experimental_malloc
enable_nss_crypt
+enable_systemtap
with_cpu
'
ac_precious_vars='build_alias
@@ -1447,6 +1448,7 @@ Optional Features:
--enable-experimental-malloc
enable experimental malloc features
--enable-nss-crypt enable libcrypt to use nss
+ --enable-systemtap enable systemtap static probe points [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1719,6 +1721,99 @@ fi
} # ac_fn_c_try_link
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( cat <<\_ASBOX
+## -------------------- ##
+## Report this to glibc ##
+## -------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+
# ac_fn_c_try_run LINENO
# ----------------------
# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
@@ -1761,6 +1856,37 @@ fi
} # ac_fn_c_try_run
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -1938,37 +2064,6 @@ rm -f conftest.val
as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_compile
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -3822,98 +3917,379 @@ else
fi
-# The way shlib-versions is used to generate soversions.mk uses a
-# fairly simplistic model for name recognition that can't distinguish
-# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
-# of `gnu*' here to be `gnu-gnu*' just so that shlib-versions can
-# tell. This doesn't get used much beyond that, so it's fairly safe.
-case "$host_os" in
-linux*)
- ;;
-gnu*)
- host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
- ;;
-esac
-
-# We keep the original values in `$config_*' and never modify them, so we
-# can write them unchanged into config.make. Everything else uses
-# $machine, $vendor, and $os, and changes them whenever convenient.
-config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os
+# Check whether --enable-systemtap was given.
+if test "${enable_systemtap+set}" = set; then :
+ enableval=$enable_systemtap; systemtap=$enableval
+else
+ systemtap=no
+fi
-# Don't allow vendor == "unknown"
-test "$config_vendor" = unknown && config_vendor=
-config_os="`echo $config_os | sed 's/^unknown-//'`"
+if test x$systemtap != xno; then
-# Some configurations imply other options.
-case "$host_os" in
-# i586-linuxaout is mangled into i586-pc-linux-gnuaout
-linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
- ;;
-gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
- # These systems (almost) always use the ELF format.
- elf=yes
- ;;
-aix*)
- # These systems are always xcoff
- xcoff=yes
- elf=no
- ;;
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
esac
-# The configure fragment of an add-on port can modify these to supplement
-# or override the table in the case statement below. No fragment should
-# ever change the config_* variables, however.
-machine=$config_machine
-vendor=$config_vendor
-os=$config_os
-base_os=''
-
-# config.guess on some IBM machines says `rs6000' instead of `powerpc'.
-# Unify this here.
-if test "$machine" = rs6000; then
- machine="powerpc"
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
fi
-# Braindead PowerPC box with absolutely no FPU.
-case "$machine-$host_os" in
- powerpc*-*soft)
- with_fp=no
- ;;
-esac
-
-submachine=
-
-# Check whether --with-cpu was given.
-if test "${with_cpu+set}" = set; then :
- withval=$with_cpu; case "$withval" in
- yes|'') as_fn_error "--with-cpu requires an argument" "$LINENO" 5 ;;
- no) ;;
- *) submachine="$withval" ;;
- esac
-
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
-# An add-on can set this when it wants to disable the sanity check below.
-libc_config_ok=no
-
-subdirs="$subdirs "
-
-
-case "$enable_add_ons" in
-''|no) add_ons= ;;
-yes|'*')
- add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps |
- sed 's@/[^/]*$@@' | sort | uniq`
- add_ons_automatic=yes
- ;;
-*) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'`
- add_ons_automatic=no ;;
-esac
-
-configured_add_ons=
-add_ons_sfx=
-add_ons_pfx=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+ if test "x$as_val" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_sdt_h" = x""yes; then :
+
+else
+ as_fn_error "systemtap support needs sys/sdt.h header" "$LINENO" 5
+fi
+
+
+ $as_echo "#define USE_STAP_PROBE 1" >>confdefs.h
+
+fi
+
+# The way shlib-versions is used to generate soversions.mk uses a
+# fairly simplistic model for name recognition that can't distinguish
+# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
+# of `gnu*' here to be `gnu-gnu*' just so that shlib-versions can
+# tell. This doesn't get used much beyond that, so it's fairly safe.
+case "$host_os" in
+linux*)
+ ;;
+gnu*)
+ host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
+ ;;
+esac
+
+# We keep the original values in `$config_*' and never modify them, so we
+# can write them unchanged into config.make. Everything else uses
+# $machine, $vendor, and $os, and changes them whenever convenient.
+config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os
+
+# Don't allow vendor == "unknown"
+test "$config_vendor" = unknown && config_vendor=
+config_os="`echo $config_os | sed 's/^unknown-//'`"
+
+# Some configurations imply other options.
+case "$host_os" in
+# i586-linuxaout is mangled into i586-pc-linux-gnuaout
+linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
+ ;;
+gnu* | linux* | freebsd* | netbsd* | sysv4* | solaris2* | irix6*)
+ # These systems (almost) always use the ELF format.
+ elf=yes
+ ;;
+aix*)
+ # These systems are always xcoff
+ xcoff=yes
+ elf=no
+ ;;
+esac
+
+# The configure fragment of an add-on port can modify these to supplement
+# or override the table in the case statement below. No fragment should
+# ever change the config_* variables, however.
+machine=$config_machine
+vendor=$config_vendor
+os=$config_os
+base_os=''
+
+# config.guess on some IBM machines says `rs6000' instead of `powerpc'.
+# Unify this here.
+if test "$machine" = rs6000; then
+ machine="powerpc"
+fi
+
+# Braindead PowerPC box with absolutely no FPU.
+case "$machine-$host_os" in
+ powerpc*-*soft)
+ with_fp=no
+ ;;
+esac
+
+submachine=
+
+# Check whether --with-cpu was given.
+if test "${with_cpu+set}" = set; then :
+ withval=$with_cpu; case "$withval" in
+ yes|'') as_fn_error "--with-cpu requires an argument" "$LINENO" 5 ;;
+ no) ;;
+ *) submachine="$withval" ;;
+ esac
+
+fi
+
+
+# An add-on can set this when it wants to disable the sanity check below.
+libc_config_ok=no
+
+subdirs="$subdirs "
+
+
+case "$enable_add_ons" in
+''|no) add_ons= ;;
+yes|'*')
+ add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps |
+ sed 's@/[^/]*$@@' | sort | uniq`
+ add_ons_automatic=yes
+ ;;
+*) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'`
+ add_ons_automatic=no ;;
+esac
+
+configured_add_ons=
+add_ons_sfx=
+add_ons_pfx=
if test x"$add_ons" != x; then
for f in $add_ons; do
# Some sanity checks
@@ -6960,765 +7336,504 @@ $as_echo_n "checking for ld --no-whole-archive... " >&6; }
if test "${libc_cv_ld_no_whole_archive+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat > conftest.c <<\EOF
-_start () {}
-int __eh_pc;
-__throw () {}
-EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
- -nostdlib -nostartfiles -Wl,--no-whole-archive
- -o conftest conftest.c 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_ld_no_whole_archive=yes
-else
- libc_cv_ld_no_whole_archive=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_no_whole_archive" >&5
-$as_echo "$libc_cv_ld_no_whole_archive" >&6; }
-if test $libc_cv_ld_no_whole_archive = yes; then
- no_whole_archive=-Wl,--no-whole-archive
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc -fexceptions" >&5
-$as_echo_n "checking for gcc -fexceptions... " >&6; }
-if test "${libc_cv_gcc_exceptions+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.c <<\EOF
-_start () {}
-int __eh_pc;
-__throw () {}
-EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
- -nostdlib -nostartfiles -fexceptions
- -o conftest conftest.c 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_gcc_exceptions=yes
-else
- libc_cv_gcc_exceptions=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_exceptions" >&5
-$as_echo "$libc_cv_gcc_exceptions" >&6; }
-if test $libc_cv_gcc_exceptions = yes; then
- exceptions=-fexceptions
-fi
-
-if test "$host_cpu" = powerpc ; then
-# Check for a bug present in at least versions 2.8.x of GCC
-# and versions 1.0.x of EGCS.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clobbering cr0 causes problems" >&5
-$as_echo_n "checking whether clobbering cr0 causes problems... " >&6; }
-if test "${libc_cv_c_asmcr0_bug+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int tester(int x) { asm ("" : : : "cc"); return x & 123; }
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- libc_cv_c_asmcr0_bug='no'
-else
- libc_cv_c_asmcr0_bug='yes'
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_c_asmcr0_bug" >&5
-$as_echo "$libc_cv_c_asmcr0_bug" >&6; }
-if test "$libc_cv_c_asmcr0_bug" != 'no'; then
- $as_echo "#define BROKEN_PPC_ASM_CR0 1" >>confdefs.h
-
-fi
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
-$as_echo_n "checking for __builtin_expect... " >&6; }
-if test "${libc_cv_gcc_builtin_expect+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.c <<EOF
-#line $LINENO "configure"
-int foo (int a)
-{
- a = __builtin_expect (a, 10);
- return a == 10 ? 0 : 1;
-}
-EOF
-if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_gcc_builtin_expect=yes
-else
- libc_cv_gcc_builtin_expect=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_expect" >&5
-$as_echo "$libc_cv_gcc_builtin_expect" >&6; }
-if test "$libc_cv_gcc_builtin_expect" = yes; then
- $as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_memset" >&5
-$as_echo_n "checking for __builtin_memset... " >&6; }
-if test "${libc_cv_gcc_builtin_memset+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.c <<\EOF
-void zero (void *x)
-{
- __builtin_memset (x, 0, 1000);
-}
-EOF
-if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; };
-then
- libc_cv_gcc_builtin_memset=no
-else
- libc_cv_gcc_builtin_memset=yes
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_memset" >&5
-$as_echo "$libc_cv_gcc_builtin_memset" >&6; }
-if test "$libc_cv_gcc_builtin_memset" = yes ; then
- $as_echo "#define HAVE_BUILTIN_MEMSET 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for redirection of built-in functions" >&5
-$as_echo_n "checking for redirection of built-in functions... " >&6; }
-if test "${libc_cv_gcc_builtin_redirection+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.c <<\EOF
-extern char *strstr (const char *, const char *) __asm ("my_strstr");
-char *foo (const char *a, const char *b)
-{
- return __builtin_strstr (a, b);
-}
-EOF
-if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; };
-then
- libc_cv_gcc_builtin_redirection=yes
-else
- libc_cv_gcc_builtin_redirection=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_redirection" >&5
-$as_echo "$libc_cv_gcc_builtin_redirection" >&6; }
-if test "$libc_cv_gcc_builtin_redirection" = yes ; then
- $as_echo "#define HAVE_BUILTIN_REDIRECTION 1" >>confdefs.h
-
-fi
-
-if test "x$use__thread" != xno; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread" >&5
-$as_echo_n "checking for __thread... " >&6; }
-if test "${libc_cv_gcc___thread+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.c <<\EOF
-__thread int a = 42;
-EOF
- if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_gcc___thread=yes
- else
- libc_cv_gcc___thread=no
- fi
- rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc___thread" >&5
-$as_echo "$libc_cv_gcc___thread" >&6; }
- if test "$libc_cv_gcc___thread" = yes; then
- $as_echo "#define HAVE___THREAD 1" >>confdefs.h
-
- fi
-else
- libc_cv_gcc___thread=no
-fi
-
-if test "$libc_cv_gcc___thread" = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tls_model attribute" >&5
-$as_echo_n "checking for tls_model attribute... " >&6; }
-if test "${libc_cv_gcc_tls_model_attr+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.c <<\EOF
-extern __thread int a __attribute__((tls_model ("initial-exec")));
-EOF
- if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_gcc_tls_model_attr=yes
- else
- libc_cv_gcc_tls_model_attr=no
- fi
- rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_tls_model_attr" >&5
-$as_echo "$libc_cv_gcc_tls_model_attr" >&6; }
- if test "$libc_cv_gcc_tls_model_attr" = yes; then
- $as_echo "#define HAVE_TLS_MODEL_ATTRIBUTE 1" >>confdefs.h
-
- fi
-fi
-
-if test -n "$submachine"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option for CPU variant" >&5
-$as_echo_n "checking for compiler option for CPU variant... " >&6; }
-if test "${libc_cv_cc_submachine+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- libc_cv_cc_submachine=no
- for opt in "-march=$submachine" "-mcpu=$submachine"; do
- if { ac_try='${CC-cc} $opt -xc /dev/null -S -o /dev/null'
+ cat > conftest.c <<\EOF
+_start () {}
+int __eh_pc;
+__throw () {}
+EOF
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+ -nostdlib -nostartfiles -Wl,--no-whole-archive
+ -o conftest conftest.c 1>&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }; then
- libc_cv_cc_submachine="$opt"
- break
- fi
- done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_submachine" >&5
-$as_echo "$libc_cv_cc_submachine" >&6; }
- if test "x$libc_cv_cc_submachine" = xno; then
- as_fn_error "${CC-cc} does not support $submachine" "$LINENO" 5
- fi
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
-$as_echo_n "checking for libgd... " >&6; }
-if test "$with_gd" != "no"; then
- old_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $libgd_include"
- old_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $libgd_ldflags"
- old_LIBS="$LIBS"
- LIBS="$LIBS -lgd -lpng -lz -lm"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <gd.h>
-int
-main ()
-{
-gdImagePng (0, 0)
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- LIBGD=yes
+ libc_cv_ld_no_whole_archive=yes
else
- LIBGD=no
+ libc_cv_ld_no_whole_archive=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- CFLAGS="$old_CFLAGS"
- LDFLAGS="$old_LDFLAGS"
- LIBS="$old_LIBS"
-else
- LIBGD=no
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_no_whole_archive" >&5
+$as_echo "$libc_cv_ld_no_whole_archive" >&6; }
+if test $libc_cv_ld_no_whole_archive = yes; then
+ no_whole_archive=-Wl,--no-whole-archive
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGD" >&5
-$as_echo "$LIBGD" >&6; }
-
-# SELinux detection
-if test x$with_selinux = xno ; then
- have_selinux=no;
-else
- # See if we have the SELinux library
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
-$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
-if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc -fexceptions" >&5
+$as_echo_n "checking for gcc -fexceptions... " >&6; }
+if test "${libc_cv_gcc_exceptions+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lselinux $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char is_selinux_enabled ();
-int
-main ()
-{
-return is_selinux_enabled ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_selinux_is_selinux_enabled=yes
+ cat > conftest.c <<\EOF
+_start () {}
+int __eh_pc;
+__throw () {}
+EOF
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
+ -nostdlib -nostartfiles -fexceptions
+ -o conftest conftest.c 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_gcc_exceptions=yes
else
- ac_cv_lib_selinux_is_selinux_enabled=no
+ libc_cv_gcc_exceptions=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
-$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
-if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then :
- have_selinux=yes
-else
- have_selinux=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_exceptions" >&5
+$as_echo "$libc_cv_gcc_exceptions" >&6; }
+if test $libc_cv_gcc_exceptions = yes; then
+ exceptions=-fexceptions
fi
- # See if we have the SELinux header with the NSCD permissions in it.
- if test x$have_selinux = xyes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSCD Flask permissions in selinux/av_permissions.h" >&5
-$as_echo_n "checking for NSCD Flask permissions in selinux/av_permissions.h... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test "$host_cpu" = powerpc ; then
+# Check for a bug present in at least versions 2.8.x of GCC
+# and versions 1.0.x of EGCS.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clobbering cr0 causes problems" >&5
+$as_echo_n "checking whether clobbering cr0 causes problems... " >&6; }
+if test "${libc_cv_c_asmcr0_bug+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <selinux/av_permissions.h>
+int tester(int x) { asm ("" : : : "cc"); return x & 123; }
int
main ()
{
-#ifdef NSCD__SHMEMHOST
- return 0;
- #else
- #error NSCD__SHMEMHOST not defined
- #endif
+
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
- have_selinux=yes
+ libc_cv_c_asmcr0_bug='no'
else
- have_selinux=no
+ libc_cv_c_asmcr0_bug='yes'
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_selinux" >&5
-$as_echo "$have_selinux" >&6; }
- fi
-
- if test x$with_selinux = xyes ; then
- if test x$have_selinux = xno ; then
- as_fn_error "SELinux explicitly required, but sufficiently recent SELinux library not found" "$LINENO" 5
- fi
- fi
fi
-# Check if we're building with SELinux support.
-if test "x$have_selinux" = xyes; then
-
-$as_echo "#define HAVE_SELINUX 1" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_c_asmcr0_bug" >&5
+$as_echo "$libc_cv_c_asmcr0_bug" >&6; }
+if test "$libc_cv_c_asmcr0_bug" != 'no'; then
+ $as_echo "#define BROKEN_PPC_ASM_CR0 1" >>confdefs.h
+fi
+fi
- # See if we have the libaudit library
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for audit_log_user_avc_message in -laudit" >&5
-$as_echo_n "checking for audit_log_user_avc_message in -laudit... " >&6; }
-if test "${ac_cv_lib_audit_audit_log_user_avc_message+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
+$as_echo_n "checking for __builtin_expect... " >&6; }
+if test "${libc_cv_gcc_builtin_expect+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-laudit $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char audit_log_user_avc_message ();
-int
-main ()
+ cat > conftest.c <<EOF
+#line $LINENO "configure"
+int foo (int a)
{
-return audit_log_user_avc_message ();
- ;
- return 0;
+ a = __builtin_expect (a, 10);
+ return a == 10 ? 0 : 1;
}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_audit_audit_log_user_avc_message=yes
+EOF
+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -nostdlib -nostartfiles
+ -o conftest conftest.c -lgcc >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_gcc_builtin_expect=yes
else
- ac_cv_lib_audit_audit_log_user_avc_message=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ libc_cv_gcc_builtin_expect=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_log_user_avc_message" >&5
-$as_echo "$ac_cv_lib_audit_audit_log_user_avc_message" >&6; }
-if test "x$ac_cv_lib_audit_audit_log_user_avc_message" = x""yes; then :
- have_libaudit=yes
-else
- have_libaudit=no
+rm -f conftest*
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_expect" >&5
+$as_echo "$libc_cv_gcc_builtin_expect" >&6; }
+if test "$libc_cv_gcc_builtin_expect" = yes; then
+ $as_echo "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h
- if test "x$have_libaudit" = xyes; then
-
-$as_echo "#define HAVE_LIBAUDIT 1" >>confdefs.h
+fi
- fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_memset" >&5
+$as_echo_n "checking for __builtin_memset... " >&6; }
+if test "${libc_cv_gcc_builtin_memset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<\EOF
+void zero (void *x)
+{
+ __builtin_memset (x, 0, 1000);
+}
+EOF
+if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; };
+then
+ libc_cv_gcc_builtin_memset=no
+else
+ libc_cv_gcc_builtin_memset=yes
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_memset" >&5
+$as_echo "$libc_cv_gcc_builtin_memset" >&6; }
+if test "$libc_cv_gcc_builtin_memset" = yes ; then
+ $as_echo "#define HAVE_BUILTIN_MEMSET 1" >>confdefs.h
+fi
- # See if we have the libcap library
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcap" >&5
-$as_echo_n "checking for cap_init in -lcap... " >&6; }
-if test "${ac_cv_lib_cap_cap_init+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for redirection of built-in functions" >&5
+$as_echo_n "checking for redirection of built-in functions... " >&6; }
+if test "${libc_cv_gcc_builtin_redirection+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcap $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cap_init ();
-int
-main ()
+ cat > conftest.c <<\EOF
+extern char *strstr (const char *, const char *) __asm ("my_strstr");
+char *foo (const char *a, const char *b)
{
-return cap_init ();
- ;
- return 0;
+ return __builtin_strstr (a, b);
}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_cap_cap_init=yes
+EOF
+if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; };
+then
+ libc_cv_gcc_builtin_redirection=yes
else
- ac_cv_lib_cap_cap_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ libc_cv_gcc_builtin_redirection=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_cap_init" >&5
-$as_echo "$ac_cv_lib_cap_cap_init" >&6; }
-if test "x$ac_cv_lib_cap_cap_init" = x""yes; then :
- have_libcap=yes
-else
- have_libcap=no
+rm -f conftest*
fi
-
- if test "x$have_libcap" = xyes; then
-
-$as_echo "#define HAVE_LIBCAP 1" >>confdefs.h
-
- fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_builtin_redirection" >&5
+$as_echo "$libc_cv_gcc_builtin_redirection" >&6; }
+if test "$libc_cv_gcc_builtin_redirection" = yes ; then
+ $as_echo "#define HAVE_BUILTIN_REDIRECTION 1" >>confdefs.h
fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if test "x$use__thread" != xno; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __thread" >&5
+$as_echo_n "checking for __thread... " >&6; }
+if test "${libc_cv_gcc___thread+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
+ cat > conftest.c <<\EOF
+__thread int a = 42;
+EOF
+ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_gcc___thread=yes
+ else
+ libc_cv_gcc___thread=no
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc___thread" >&5
+$as_echo "$libc_cv_gcc___thread" >&6; }
+ if test "$libc_cv_gcc___thread" = yes; then
+ $as_echo "#define HAVE___THREAD 1" >>confdefs.h
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
- ac_cv_path_GREP=$GREP
+ libc_cv_gcc___thread=no
fi
+if test "$libc_cv_gcc___thread" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tls_model attribute" >&5
+$as_echo_n "checking for tls_model attribute... " >&6; }
+if test "${libc_cv_gcc_tls_model_attr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.c <<\EOF
+extern __thread int a __attribute__((tls_model ("initial-exec")));
+EOF
+ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -Werror conftest.c >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_gcc_tls_model_attr=yes
+ else
+ libc_cv_gcc_tls_model_attr=no
+ fi
+ rm -f conftest*
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_tls_model_attr" >&5
+$as_echo "$libc_cv_gcc_tls_model_attr" >&6; }
+ if test "$libc_cv_gcc_tls_model_attr" = yes; then
+ $as_echo "#define HAVE_TLS_MODEL_ATTRIBUTE 1" >>confdefs.h
+ fi
+fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if test -n "$submachine"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option for CPU variant" >&5
+$as_echo_n "checking for compiler option for CPU variant... " >&6; }
+if test "${libc_cv_cc_submachine+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
+ libc_cv_cc_submachine=no
+ for opt in "-march=$submachine" "-mcpu=$submachine"; do
+ if { ac_try='${CC-cc} $opt -xc /dev/null -S -o /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_cc_submachine="$opt"
+ break
fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_submachine" >&5
+$as_echo "$libc_cv_cc_submachine" >&6; }
+ if test "x$libc_cv_cc_submachine" = xno; then
+ as_fn_error "${CC-cc} does not support $submachine" "$LINENO" 5
fi
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgd" >&5
+$as_echo_n "checking for libgd... " >&6; }
+if test "$with_gd" != "no"; then
+ old_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $libgd_include"
+ old_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $libgd_ldflags"
+ old_LIBS="$LIBS"
+ LIBS="$LIBS -lgd -lpng -lz -lm"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <gd.h>
+int
+main ()
+{
+gdImagePng (0, 0)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBGD=yes
else
- ac_cv_path_EGREP=$EGREP
+ LIBGD=no
fi
-
- fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CFLAGS="$old_CFLAGS"
+ LDFLAGS="$old_LDFLAGS"
+ LIBS="$old_LIBS"
+else
+ LIBGD=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGD" >&5
+$as_echo "$LIBGD" >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+# SELinux detection
+if test x$with_selinux = xno ; then
+ have_selinux=no;
+else
+ # See if we have the SELinux library
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
+$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
+if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lselinux $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char is_selinux_enabled ();
int
main ()
{
-
+return is_selinux_enabled ();
;
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_selinux_is_selinux_enabled=yes
else
- ac_cv_header_stdc=no
+ ac_cv_lib_selinux_is_selinux_enabled=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
+$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
+if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then :
+ have_selinux=yes
+else
+ have_selinux=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ # See if we have the SELinux header with the NSCD permissions in it.
+ if test x$have_selinux = xyes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSCD Flask permissions in selinux/av_permissions.h" >&5
+$as_echo_n "checking for NSCD Flask permissions in selinux/av_permissions.h... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <string.h>
-
+#include <selinux/av_permissions.h>
+int
+main ()
+{
+#ifdef NSCD__SHMEMHOST
+ return 0;
+ #else
+ #error NSCD__SHMEMHOST not defined
+ #endif
+ ;
+ return 0;
+}
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
+if ac_fn_c_try_compile "$LINENO"; then :
+ have_selinux=yes
else
- ac_cv_header_stdc=no
+ have_selinux=no
fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_selinux" >&5
+$as_echo "$have_selinux" >&6; }
+ fi
+ if test x$with_selinux = xyes ; then
+ if test x$have_selinux = xno ; then
+ as_fn_error "SELinux explicitly required, but sufficiently recent SELinux library not found" "$LINENO" 5
+ fi
+ fi
fi
+# Check if we're building with SELinux support.
+if test "x$have_selinux" = xyes; then
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+$as_echo "#define HAVE_SELINUX 1" >>confdefs.h
+
+
+ # See if we have the libaudit library
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for audit_log_user_avc_message in -laudit" >&5
+$as_echo_n "checking for audit_log_user_avc_message in -laudit... " >&6; }
+if test "${ac_cv_lib_audit_audit_log_user_avc_message+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-laudit $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char audit_log_user_avc_message ();
+int
+main ()
+{
+return audit_log_user_avc_message ();
+ ;
+ return 0;
+}
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_audit_audit_log_user_avc_message=yes
else
- ac_cv_header_stdc=no
+ ac_cv_lib_audit_audit_log_user_avc_message=no
fi
-rm -f conftest*
-
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_log_user_avc_message" >&5
+$as_echo "$ac_cv_lib_audit_audit_log_user_avc_message" >&6; }
+if test "x$ac_cv_lib_audit_audit_log_user_avc_message" = x""yes; then :
+ have_libaudit=yes
+else
+ have_libaudit=no
fi
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
+ if test "x$have_libaudit" = xyes; then
+
+$as_echo "#define HAVE_LIBAUDIT 1" >>confdefs.h
+
+ fi
+
+
+ # See if we have the libcap library
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcap" >&5
+$as_echo_n "checking for cap_init in -lcap... " >&6; }
+if test "${ac_cv_lib_cap_cap_init+set}" = set; then :
+ $as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcap $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char cap_init ();
int
main ()
{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
+return cap_init ();
+ ;
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_cap_cap_init=yes
else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cv_lib_cap_cap_init=no
fi
-
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_cap_init" >&5
+$as_echo "$ac_cv_lib_cap_cap_init" >&6; }
+if test "x$ac_cv_lib_cap_cap_init" = x""yes; then :
+ have_libcap=yes
+else
+ have_libcap=no
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+ if test "x$have_libcap" = xyes; then
-fi
+$as_echo "#define HAVE_LIBCAP 1" >>confdefs.h
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ fi
fi
-done
-
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
diff --git a/configure.in b/configure.in
index 56849df..272aaf8 100644
--- a/configure.in
+++ b/configure.in
@@ -319,6 +319,17 @@ else
fi
AC_SUBST(libc_cv_nss_crypt)
+AC_ARG_ENABLE([systemtap],
+ [AS_HELP_STRING([--enable-systemtap],
+ [enable systemtap static probe points @<:@default=no@:>@])],
+ [systemtap=$enableval],
+ [systemtap=no])
+if test x$systemtap != xno; then
+ AC_CHECK_HEADER([sys/sdt.h],,
+ [AC_MSG_ERROR([systemtap support needs sys/sdt.h header])])
+ AC_DEFINE([USE_STAP_PROBE])
+fi
+
# The way shlib-versions is used to generate soversions.mk uses a
# fairly simplistic model for name recognition that can't distinguish
# i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os
diff --git a/extra-lib.mk b/extra-lib.mk
index 775eb23..7f8516e 100644
--- a/extra-lib.mk
+++ b/extra-lib.mk
@@ -101,4 +101,4 @@ ifneq (,$(cpp-srcs-left))
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
endif
-CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1
+CPPFLAGS-$(lib) := -DNOT_IN_libc=1 -DIS_IN_$(lib)=1 -DIN_LIB=$(lib)
diff --git a/include/stap-probe.h b/include/stap-probe.h
new file mode 100644
index 0000000..a1a45d4
--- /dev/null
+++ b/include/stap-probe.h
@@ -0,0 +1,122 @@
+/* Macros for defining Systemtap <sys/sdt.h> static probe points.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _STAP_PROBE_H
+#define _STAP_PROBE_H 1
+
+#ifdef USE_STAP_PROBE
+
+# include <sys/sdt.h>
+
+/* Our code uses one macro LIBC_PROBE (name, n, arg1, ..., argn).
+
+ Without USE_STAP_PROBE, that does nothing but evaluates all
+ its arguments (to prevent bit rot, unlike e.g. assert).
+
+ Systemtap's header defines the macros STAP_PROBE (provider, name) and
+ STAP_PROBEn (provider, name, arg1, ..., argn). For "provider" we paste
+ in the IN_LIB name (libc, libpthread, etc.) automagically. */
+
+# ifndef NOT_IN_libc
+# define IN_LIB libc
+# elif !defined IN_LIB
+# error "missing -DIN_LIB=... -- not extra-lib.mk?"
+# endif
+
+# define LIBC_PROBE(name, n, ...) \
+ LIBC_PROBE_1 (IN_LIB, name, n, ## __VA_ARGS__)
+
+# define LIBC_PROBE_1(lib, name, n, ...) \
+ STAP_PROBE##n (lib, name, ## __VA_ARGS__)
+
+# define STAP_PROBE0 STAP_PROBE
+
+#else /* Not USE_STAP_PROBE. */
+
+# define LIBC_PROBE(name, n, ...) DUMMY_PROBE##n (__VA_ARGS__)
+
+/* This silliness lets us evaluate all the arguments for each arity
+ of probe. My kingdom for a real macro system. */
+
+# define DUMMY_PROBE0() do {} while (0)
+# define DUMMY_PROBE1(a1) do {} while ((void) (a1), 0)
+# define DUMMY_PROBE2(a1, a2) do {} while ((void) (a1), \
+ (void) (a2), 0)
+# define DUMMY_PROBE3(a1, a2, a3) do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), 0)
+# define DUMMY_PROBE4(a1, a2, a3, a4) do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), 0)
+# define DUMMY_PROBE5(a1, a2, a3, a4, a5) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), 0)
+# define DUMMY_PROBE6(a1, a2, a3, a4, a5, a6) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), 0)
+# define DUMMY_PROBE7(a1, a2, a3, a4, a5, a6, a7) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), 0)
+# define DUMMY_PROBE8(a1, a2, a3, a4, a5, a6, a7, a8) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), \
+ (void) (a8), 0)
+# define DUMMY_PROBE9(a1, a2, a3, a4, a5, a6, a7, a8, a9) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), \
+ (void) (a8), \
+ (void) (a9), 0)
+# define DUMMY_PROBE10(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
+ do {} while ((void) (a1), \
+ (void) (a2), \
+ (void) (a3), \
+ (void) (a4), \
+ (void) (a5), \
+ (void) (a6), \
+ (void) (a7), \
+ (void) (a8), \
+ (void) (a9), \
+ (void) (a10), 0)
+
+#endif /* USE_STAP_PROBE. */
+
+#endif /* stap-probe.h */
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index c1f8620..3052ba5 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-23 Roland McGrath <roland@redhat.com>
+
+ * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
+
2010-07-06 Andreas Schwab <schwab@redhat.com>
* sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 34d83f9..4075dd9 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -31,6 +31,8 @@
#include <shlib-compat.h>
+#include <stap-probe.h>
+
/* Local function to start thread and handle cleanup. */
static int start_thread (void *arg);
@@ -296,6 +298,8 @@ start_thread (void *arg)
CANCEL_RESET (oldtype);
}
+ LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg);
+
/* Run the code the user provided. */
#ifdef CALL_THREAD_FCT
THREAD_SETMEM (pd, result, CALL_THREAD_FCT (pd));
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources