summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac18
1 files changed, 15 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 620a85c..c2a4411 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,9 +33,21 @@ AC_PROG_CC()
AM_PROG_CC_C_O()
test -d "${srcdir}/.git" || CFLAGS="${save_CFLAGS}"
-AC_SEARCH_LIBS([log10], [m], [], AC_MSG_ERROR([missing log10]))
-AC_SEARCH_LIBS([ceil], [m], [], AC_MSG_ERROR([missing ceil]))
-AC_SEARCH_LIBS([lrint], [m], [], AC_MSG_ERROR([missing lrint]))
+funcs_missing=false
+AC_CHECK_FUNCS(
+ [\
+ fclose feof ferror fopen fprintf fputs fread free fwrite \
+ localtime malloc memcmp memcpy memset printf puts snprintf \
+ sprintf strcmp strftime strlen strncpy strtol
+ ],
+ [],
+ [funcs_missing=true])
+for func in log10 ceil lrint; do
+ AC_SEARCH_LIBS([${func}], [m], [], [funcs_missing=true])
+done
+if ${funcs_missing}; then
+ AC_MSG_ERROR([required functions are missing])
+fi
PKG_PROG_PKG_CONFIG()
PKG_CHECK_MODULES([ZLIB], [zlib])