summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac36
1 files changed, 32 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index fea89da..77d9c6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,10 +43,11 @@ test -d "${srcdir}/.git" || CFLAGS="${save_CFLAGS}"
funcs_missing=false
AC_CHECK_FUNCS(
[\
- fclose feof ferror fopen fprintf fputs fread free fscanf fseek \
- fwrite getgrgid getpwuid localtime lstat malloc memcmp memcpy \
- memset mkdir printf puts readlink scandir snprintf sprintf \
- stat strchr strcmp strcpy strftime strlen strncpy strtol unlink
+ calloc execve fclose fdopen feof ferror fopen fprintf fputs \
+ fread free fscanf fseek fwrite getgrgid getpwuid localtime \
+ lstat malloc memcmp memcpy memset mkdir mkfifo open printf \
+ puts readlink rename scandir sleep snprintf sprintf stat \
+ strchr strcmp strcpy strftime strlen strncpy strtol unlink
],
[],
[funcs_missing=true])
@@ -65,6 +66,33 @@ AC_CHECK_DECLS([[major(dev_t)], [minor(dev_t)]], [],
PKG_PROG_PKG_CONFIG()
PKG_CHECK_MODULES([ZLIB], [zlib])
+AC_ARG_WITH(
+ [mknod],
+ [AS_HELP_STRING([--with-mknod=PATH], [mknod utility])],
+ [
+ case "${withval}" in
+ 'yes'|'')
+ AC_MSG_ERROR(
+ [--with-mknod requires an argument])
+ ;;
+ 'no')
+ AC_MSG_ERROR([mknod is required])
+ ;;
+ *)
+ MKNOD="${withval}"
+ ;;
+ esac
+ ],
+ [
+ AC_PATH_PROG([MKNOD], [mknod])
+ if test -z "${MKNOD}"; then
+ AC_MSG_ERROR([mknod not found])
+ fi
+ ]
+)
+AC_DEFINE_UNQUOTED([MKNOD], ["${MKNOD}"],
+ [Define to the path to the mknod utility.])
+
AX_CFLAGS_WARN_ALL() dnl Adds -Wall or equivalent
AX_CHECK_COMPILE_FLAG([-Wpedantic], [AX_APPEND_FLAG([-Wpedantic])])
AX_CHECK_COMPILE_FLAG([-Wextra], [AX_APPEND_FLAG([-Wextra])])