summaryrefslogtreecommitdiff
path: root/devel/bmake/files/configure.in
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-05-19 21:36:43 +0000
committerjoerg <joerg@pkgsrc.org>2015-05-19 21:36:43 +0000
commit41f4d684ea949e703f7e4cdb02fffeb278231228 (patch)
tree2b7216a215b93c3db4db0c3a78c3ab11b8eaec34 /devel/bmake/files/configure.in
parent7cb16bb66575467ac59352068eaec344242b439a (diff)
downloadpkgsrc-41f4d684ea949e703f7e4cdb02fffeb278231228.tar.gz
Import bmake-20150505
Diffstat (limited to 'devel/bmake/files/configure.in')
-rw-r--r--devel/bmake/files/configure.in44
1 files changed, 36 insertions, 8 deletions
diff --git a/devel/bmake/files/configure.in b/devel/bmake/files/configure.in
index 212e7058506..65197e76db4 100644
--- a/devel/bmake/files/configure.in
+++ b/devel/bmake/files/configure.in
@@ -1,11 +1,18 @@
dnl
dnl RCSid:
-dnl $Id: configure.in,v 1.1.1.6 2011/06/18 22:17:53 bsiegert Exp $
+dnl $Id: configure.in,v 1.1.1.7 2015/05/19 21:36:43 joerg Exp $
dnl
dnl Process this file with autoconf to produce a configure script
dnl
-AC_INIT([bmake], [2010505], [sjg@NetBSD.org])
-AC_CONFIG_HEADER(config.h)
+AC_PREREQ(2.50)
+AC_INIT([bmake], [20140214], [sjg@NetBSD.org])
+AC_CONFIG_HEADERS(config.h)
+
+dnl make srcdir absolute
+case "$srcdir" in
+/*) ;;
+*) srcdir=`cd $srcdir && pwd`;;
+esac
dnl
AC_ARG_WITH(defshell,
@@ -39,7 +46,7 @@ AC_ARG_WITH(filemon,
esac],
[
OS=`uname -s`
-for d in "$srcdir/filemon" "$srcdir/../filemon"
+for d in "/usr/include/dev/filemon" "$prefix/include/dev/filemon" "$srcdir/filemon" "$srcdir/../filemon" "$srcdir/../../sys/dev/filemon"
do
for x in "/$OS" ""
do
@@ -71,7 +78,20 @@ AC_PROG_GCC_TRADITIONAL
AC_PROG_INSTALL
dnl Executable suffix - normally empty; .exe on os2.
AC_SUBST(ac_exe_suffix)dnl
-
+dnl
+dnl Hurd refuses to define PATH_MAX or MAXPATHLEN
+if test -x /usr/bin/getconf; then
+ bmake_path_max=`getconf PATH_MAX / 2> /dev/null`
+ # only a numeric response is useful
+ test ${bmake_path_max:-0} -gt 0 2> /dev/null || bmake_path_max=
+fi
+bmake_path_max=${bmake_path_max:-1024}
+if test $bmake_path_max -gt 1024; then
+ # this is all we expect
+ bmake_path_max=1024
+fi
+echo "Using: BMAKE_PATH_MAX=$bmake_path_max" >&6
+AC_SUBST(bmake_path_max)dnl
dnl
dnl AC_C_CROSS
dnl
@@ -92,6 +112,7 @@ AC_CHECK_HEADERS( \
sys/mman.h \
sys/select.h \
sys/socket.h \
+ sys/sysctl.h \
sys/time.h \
sys/uio.h \
unistd.h \
@@ -143,6 +164,8 @@ AC_CHECK_FUNCS( \
putenv \
select \
setenv \
+ setpgid \
+ setsid \
sigaction \
sigvec \
snprintf \
@@ -151,6 +174,7 @@ AC_CHECK_FUNCS( \
strsep \
strtod \
strtol \
+ sysctl \
unsetenv \
vsnprintf \
wait3 \
@@ -162,7 +186,6 @@ AC_CHECK_FUNCS( \
dnl functions which we may need to provide
AC_REPLACE_FUNCS( \
- getenv \
realpath \
dirname \
stresep \
@@ -182,6 +205,11 @@ dnl
AC_HEADER_STAT
AC_STRUCT_ST_RDEV
dnl
+echo "checking if compiler supports __func__" >&6
+AC_LANG(C)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[[const char *func = __func__;]])],,
+ AC_DEFINE(__func__, __FUNCTION__, C99 function name))
+dnl
dnl we want this for unit-tests/Makefile
echo $ECHO_N "checking if diff -u works... $ECHO_C" >&6
if diff -u /dev/null /dev/null > /dev/null 2>&1; then
@@ -347,13 +375,13 @@ AC_SUBST(GCC)
AC_SUBST(diff_u)
AC_SUBST(use_meta)
AC_SUBST(filemon_h)
-AC_OUTPUT(Makefile make-bootstrap.sh unit-tests/Makefile)
+AC_OUTPUT(makefile Makefile.config make-bootstrap.sh unit-tests/Makefile)
cat <<EOF
You can now run
- ./make-bootstrap.sh
+ sh ./make-bootstrap.sh
to produce a fully functional bmake.