From 72914c567fc65a363832995f7b0cc36b917ea0d0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 6 Mar 1999 00:31:05 +0000 Subject: [PATCH] HAVE_SCHED_H test added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- configure | 72 ++++++++++++++++++++++++++++++++++++++----------- configure.in | 3 +++ setup/setup.hin | 3 +++ 3 files changed, 63 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 52a5ef28a7..d3a12310bd 100755 --- a/configure +++ b/configure @@ -7520,8 +7520,50 @@ fi if test "$wxUSE_THREADS" = "1"; then THREADS_LINK2="" + + for ac_hdr in sched.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:7529: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:7539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + + echo $ac_n "checking for sched_yield in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:7525: checking for sched_yield in -l$THREADS_LINK" >&5 +echo "configure:7567: checking for sched_yield in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7529,7 +7571,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7562,7 +7604,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_yield in -l"posix4"""... $ac_c" 1>&6 -echo "configure:7566: checking for sched_yield in -l"posix4"" >&5 +echo "configure:7608: checking for sched_yield in -l"posix4"" >&5 ac_lib_var=`echo "posix4"'_'sched_yield | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7570,7 +7612,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l"posix4" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7611,7 +7653,7 @@ fi echo $ac_n "checking for sched_get_priority_min in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:7615: checking for sched_get_priority_min in -l$THREADS_LINK" >&5 +echo "configure:7657: checking for sched_get_priority_min in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'sched_get_priority_min | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7619,7 +7661,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7652,7 +7694,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sched_get_priority_min in -l"posix4"""... $ac_c" 1>&6 -echo "configure:7656: checking for sched_get_priority_min in -l"posix4"" >&5 +echo "configure:7698: checking for sched_get_priority_min in -l"posix4"" >&5 ac_lib_var=`echo "posix4"'_'sched_get_priority_min | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7660,7 +7702,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l"posix4" $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7701,7 +7743,7 @@ fi echo $ac_n "checking for pthread_cancel in -l$THREADS_LINK""... $ac_c" 1>&6 -echo "configure:7705: checking for pthread_cancel in -l$THREADS_LINK" >&5 +echo "configure:7747: checking for pthread_cancel in -l$THREADS_LINK" >&5 ac_lib_var=`echo $THREADS_LINK'_'pthread_cancel | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7709,7 +7751,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$THREADS_LINK $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff --git a/configure.in b/configure.in index 2de2e3cb87..8fc21ef771 100644 --- a/configure.in +++ b/configure.in @@ -1434,6 +1434,9 @@ fi dnl do other tests only if we are using threads if test "$wxUSE_THREADS" = "1"; then THREADS_LINK2="" + + AC_CHECK_HEADERS(sched.h) + AC_CHECK_LIB($THREADS_LINK, sched_yield, AC_DEFINE(HAVE_SCHED_YIELD), [AC_CHECK_LIB("posix4", sched_yield, diff --git a/setup/setup.hin b/setup/setup.hin index 1e35223473..fb0d108ef9 100644 --- a/setup/setup.hin +++ b/setup/setup.hin @@ -362,6 +362,9 @@ /* Define if you don't have vprintf but do have _doprnt. */ #undef HAVE_DOPRNT +/* Define if you have sched.h */ +#undef HAVE_SCHED_H + /* Define if you have vprintf() */ #undef HAVE_VPRINTF -- 2.45.2