diff options
author | Explorer09 <explorer09@gmail.com> | 2017-02-17 23:17:23 +0800 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2017-02-17 16:55:33 -0500 |
commit | dbb4e94dc7bacbcfd4acef4f085ef752fe1aa03f (patch) | |
tree | 8e979274b7d5064135b49414fe9d29b3e62407c6 /configure.ac | |
parent | c7a545ae0907c81cf52139dd391659586570f60c (diff) |
build: Let configure error if missing required functions, headers..
`configure` will now error if a required header or function is not
found on the system.
Also add comments on optional functions checks.
Add sys/stats.h and sys/wait.h to list of required headers in
configure.
This fixes issue #180.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 36bf58e..0115064 100644 --- a/configure.ac +++ b/configure.ac @@ -111,7 +111,10 @@ AC_PATH_PROG([INDENT], indent, [\${top_srcdir}/build-aux/missing indent]) # checks for headers -AC_CHECK_HEADERS([inttypes.h libintl.h limits.h locale.h malloc.h netinet/in.h regex.h unistd.h]) +AC_CHECK_HEADERS([regex.h sys/stat.h sys/wait.h unistd.h], [], + [AC_MSG_ERROR(required header not found on your system)]) + +AC_CHECK_HEADERS([inttypes.h libintl.h limits.h locale.h malloc.h netinet/in.h]) # checks for libraries @@ -147,16 +150,20 @@ AC_FUNC_REALLOC AS_IF([test "$cross_compiling" = yes], AC_MSG_WARN([result $ac_cv_func_realloc_0_nonnull guessed because of cross compilation])) -AC_CHECK_FUNCS(dup2 dnl +AC_CHECK_FUNCS([dup2 dnl memset dnl -pow dnl regcomp dnl -setlocale dnl strchr dnl strdup dnl -strtol) - -AC_CHECK_FUNCS(reallocarray) +strtol dnl +], [], [AC_MSG_ERROR(required library function not found on your system)]) + +# Optional library functions +AC_CHECK_FUNCS([dnl +pow dnl Used only by "examples/manual/expr" +setlocale dnl Needed only if NLS is enabled +reallocarray dnl OpenBSD function. We have replacement if not available. +]) AC_CONFIG_FILES( Makefile |