configure.ac revision 1.5
1#	$NetBSD: configure.ac,v 1.5 2002/01/24 04:05:28 lukem Exp $
2#
3# Autoconf definition file for libnbcompat.
4#
5
6AC_INIT([libnbcompat], [noversion], [lib-bug-people@netbsd.org])
7AC_CONFIG_HEADERS(config.h)
8AC_CONFIG_FILES(defs.mk)
9
10AC_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.
15AC_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.
22AC_CHECK_HEADERS(err.h inttypes.h libgen.h stddef.h vis.h)
23
24# Typedefs.
25AC_TYPE_SIZE_T
26AC_CHECK_TYPES(id_t)
27
28# Struct members.
29AC_CHECK_MEMBERS(struct stat.st_flags,,, [#include <sys/stat.h>])
30
31# Global variable decls.
32AC_CHECK_DECLS(sys_signame,,, [#include <signal.h>])
33
34# Library functions (where a .h check isn't enough).
35AC_SEARCH_LIBS(fparseln, util)
36AC_CHECK_FUNCS(basename dirname fgetln flock fparseln futimes \
37	pread pwcache_userdb pwrite setprogname strlcat strlcpy)
38
39# regcomp() and regexec() are also names of functions in the old V8
40# regexp package.  To avoid them, we need to find out who has regfree().
41
42dnl # Cygwin: We *MUST* look at -lregex *before* the "no libs" condition.
43dnl # Thus AC_CHECK_LIB(regex...) comes first, and AC_SEARCHLIBS next.
44AC_CHECK_LIB(regex, regfree)
45AC_SEARCH_LIBS(regfree, rx posix)
46
47AC_OUTPUT
48