summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cvs/configure.in
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>2001-02-10 19:31:37 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>2001-02-10 19:31:37 +0000
commit660a9e91edc56a0125f26045a71659394f9695dd (patch)
treec483455379f9b1936a06ce02be447bf0f069796f /gnu/usr.bin/cvs/configure.in
parent401a4da8c9d8080c2f81ea0e35cc9e72d12b0382 (diff)
Integrate local changes
Diffstat (limited to 'gnu/usr.bin/cvs/configure.in')
-rw-r--r--gnu/usr.bin/cvs/configure.in125
1 files changed, 39 insertions, 86 deletions
diff --git a/gnu/usr.bin/cvs/configure.in b/gnu/usr.bin/cvs/configure.in
index 83ecf1033e2..a3ec8e566ef 100644
--- a/gnu/usr.bin/cvs/configure.in
+++ b/gnu/usr.bin/cvs/configure.in
@@ -1,42 +1,15 @@
dnl configure.in for cvs
AC_INIT(src/cvs.h)
-dnl
-AC_PREREQ(2.4)dnl Required Autoconf version.
-dnl Do not use autoconf 2.12; it produces a configure script which produces
-dnl a "internal 2K buffer" error on HPUX when run with /bin/sh.
-dnl autoconf 2.10 seems like a good choice.
-dnl
-dnl It is possible that we should just change the above required version
-dnl to 2.10; it seems like everyone is using 2.10 anyway, and there is
-dnl at least some sentiment that we should be using a version which has
-dnl --bindir (and correspondingly, using @bindir@ and friends in our
-dnl Makefile.in files. Rumor has it that autoconf 2.7
-dnl introduced --bindir but the point is that 2.10 has it.
+AC_PREREQ(2.13)
+AC_PREFIX_PROGRAM(cvs)
AC_CONFIG_HEADER(config.h src/options.h)
+AC_PROG_AWK
AC_PROG_CC
-
-AC_AIX
-AC_MINIX
-AC_ISC_POSIX
-if test "$ISC" = yes; then
-CFLAGS="$CFLAGS -D_SYSV3"
-LIBS="-lcrypt $LIBS"
-fi
-
-AC_PREFIX_PROGRAM(cvs)
-
-dnl FIXME: AC_C_CROSS is considered obsolete by autoconf 2.12, and is
-dnl pretty ugly to start with. But it isn't obvious to me how we should
-dnl be handling the uses of cross_compiling below.
-AC_C_CROSS
-
-AC_C_CONST
-
AC_PROG_INSTALL
+AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_YACC
-AC_PROG_MAKE_SET
AC_PATH_PROG(perl_path, perl, no)
AC_PATH_PROG(csh_path, csh, no)
@@ -48,23 +21,35 @@ if test X"$ac_cv_sys_interpreter" != X"yes" ; then
AC_MSG_WARN($ac_msg)
fi
+AC_AIX
+AC_MINIX
+AC_ISC_POSIX
+if test "$ISC" = yes; then
+CFLAGS="$CFLAGS -D_SYSV3"
+LIBS="-lcrypt $LIBS"
+fi
+
+AC_HEADER_DIRENT
AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
limits.h sys/file.h \
sys/param.h sys/select.h sys/time.h sys/timeb.h \
io.h direct.h sys/bsdtypes.h sys/resource.h)
-AC_HEADER_SYS_WAIT
AC_HEADER_STAT
AC_HEADER_TIME
-AC_HEADER_DIRENT
-AC_TYPE_SIGNAL
+
+AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_MODE_T
-AC_TYPE_SIZE_T
AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SIGNAL
+
AC_STRUCT_ST_BLKSIZE
+AC_STRUCT_ST_RDEV
AC_REPLACE_FUNCS(mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul)
-AC_CHECK_FUNCS(fchmod fsync ftime mktemp putenv vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock tempnam tzset readlink wait3)
+AC_CHECK_FUNCS(fchmod fsync ftime mktemp putenv vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock tempnam tzset readlink wait3 mknod getpassphrase)
dnl
dnl The CVS coding standard (as specified in HACKING) is that if it exists
@@ -75,6 +60,12 @@ AC_DEFINE(HAVE_STRCHR)
AC_DEFINE(HAVE_MEMCHR)
dnl
+dnl Force lib/regex.c to use malloc instead of messing around with alloca
+dnl and define the old re_comp routines that we use.
+dnl
+AC_DEFINE(REGEX_MALLOC)
+AC_DEFINE(_REGEX_RE_COMP)
+dnl
dnl AC_FUNC_VFORK is rather baroque. It seems to be rather more picky
dnl than, say, the Single Unix Specification (version 2), which simplifies
dnl a lot of cases by saying that the child process can't set any variables
@@ -96,8 +87,7 @@ dnl
dnl We used to try to determine whether shadow passwords were actually in
dnl use or not, but the code has been changed to work right reguardless,
dnl so we can go back to a simple check.
-AC_CHECK_LIB(sec, getspnam)
-AC_CHECK_FUNCS(getspnam)
+AC_SEARCH_LIBS(getspnam, sec gen, AC_DEFINE(HAVE_GETSPNAM))
dnl
dnl Check for a system libz.
@@ -128,53 +118,16 @@ dnl AC_CHECK_FUNC(re_exec, :, LIBOBJS="$LIBOBJS regex.o")
AC_FUNC_UTIME_NULL
AC_SYS_LONG_FILE_NAMES
-AC_MSG_CHECKING([for working fnmatch function])
-AC_CACHE_VAL(ccvs_cv_sys_working_fnmatch,
-[AC_TRY_RUN([
-#include <fnmatch.h>
-int
-main ()
-{
- exit ((fnmatch ("a", "a", FNM_PATHNAME) == 0
- && fnmatch ("a", "b", FNM_PATHNAME) == FNM_NOMATCH)
- ? 0 : 1);
-}],
-ccvs_cv_sys_working_fnmatch=yes,
-ccvs_cv_sys_working_fnmatch=no,
-ccvs_cv_sys_working_fnmatch=no)])
-if test $ccvs_cv_sys_working_fnmatch = no; then
+AC_FUNC_FNMATCH
+if test "$ac_cv_func_fnmatch_works" = no; then
LIBOBJS="$LIBOBJS fnmatch.o"
fi
-AC_MSG_RESULT($ccvs_cv_sys_working_fnmatch)
-
-# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
-# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
-# libsocket.so which has a bad implementation of gethostbyname (it
-# only looks in /etc/hosts), so we only look for -lsocket if we need
-# it.
-AC_CHECK_FUNC(connect, :,
-[case "$LIBS" in
-*-lnsl*) ;;
-*) AC_CHECK_LIB(nsl_s, printf) ;;
-esac
-case "$LIBS" in
-*-lnsl*) ;;
-*) AC_CHECK_LIB(nsl, printf) ;;
-esac
-case "$LIBS" in
-*-lsocket*) ;;
-*) AC_CHECK_LIB(socket, connect) ;;
-esac
-case "$LIBS" in
-*-linet*) ;;
-*) AC_CHECK_LIB(inet, connect) ;;
-esac
-dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
-dnl has been cached.
-if test "$ac_cv_lib_socket_connect" = "yes" || test "$ac_cv_lib_inet_connect" = "yes"; then
- ac_cv_func_connect=yes
- AC_DEFINE(HAVE_CONNECT)
-fi])
+
+# Try to find connect and gethostbyname.
+AC_CHECK_LIB(nsl, main,
+ AC_SEARCH_LIBS(connect, xnet socket inet, AC_DEFINE(HAVE_CONNECT),, -lnsl),
+ AC_SEARCH_LIBS(connect, xnet socket inet, AC_DEFINE(HAVE_CONNECT)))
+AC_SEARCH_LIBS(gethostbyname, netinet nsl)
dnl
dnl set $(KRB4) from --with-krb4=value -- WITH_KRB4
@@ -322,7 +275,7 @@ AC_ARG_ENABLE(client,
[if test "$enable_client" = yes; then
AC_DEFINE(CLIENT_SUPPORT)
fi],
-[if test "$ac_cv_func_connect" = yes; then
+[if test "$ac_cv_search_connect" != no; then
AC_DEFINE(CLIENT_SUPPORT)
fi])
AC_ARG_ENABLE(server,
@@ -331,7 +284,7 @@ AC_ARG_ENABLE(server,
[if test "$enable_server" = yes; then
AC_DEFINE(SERVER_SUPPORT)
fi],
-[if test "$ac_cv_func_connect" = yes; then
+[if test "$ac_cv_search_connect" != no; then
AC_DEFINE(SERVER_SUPPORT)
enable_server=yes
fi])
@@ -366,7 +319,7 @@ dnl For the moment we will assume that all systems which have
dnl the unixyness to run configure are unixy enough to do the
dnl PreservePermissions stuff. I have this sinking feeling that
dnl things won't be that simple, before long.
-AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT)
+dnl AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT)
dnl On cygwin32, we configure like a Unix system, but we use the
dnl Windows support code in lib/fncase.c to handle the case