configure.ac revision 1.8
1# $NetBSD: configure.ac,v 1.8 2007/10/14 20:25:35 apb Exp $ 2# 3# Autoconf definition file for make. 4# 5# When you edit configure.ac: 6# 0. Create the tools version of autoconf: 7# cd ${SRCDIR} && build.sh -V MKMAINTAINERTOOLS=yes tools 8# (This might not work if you try it after editing configure.ac.) 9# 1. edit configure.ac 10# 2. Regenerate "configure" from "configure.ac": 11# cd ${SRCDIR}/tools/make && \ 12# ${TOOLDIR}/bin/nbmake-${MACHINE} -f Makefile.regen 13# (Please don't use a non-tools version of autoconf). 14# 3. Test that nbmake still builds 15# mv ${TOOLDIR}/nbmake ${TOOLDIR}/bin/nbmake.bak 16# cd ${SRCDIR} && build.sh makewrapper 17# 4. cvs commit files that you edited. 18# 5. Regen again, to pick up changed RCS IDs from the above commit: 19# cd ${SRCDIR}/tools/make && \ 20# ${TOOLDIR}/bin/nbmake-${MACHINE} -f Makefile.regen 21# 6. cvs commit files that were generated. 22# 23# 24 25AC_INIT([make], [noversion], [bin-bug-people@NetBSD.org]) 26AC_CONFIG_FILES(buildmake.sh) 27 28AC_PATH_PROG(BSHELL, sh) 29if test x"$BSHELL" = x; then 30 AC_MSG_ERROR([sh must be somewhere on \$PATH]) 31fi 32# Make wants to get the directory name and the basename 33# for the default shell in two separate variables. 34nb_path_defshelldir="${BSHELL%/*}" 35nb_basename_defshell="${BSHELL##*/}" 36AC_DEFINE_UNQUOTED(_PATH_DEFSHELLDIR, "$nb_path_defshelldir") 37AC_DEFINE_UNQUOTED(_BASENAME_DEFSHELL, "$nb_basename_defshell") 38 39# Make sure we have POSIX regex ability. 40AC_CHECK_HEADER(regex.h,, AC_MSG_ERROR([POSIX regex.h is required])) 41 42# If we don't have <poll.h>, we need to use select(2). 43AC_CHECK_HEADER(poll.h,, AC_DEFINE(USE_SELECT)) 44 45# regcomp() and regexec() are also names of functions in the old V8 46# regexp package. To avoid them, we need to find out who has regfree(). 47 48dnl # Cygwin: We *MUST* look at -lregex *before* the "no libs" condition. 49dnl # Thus AC_CHECK_LIB(regex...) comes first, and AC_SEARCHLIBS next. 50AC_CHECK_LIB(regex, regfree) 51AC_SEARCH_LIBS(regfree, rx posix) 52 53AC_CHECK_FUNCS(setenv strdup strerror strftime vsnprintf) 54 55AC_OUTPUT 56