1 dnl $MirOS: src/gnu/usr.bin/cvs/configure.in,v 1.23 2016/10/22 22:01:42 tg Exp $
3 dnl configure.in for cvs
6 [Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
7 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
8 Free Software Foundation, Inc.
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.])
20 AC_INIT([Concurrent Versions System (CVS)],[1.12.13-MirOS-0AB7.4],
21 [miros-discuss@mirbsd.org],[cvs])
22 AC_CONFIG_SRCDIR(src/cvs.h)
23 AM_INIT_AUTOMAKE([gnu 1.9.2 dist-bzip2 no-define])
26 AC_PREFIX_PROGRAM(cvs)
27 AM_CONFIG_HEADER(config.h)
30 dnl This needs to be called to enable certain system extensions before calling
41 AC_PATH_PROG(PERL, perl, no)
42 AC_PATH_PROG(CSH, csh, no)
43 # for contrib/rcs2log.sh & src/cvsbug.in.
44 AC_PATH_PROG(MKTEMP, mktemp, mktemp)
45 if test x"$MKTEMP" = xmktemp; then
46 MKTEMP_SH_FUNCTION=$srcdir/mktemp.sh
48 MKTEMP_SH_FUNCTION=/dev/null
50 AC_SUBST_FILE(MKTEMP_SH_FUNCTION)
52 AC_PATH_PROG(SENDMAIL, sendmail, no, [$PATH:/usr/sbin:/usr/lib])
54 AC_PATH_PROG(PR, pr, no)
55 if test x"$PR" != xno; then
56 AC_DEFINE_UNQUOTED([PR_PROGRAM], ["$PR"], [Path to the pr utility])
59 dnl FIXME This is truly gross.
60 missing_dir=`cd $ac_aux_dir && pwd`
61 dnl FIXME I pulled this default list from sanity.sh. Perhaps these lists
62 dnl can be stored in one location?
64 dnl Yeah, put the value in a variable add it to the substitution list
65 dnl then have configure create sanity.sh from sanity.sh.in...
66 glocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin"
67 AC_PATH_PROGS(ROFF, nroff gnroff groff roff, $missing_dir/missing roff, $glocs)
68 AC_PATH_PROG(PS2PDF, ps2pdf, $missing_dir/missing ps2pdf)
69 AC_PATH_PROG(TEXI2DVI, texi2dvi, $missing_dir/missing texi2dvi)
72 if test X"$ac_cv_sys_interpreter" != X"yes" ; then
73 # silly trick to avoid problems in AC macros...
74 ac_msg='perl scripts using #! may not be invoked properly'
78 # BSD's logo is a devil for a reason, hey?
79 AC_CACHE_CHECK(for BSD VPATH bug in make, ccvs_cv_bsd_make_vpath_bug,
80 [if test ! -d ac_test_dir ; then
81 AC_TRY_COMMAND([mkdir ac_test_dir])
83 cat >conftestmake <<EOF
85 ac_test_target: ac_test_dep
86 echo BSD VPATH bug present >&2
87 ac_test_dep: ac_test_dep_dep
89 touch ac_test_dir/ac_test_dep_dep
90 touch ac_test_dir/ac_test_dep
92 # Don't know why, but the following test doesn't work under FreeBSD 4.2
93 # without this sleep command
95 if AC_TRY_COMMAND([make -f conftestmake 2>&1 >/dev/null |grep ^BSD\ VPATH\ bug\ present\$ >/dev/null]) ; then
96 ccvs_cv_bsd_make_vpath_bug=yes
98 ccvs_cv_bsd_make_vpath_bug=no
100 AC_TRY_COMMAND([rm -rf ac_test_dir ac_test_target conftestmake])])
101 # We also don't need to worry about the bug when $srcdir = $builddir
102 AM_CONDITIONAL(MAKE_TARGETS_IN_VPATH, \
103 test $ccvs_cv_bsd_make_vpath_bug = no \
130 gl_AC_HEADER_STDINT_H
140 AC_CHECK_MEMBERS([struct stat.st_blksize])
141 AC_CHECK_MEMBERS([struct stat.st_rdev])
145 AC_CHECK_FUNCS([fseeko])
146 if test $ac_cv_func_fseeko = no; then
151 # Replace functions with versions in lib/ when they can't be found.
157 # Special hack for a SunOS 5.7 (aka Solaris 7) select() problem.
162 # Begin GNULIB stuff.
165 # Look for functions from GNULIB and replace with versions in lib/ when
167 dnl This calls most of the GNULIB macros we need via the
168 dnl autogenerated m4/gnulib.m4.
170 # The error module still poses merge problems.
172 dnl The following macros can be called by other GNULIB macros but are also
173 dnl used by the UNIQUE_*_TYPE stuff below. I don't want to rely on the GNULIB
174 dnl macros which call these to continue to do so, so use AC_REQUIRE, which can
175 dnl only be called from within another macro, to only call them only once.
176 AC_DEFUN([CCVS_CALL_GNULIB_MACROS_ONCE],
177 [AC_REQUIRE([gt_TYPE_LONGDOUBLE])
178 AC_REQUIRE([gt_TYPE_WCHAR_T])
179 AC_REQUIRE([gt_TYPE_WINT_T])
180 AC_REQUIRE([gl_AC_TYPE_INTMAX_T])
181 AC_REQUIRE([gl_FUNC_MMAP_ANON])
182 AC_REQUIRE([gl_AC_TYPE_LONG_LONG])])
183 CCVS_CALL_GNULIB_MACROS_ONCE()
191 # Check for function existance.
226 HAVE_PUTENV=$ac_cv_func_putenv
227 AC_SUBST(HAVE_PUTENV)
231 dnl Find the sizes of various types and set a variable for some if they
232 dnl are "unique", meaning it does not share a size with a lower precedence
235 dnl also, I snagged this cross_compiling line from openldap's autoconf,
236 dnl because I can't figure out how to stop autoconf from giving cross compiler
237 dnl related warnings each time the AC_CHECK_SIZEOF function is run
239 if test $cross_compiling = yes ; then
240 AC_DEFINE(CROSS_COMPILING, 1, [define if cross compiling])
242 AC_CHECK_SIZEOF(char)
243 AC_CACHE_CHECK(for uniquely sized char,
244 ccvs_cv_unique_int_type_char,
245 [if set |grep ^ccvs_cv_unique_int_type_ \
246 |grep "($ac_cv_sizeof_char)" >/dev/null ; then
247 ccvs_cv_unique_int_type_char=no
249 ccvs_cv_unique_int_type_char=yes\($ac_cv_sizeof_char\)
251 if test $ccvs_cv_unique_int_type_char != no ; then
252 AC_DEFINE( UNIQUE_INT_TYPE_CHAR, 1,
253 [Define if char is the first integer type
254 detected with its size.])
256 AC_CHECK_SIZEOF(short)
257 AC_CACHE_CHECK(for uniquely sized short,
258 ccvs_cv_unique_int_type_short,
259 [if set |grep ^ccvs_cv_unique_int_type_ \
260 |grep "($ac_cv_sizeof_short)" >/dev/null ; then
261 ccvs_cv_unique_int_type_short=no
263 ccvs_cv_unique_int_type_short=yes\($ac_cv_sizeof_short\)
265 if test $ccvs_cv_unique_int_type_short != no ; then
266 AC_DEFINE( UNIQUE_INT_TYPE_SHORT, 1,
267 [Define if short is the first integer type
268 detected with its size.])
271 AC_CACHE_CHECK(for uniquely sized int,
272 ccvs_cv_unique_int_type_int,
273 [if set |grep ^ccvs_cv_unique_int_type_ \
274 |grep "($ac_cv_sizeof_int)" >/dev/null ; then
275 ccvs_cv_unique_int_type_int=no
277 ccvs_cv_unique_int_type_int=yes\($ac_cv_sizeof_int\)
279 if test $ccvs_cv_unique_int_type_int != no ; then
280 AC_DEFINE( UNIQUE_INT_TYPE_INT, 1,
281 [Define if int is the first integer type
282 detected with its size.])
284 AC_CHECK_SIZEOF(long)
285 AC_CACHE_CHECK(for uniquely sized long,
286 ccvs_cv_unique_int_type_long,
287 [if set |grep ^ccvs_cv_unique_int_type_ \
288 |grep "($ac_cv_sizeof_long)" >/dev/null ; then
289 ccvs_cv_unique_int_type_long=no
291 ccvs_cv_unique_int_type_long=yes\($ac_cv_sizeof_long\)
293 if test $ccvs_cv_unique_int_type_long != no ; then
294 AC_DEFINE(UNIQUE_INT_TYPE_LONG, 1,
295 [Define if long int is the first integer type
296 detected with its size.])
298 if test $ac_cv_type_long_long != no; then
299 AC_CHECK_SIZEOF(long long)
300 AC_CACHE_CHECK(for uniquely sized long long,
301 ccvs_cv_unique_int_type_long_long,
302 [if set |grep ^ccvs_cv_unique_int_type_ \
303 |grep "($ac_cv_sizeof_long_long)" >/dev/null ; then
304 ccvs_cv_unique_int_type_long_long=no
306 ccvs_cv_unique_int_type_long_long=yes\($ac_cv_sizeof_long_long\)
308 if test $ccvs_cv_unique_int_type_long_long != no ; then
309 AC_DEFINE(UNIQUE_INT_TYPE_LONG_LONG, 1,
310 [Define if long long is the first integer type
311 detected with its size.])
314 AC_CHECK_SIZEOF(size_t)
315 AC_CACHE_CHECK(for uniquely sized size_t,
316 ccvs_cv_unique_int_type_size_t,
317 [if set |grep ^ccvs_cv_unique_int_type_ \
318 |grep "($ac_cv_sizeof_size_t)" >/dev/null ; then
319 ccvs_cv_unique_int_type_size_t=no
321 ccvs_cv_unique_int_type_size_t=yes\($ac_cv_sizeof_size_t\)
323 if test $ccvs_cv_unique_int_type_size_t != no ; then
324 AC_DEFINE(UNIQUE_INT_TYPE_SIZE_T, 1,
325 [Define if size_t is the first integer type
326 detected with its size.])
328 AC_CHECK_SIZEOF(ptrdiff_t)
329 AC_CACHE_CHECK(for uniquely sized ptrdiff_t,
330 ccvs_cv_unique_int_type_ptrdiff_t,
331 [if set |grep ^ccvs_cv_unique_int_type_ \
332 |grep "($ac_cv_sizeof_ptrdiff_t)" >/dev/null ; then
333 ccvs_cv_unique_int_type_ptrdiff_t=no
335 ccvs_cv_unique_int_type_ptrdiff_t=yes\($ac_cv_sizeof_ptrdiff_t\)
337 if test $ccvs_cv_unique_int_type_ptrdiff_t != no ; then
338 AC_DEFINE(UNIQUE_INT_TYPE_PTRDIFF_T, 1,
339 [Define if ptrdiff_t is the first integer type
340 detected with its size.])
342 if test $gt_cv_c_wint_t != no; then
343 AC_CHECK_SIZEOF(wint_t, [], [[#include <stdio.h>
346 AC_CACHE_CHECK(for uniquely sized wint_t,
347 ccvs_cv_unique_int_type_wint_t,
348 [if set |grep ^ccvs_cv_unique_int_type_ \
349 |grep "($ac_cv_sizeof_wint_t)" >/dev/null ; then
350 ccvs_cv_unique_int_type_wint_t=no
352 ccvs_cv_unique_int_type_wint_t=yes\($ac_cv_sizeof_wint_t\)
354 if test $ccvs_cv_unique_int_type_wint_t != no ; then
355 AC_DEFINE( UNIQUE_INT_TYPE_WINT_T, 1,
356 [Define if wint_t is the first integer type
357 detected with its size.])
360 if test $gt_cv_c_intmax_t != no; then
361 AC_CHECK_SIZEOF(intmax_t, [], [[#include <stdio.h>
362 #ifdef HAVE_INTTYPES_H
363 #include <inttypes.h>
370 AC_CACHE_CHECK(for uniquely sized intmax_t,
371 ccvs_cv_unique_int_type_intmax_t,
372 [if set |grep ^ccvs_cv_unique_int_type_ \
373 |grep "($ac_cv_sizeof_intmax_t)" >/dev/null ; then
374 ccvs_cv_unique_int_type_intmax_t=no
376 ccvs_cv_unique_int_type_intmax_t=yes\($ac_cv_sizeof_intmax_t\)
378 if test $ccvs_cv_unique_int_type_intmax_t != no ; then
379 AC_DEFINE( UNIQUE_INT_TYPE_INTMAX_T, 1,
380 [Define if intmax_t is the first integer type
381 detected with its size.])
386 dnl and the same for floats...
388 AC_CHECK_SIZEOF(float)
389 AC_CACHE_CHECK(for uniquely sized float,
390 ccvs_cv_unique_float_type_float,
391 [if set |grep ^ccvs_cv_unique_float_type_ \
392 |grep "($ac_cv_sizeof_float)" >/dev/null ; then
393 ccvs_cv_unique_float_type_float=no
395 ccvs_cv_unique_float_type_float=yes\($ac_cv_sizeof_float\)
397 if test $ccvs_cv_unique_float_type_float != no ; then
398 AC_DEFINE( UNIQUE_FLOAT_TYPE_FLOAT, 1,
399 [Define if float is the first floating point type
400 detected with its size.])
402 AC_CHECK_SIZEOF(double)
403 AC_CACHE_CHECK(for uniquely sized double,
404 ccvs_cv_unique_float_type_double,
405 [if set |grep ^ccvs_cv_unique_float_type_ \
406 |grep "($ac_cv_sizeof_double)" >/dev/null ; then
407 ccvs_cv_unique_float_type_double=no
409 ccvs_cv_unique_float_type_double=yes\($ac_cv_sizeof_double\)
411 if test $ccvs_cv_unique_float_type_double != no ; then
412 AC_DEFINE( UNIQUE_FLOAT_TYPE_DOUBLE, 1,
413 [Define if double is the first floating point type
414 detected with its size.])
416 if test $gt_cv_c_long_double != no; then
417 AC_CHECK_SIZEOF(long double)
418 AC_CACHE_CHECK(for uniquely sized long double,
419 ccvs_cv_unique_float_type_long_double,
420 [if set |grep ^ccvs_cv_unique_float_type_ \
421 |grep "($ac_cv_sizeof_long_double)" >/dev/null ; then
422 ccvs_cv_unique_float_type_long_double=no
424 ccvs_cv_unique_float_type_long_double=yes\($ac_cv_sizeof_long_double\)
426 if test $ccvs_cv_unique_float_type_long_double != no ; then
427 AC_DEFINE(UNIQUE_FLOAT_TYPE_LONG_DOUBLE, 1,
428 [Define if long double is the first floating point
429 type detected with its size.])
435 dnl The CVS coding standard (as specified in HACKING) is that if it exists
436 dnl in SunOS4 and ANSI, we use it. CVS itself, of course, therefore doesn't
437 dnl need HAVE_* defines for such functions, but diff wants them.
439 AC_DEFINE(HAVE_STRCHR, 1,
440 [Define if you have strchr (always for CVS).])
441 AC_DEFINE(HAVE_MEMCHR, 1,
442 [Define if you have memchr (always for CVS).])
445 dnl Force lib/regex.c to use malloc instead of messing around with alloca
446 dnl and define the old re_comp routines that we use.
448 AC_DEFINE(REGEX_MALLOC, 1,
449 [Define to force lib/regex.c to use malloc instead of alloca.])
450 AC_DEFINE(_REGEX_RE_COMP, 1,
451 [Define to force lib/regex.c to define re_comp et al.])
453 dnl AC_FUNC_FORK([]) is rather baroque. It seems to be rather more picky
454 dnl than, say, the Single Unix Specification (version 2), which simplifies
455 dnl a lot of cases by saying that the child process can't set any variables
456 dnl (thus avoiding problems with register allocation) or call any functions
457 dnl (thus avoiding problems with whether file descriptors are shared).
458 dnl It would be nice if we could just write to the Single Unix Specification.
459 dnl I think the only way to do redirection this way is by doing it in the
460 dnl parent, and then undoing it afterwards (analogous to windows-NT/run.c).
461 dnl That would appear to have a race condition if the user hits ^C (or
462 dnl some other signal) at the wrong time, as main_cleanup will try to use
463 dnl stdout/stderr. So maybe we are stuck with AC_FUNC_FORK([]).
466 AC_FUNC_CLOSEDIR_VOID
469 dnl Check for shadow password support.
471 dnl We used to try to determine whether shadow passwords were actually in
472 dnl use or not, but the code has been changed to work right reguardless,
473 dnl so we can go back to a simple check.
474 AC_SEARCH_LIBS(getspnam, sec gen, AC_DEFINE(HAVE_GETSPNAM, 1,
475 [Define if you have the getspnam function.]))
478 AC_SYS_LONG_FILE_NAMES
480 dnl for debugging code
483 # Try to find connect and gethostbyname.
484 AC_CHECK_LIB(nsl, main)
485 AC_SEARCH_LIBS(connect, xnet socket inet,
486 AC_DEFINE(HAVE_CONNECT, 1,
487 [Define if you have the connect function.]))
488 dnl no need to search nsl for gethostbyname here since we should have
489 dnl just added libnsl above if we found it.
490 AC_SEARCH_LIBS(gethostbyname, netinet)
492 AC_SUBST(cvs_client_objects)
502 dnl Many sites no longer desire the use of "rsh" as the default
503 dnl remote shell program. They typically favor "ssh" as the default
505 # What remote shell transport should our client cvs default to using?
510 [The default remote shell CVS will use for :ext: transport
512 [with_rsh="ssh rsh"])
514 if test no = "$with_rsh"; then
515 AC_MSG_WARN([Failed to find usable remote shell. Using 'rsh'.])
517 elif test yes = "$with_rsh"; then
518 # Make --with-rsh mean the same thing as --with-rsh=rsh
522 if echo $with_rsh |grep ^/ >/dev/null; then
523 # If $with_rsh is an absolute path, issue a warning if the executable
524 # doesn't exist or isn't usable, but then trust the user and use it
526 with_default_rsh=$with_rsh
527 AC_MSG_CHECKING([for a remote shell])
528 if ! test -f $with_rsh \
529 || ! test -x $with_rsh; then
530 # warn the user that they may encounter problems
531 AC_MSG_WARN([$with_rsh is not a path to an executable file])
534 # Search for a remote shell
535 AC_CHECK_PROGS([with_default_rsh], [$with_rsh], "rsh")
539 [RSH_DFLT], ["$with_default_rsh"],
540 [The default remote shell to use, if one does not specify the
541 CVS_RSH environment variable.])
542 RSH_DFLT=$with_default_rsh
544 dnl done with finding a default CVS_RSH value
550 dnl begin --with-editor
552 dnl Set the default editor to use for log messages
557 [The text editor CVS will use by default for log messages.])
559 # Let the confiscator request a specific editor
564 [The default text editor CVS should use for log messages
565 (default autoselects)]), ,
568 # If --with-editor was supplied with an argument, let it override $EDITOR from
569 # the user's environment. We need to unset EDITOR here because AC_CHECK_PROGS
570 # will let the value of EDITOR ride when it is set rather than searching. We
571 # ignore the --without-editor case since it will be caught below.
572 if test -n "$EDITOR" && test yes != $with_editor; then
576 # Set the default when --with-editor wasn't supplied or when it was supplied
577 # without an argument.
578 if test yes = $with_editor; then
579 with_editor="vim vi emacs nano pico edit"
582 if echo $with_editor |grep ^/ >/dev/null; then
583 # If $with_editor is an absolute path, issue a warning if the executable
584 # doesn't exist or isn't usable, but then trust the user and use it
587 AC_MSG_CHECKING([for an editor])
588 AC_MSG_RESULT([$EDITOR])
589 if ! test -f $with_editor \
590 || ! test -x $with_editor; then
591 # warn the user that they may encounter problems
592 AC_MSG_WARN([\`$with_editor' is not a path to an executable file])
594 elif test no != "${with_editor}"; then
595 # Search for an editor
596 AC_CHECK_PROGS([EDITOR], [$with_editor], [no])
597 if test no = "${EDITOR}"; then
599 Failed to find a text file editor. CVS cannot be compiled
600 without a default log message editor. Searched for
601 \`$with_editor'. Try \`configure --with-editor'.])
605 CVS cannot be compiled without a default log message editor.
606 Try \`configure --with-editor'.])
609 dnl FIXME - Using --without-editor will probably break a compile at
610 dnl the moment, but maybe it is reasonable for someone to want to
611 dnl compile a CVS executable that refuses to run if no $EDITOR,
612 dnl $CVS_EDITOR, or -e option is specified? Making a preliminary
613 dnl design decision in this direction, subject to discussion.
615 dnl Still don't know if the above would be useful, but we shouldn't
616 dnl be able to get here any longer without $EDITOR defined due to the
617 dnl error checking above.
619 [EDITOR_DFLT], ["$EDITOR"],
620 [The default editor to use, if one does not specify the "-e" option
621 to cvs, or does not have an EDITOR environment variable. If this
622 is not set to an absolute path to an executable, use the shell to
623 find where the editor actually is. This allows sites with
624 /usr/bin/vi or /usr/ucb/vi to work equally well (assuming that their
625 PATH is reasonable).])
628 dnl done finding an editor
630 dnl end --with-editor
636 dnl --with-hardcoded-pam-service-name
639 [hardcoded-pam-service-name],
641 [--with-hardcoded-pam-service-name],
642 [Use this to hard code a service name for PAM CVS authentication. The
643 special name, `program_name', will cause CVS to use whatever name it
644 was invoked as as the service name. (defaults to `cvs')]),,
645 [with_hardcoded_pam_service_name=cvs])
647 if test "x$with_hardcoded_pam_service_name" = xno ||
648 test "x$with_hardcoded_pam_service_name" = xprogram_name; then
649 AC_DEFINE([PAM_SERVICE_NAME], [program_name],
650 [Define to set a service name for PAM. This must be defined. Define to
651 `program_name', without the quotes, to use whatever name CVS was invoked
652 as. Otherwise, define to a double-quoted literal string, such as
655 if test x"$with_hardcoded_pam_service_name" = xyes; then
656 with_hardcoded_pam_service_name=cvs
658 AC_DEFINE_UNQUOTED([PAM_SERVICE_NAME], ["$with_hardcoded_pam_service_name"])
664 dnl Find a temporary directory
670 [The temporary directory CVS should use as a default
671 (default autoselects)]))
673 AC_MSG_CHECKING([for temporary directory])
674 if test -z "$with_tmpdir" || test yes = "$with_tmpdir"; then
675 for with_tmpdir in /tmp /var/tmp no; do
676 if test -d "$with_tmpdir" && test -x "$with_tmpdir" \
677 && test -w "$with_tmpdir" && test -r "$with_tmpdir"; then
681 if test no = "$with_tmpdir"; then
682 AC_MSG_WARN([Failed to find usable temporary directory. Using '/tmp'.])
685 AC_MSG_RESULT([$with_tmpdir])
686 elif ! echo "$with_tmpdir" |grep '^[[\\/]]'; then
687 AC_MSG_RESULT([$with_tmpdir])
688 AC_MSG_ERROR([--with-tmpdir requires an absolute path.])
689 elif ! test -d "$with_tmpdir" || ! test -x "$with_tmpdir" \
690 || ! test -w "$with_tmpdir" || ! test -r "$with_tmpdir"; then
691 AC_MSG_RESULT([$with_tmpdir])
693 [User supplied temporary directory ('$with_tmpdir') does not
694 exist or lacks sufficient permissions for read/write.])
698 [TMPDIR_DFLT], ["$with_tmpdir"],
699 [Directory used for storing temporary files, if not overridden by
700 environment variables or the -T global option. There should be little
701 need to change this (-T is a better mechanism if you need to use a
702 different directory for temporary files).])
705 dnl done finding tmpdir
710 dnl Get default umask
717 [Set the umask CVS will use by default in the repository (default 002)]))
719 if test -z "$with_umask" || test yes = "$with_umask"; then
721 elif test no = "$with_umask"; then
726 [UMASK_DFLT], [$with_umask],
727 [The default umask to use when creating or otherwise setting file or
728 directory permissions in the repository. Must be a value in the
729 range of 0 through 0777. For example, a value of 002 allows group
730 rwx access and world rx access; a value of 007 allows group rwx
731 access but no world access. This value is overridden by the value
732 of the CVSUMASK environment variable, which is interpreted as an
736 dnl Done setting default umask
740 dnl Set CVS Administrator Group
745 [--with-cvs-admin-group=GROUP],
746 [The CVS admin command is restricted to the members of this group.
747 If this group does not exist, all users are allowed to run CVS admin.
748 To disable the CVS admin command for all users, create an empty group
749 by specifying the --with-cvs-admin-group= option. To disable access
750 control for CVS admin, run configure with the --without-cvs-admin-group
751 option. (default 'cvsadmin')]), ,
752 [with_cvs_admin_group=cvsadmin])
754 if test yes = "$with_cvs_admin_group"; then
755 with_cvs_admin_group=cvsadmin
757 if test no != "$with_cvs_admin_group"; then
758 dnl FIXME We should warn if the group doesn't exist
760 [CVS_ADMIN_GROUP], ["$with_cvs_admin_group"],
761 [The CVS admin command is restricted to the members of the group
762 CVS_ADMIN_GROUP. If this group does not exist, all users are
763 allowed to run CVS admin. To disable the CVS admin command for
764 all users, create an empty CVS_ADMIN_GROUP by running configure
765 with the --with-cvs-admin-group= option. To disable access control
766 for CVS admin, run configure with the --without-cvs-admin-group
767 option in order to comment out the define below.])
771 dnl Done setting CVS Administrator Group
775 dnl Set the NDBM library to use.
777 dnl XXX - FIXME - FIXME - FIXME - XXX
779 dnl This is very bad. It should really autodetect an appropriate NDBM library
780 dnl and, if it doesn't find one, decide to use MY_NDBM. I'm am defining
781 dnl this here since this is no worse than it worked when it was in options.h
782 dnl and I am cleaning out options.h so that the Windows version of CVS will
783 dnl compile properly for the next release.
785 dnl That's why this option is in the --with-* section rather than the
786 dnl --enable-* section.
788 dnl XXX - FIXME - FIXME - FIXME - XXX
794 [Use the NDBM library distributed with CVS rather than attempting to use
795 a system NDBM library. Disabling this may not work. (default)]), ,
796 [enable_cvs_ndbm=yes])
797 if test no != "$enable_cvs_ndbm"; then
800 [By default, CVS stores its modules and other such items in flat
801 text files (MY_NDBM enables this). Turning off MY_NDBM causes CVS
802 to look for a system-supplied ndbm database library and use it
803 instead. That may speed things up, but the default setting
804 generally works fine too.])
808 dnl Done selecting NDBM library.
824 dnl begin --enable-client
827 # Check for options requesting client and server feature. If none are
828 # given and we have connect(), we want the full client & server arrangement.
833 [Include code for running as a remote client (default)]), ,
834 [enable_client=$ac_cv_search_connect])
835 if test no != "$enable_client"; then
837 [CLIENT_SUPPORT], [1],
838 [Define if you want CVS to be able to be a remote repository client.])
842 dnl end --enable-client
847 dnl begin --enable-password-authenticated-client
850 [password-authenticated-client],
852 [--enable-password-authenticated-client],
853 [Enable pserver as a remote access method in the CVS client
855 [enable_password_authenticated_client=$enable_client])
857 if test xno != "x$enable_password_authenticated_client"; then
858 if test xno != "x$enable_client"; then
860 [AUTH_CLIENT_SUPPORT], [1],
861 [Enable AUTH_CLIENT_SUPPORT to enable pserver as a remote access
862 method in the CVS client (default)])
865 [--enable-password-authenticated-client is meaningless with
866 the CVS client disabled (--disable-client)])
871 dnl begin --enable-password-authenticated-client
876 dnl begin --enable-server
880 dnl Give the confiscator control over whether the server code is compiled
886 [Include code for running as a server (default)]), ,
887 [enable_server=$ac_cv_search_connect])
889 if test no != "$enable_server"; then
891 [SERVER_SUPPORT], [1],
892 [Define if you want CVS to be able to serve repositories to remote
896 dnl The auth server needs to be able to check passwords against passwd
897 dnl file entries, so we only #define AUTH_SERVER_SUPPORT if we can
898 dnl find the crypt function.
904 [Define if you have the crypt function.])
906 [AUTH_SERVER_SUPPORT], [1],
907 [Define if you want to use the password authenticated server.])dnl
911 dnl Allow the configurer to enable server flowcontrol. Read the help
912 dnl strings below for a full explanation.
915 [server-flow-control],
917 [--enable-server-flow-control],
918 [If you are working with a large remote repository and a 'cvs
919 checkout' is swamping your network and memory, define these to
920 enable flow control. You may optionally pass a low water mark
921 in bytes and a high water mark in bytes, separated by commas.
922 (default is enabled 1M,2M)]),
923 [if test yes = $enable_server_flow_control; then
924 enable_server_flow_control=1M,2M
926 [enable_server_flow_control=1M,2M])
927 if test no != $enable_server_flow_control; then
928 ccvs_lwm=`expr "$enable_server_flow_control" : '\(.*\),'`
929 ccvs_hwm=`expr "$enable_server_flow_control" : '.*,\(.*\)'`
930 ccvs_lwm_E=`expr "$ccvs_lwm" : '[[0-9]][[0-9]]*\(.*\)'`
931 ccvs_lwm=`expr "$ccvs_lwm" : '\([[0-9]][[0-9]]*\)'`
932 test "" != "$ccvs_lwm" || ccvs_lwm_E="?"
934 G) ccvs_lwm="$ccvs_lwm * 1024 * 1024 * 1024";;
935 M) ccvs_lwm="$ccvs_lwm * 1024 * 1024";;
936 k) ccvs_lwm="$ccvs_lwm * 1024";;
938 *) AC_MSG_ERROR([Can't parse argument to --enable-server-flow-control
939 ('$enable_server_flow_control') as <lwm>,<hwm>])
941 ccvs_hwm_E=`expr "$ccvs_hwm" : '[[0-9]][[0-9]]*\(.*\)'`
942 ccvs_hwm=`expr "$ccvs_hwm" : '\([[0-9]][[0-9]]*\).*'`
943 test "" != "$ccvs_hwm" || ccvs_hwm_E="?"
945 G) ccvs_hwm="$ccvs_hwm * 1024 * 1024 * 1024";;
946 M) ccvs_hwm="$ccvs_hwm * 1024 * 1024";;
947 k) ccvs_hwm="$ccvs_hwm * 1024";;
948 b | '') ccvs_hwm="$ccvs_hwm";;
949 *) AC_MSG_ERROR([Can't parse argument to --enable-server-flow-control
950 ('$enable_server_flow_control') as <lwm>,<hwm>])
954 [SERVER_FLOWCONTROL], [1],
955 [If you are working with a large remote repository and a 'cvs
956 checkout' is swamping your network and memory, define these to
957 enable flow control. You will end up with even less probability of
958 a consistent checkout (see Concurrency in cvs.texinfo), but CVS
959 doesn't try to guarantee that anyway. The master server process
960 will monitor how far it is getting behind, if it reaches the high
961 water mark, it will signal the child process to stop generating
962 data when convenient (ie: no locks are held, currently at the
963 beginning of a new directory). Once the buffer has drained
964 sufficiently to reach the low water mark, it will be signalled to
967 [SERVER_LO_WATER], [($ccvs_lwm)],
968 [The low water mark in bytes for server flow control. Required if
969 SERVER_FLOWCONTROL is defined, and useless otherwise.])
971 [SERVER_HI_WATER], [($ccvs_hwm)],
972 [The high water mark in bytes for server flow control. Required if
973 SERVER_FLOWCONTROL is defined, and useless otherwise.])
974 fi # enable_server_flow_control
978 dnl end --enable-server
983 dnl begin --enable-proxy
987 dnl Give the confiscator control over whether the proxy server code is compiled
993 [Include code for running as a transparent proxy server. Disabling this
994 may produce a slight performance gain on some systems, at the expense of
995 write proxy support. (default)]), ,
996 [if test xno != "x$enable_client" && test xno != "x$enable_server"; then
1002 if test no != "$enable_proxy"; then
1003 if test xno = "x$enable_client" || test xno = "x$enable_server"; then
1005 [--enable-proxy is meaningless when either the CVS client or the
1006 CVS server is disabled (--disable-client and --disable-server).])
1009 [PROXY_SUPPORT], [1],
1010 [Define if you want CVS to be able to serve as a transparent proxy for
1011 write operations. Disabling this may produce a slight performance gain
1012 on some systems, at the expense of write proxy support.])
1016 dnl end --enable-proxy
1021 dnl begin --enable-pam
1025 dnl Check if PAM authentication is enabled
1031 [Use to enable system authentication with PAM instead of using the
1032 simple getpwnam interface. This allows authentication (in theory)
1033 with any PAM module, e.g. on systems with shadow passwords or via LDAP]), ,
1037 if test yes = $enable_pam; then
1038 ac_pam_header_available=
1040 AC_CHECK_HEADER([security/pam_appl.h], [
1041 AC_DEFINE([HAVE_SECURITY_PAM_APPL_H], 1, [Define to 1 if security/pam_appl.h is available])
1042 ac_pam_header_available=1])
1044 if test -z "$ac_pam_header_available"; then
1045 AC_CHECK_HEADER([pam/pam_appl.h], [
1046 AC_DEFINE([HAVE_PAM_PAM_APPL_H], 1, [Define to 1 if pam/pam_appl.h is available])
1047 ac_pam_header_available=1])
1050 if test -z "$ac_pam_header_available"; then
1051 AC_MSG_ERROR([Could not find PAM headers])
1053 AC_DEFINE(HAVE_PAM, 1,
1054 [Define to enable system authentication with PAM instead of using the
1055 simple getpwnam interface. This allows authentication (in theory)
1056 with any PAM module, e.g. on systems with shadow passwords or via LDAP])
1057 AC_CHECK_LIB(pam, pam_start, [LIBS="${LIBS} -lpam"],
1058 AC_MSG_ERROR([Could not find PAM libraries but the headers exist.
1059 Give the --disable-pam option to compile without PAM support (or fix
1060 your broken configuration)])
1066 dnl end --enable-pam
1071 dnl begin --enable-case-sensitivity
1077 [--enable-case-sensitivity],
1078 [Force CVS to expect a case sensitive file system. Enabling this on a case
1079 insensitive system should have little effect on the server or client
1080 operation, though client users may ocassionally be suprised that the CVS
1081 server appears to be case sensitive. Disabling this for a case sensitive
1082 server disables server support for case insensitive clients, which can
1083 confuse all users of case insensitive clients contacting the server.
1084 Disabling this for a case sensitive client will cause the client to ask
1085 servers to behave case insensitively, which could cause confusion for
1086 users, but also probably no real harm. (default autoselects based on the
1087 case sensitivity of the file system containing the current working
1089 [case "$enable_case_sensitivity" in
1092 AC_MSG_ERROR([Unrecognized argument to --enable-case-sensitivity: \`$enable_case_sensitivity'. Acceptable values are \`yes', \`no', and \`auto'.])
1095 [enable_case_sensitivity=auto])
1097 acx_forced=' (forced)'
1098 AC_MSG_CHECKING([for a case sensitive file system])
1099 if test $enable_case_sensitivity = auto; then
1101 dnl Check for a case insensitive filesystem, like Mac OS X and Windows have.
1103 AC_CACHE_VAL([acx_cv_case_sensitive],
1104 [ rm -f ac_TEST_filenames_CASE_sensitive
1105 echo foo >ac_test_filenames_case_sensitive
1106 if test -f ac_TEST_filenames_CASE_sensitive; then
1107 acx_cv_case_sensitive=no
1109 acx_cv_case_sensitive=yes
1111 rm ac_test_filenames_case_sensitive
1113 enable_case_sensitivity=$acx_cv_case_sensitive
1116 AC_MSG_RESULT([$enable_case_sensitivity$acx_forced])
1117 if test $enable_case_sensitivity = no; then
1118 AC_DEFINE([FILENAMES_CASE_INSENSITIVE], [1],
1119 [Define if this executable will be running on case insensitive
1120 file systems. In the client case, this means that it will request
1121 that the server pretend to be case insensitive if it isn't
1123 dnl Compile fncase.c (containing fncase() & fncmp()) to handle file name
1124 dnl comparisons on case insensitive filesystems.
1129 dnl end --enable-case-sensitivity
1134 dnl begin --enable-encryption
1138 dnl Use --enable-encryption to turn on encryption support, but ignore this
1139 dnl option unless either client or server is enabled.
1144 [--enable-encryption],
1145 [Enable encryption support (disabled by default)]), ,
1146 [enable_encryption=no])
1147 if test "x$enable_encryption" = xyes; then
1148 if test xno = "x$with_client" && test xno = "x$with_server"; then
1150 [--enable-encryption is meaningless when neither the CVS client
1151 nor the CVS server is enabled (--disable-client and --disable-server).])
1155 [Define to enable encryption support.])
1160 dnl end --enable-encryption
1165 dnl begin --enable-force-editor
1171 [--enable-force-editor],
1172 [When committing or importing files, you must enter a log message.
1173 Normally, you can do this either via the -m flag on the command
1174 line, the -F flag on the command line, or an editor will be started
1175 for you. If you like to use logging templates (the rcsinfo file
1176 within the $CVSROOT/CVSROOT directory), you might want to force
1177 people to use the editor even if they specify a message with -m or
1178 -F. --enable-force-editor will cause the -m or -F message to be
1179 appended to the temp file when the editor is started. (disabled
1181 [enable_force_editor=no])
1183 if test yes = "$enable_force_editor"; then
1185 [FORCE_USE_EDITOR], [1],
1186 [When committing or importing files, you must enter a log message.
1187 Normally, you can do this either via the -m flag on the command
1188 line, the -F flag on the command line, or an editor will be started
1189 for you. If you like to use logging templates (the rcsinfo file
1190 within the $CVSROOT/CVSROOT directory), you might want to force
1191 people to use the editor even if they specify a message with -m or
1192 -F. Enabling FORCE_USE_EDITOR will cause the -m or -F message to be
1193 appended to the temp file when the editor is started.])
1197 dnl end --enable-force-editor
1202 dnl begin --enable-lock-compatibility
1205 # Check for options requesting client and server feature. If none are
1206 # given and we have connect(), we want the full client & server arrangement.
1208 [lock-compatibility],
1210 [--enable-lock-compatibility],
1211 [Include locking code which prevents versions of CVS earlier than 1.12.4
1212 directly accessing the same repositiory as this executable from ignoring
1213 this executable's promotable read locks. If only CVS versions 1.12.4 and
1214 later will be accessing your repository directly (as a server or locally),
1215 you can safely disable this option in return for fewer disk accesses and a
1216 small speed increase. Disabling this option when versions of CVS earlier
1217 than 1,12,4 _will_ be accessing your repository, however, is *VERY* *VERY*
1218 *VERY* dangerous and could result in data loss. (enabled by default)]),,
1219 [enable_lock_compatibility=yes])
1221 if test x$enable_lock_compatibility = xyes; then
1222 AC_DEFINE([LOCK_COMPATIBILITY], [1],
1223 [Define to include locking code which prevents versions of CVS earlier than
1224 1.12.4 directly accessing the same repositiory as this executable from
1225 ignoring this executable's promotable read locks. If only CVS versions
1226 1.12.4 and later will be accessing your repository directly (as a server
1227 or locally), you can safely disable this option in return for fewer disk
1228 accesses and a small speed increase. Disabling this option when versions
1229 of CVS earlier than 1,12,4 _will_ be accessing your repository, however,
1230 is *VERY* *VERY* *VERY* dangerous and could result in data loss.
1232 As such, by default, CVS is compiled with this code enabled. If you are
1233 sure you would like this code disabled, you can disable it by passing the
1234 "--disable-lock-compatibility" option to configure or by commenting out
1239 dnl end --enable-lock-compatibility
1244 dnl begin --enable-rootcommit
1248 dnl I don't like this here, but I don't really like options.h, either.
1249 dnl Besides, this is causing some problems currently when compiling under
1250 dnl Windows and moving it here should avoid the issue (the wrong options.h
1253 dnl I don't like making this a runtime option either. I think I just don't
1254 dnl like making it easy to get to, but putting it here goes along with the
1260 [--enable-rootcommit],
1261 [Allow the root user to commit files (disabled by default)]), ,
1262 [enable_rootcommit=no])
1263 if test "$enable_rootcommit" = no; then
1266 [When committing a permanent change, CVS and RCS make a log entry of
1267 who committed the change. If you are committing the change logged
1268 in as "root" (not under "su" or other root-priv giving program),
1269 CVS/RCS cannot determine who is actually making the change.
1271 As such, by default, CVS prohibits changes committed by users
1272 logged in as "root". You can disable checking by passing the
1273 "--enable-rootcommit" option to configure or by commenting out the
1278 dnl end --enable-rootcommit
1282 dnl begin --enable-old-info-support
1287 [--enable-old-info-format-support],
1288 [Enable support for the pre 1.12.1 *info scripting hook format strings.
1289 Disable this option for a smaller executable once your scripting
1290 hooks have been updated to use the new *info format strings (default).]), ,
1291 [enable_old_info_format_support=yes])
1292 if test "$enable_old_info_format_support" = yes; then
1294 [SUPPORT_OLD_INFO_FMT_STRINGS], [1],
1295 [Enable support for the pre 1.12.1 *info scripting hook format strings.
1296 Disable this option for a smaller executable once your scripting
1297 hooks have been updated to use the new *info format strings by passing
1298 "--disable-old-info-format-support" option to configure or by commenting
1299 out the line below.])
1303 dnl end --enable-old-info-support
1308 dnl begin --enable-config-override
1314 [--enable-config-override],
1315 [Set to a comma-separated list of paths to directories (designated by
1316 trailing `/') and files, specifies the path prefixes (for directories) and
1317 paths to files the CVS server commands will allow configuration to be read
1318 from. Specify `--enable-config-override=no' to disable config file
1319 overrides completely and `--enable-config-override=/' or simply
1320 `--enable-config-override' to allow all paths. (Defaults to
1321 `SYSCONFDIR/cvs.conf,SYSCONFDIR/cvs/')]),,
1322 [# $sysconfdir may still contain variable references. By default, this will
1323 # be to $prefix, and $prefix won't be set to its default value until later.
1324 # Compromise without setting $prefix for the rest of the file.
1325 cvs_save_prefix=$prefix
1326 if test "X$prefix" = XNONE; then
1327 prefix=$ac_prefix_default
1329 eval enable_config_override=`echo $sysconfdir/cvs.conf,$sysconfdir/cvs/`
1330 prefix=$cvs_save_prefix])
1332 if test x"$enable_config_override" = xyes; then
1333 enable_config_override=/
1336 if test x"$enable_config_override" = xno; then :; else
1340 for path in $enable_config_override; do
1343 [[\\/$]]* | ?:[[\\/]]* )
1344 arrayinit="$arrayinit\"$path\", "
1347 [expected comma separated list of absolute directory
1348 names for --enable-config-override, or \`no', not:
1349 \`$enable_config_override'
1350 (\`$path' invalid.)]);;
1353 arrayinit="${arrayinit}NULL"
1355 AC_DEFINE_UNQUOTED(ALLOW_CONFIG_OVERRIDE, [$arrayinit],
1356 [Define this to a NULL terminated list of allowed path prefixes (for
1357 directories) and paths to files the CVS server will allow configuration to
1358 be read from when specified from the command line.])
1362 dnl end --enable-config-override
1373 dnl For the moment we will assume that all systems which have
1374 dnl the unixyness to run configure are unixy enough to do the
1375 dnl PreservePermissions stuff. I have this sinking feeling that
1376 dnl things won't be that simple, before long.
1377 dnl AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT, 1,
1378 dnl [Define if this system supports chown(), link(), and friends.])
1380 dnl On cygwin32, we configure like a Unix system, but we need some support
1381 dnl libraries. We do this at the end so that the new libraries are added at
1382 dnl the end of LIBS.
1384 dnl FIXME: We should be trying to meet the autoconf ideal of checking for
1385 dnl the properties of the system rather than the name of the os here. In other
1386 dnl words, we should check the case sensitivty of the system and then for
1387 dnl the support functions we are using and which library we find them in.
1388 AC_CACHE_CHECK(for cygwin32, ccvs_cv_sys_cygwin32,
1389 [AC_TRY_COMPILE([], [return __CYGWIN32__;],
1390 ccvs_cv_sys_cygwin32=yes, ccvs_cv_sys_cygwin32=no)])
1391 if test $ccvs_cv_sys_cygwin32 = yes; then
1392 LIBS="$LIBS -ladvapi32"
1394 dnl On Windows you can only change file times if you can write to
1395 dnl the file. cygwin32 should really handle this for us, but as of
1396 dnl January 1998 it doesn't.
1397 AC_DEFINE(UTIME_EXPECTS_WRITABLE, 1,
1398 [Define if utime requires write access to the file (true on Windows,
1401 dnl On Windows we must use setmode to change between binary and text
1402 dnl mode. This probably doesn't really require two macro definitions
1403 AC_DEFINE(USE_SETMODE_STDOUT, 1,
1404 [Define if setmode is required when writing binary data to stdout.])
1405 AC_DEFINE(HAVE_SETMODE, 1,
1406 [Define if the diff library should use setmode for binary files.])
1409 dnl associate the setting of the execute bit with the individual scripts
1410 AC_CONFIG_FILES(contrib/validate_repo, [chmod +x contrib/validate_repo])
1411 AC_CONFIG_FILES(contrib/clmerge, [chmod +x contrib/clmerge])
1412 AC_CONFIG_FILES(contrib/cln_hist, [chmod +x contrib/cln_hist])
1413 dnl AC_CONFIG_FILES(contrib/commit_prep, [chmod +x contrib/commit_prep])
1414 dnl AC_CONFIG_FILES(contrib/cvs_acls, [chmod +x contrib/cvs_acls])
1415 dnl AC_CONFIG_FILES(contrib/log, [chmod +x contrib/log])
1416 dnl AC_CONFIG_FILES(contrib/log_accum, [chmod +x contrib/log_accum])
1417 dnl AC_CONFIG_FILES(contrib/mfpipe, [chmod +x contrib/mfpipe])
1418 AC_CONFIG_FILES(contrib/pvcs2rcs, [chmod +x contrib/pvcs2rcs])
1419 AC_CONFIG_FILES(contrib/rcs2log:contrib/rcs2log.sh, [chmod +x contrib/rcs2log])
1420 dnl AC_CONFIG_FILES(contrib/rcslock, [chmod +x contrib/rcslock])
1421 AC_CONFIG_FILES(contrib/sccs2rcs, [chmod +x contrib/sccs2rcs])
1422 AC_CONFIG_FILES(doc/mkman:doc/mkman.pl, [chmod +x doc/mkman])
1425 AC_CONFIG_FILES([Makefile \
1438 # Report the state of this version of CVS if this is from dev.
1439 m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[0-9]*\.[0-9]*\.[0-9]*\.[0-9]],
1442 You are about to use an unreleased version of CVS. Be sure to
1443 read the relevant mailing lists, most importantly <info-cvs@nongnu.org>.
1445 Below you will find information on the status of this version of CVS.
1449 sed -n '/^\* Status/,$p' $srcdir/BUGS