]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
check for sigwaitinfo presence, and if it is missing, look for it in librt
authorTobias Oetiker <tobi@oetiker.ch>
Fri, 9 Jan 2015 17:37:01 +0000 (18:37 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Fri, 9 Jan 2015 17:37:01 +0000 (18:37 +0100)
configure
configure.ac

index 45a9a9d64e98bafe610bb243fa6ae3d0b1b98b13..eea625e5042f2760ec77d6da75b1007e212b2d82 100755 (executable)
--- a/configure
+++ b/configure
@@ -14420,6 +14420,7 @@ fi
 
 
 
+
 eval `./libtool --config | grep pic_flag=`
 CFLAGS="$CFLAGS $pic_flag"
 
@@ -18224,6 +18225,58 @@ $as_echo "#define HAVE_TIMEZONE 1" >>confdefs.h
         fi
 
 
+ac_fn_c_check_func "$LINENO" "sigwaitinfo" "ac_cv_func_sigwaitinfo"
+if test "x$ac_cv_func_sigwaitinfo" = xyes; then :
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwaitinfo in -lrt" >&5
+$as_echo_n "checking for sigwaitinfo in -lrt... " >&6; }
+if ${ac_cv_lib_rt_sigwaitinfo+:} false; 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 sigwaitinfo ();
+int
+main ()
+{
+return sigwaitinfo ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_sigwaitinfo=yes
+else
+  ac_cv_lib_rt_sigwaitinfo=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_sigwaitinfo" >&5
+$as_echo "$ac_cv_lib_rt_sigwaitinfo" >&6; }
+if test "x$ac_cv_lib_rt_sigwaitinfo" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
+
+  LIBS="-lrt $LIBS"
+
+fi
+
+fi
+
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msync with MS_ASYNC updates the files mtime" >&5
 $as_echo_n "checking if msync with MS_ASYNC updates the files mtime... " >&6; }
index 17771889a17726adc7b21a52c8f0dba352ccf37e..9439b3ec80668d76b2cedbf969f76a8520d2dc8d 100644 (file)
@@ -236,6 +236,7 @@ AC_CHECK_FUNC(acos,  , AC_CHECK_LIB(m, acos))
 AC_CHECK_FUNC(round, , AC_CHECK_LIB(m, round))
 
 
+
 dnl add pic flag in any case this makes sure all our code is relocatable
 eval `./libtool --config | grep pic_flag=` 
 CFLAGS="$CFLAGS $pic_flag"
@@ -389,6 +390,9 @@ CONFIGURE_PART(Resolve Portability Issues)
 
 GC_TIMEZONE()
 
+dnl Solaris has sigwaitinfo in librt
+AC_CHECK_FUNC(sigwaitinfo, , AC_CHECK_LIB(rt, sigwaitinfo))
+
 CHECK_FOR_WORKING_MS_ASYNC
 
 dnl do we have nl_langinfo(_NL_TIME_WEEK_1STDAY)