configure.ac revision 1.7 1 1.7 apb # $NetBSD: configure.ac,v 1.7 2006/10/09 20:51:05 apb Exp $
2 1.1 tv #
3 1.1 tv # Autoconf definition file for make.
4 1.1 tv #
5 1.1 tv
6 1.6 salo AC_INIT([make], [noversion], [bin-bug-people (a] NetBSD.org])
7 1.1 tv AC_CONFIG_FILES(buildmake.sh)
8 1.3 bjh21
9 1.3 bjh21 AC_PATH_PROG(BSHELL, sh)
10 1.3 bjh21 if test x"$BSHELL" = x; then
11 1.3 bjh21 AC_MSG_ERROR([sh must be somewhere on \$PATH])
12 1.3 bjh21 fi
13 1.7 apb # Make wants to get the directory name and the basename
14 1.7 apb # for the default shell in two separate variables.
15 1.7 apb nb_path_defshelldir="${BSHELL%/*}"
16 1.7 apb nb_basename_defshell="${BSHELL##*/}"
17 1.3 bjh21 AC_DEFINE_UNQUOTED(_PATH_DEFSHELLDIR, "$nb_path_defshelldir")
18 1.7 apb AC_DEFINE_UNQUOTED(_BASENAME_DEFSHELL, "$nb_basename_defshell")
19 1.1 tv
20 1.1 tv # Make sure we have POSIX regex ability.
21 1.1 tv AC_CHECK_HEADER(regex.h,, AC_MSG_ERROR([POSIX regex.h is required]))
22 1.5 thorpej
23 1.5 thorpej # If we don't have <poll.h>, we need to use select(2).
24 1.5 thorpej AC_CHECK_HEADER(poll.h,, AC_DEFINE(USE_SELECT))
25 1.1 tv
26 1.1 tv # regcomp() and regexec() are also names of functions in the old V8
27 1.1 tv # regexp package. To avoid them, we need to find out who has regfree().
28 1.1 tv
29 1.1 tv dnl # Cygwin: We *MUST* look at -lregex *before* the "no libs" condition.
30 1.1 tv dnl # Thus AC_CHECK_LIB(regex...) comes first, and AC_SEARCHLIBS next.
31 1.1 tv AC_CHECK_LIB(regex, regfree)
32 1.1 tv AC_SEARCH_LIBS(regfree, rx posix)
33 1.2 tv
34 1.2 tv AC_CHECK_FUNCS(setenv strdup strerror strftime vsnprintf)
35 1.1 tv
36 1.1 tv AC_OUTPUT
37