From f12dcd37e062f752e7a61569569b05956a37360d Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 27 Mar 2021 17:41:08 -0400 Subject: build: Consolidate math function checks --- diff --git a/configure.ac b/configure.ac index 379847e..85612be 100644 --- a/configure.ac +++ b/configure.ac @@ -47,24 +47,11 @@ AC_CHECK_FUNCS( if ${funcs_missing}; then AC_MSG_ERROR([required functions are missing]) fi -AC_SEARCH_LIBS([atan2], [m], [], [ - AC_MSG_ERROR([required functions are missing]) -]) -AC_SEARCH_LIBS([ceil], [m], [], [ - AC_MSG_ERROR([required functions are missing]) -]) -AC_SEARCH_LIBS([cos], [m], [], [ - AC_MSG_ERROR([required functions are missing]) -]) -AC_SEARCH_LIBS([floor], [m], [], [ - AC_MSG_ERROR([required functions are missing]) -]) -AC_SEARCH_LIBS([fmod], [m], [], [ - AC_MSG_ERROR([required functions are missing]) -]) -AC_SEARCH_LIBS([sin], [m], [], [ - AC_MSG_ERROR([required functions are missing]) -]) +for func in atan2 ceil cos floor fmod sin; do + AC_SEARCH_LIBS([${func}], [m], [], [ + AC_MSG_ERROR([required functions are missing]) + ]) +done AX_CFLAGS_WARN_ALL() dnl Adds -Wall or equivalent AX_CHECK_COMPILE_FLAG([-Wpedantic], [AX_APPEND_FLAG([-Wpedantic])]) -- cgit v0.9.1