summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2021-03-27 17:41:08 (EDT)
committer P. J. McDermott <pj@pehjota.net>2021-03-27 17:41:08 (EDT)
commitf12dcd37e062f752e7a61569569b05956a37360d (patch)
tree12a38a43b6722e4a537f52fcf94dbbb35ee2cdac
parent7e4c259bc4f5e1467bcce3d592849aba3a9db2e6 (diff)
downloaddodge-balls-f12dcd37e062f752e7a61569569b05956a37360d.zip
dodge-balls-f12dcd37e062f752e7a61569569b05956a37360d.tar.gz
dodge-balls-f12dcd37e062f752e7a61569569b05956a37360d.tar.bz2
build: Consolidate math function checks
-rw-r--r--configure.ac23
1 files changed, 5 insertions, 18 deletions
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])])