summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/configure.in
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-10-02 06:33:59 +0000
committerpeter <peter@FreeBSD.org>2000-10-02 06:33:59 +0000
commit590c411955d6975551ffeaf41d7faf4b26f836d1 (patch)
treec2ec0b150478a3cab9fb18e60d02dedbdc1cfd15 /contrib/cvs/configure.in
parent784ea5066cbea73d04e8ce5783dd0eb842e3ac1f (diff)
downloadFreeBSD-src-590c411955d6975551ffeaf41d7faf4b26f836d1.zip
FreeBSD-src-590c411955d6975551ffeaf41d7faf4b26f836d1.tar.gz
Import cvs-1.11 onto vendor branch.
Diffstat (limited to 'contrib/cvs/configure.in')
-rw-r--r--contrib/cvs/configure.in159
1 files changed, 42 insertions, 117 deletions
diff --git a/contrib/cvs/configure.in b/contrib/cvs/configure.in
index c60e98f..cf35ccd 100644
--- a/contrib/cvs/configure.in
+++ b/contrib/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,77 +87,21 @@ 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 We always use CVS's regular expression matcher.
-dnl This is because:
-dnl (1) If memory serves, the syntax of the regular expressions
-dnl handled by re_exec is not consistent from system to system, which
-dnl is a Bad Thing because CVS passes this syntax out to the user.
-dnl We might have better luck with the POSIX interface, if we really
-dnl want to look for a system-supplied matcher.
-dnl (2) It is necessary to make _sure_ that we get a regex.h and regex.c
-dnl that match each other. In particular, rx and the CVS/emacs
-dnl regex.c have a different "struct re_pattern_buffer" and so using
-dnl the system regex.h and our regex.c, or vice versa, will tend to
-dnl cause a core dump.
-dnl (3) Just as a random data point, CVS uses re_exec (a BSD interface);
-dnl libdiff uses re_compile_pattern (a GNU interface, I think). Diff
-dnl should probably be fixed to have the caller (CVS) supply the regexp
-dnl matching.
-dnl
-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
@@ -314,7 +249,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,
@@ -323,34 +258,24 @@ 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])
-### The auth server needs to be able to check passwords against passwd
-### file entries, so we only #define AUTH_SERVER_SUPPORT if we can
-### find the crypt function.
-###
-### We used to test for crypt in libc first, and only add -lcrypt if
-### we couldn't find it, but that interacts badly with the cache
-### variables, the 'unset' command isn't portable, and I'm not sure
-### there's any harm in just testing for -lcrypt first.
+dnl The auth server needs to be able to check passwords against passwd
+dnl file entries, so we only #define AUTH_SERVER_SUPPORT if we can
+dnl find the crypt function.
if test "$enable_server" = yes; then
-AC_CHECK_LIB(crypt, crypt)
-AC_CHECK_FUNCS(crypt)
-
-if test "$ac_cv_func_crypt" = yes; then
- AC_DEFINE(AUTH_SERVER_SUPPORT)
-fi
+AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT) AC_DEFINE(AUTH_SERVER_SUPPORT))
fi # enable_server
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
OpenPOWER on IntegriCloud