diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-06-26 09:44:14 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-06-26 11:41:18 (EDT) |
commit | 2622c8a1e2c1cabfd0f0c6f504325b9ae21672fa (patch) | |
tree | c103eeabd4d1f67b8c4a4fb47481716c0f6c3e49 | |
parent | a032bc56cce59b685eb1f53d9cf997c85cf8f931 (diff) |
build: Check for mknod funcs, prog
calloc(), execve(), fdopen(), mkfifo(), open(), rename(), sleep(), and
mknod
-rw-r--r-- | configure.ac | 36 |
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])]) |