summaryrefslogtreecommitdiff
path: root/libmudflap/configure
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-13 14:57:29 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-13 14:57:29 +0000
commit0c6d91a6db026bff0d29671746142b01c7c2f60a (patch)
tree133760b21836feaabf58e9e01a0522ecb4834652 /libmudflap/configure
parent6e71bd21bb8a410e95a8e675887030b0b8028b91 (diff)
downloadgcc-0c6d91a6db026bff0d29671746142b01c7c2f60a.tar.gz
* configure.ac: Don't create pth.
Check for library containing sched_yield. * configure: Regenerate. * config.h.in: Regenerate. * testsuite/lib/libmudflap.exp (libmudflap-init): Use mfconfig_libs in -static check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176237 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap/configure')
-rwxr-xr-xlibmudflap/configure57
1 files changed, 51 insertions, 6 deletions
diff --git a/libmudflap/configure b/libmudflap/configure
index d2b94187932..3ce3979bda2 100755
--- a/libmudflap/configure
+++ b/libmudflap/configure
@@ -10986,12 +10986,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-if test ! -d pth
-then
- # libmudflapth objects are built in this subdirectory
- mkdir pth
-fi
-
for ac_header in pthread.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
@@ -11138,6 +11132,57 @@ fi
fi
+ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
+if test "x$ac_cv_func_sched_yield" = x""yes; then :
+
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+$as_echo_n "checking for sched_yield in -lrt... " >&6; }
+if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt $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 sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_rt_sched_yield=yes
+else
+ ac_cv_lib_rt_sched_yield=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_rt_sched_yield" >&5
+$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
+
+ LIBS="-lrt $LIBS"
+
+fi
+
+fi
+
# Calculate toolexeclibdir
# Also toolexecdir, though it's only used in toolexeclibdir