]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #646 Portability to Solaris, -lrt for getentropy_solaris.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 20 Feb 2015 14:03:41 +0000 (14:03 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 20 Feb 2015 14:03:41 +0000 (14:03 +0000)
git-svn-id: file:///svn/unbound/trunk@3340 be551aaa-1e26-0410-a405-d3ace91eadb9

configure
configure.ac
doc/Changelog

index 7c22bf3e09bbabeead261b10a7c5bffc9223a4ba..20ff33d7299028192f96da9f87712ac78d481bbc 100755 (executable)
--- a/configure
+++ b/configure
@@ -18254,6 +18254,62 @@ done
                                        # this lib needed for sha2 on solaris
                                        LIBS="$LIBS -lmd"
                                fi
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$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 clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_clock_gettime+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+  ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
                        ;;
                        Linux|*)
                                case " $LIBOBJS " in
index 2657ba5c1f22a33ead14a441c971ec89dd7b0913..ae0525b540b0aa640a2ed725738d74dc6aa4ade4 100644 (file)
@@ -1022,6 +1022,7 @@ if test "$USE_NSS" = "no"; then
                                        # this lib needed for sha2 on solaris
                                        LIBS="$LIBS -lmd"
                                fi
+                               AC_SEARCH_LIBS([clock_gettime], [rt])
                        ;;
                        Linux|*)
                                AC_LIBOBJ(getentropy_linux)
index 34985648d4313b83759dc686ccd2890b2f565604..94b3f941120c368d96bffa600a707974027803cf 100644 (file)
@@ -1,7 +1,8 @@
 20 February 2015: Wouter
        - Use the getrandom syscall introduced in Linux 3.17 (from Heiner
          Kallweit).
-       - Portability to Solaris 10, use AF_LOCAL.
+       - Fix #645 Portability to Solaris 10, use AF_LOCAL.
+       - Fix #646 Portability to Solaris, -lrt for getentropy_solaris.
 
 19 February 2015: Wouter
        - 1.5.2 release tag.