summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/configure.in
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-12-02 03:13:37 +0000
committerpeter <peter@FreeBSD.org>2002-12-02 03:13:37 +0000
commit3dc96f7243ece1d1f7f87b03334f840415e0db63 (patch)
tree15f00bd8ebd718713d8c0a8707ebebfced99c550 /contrib/cvs/configure.in
parentcf46dfb750863d760d19b9858b0a336b158275da (diff)
downloadFreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.zip
FreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.tar.gz
Import cvs-1.11.2.1 as of 2002/12/01 onto vendor branch. This fixes all
of the bugs that I know of. We've been running a slightly older version of this on freefall/repoman, where it was afflicted by a silly merge error on my part (fixed). Approved by: re
Diffstat (limited to 'contrib/cvs/configure.in')
-rw-r--r--contrib/cvs/configure.in639
1 files changed, 531 insertions, 108 deletions
diff --git a/contrib/cvs/configure.in b/contrib/cvs/configure.in
index fe78c7a..901d71d 100644
--- a/contrib/cvs/configure.in
+++ b/contrib/cvs/configure.in
@@ -1,9 +1,11 @@
dnl configure.in for cvs
-AC_INIT(src/cvs.h)
-AM_INIT_AUTOMAKE(cvs, 1.11.2)
-AC_PREREQ(2.13)
+AC_INIT([Concurrent Versions System (CVS)],[1.11.2.1],[bug-cvs@gnu.org],[cvs])
+AC_CONFIG_SRCDIR(src/cvs.h)
+AM_INIT_AUTOMAKE([gnu 1.5 dist-bzip2 no-define])
+AC_PREREQ(2.53)
+
AC_PREFIX_PROGRAM(cvs)
-AM_CONFIG_HEADER(config.h src/options.h)
+AM_CONFIG_HEADER(config.h)
AC_PROG_CC
AM_PROG_CC_C_O
@@ -15,11 +17,52 @@ dnl These are here instead of later because they want to be called before
dnl anything that calls a C compiler.
AC_AIX
AC_MINIX
-AC_ISC_POSIX
-if test "$ISC" = yes; then
-CFLAGS="$CFLAGS -D_SYSV3"
-LIBS="-lcrypt $LIBS"
-fi
+
+# Find the posix library needed on INTERACTIVE UNIX (ISC)
+dnl
+dnl From the Autoconf 2.53 manual (AC_ISC_POSIX):
+dnl
+dnl For INTERACTIVE UNIX (ISC), add `-lcposix' to output variable
+dnl `LIBS' if necessary for POSIX facilities. Call this after
+dnl `AC_PROG_CC' and before any other macros that use POSIX
+dnl interfaces. INTERACTIVE UNIX is no longer sold, and Sun says that
+dnl they will drop support for it on 2006-07-23, so this macro is
+dnl becoming obsolescent.
+dnl
+AC_SEARCH_LIBS([strerror], [cposix])
+
+dnl
+dnl Autoconf stopped setting $ISC sometime before 2.53
+dnl
+dnl If this is still important, someone should come up with a generic test
+dnl for whether _SYSV3 needs to be defined. Removed code below:
+dnl
+dnl if test "$ISC" = yes; then
+dnl CFLAGS="$CFLAGS -D_SYSV3"
+dnl # And I don't like this... In theory it should be found later if server is
+dnl # enabled, but maybe something on INTERACTIVE UNIX (ISC) we didn't ask to
+dnl # link with crypt tries? Anyhow, the autoconf manual says we can delete
+dnl # this ISC stuff on or after 2006-07-23 when Sun discontinues support and
+dnl # ISC becomes obsolescent, but I suppose that is probably a matter of
+dnl # opinion.
+dnl #
+dnl # N.B. The reason for doing this is that some moron decided to put a stub
+dnl # for crypt in libc that always returns NULL. Without this here, the later
+dnl # check will find the stub instead of the real thing, resulting in a server
+dnl # that can't process crypted passwords correctly.
+dnl
+dnl # again, if we have to try and reenable this for ISC, someone should come
+dnl # up with a generic test that figures out whether crypt is good or not -
+dnl # Is it always returning NULL?
+dnl LIBS="-lcrypt $LIBS"
+dnl fi
+dnl
+dnl FIXME - This has been broken for at least a few months anyhow, so I'm
+dnl removing the crypt lib define above, but the correct fix would be to
+dnl provide a CRYPT_WORKS macro or the like that gets called sometime after
+dnl the AC_SEARCH_LIBS call that normally finds crypt, and if crypt doesn't
+dnl work, the macro should be retried with LIBS="-lcrypt $LIBS" forced.
+dnl
AC_PROG_RANLIB
AC_PROG_YACC
@@ -88,6 +131,7 @@ AC_CHECK_HEADERS(\
errno.h \
direct.h \
fcntl.h \
+ fnmatch.h \
io.h \
limits.h \
memory.h \
@@ -114,10 +158,13 @@ AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SIGNAL
-AC_STRUCT_ST_BLKSIZE
-AC_STRUCT_ST_RDEV
+AC_CHECK_MEMBERS([struct stat.st_blksize])
+AC_CHECK_MEMBERS([struct stat.st_rdev])
+
AC_REPLACE_FUNCS(\
dup2 \
+ ftruncate \
+ gethostname \
memmove \
mkdir \
rename \
@@ -132,17 +179,24 @@ AC_CHECK_FUNCS(\
fchmod \
fsync \
ftime \
- ftruncate \
+ geteuid \
getgroups \
+ getopt \
getpagesize \
getpassphrase \
gettimeofday \
initgroups \
+ login \
+ logout \
mknod \
mkstemp \
mktemp \
putenv \
readlink \
+ regcomp \
+ regerror \
+ regexec \
+ regfree \
sigaction \
sigblock \
sigprocmask \
@@ -166,17 +220,21 @@ dnl The CVS coding standard (as specified in HACKING) is that if it exists
dnl in SunOS4 and ANSI, we use it. CVS itself, of course, therefore doesn't
dnl need HAVE_* defines for such functions, but diff wants them.
dnl
-AC_DEFINE(HAVE_STRCHR)
-AC_DEFINE(HAVE_MEMCHR)
+AC_DEFINE(HAVE_STRCHR, 1,
+[Define if you have strchr (always for CVS).])
+AC_DEFINE(HAVE_MEMCHR, 1,
+[Define if you have memchr (always for CVS).])
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)
+AC_DEFINE(REGEX_MALLOC, 1,
+[Define to force lib/regex.c to use malloc instead of alloca.])
+AC_DEFINE(_REGEX_RE_COMP, 1,
+[Define to force lib/regex.c to define re_comp et al.])
dnl
-dnl AC_FUNC_VFORK is rather baroque. It seems to be rather more picky
+dnl AC_FUNC_FORK([]) 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
dnl (thus avoiding problems with register allocation) or call any functions
@@ -186,9 +244,9 @@ dnl I think the only way to do redirection this way is by doing it in the
dnl parent, and then undoing it afterwards (analogous to windows-NT/run.c).
dnl That would appear to have a race condition if the user hits ^C (or
dnl some other signal) at the wrong time, as main_cleanup will try to use
-dnl stdout/stderr. So maybe we are stuck with AC_FUNC_VFORK.
+dnl stdout/stderr. So maybe we are stuck with AC_FUNC_FORK([]).
dnl
-AC_FUNC_VFORK
+AC_FUNC_FORK([])
AC_FUNC_CLOSEDIR_VOID
dnl
@@ -197,24 +255,35 @@ 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_SEARCH_LIBS(getspnam, sec gen, AC_DEFINE(HAVE_GETSPNAM))
+AC_SEARCH_LIBS(getspnam, sec gen, AC_DEFINE(HAVE_GETSPNAM, 1,
+[Define if you have the getspnam function.]))
AC_FUNC_UTIME_NULL
AC_SYS_LONG_FILE_NAMES
AC_FUNC_FNMATCH
if test "$ac_cv_func_fnmatch_works" = no; then
- LIBOBJS="$LIBOBJS fnmatch.o"
+ AC_LIBOBJ(fnmatch)
+ AC_CONFIG_LINKS(lib/fnmatch.h:lib/fnmatch.h.in)
+ AC_LIBSOURCE(fnmatch.h.in)
fi
dnl for the buffer routine replacements
AC_FUNC_MMAP
# 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)
+AC_CHECK_LIB(nsl, main)
+AC_SEARCH_LIBS(connect, xnet socket inet,
+ AC_DEFINE(HAVE_CONNECT, 1,
+[Define if you have the connect function.]))
+dnl no need to search nsl for gethostbyname here since we should have
+dnl just added libnsl above if we found it.
+AC_SEARCH_LIBS(gethostbyname, netinet)
+
+
+dnl
+dnl begin --with-*
+dnl
dnl
dnl set $(KRB4) from --with-krb4=value -- WITH_KRB4
@@ -225,11 +294,15 @@ dnl override the system -lkrb.
dnl
KRB4=/usr/kerberos
define(WITH_KRB4,[
-AC_ARG_WITH([krb4],
- [ --with-krb4=value set default \$(KRB4) from value],
- [KRB4=$withval],
+AC_ARG_WITH(
+ [krb4],
+ AC_HELP_STRING(
+ [--with-krb4],
+ [Kerberos 4 directory (default /usr/kerberos)]),
+ [KRB4=$with_krb4],
)dnl
-echo "default place for krb4 is $KRB4"
+AC_MSG_CHECKING([for KRB4 in $KRB4])
+AC_MSG_RESULT([])
AC_SUBST(KRB4)])dnl
WITH_KRB4
@@ -278,7 +351,8 @@ if test -n "$krb_h"; then
AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=])
fi
if test -n "$krb_lib"; then
- AC_DEFINE(HAVE_KERBEROS)
+ AC_DEFINE([HAVE_KERBEROS], 1,
+ [Define if you have MIT Kerberos version 4 available.])
test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
LIBS="${LIBS} -lkrb"
# Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
@@ -295,60 +369,418 @@ if test -n "$krb_h"; then
fi
AC_CHECK_FUNCS(krb_get_err_text)
+
+dnl
+dnl WITH_GSSAPI is external
+dnl
+dnl TODO - I tried to put these in alphabetical order, but ACX_WITH_GSSAPI
+dnl fails unless called after the KRB4 stuff. I don't know why.
+dnl
ACX_WITH_GSSAPI
+
+dnl
+dnl begin --with-editor
+dnl
+dnl Set the default editor to use for log messages
+dnl
+
+AC_ARG_VAR(
+ [EDITOR],
+ [The text editor CVS will use by default for log messages.])
+
+# Let the confiscator request a specific editor
+AC_ARG_WITH(
+ [editor],
+ AC_HELP_STRING(
+ [--with-editor],
+ [The default text editor CVS should use for log messages
+ (default autoselects)]), ,
+ [with_editor="vi emacs pico edit"])
+
+
+if echo $with_editor |grep ^/ >/dev/null; then
+ # If $with_editor is an absolute path, issue a warning if the executable
+ # doesn't exist or isn't usable, but then trust the user and use it
+ # regardless
+ EDITOR=$with_editor
+ AC_MSG_CHECKING([for an editor])
+ AC_MSG_RESULT([$EDITOR])
+ if ! test -f $with_editor \
+ || ! test -x $with_editor; then
+ # warn the user that they may encounter problems
+ AC_MSG_WARN([$with_editor is not a path to an executable file])
+ fi
+elif test no != "${with_editor}"; then
+ # Search for an editor
+ AC_CHECK_PROGS([EDITOR], [$with_editor])
+else
+ AC_MSG_CHECKING([for an editor])
+ AC_MSG_RESULT([no])
+fi
+
+if test -n "${EDITOR}"; then
+ dnl FIXME - Using --without-editor will probably break a compile at
+ dnl the moment, but maybe it is reasonable for someone to want to
+ dnl compile a CVS executable that refuses to run if no $EDITOR,
+ dnl $CVS_EDITOR, or -e option is specified? Making a preliminary
+ dnl design decision in this direction, subject to discussion.
+ AC_DEFINE_UNQUOTED(
+ [EDITOR_DFLT], ["$EDITOR"],
+ [The default editor to use, if one does not specify the "-e" option
+ to cvs, or does not have an EDITOR environment variable. If this
+ is not set to an absolute path to an executable, use the shell to
+ find where the editor actually is. This allows sites with
+ /usr/bin/vi or /usr/ucb/vi to work equally well (assuming that their
+ PATH is reasonable).])
+fi
+
dnl
-dnl Use --with-encryption to turn on encryption support
+dnl done finding an editor
dnl
-AC_ARG_ENABLE(encryption,
- [ --enable-encryption enable encryption support],
- [case "${enableval}" in
- yes) encryption=true ;;
- no) encryption=false ;;
- *) AC_MSG_ERROR(bad value ${enableval} for encryption option) ;;
- esac],
- [encryption=false])
-if test "$encryption" = "true"; then
- AC_DEFINE(ENCRYPTION)
+dnl end --with-editor
+dnl
+
+
+dnl
+dnl Find a temporary directory
+dnl
+AC_ARG_WITH(
+ [tmpdir],
+ AC_HELP_STRING(
+ [--with-tmpdir],
+ [The temporary directory CVS should use as a default
+ (default autoselects)]))
+
+AC_MSG_CHECKING([for temporary directory])
+if test -z "$with_tmpdir" || test yes = "$with_tmpdir"; then
+ for with_tmpdir in "$TMPDIR" "$TMP" "$TEMP" /tmp /var/tmp no; do
+ if test -d "$with_tmpdir" && test -x "$with_tmpdir" \
+ && test -w "$with_tmpdir" && test -r "$with_tmpdir"; then
+ break
+ fi
+ done
+ if test no = "$with_tmpdir"; then
+ AC_MSG_WARN([Failed to find usable temporary directory. Using '/tmp'.])
+ with_tmpdir=/tmp
+ fi
+ AC_MSG_RESULT([$with_tmpdir])
+elif ! echo "$with_tmpdir" |grep '^[[\\/]]'; then
+ AC_MSG_RESULT([$with_tmpdir])
+ AC_MSG_ERROR([--with-tmpdir requires an absolute path.])
+elif ! test -d "$with_tmpdir" || ! test -x "$with_tmpdir" \
+ || ! test -w "$with_tmpdir" || ! test -r "$with_tmpdir"; then
+ AC_MSG_RESULT([$with_tmpdir])
+ AC_MSG_WARN(
+ [User supplied temporary directory ('$with_tmpdir') does not
+ exist or lacks sufficient permissions for read/write.])
fi
-AC_CHECK_FUNC(gethostname, :, LIBOBJS="$LIBOBJS hostname.o")
+AC_DEFINE_UNQUOTED(
+ [TMPDIR_DFLT], ["$with_tmpdir"],
+ [Directory used for storing temporary files, if not overridden by
+ environment variables or the -T global option. There should be little
+ need to change this (-T is a better mechanism if you need to use a
+ different directory for temporary files).])
+
+dnl
+dnl done finding tmpdir
+dnl
+
+
+dnl
+dnl Get default umask
+dnl
+
+AC_ARG_WITH(
+ [umask],
+ AC_HELP_STRING(
+ [--with-umask],
+ [Set the umask CVS will use by default in the repository (default 002)]))
+
+if test -z "$with_umask" || test yes = "$with_umask"; then
+ with_umask=002
+elif test no = "$with_umask"; then
+ with_umask=000
+fi
+
+AC_DEFINE_UNQUOTED(
+ [UMASK_DFLT], [$with_umask],
+ [The default umask to use when creating or otherwise setting file or
+ directory permissions in the repository. Must be a value in the
+ range of 0 through 0777. For example, a value of 002 allows group
+ rwx access and world rx access; a value of 007 allows group rwx
+ access but no world access. This value is overridden by the value
+ of the CVSUMASK environment variable, which is interpreted as an
+ octal number.])
+
+dnl
+dnl Done setting default umask
+dnl
+
+
+dnl
+dnl end --with-*
+dnl
+
+
+dnl
+dnl begin --enables
+dnl
+
# Check for options requesting client and server feature. If none are
# given and we have connect(), we want the full client & server arrangement.
-AC_ARG_ENABLE(client,
-[ --enable-client include code for running as a remote client (default)
- --disable-client don't include remote client code],
-[if test "$enable_client" = yes; then
- AC_DEFINE(CLIENT_SUPPORT)
-fi],
-[if test "$ac_cv_search_connect" != no; then
- AC_DEFINE(CLIENT_SUPPORT)
-fi])
-AC_ARG_ENABLE(server,
-[ --enable-server include code for running as a server (default)
- --disable-server don't include server code],
-[if test "$enable_server" = yes; then
- AC_DEFINE(SERVER_SUPPORT)
-fi],
-[if test "$ac_cv_search_connect" != no; then
- AC_DEFINE(SERVER_SUPPORT)
- enable_server=yes
-fi])
-
-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_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT) AC_DEFINE(AUTH_SERVER_SUPPORT))
+AC_ARG_ENABLE(
+ [client],
+ AC_HELP_STRING(
+ [--enable-client],
+ [Include code for running as a remote client (default)]), ,
+ [if test "$ac_cv_search_connect" != no; then
+ enable_client=yes
+ fi])
+if test no != "$enable_client"; then
+ AC_DEFINE(
+ [CLIENT_SUPPORT], [1],
+ [Define if you want CVS to be able to be a remote repository client.])
+fi
+
+AC_ARG_ENABLE(
+ [password-authenticated-client],
+ AC_HELP_STRING(
+ [--enable-password-authenticated-client],
+ [Enable pserver as a remote access method in the CVS client
+ (default)]))
+
+if test no != "$enable_password_authenticated_client"; then
+ if test no != "$enable_client"; then
+ AC_DEFINE(
+ [AUTH_CLIENT_SUPPORT], [1],
+ [Enable AUTH_CLIENT_SUPPORT to enable pserver as a remote access
+ method in the CVS client (default)])
+ else
+ AC_MSG_WARN(
+ [--enable-password-authenticated-server is meaningless with
+ the CVS client disabled (--disable-client)])
+ fi
+fi
+
+
+dnl
+dnl Give the confiscator control over whether the server code is compiled
+dnl
+AC_ARG_ENABLE(
+ [server],
+ AC_HELP_STRING(
+ [--enable-server],
+ [Include code for running as a server (default)]), ,
+ [if test "$ac_cv_search_connect" != no; then
+ enable_server=yes
+ fi])
+
+if test no != "$enable_server"; then
+ AC_DEFINE(
+ [SERVER_SUPPORT], [1],
+ [Define if you want CVS to be able to serve repositories to remote
+ clients.])
+
+ dnl
+ 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.
+ dnl
+ AC_SEARCH_LIBS(
+ [crypt], [crypt],
+ [AC_DEFINE(
+ [HAVE_CRYPT], [1],
+ [Define if you have the crypt function.])
+ AC_DEFINE(
+ [AUTH_SERVER_SUPPORT], [1],
+ [Define if you want to use the password authenticated server.])dnl
+ ])dnl AC_SEARCH_LIBS
+
+ dnl
+ dnl Allow the configurer to enable server flowcontrol. Read the help
+ dnl strings below for a full explanation.
+ dnl
+ AC_ARG_ENABLE(
+ [server-flow-control],
+ AC_HELP_STRING(
+ [--enable-server-flow-control],
+ [If you are working with a large remote repository and a 'cvs
+ checkout' is swamping your network and memory, define these to
+ enable flow control. You may optionally pass a low water mark
+ in bytes and a high water mark in bytes, separated by commas.
+ (default is enabled 1M,2M)]),
+ [if test yes = $enable_server_flow_control; then
+ enable_server_flow_control=1M,2M
+ fi],
+ [enable_server_flow_control=1M,2M])
+ if test no != $enable_server_flow_control; then
+ ccvs_lwm=`expr "$enable_server_flow_control" : '\(.*\),'`
+ ccvs_hwm=`expr "$enable_server_flow_control" : '.*,\(.*\)'`
+ ccvs_lwm_E=`expr "$ccvs_lwm" : '[[0-9]][[0-9]]*\(.*\)'`
+ ccvs_lwm=`expr "$ccvs_lwm" : '\([[0-9]][[0-9]]*\)'`
+ test "" != "$ccvs_lwm" || ccvs_lwm_E="?"
+ case $ccvs_lwm_E in
+ G) ccvs_lwm="$ccvs_lwm * 1024 * 1024 * 1024";;
+ M) ccvs_lwm="$ccvs_lwm * 1024 * 1024";;
+ k) ccvs_lwm="$ccvs_lwm * 1024";;
+ b | '') ;;
+ *) AC_MSG_ERROR([Can't parse argument to --enable-server-flow-control
+ ('$enable_server_flow_control') as <lwm>,<hwm>])
+ esac
+ ccvs_hwm_E=`expr "$ccvs_hwm" : '[[0-9]][[0-9]]*\(.*\)'`
+ ccvs_hwm=`expr "$ccvs_hwm" : '\([[0-9]][[0-9]]*\).*'`
+ test "" != "$ccvs_hwm" || ccvs_hwm_E="?"
+ case $ccvs_hwm_E in
+ G) ccvs_hwm="$ccvs_hwm * 1024 * 1024 * 1024";;
+ M) ccvs_hwm="$ccvs_hwm * 1024 * 1024";;
+ k) ccvs_hwm="$ccvs_hwm * 1024";;
+ b | '') ccvs_hwm="$ccvs_hwm";;
+ *) AC_MSG_ERROR([Can't parse argument to --enable-server-flow-control
+ ('$enable_server_flow_control') as <lwm>,<hwm>])
+ esac
+
+ AC_DEFINE(
+ [SERVER_FLOWCONTROL], [1],
+ [If you are working with a large remote repository and a 'cvs
+ checkout' is swamping your network and memory, define these to
+ enable flow control. You will end up with even less probability of
+ a consistent checkout (see Concurrency in cvs.texinfo), but CVS
+ doesn't try to guarantee that anyway. The master server process
+ will monitor how far it is getting behind, if it reaches the high
+ water mark, it will signal the child process to stop generating
+ data when convenient (ie: no locks are held, currently at the
+ beginning of a new directory). Once the buffer has drained
+ sufficiently to reach the low water mark, it will be signalled to
+ start again.])
+ AC_DEFINE_UNQUOTED(
+ [SERVER_LO_WATER], [($ccvs_lwm)],
+ [The low water mark in bytes for server flow control. Required if
+ SERVER_FLOWCONTROL is defined, and useless otherwise.])
+ AC_DEFINE_UNQUOTED(
+ [SERVER_HI_WATER], [($ccvs_hwm)],
+ [The high water mark in bytes for server flow control. Required if
+ SERVER_FLOWCONTROL is defined, and useless otherwise.])
+ fi # enable_server_flow_control
fi # enable_server
+
+dnl
+dnl Use --enable-encryption to turn on encryption support, but ignore this
+dnl option unless either client or server is enabled.
+dnl
+AC_ARG_ENABLE(
+ [encryption],
+ AC_HELP_STRING(
+ [--enable-encryption],
+ [Enable encryption support (disabled by default)]), ,
+ [enable_encryption=no])
+if test "$enable_encryption" = yes; then
+ if test no != "$with_client" || test no != "$with_server"; then
+ AC_DEFINE(
+ [ENCRYPTION], [1],
+ [Define to enable encryption support.])
+ else
+ AC_MSG_WARN(
+ [--enable-encryption is meaningless with neither the CVS client
+ nor the CVS server is enabled (--disable-client and --disable-server).])
+ fi
+fi
+
+dnl
+dnl end --enable-encryption
+dnl
+
+
+dnl
+dnl begin --enable-force-editor
+dnl
+
+AC_ARG_ENABLE(
+ [force-editor],
+ AC_HELP_STRING(
+ [--enable-force-editor],
+ [When committing or importing files, you must enter a log message.
+ Normally, you can do this either via the -m flag on the command
+ line, the -F flag on the command line, or an editor will be started
+ for you. If you like to use logging templates (the rcsinfo file
+ within the $CVSROOT/CVSROOT directory), you might want to force
+ people to use the editor even if they specify a message with -m or
+ -F. --enable-force-editor will cause the -m or -F message to be
+ appended to the temp file when the editor is started. (disabled
+ by default)]), ,
+ [enable_force_editor=no])
+
+if test yes = "$enable_force_editor"; then
+ AC_DEFINE(
+ [FORCE_USE_EDITOR], [1],
+ [When committing or importing files, you must enter a log message.
+ Normally, you can do this either via the -m flag on the command
+ line, the -F flag on the command line, or an editor will be started
+ for you. If you like to use logging templates (the rcsinfo file
+ within the $CVSROOT/CVSROOT directory), you might want to force
+ people to use the editor even if they specify a message with -m or
+ -F. Enabling FORCE_USE_EDITOR will cause the -m or -F message to be
+ appended to the temp file when the editor is started.])
+fi
+
+dnl
+dnl end --enable-force-editor
+dnl
+
+
+dnl
+dnl begin --enable-rootcommit
+dnl
+
+dnl
+dnl I don't like this here, but I don't really like options.h, either.
+dnl Besides, this is causing some problems currently when compiling under
+dnl Windows and moving it here should avoid the issue (the wrong options.h
+dnl is being used).
+dnl
+dnl I don't like making this a runtime option either. I think I just don't
+dnl like making it easy to get to, but putting it here goes along with the
+dnl Autoconf ideal.
+dnl
+AC_ARG_ENABLE(
+ [rootcommit],
+ AC_HELP_STRING(
+ [--enable-rootcommit],
+ [Allow the root user to commit files (disabled by default)]), ,
+ [enable_rootcommit=no])
+if test "$enable_rootcommit" = no; then
+ AC_DEFINE(
+ [CVS_BADROOT], [1],
+ [When committing a permanent change, CVS and RCS make a log entry of
+ who committed the change. If you are committing the change logged
+ in as "root" (not under "su" or other root-priv giving program),
+ CVS/RCS cannot determine who is actually making the change.
+
+ As such, by default, CVS prohibits changes committed by users
+ logged in as "root". You can disable checking by passing the
+ "--enable-rootcommit" option to configure or by commenting out the
+ lines below.])
+fi
+
+dnl
+dnl end --enable-rootcommit
+dnl
+
+
+dnl
+dnl end --enables
+dnl
+
+
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.
-dnl AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT)
+dnl AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT, 1,
+dnl [Define if this system supports chown(), link(), and friends.])
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
@@ -364,40 +796,42 @@ AC_CACHE_CHECK(for cygwin32, ccvs_cv_sys_cygwin32,
[AC_TRY_COMPILE([], [return __CYGWIN32__;],
ccvs_cv_sys_cygwin32=yes, ccvs_cv_sys_cygwin32=no)])
if test $ccvs_cv_sys_cygwin32 = yes; then
- LIBOBJS="$LIBOBJS fncase.o"
+ AC_LIBOBJ(fncase)
LIBS="$LIBS -ladvapi32"
dnl On Windows you can only change file times if you can write to
dnl the file. cygwin32 should really handle this for us, but as of
dnl January 1998 it doesn't.
- AC_DEFINE(UTIME_EXPECTS_WRITABLE)
+ AC_DEFINE(UTIME_EXPECTS_WRITABLE, 1,
+[Define if utime requires write access to the file (true on Windows,
+but not Unix).])
dnl On Windows we must use setmode to change between binary and text
- dnl mode.
- AC_DEFINE(USE_SETMODE_STDOUT)
- AC_DEFINE(HAVE_SETMODE)
+ dnl mode. This probably doesn't really require two macro definitions
+ AC_DEFINE(USE_SETMODE_STDOUT, 1,
+[Define if setmode is required when writing binary data to stdout.])
+ AC_DEFINE(HAVE_SETMODE, 1,
+[Define if the diff library should use setmode for binary files.])
fi
-test -f src/options.h && (
- AC_MSG_WARN(saving ./src/options.h in ./src/options.h-SAVED)
- AC_MSG_WARN(You may wish to check that local options have not been lost.)
- AC_MSG_WARN(Do not re-run ./configure or ./config.status until you have....)
- cp ./src/options.h ./src/options.h-SAVED
-)
-
-AC_OUTPUT([Makefile \
- cvs.spec \
+dnl associate the setting of the execute bit with the individual scripts
+AC_CONFIG_FILES(contrib/check_cvs, [chmod +x contrib/check_cvs])
+AC_CONFIG_FILES(contrib/clmerge, [chmod +x contrib/clmerge])
+AC_CONFIG_FILES(contrib/cln_hist, [chmod +x contrib/cln_hist])
+AC_CONFIG_FILES(contrib/commit_prep, [chmod +x contrib/commit_prep])
+AC_CONFIG_FILES(contrib/cvs_acls, [chmod +x contrib/cvs_acls])
+AC_CONFIG_FILES(contrib/log, [chmod +x contrib/log])
+AC_CONFIG_FILES(contrib/log_accum, [chmod +x contrib/log_accum])
+AC_CONFIG_FILES(contrib/mfpipe, [chmod +x contrib/mfpipe])
+AC_CONFIG_FILES(contrib/pvcs2rcs, [chmod +x contrib/pvcs2rcs])
+AC_CONFIG_FILES(contrib/rcslock, [chmod +x contrib/rcslock])
+AC_CONFIG_FILES(contrib/sccs2rcs, [chmod +x contrib/sccs2rcs])
+AC_CONFIG_FILES(src/cvsbug, [chmod +x src/cvsbug])
+
+dnl the bulk files
+AC_CONFIG_FILES([Makefile \
contrib/Makefile \
- contrib/clmerge \
- contrib/cln_hist \
- contrib/commit_prep \
- contrib/cvs_acls \
- contrib/log \
- contrib/log_accum \
- contrib/mfpipe \
- contrib/pvcs2rcs \
- contrib/rcslock \
- contrib/sccs2rcs \
+ cvs.spec \
diff/Makefile \
doc/Makefile \
emx/Makefile \
@@ -405,22 +839,11 @@ AC_OUTPUT([Makefile \
man/Makefile \
os2/Makefile \
src/Makefile \
- src/cvsbug \
- src/version.h \
tools/Makefile \
vms/Makefile \
windows-NT/Makefile \
windows-NT/SCC/Makefile \
- zlib/Makefile],
- [chmod +x \
- contrib/clmerge \
- contrib/cln_hist \
- contrib/commit_prep \
- contrib/cvs_acls \
- contrib/log \
- contrib/log_accum \
- contrib/mfpipe \
- contrib/pvcs2rcs \
- contrib/rcslock \
- contrib/sccs2rcs \
- src/cvsbug])
+ zlib/Makefile])
+
+dnl and we're done
+AC_OUTPUT
OpenPOWER on IntegriCloud