$OpenBSD: patch-configure_d_config_os_libs2,v 1.5 2020/02/22 22:45:59 sthen Exp $

From d63e35a3a384c9f917bc4ab117d9239af2f01fc4 Mon Sep 17 00:00:00 2001
From: Bart Van Assche <bvanassche@acm.org>
Date: Fri, 21 Feb 2020 19:42:11 -0800
Subject: [PATCH] configure: Add -lm to LNETSNMPLIBS if ceil() exists in libm

Index: configure.d/config_os_libs2
--- configure.d/config_os_libs2.orig
+++ configure.d/config_os_libs2
@@ -589,22 +589,4 @@ AC_SUBST([LIBCURSES])
 
 #   libm for ceil
 #
-AC_MSG_CHECKING([for ceil without -lm])
-AC_LINK_IFELSE([AC_LANG_PROGRAM([
-  #include <math.h>
-], [
-  ceil((double)2.4);
-])], [
-  AC_MSG_RESULT(yes);
-  # Keep LIBS.
-  need_ceil_lib="no"
-  true
-], [
-  AC_MSG_RESULT(no)
-  need_ceil_lib="yes"
-  # Restore LIBS.
-])
-
-if test "${need_ceil_lib}" = yes; then
-  AC_SEARCH_LIBS([ceil], [m])
-fi
+NETSNMP_SEARCH_LIBS(ceil, m,,,, LNETSNMPLIBS)
