Browse Source

build: Check and abort on required functions

Right now this includes memcpy (moved from a simple check) and lchown,
both being used unconditionally in the code.

(The TODO had lstat as a typo for lchown.)
Guillem Jover 12 years ago
parent
commit
072c025d0f
2 changed files with 3 additions and 2 deletions
  1. 0 1
      TODO
  2. 3 1
      configure.ac

+ 0 - 1
TODO

@@ -26,7 +26,6 @@ TODO
  * Build:
    - Make dpkg bootstrappable.
    - Check availability of warning flags at configure time.
-   - Handle missing lstat at configure time by erroring out.
 
  * Code cleanup / bug fixes:
    - Get rid of static variables inside functions.

+ 3 - 1
configure.ac

@@ -89,7 +89,9 @@ DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
                          strnlen strerror strsignal asprintf \
                          scandir alphasort unsetenv])
 AC_CHECK_DECLS([strnlen], [[#include <string.h>]])
-AC_CHECK_FUNCS([strtoul strtoimax isascii memcpy setsid getdtablesize \
+AC_CHECK_FUNCS([memcpy lchown],
+               [], [AC_ERROR([missing required function])])
+AC_CHECK_FUNCS([strtoul strtoimax isascii setsid getdtablesize \
                 getprogname getexecname lutimes posix_fadvise])
 
 DPKG_MMAP