configure.ac revision 1.4 1 # $NetBSD: configure.ac,v 1.4 2002/01/21 20:04:36 tv Exp $
2 #
3 # Autoconf definition file for libnbcompat.
4 #
5
6 AC_INIT([libnbcompat], [noversion], [lib-bug-people (a] netbsd.org])
7 AC_CONFIG_HEADERS(config.h)
8 AC_CONFIG_FILES(defs.mk)
9
10 AC_C_BIGENDIAN
11
12 # Make sure certain required headers are available.
13 # These are not necessarily required by the code, but they are not
14 # currently conditionalized.
15 AC_CHECK_HEADERS(sys/cdefs.h sys/mman.h sys/param.h sys/stat.h \
16 sys/types.h sys/utsname.h sys/wait.h \
17 ctype.h errno.h fcntl.h grp.h limits.h locale.h paths.h pwd.h \
18 signal.h stdio.h stdlib.h string.h unistd.h,,
19 AC_MSG_ERROR([standard system header file not found]))
20
21 # Find headers that may not be available.
22 AC_CHECK_HEADERS(err.h inttypes.h libgen.h stddef.h vis.h)
23
24 # Typedefs.
25 AC_TYPE_SIZE_T
26 AC_CHECK_TYPES(id_t)
27
28 # Struct members.
29 AC_CHECK_MEMBERS(struct stat.st_flags,,, [#include <sys/stat.h>])
30
31 # Global variable decls.
32 AC_CHECK_DECLS(sys_signame,,, [#include <signal.h>])
33
34 # Library functions (where a .h check isn't enough).
35 AC_SEARCH_LIBS(fparseln, util)
36 AC_CHECK_FUNCS(basename dirname fgetln flock fparseln futimes pread pwrite setprogname strlcat strlcpy)
37
38 # regcomp() and regexec() are also names of functions in the old V8
39 # regexp package. To avoid them, we need to find out who has regfree().
40
41 dnl # Cygwin: We *MUST* look at -lregex *before* the "no libs" condition.
42 dnl # Thus AC_CHECK_LIB(regex...) comes first, and AC_SEARCHLIBS next.
43 AC_CHECK_LIB(regex, regfree)
44 AC_SEARCH_LIBS(regfree, rx posix)
45
46 AC_OUTPUT
47