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