117721Speterdnl configure.in for cvs 2177391SobrienAC_INIT([Concurrent Versions System (CVS)],[1.11.22.1], 3175261Sobrien [bug-cvs@nongnu.org],[cvs]) 4107484SpeterAC_CONFIG_SRCDIR(src/cvs.h) 5128266SpeterAM_INIT_AUTOMAKE([gnu 1.7.9 dist-bzip2 no-define]) 6177391SobrienAC_PREREQ(2.60) 7107484Speter 866525SpeterAC_PREFIX_PROGRAM(cvs) 9107484SpeterAM_CONFIG_HEADER(config.h) 10128266SpeterAM_MAINTAINER_MODE 1117721Speter 1217721SpeterAC_PROG_CC 13102840SpeterAM_PROG_CC_C_O 14102840Speter 15102840Speterdnl FIXME the next three calls should be avoided according to autoconf 16102840Speterdnl philosophy. for example, AC_CHECK_LIB should be used to look for crypt. 17102840Speterdnl 18102840Speterdnl These are here instead of later because they want to be called before 19102840Speterdnl anything that calls a C compiler. 20102840SpeterAC_AIX 21102840SpeterAC_MINIX 22102840Speter 23107484Speter# Find the posix library needed on INTERACTIVE UNIX (ISC) 24107484Speterdnl 25107484Speterdnl From the Autoconf 2.53 manual (AC_ISC_POSIX): 26107484Speterdnl 27107484Speterdnl For INTERACTIVE UNIX (ISC), add `-lcposix' to output variable 28107484Speterdnl `LIBS' if necessary for POSIX facilities. Call this after 29107484Speterdnl `AC_PROG_CC' and before any other macros that use POSIX 30107484Speterdnl interfaces. INTERACTIVE UNIX is no longer sold, and Sun says that 31107484Speterdnl they will drop support for it on 2006-07-23, so this macro is 32107484Speterdnl becoming obsolescent. 33107484Speterdnl 34107484SpeterAC_SEARCH_LIBS([strerror], [cposix]) 35107484Speter 36107484Speterdnl 37107484Speterdnl Autoconf stopped setting $ISC sometime before 2.53 38107484Speterdnl 39107484Speterdnl If this is still important, someone should come up with a generic test 40107484Speterdnl for whether _SYSV3 needs to be defined. Removed code below: 41107484Speterdnl 42107484Speterdnl if test "$ISC" = yes; then 43107484Speterdnl CFLAGS="$CFLAGS -D_SYSV3" 44107484Speterdnl # And I don't like this... In theory it should be found later if server is 45107484Speterdnl # enabled, but maybe something on INTERACTIVE UNIX (ISC) we didn't ask to 46107484Speterdnl # link with crypt tries? Anyhow, the autoconf manual says we can delete 47107484Speterdnl # this ISC stuff on or after 2006-07-23 when Sun discontinues support and 48107484Speterdnl # ISC becomes obsolescent, but I suppose that is probably a matter of 49107484Speterdnl # opinion. 50107484Speterdnl # 51107484Speterdnl # N.B. The reason for doing this is that some moron decided to put a stub 52107484Speterdnl # for crypt in libc that always returns NULL. Without this here, the later 53107484Speterdnl # check will find the stub instead of the real thing, resulting in a server 54107484Speterdnl # that can't process crypted passwords correctly. 55107484Speterdnl 56107484Speterdnl # again, if we have to try and reenable this for ISC, someone should come 57107484Speterdnl # up with a generic test that figures out whether crypt is good or not - 58107484Speterdnl # Is it always returning NULL? 59107484Speterdnl LIBS="-lcrypt $LIBS" 60107484Speterdnl fi 61107484Speterdnl 62107484Speterdnl FIXME - This has been broken for at least a few months anyhow, so I'm 63107484Speterdnl removing the crypt lib define above, but the correct fix would be to 64107484Speterdnl provide a CRYPT_WORKS macro or the like that gets called sometime after 65107484Speterdnl the AC_SEARCH_LIBS call that normally finds crypt, and if crypt doesn't 66107484Speterdnl work, the macro should be retried with LIBS="-lcrypt $LIBS" forced. 67107484Speterdnl 68107484Speter 6917721SpeterAC_PROG_RANLIB 7017721SpeterAC_PROG_YACC 7181404SpeterAC_PROG_LN_S 72102840SpeterAC_EXEEXT 7317721Speter 7481404SpeterAC_PATH_PROG(PERL, perl, no) 7581404SpeterAC_PATH_PROG(CSH, csh, no) 76128266Speter# for contrib/rcs2log.sh & src/cvsbug.in. 77128266SpeterAC_PATH_PROG(MKTEMP, mktemp, mktemp) 78128266Speterif test x"$MKTEMP" = xmktemp; then 79128266Speter MKTEMP_SH_FUNCTION=$srcdir/mktemp.sh 80128266Speterelse 81128266Speter MKTEMP_SH_FUNCTION=/dev/null 82128266Speterfi 83128266SpeterAC_SUBST_FILE(MKTEMP_SH_FUNCTION) 84128266Speter# for src/cvsbug.in 85128266SpeterAC_PATH_PROG(SENDMAIL, sendmail, no, [$PATH:/usr/sbin:/usr/lib]) 86128266Speter# For diff/util.c 8781404SpeterAC_PATH_PROG(PR, pr, no) 8881404Speterif test x"$PR" != xno; then 8981404Speter AC_DEFINE_UNQUOTED([PR_PROGRAM], ["$PR"], [Path to the pr utility]) 9081404Speterfi 9117721Speter 9281404Speterdnl FIXME This is truly gross. 9381404Spetermissing_dir=`cd $ac_aux_dir && pwd` 9481404Speterdnl FIXME I pulled this default list from sanity.sh. Perhaps these lists 9581404Speterdnl can be stored in one location? 96102840Speterdnl 97102840Speterdnl Yeah, put the value in a variable add it to the substitution list 98102840Speterdnl then have configure create sanity.sh from sanity.sh.in... 9981404Speterglocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin" 10081404SpeterAC_PATH_PROGS(ROFF, groff roff, $missing_dir/missing roff, $glocs) 10181404SpeterAC_PATH_PROG(PS2PDF, ps2pdf, $missing_dir/missing ps2pdf) 10281404SpeterAC_PATH_PROG(TEXI2DVI, texi2dvi, $missing_dir/missing texi2dvi) 10381404Speter 10417721SpeterAC_SYS_INTERPRETER 10517721Speterif test X"$ac_cv_sys_interpreter" != X"yes" ; then 10617721Speter # silly trick to avoid problems in AC macros... 10717721Speter ac_msg='perl scripts using #! may not be invoked properly' 10817721Speter AC_MSG_WARN($ac_msg) 10917721Speterfi 11017721Speter 11181404Speter# BSD's logo is a devil for a reason, hey? 11281404SpeterAC_CACHE_CHECK(for BSD VPATH bug in make, ccvs_cv_bsd_make_vpath_bug, 11381404Speter[if test ! -d ac_test_dir ; then 11481404Speter AC_TRY_COMMAND([mkdir ac_test_dir]) 11581404Speterfi 11681404Spetercat >conftestmake <<EOF 11781404SpeterVPATH = ac_test_dir 11881404Speterac_test_target: ac_test_dep 11981404Speter echo BSD VPATH bug present >&2 12081404Speterac_test_dep: ac_test_dep_dep 12181404SpeterEOF 12281404Spetertouch ac_test_dir/ac_test_dep_dep 12381404Spetertouch ac_test_dir/ac_test_dep 12481404Spetertouch ac_test_target 12581404Speter# Don't know why, but the following test doesn't work under FreeBSD 4.2 12681404Speter# without this sleep command 12781404Spetersleep 1 12881404Speterif AC_TRY_COMMAND([make -f conftestmake 2>&1 >/dev/null |grep ^BSD\ VPATH\ bug\ present\$ >/dev/null]) ; then 12981404Speter ccvs_cv_bsd_make_vpath_bug=yes 13081404Speterelse 13181404Speter ccvs_cv_bsd_make_vpath_bug=no 13281404Speterfi 13381404SpeterAC_TRY_COMMAND([rm -rf ac_test_dir ac_test_target conftestmake])]) 13481404Speter# We also don't need to worry about the bug when $srcdir = $builddir 13581404SpeterAM_CONDITIONAL(MAKE_TARGETS_IN_VPATH, \ 13681404Speter test $ccvs_cv_bsd_make_vpath_bug = no \ 13781404Speter || test $srcdir = .) 13881404Speter 13966525SpeterAC_HEADER_DIRENT 14017721SpeterAC_HEADER_STDC 14166525SpeterAC_HEADER_SYS_WAIT 142102840SpeterAC_CHECK_HEADERS(\ 143102840Speter errno.h \ 144102840Speter direct.h \ 145102840Speter fcntl.h \ 146107484Speter fnmatch.h \ 147102840Speter io.h \ 148102840Speter limits.h \ 149102840Speter memory.h \ 150102840Speter ndbm.h \ 151102840Speter string.h \ 152102840Speter syslog.h \ 153102840Speter sys/bsdtypes.h \ 154102840Speter sys/file.h \ 155102840Speter sys/param.h \ 156102840Speter sys/resource.h \ 157102840Speter sys/select.h \ 158102840Speter sys/time.h \ 159102840Speter sys/timeb.h \ 160102840Speter unistd.h \ 161102840Speter utime.h\ 162102840Speter) 16317721SpeterAC_HEADER_STAT 16417721SpeterAC_HEADER_TIME 16566525Speter 16666525SpeterAC_C_CONST 16717721SpeterAC_TYPE_UID_T 16817721SpeterAC_TYPE_MODE_T 16966525SpeterAC_TYPE_PID_T 17017721SpeterAC_TYPE_SIZE_T 17166525SpeterAC_TYPE_SIGNAL 17266525Speter 173107484SpeterAC_CHECK_MEMBERS([struct stat.st_blksize]) 174107484SpeterAC_CHECK_MEMBERS([struct stat.st_rdev]) 175107484Speter 176102840SpeterAC_REPLACE_FUNCS(\ 177102840Speter dup2 \ 178107484Speter ftruncate \ 179107484Speter gethostname \ 180102840Speter memmove \ 181102840Speter mkdir \ 182102840Speter rename \ 183102840Speter strerror \ 184102840Speter strstr \ 185102840Speter strtoul\ 186102840Speter valloc \ 187102840Speter waitpid \ 188102840Speter) 189128266Speter 190128266Speter 191128266Speter 192128266Speterdnl 193128266Speterdnl Begin GNULIB stuff. 194128266Speterdnl 195130303Spetergl_XSIZE 196128266Speter 197128266Speterdnl We always want to use the GNULIB getpass, so define its name to something 198128266Speterdnl that won't conflict with system declarations. 199128266SpeterAC_DEFINE([getpass], [cvs_getpass], 200128266Speter [We want to always use the GNULIB version of getpass which we have in lib, 201128266Speter so define getpass to something that won't conflict with any existing system 202128266Speter declarations.]) 203128266Speter 204128266Speterdnl 205128266Speterdnl End GNULIB stuff. 206128266Speterdnl 207128266Speter 208128266Speter 209128266Speter 21081404SpeterAC_CHECK_FUNCS(\ 21181404Speter fchdir \ 21281404Speter fchmod \ 21381404Speter fsync \ 21481404Speter ftime \ 215107484Speter geteuid \ 21681404Speter getgroups \ 217107484Speter getopt \ 21881404Speter getpagesize \ 21981404Speter gettimeofday \ 22081404Speter initgroups \ 221107484Speter login \ 222107484Speter logout \ 22381404Speter mknod \ 22481404Speter mkstemp \ 22581404Speter mktemp \ 22681404Speter putenv \ 22781404Speter readlink \ 228107484Speter regcomp \ 229107484Speter regerror \ 230107484Speter regexec \ 231107484Speter regfree \ 23281404Speter sigaction \ 23381404Speter sigblock \ 23481404Speter sigprocmask \ 23581404Speter sigsetmask \ 23681404Speter sigvec \ 23781404Speter tempnam \ 23881404Speter timezone \ 23981404Speter tzset \ 24081404Speter vprintf \ 24181404Speter wait3 \ 24281404Speter) 24381404Speter# we only need one of the following 24481404SpeterAC_CHECK_FUNCS([\ 24581404Speter nanosleep \ 24681404Speter usleep \ 24781404Speter select \ 24881404Speter], [break]) 24925839Speter 25025839Speterdnl 25132785Speterdnl The CVS coding standard (as specified in HACKING) is that if it exists 25232785Speterdnl in SunOS4 and ANSI, we use it. CVS itself, of course, therefore doesn't 25332785Speterdnl need HAVE_* defines for such functions, but diff wants them. 25432785Speterdnl 255107484SpeterAC_DEFINE(HAVE_STRCHR, 1, 256107484Speter[Define if you have strchr (always for CVS).]) 257107484SpeterAC_DEFINE(HAVE_MEMCHR, 1, 258107484Speter[Define if you have memchr (always for CVS).]) 25932785Speter 26032785Speterdnl 26166525Speterdnl Force lib/regex.c to use malloc instead of messing around with alloca 26266525Speterdnl and define the old re_comp routines that we use. 26366525Speterdnl 264107484SpeterAC_DEFINE(REGEX_MALLOC, 1, 265107484Speter[Define to force lib/regex.c to use malloc instead of alloca.]) 266107484SpeterAC_DEFINE(_REGEX_RE_COMP, 1, 267107484Speter[Define to force lib/regex.c to define re_comp et al.]) 26866525Speterdnl 269107484Speterdnl AC_FUNC_FORK([]) is rather baroque. It seems to be rather more picky 27032785Speterdnl than, say, the Single Unix Specification (version 2), which simplifies 27132785Speterdnl a lot of cases by saying that the child process can't set any variables 27232785Speterdnl (thus avoiding problems with register allocation) or call any functions 27332785Speterdnl (thus avoiding problems with whether file descriptors are shared). 27432785Speterdnl It would be nice if we could just write to the Single Unix Specification. 27532785Speterdnl I think the only way to do redirection this way is by doing it in the 27632785Speterdnl parent, and then undoing it afterwards (analogous to windows-NT/run.c). 27732785Speterdnl That would appear to have a race condition if the user hits ^C (or 27832785Speterdnl some other signal) at the wrong time, as main_cleanup will try to use 279107484Speterdnl stdout/stderr. So maybe we are stuck with AC_FUNC_FORK([]). 28032785Speterdnl 281107484SpeterAC_FUNC_FORK([]) 28232785SpeterAC_FUNC_CLOSEDIR_VOID 28332785Speter 28432785Speterdnl 28544852Speterdnl Check for shadow password support. 28625839Speterdnl 28744852Speterdnl We used to try to determine whether shadow passwords were actually in 28844852Speterdnl use or not, but the code has been changed to work right reguardless, 28944852Speterdnl so we can go back to a simple check. 290107484SpeterAC_SEARCH_LIBS(getspnam, sec gen, AC_DEFINE(HAVE_GETSPNAM, 1, 291107484Speter[Define if you have the getspnam function.])) 29225839Speter 29317721SpeterAC_FUNC_UTIME_NULL 29417721SpeterAC_SYS_LONG_FILE_NAMES 29517721Speter 29666525SpeterAC_FUNC_FNMATCH 29766525Speterif test "$ac_cv_func_fnmatch_works" = no; then 298107484Speter AC_LIBOBJ(fnmatch) 299107484Speter AC_CONFIG_LINKS(lib/fnmatch.h:lib/fnmatch.h.in) 300107484Speter AC_LIBSOURCE(fnmatch.h.in) 30117721Speterfi 30217721Speter 30366525Speter# Try to find connect and gethostbyname. 304107484SpeterAC_CHECK_LIB(nsl, main) 305107484SpeterAC_SEARCH_LIBS(connect, xnet socket inet, 306107484Speter AC_DEFINE(HAVE_CONNECT, 1, 307107484Speter[Define if you have the connect function.])) 308107484Speterdnl no need to search nsl for gethostbyname here since we should have 309107484Speterdnl just added libnsl above if we found it. 310107484SpeterAC_SEARCH_LIBS(gethostbyname, netinet) 31125839Speter 312107484Speter 31317721Speterdnl 314107484Speterdnl begin --with-* 315107484Speterdnl 316107484Speter 317107484Speterdnl 31817721Speterdnl set $(KRB4) from --with-krb4=value -- WITH_KRB4 31917721Speterdnl 32032785Speterdnl If you change this, keep in mind that some systems have a bogus 32132785Speterdnl libkrb in the system libraries, so --with-krb4=value needs to 32232785Speterdnl override the system -lkrb. 32332785Speterdnl 32417721SpeterKRB4=/usr/kerberos 32517721Speterdefine(WITH_KRB4,[ 326107484SpeterAC_ARG_WITH( 327107484Speter [krb4], 328107484Speter AC_HELP_STRING( 329107484Speter [--with-krb4], 330107484Speter [Kerberos 4 directory (default /usr/kerberos)]), 331107484Speter [KRB4=$with_krb4], 33217721Speter)dnl 333107484SpeterAC_MSG_CHECKING([for KRB4 in $KRB4]) 334107484SpeterAC_MSG_RESULT([]) 33517721SpeterAC_SUBST(KRB4)])dnl 33617721SpeterWITH_KRB4 33717721Speter 33817721Speterkrb_h= 33917721SpeterAC_MSG_CHECKING([for krb.h]) 34032785Speterif test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then 34132785Speter hold_cflags=$CFLAGS 34232785Speter CFLAGS="$CFLAGS -I$KRB4/include" 34332785Speter AC_TRY_LINK([#include <krb.h>],[int i;], 34432785Speter [krb_h=yes krb_incdir=$KRB4/include], 34532785Speter [CFLAGS=$hold_cflags 34632785Speter AC_TRY_LINK([#include <krb.h>],[int i;], 34732785Speter [krb_h=yes krb_incdir=])]) 34832785Speter CFLAGS=$hold_cflags 34932785Speterelse 35032785Speter AC_TRY_LINK([#include <krb.h>],[int i;], 35132785Speter [krb_h=yes krb_incdir=]) 35232785Speterfi 35317721Speterif test -z "$krb_h"; then 35417721Speter AC_TRY_LINK([#include <krb.h>],[int i;], 35517721Speter [krb_h=yes krb_incdir=], 35617721Speter [if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then 35717721Speter hold_cflags=$CFLAGS 35817721Speter CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV" 35917721Speter AC_TRY_LINK([#include <krb.h>],[int i;], 36017721Speter [krb_h=yes krb_incdir=$KRB4/include/kerberosIV]) 36117721Speter CFLAGS=$hold_cflags 36217721Speter fi]) 36317721Speterfi 36417721SpeterAC_MSG_RESULT($krb_h) 36517721Speter 36632785Speterincludeopt= 36732785SpeterAC_SUBST(includeopt) 36817721Speterif test -n "$krb_h"; then 36917721Speter krb_lib= 37032785Speter if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then 37132785Speter hold_ldflags=$LDFLAGS 37232785Speter LDFLAGS="-L${KRB4}/lib $LDFLAGS" 37332785Speter AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=${KRB4}/lib], 37432785Speter [LDFLAGS=$hold_ldflags 37532785Speter # Using open here instead of printf so we don't 37632785Speter # get confused by the cached value for printf from above. 37732785Speter AC_CHECK_LIB(krb,open,[krb_lib=yes krb_libdir=])]) 37832785Speter LDFLAGS=$hold_ldflags 37932785Speter else 38032785Speter AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=]) 381128266Speter AC_CHECK_FUNC(krb_recvauth,[krb_lib=yes krb_libdir=]) 38232785Speter fi 38317721Speter if test -n "$krb_lib"; then 384107484Speter AC_DEFINE([HAVE_KERBEROS], 1, 385107484Speter [Define if you have MIT Kerberos version 4 available.]) 38617721Speter test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}" 38725839Speter # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before 38825839Speter # -ldes in the command line. Don't do it permanently so that we honor 38925839Speter # the user's setting for LDFLAGS 39025839Speter hold_ldflags=$LDFLAGS 39125839Speter test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}" 39217721Speter AC_CHECK_LIB(des,printf,[LIBS="${LIBS} -ldes"]) 393128266Speter AC_CHECK_LIB(krb,krb_recvauth) 394128266Speter AC_CHECK_LIB(krb4,krb_recvauth) 39525839Speter LDFLAGS=$hold_ldflags 39617721Speter if test -n "$krb_incdir"; then 39717721Speter includeopt="${includeopt} -I$krb_incdir" 39817721Speter fi 39917721Speter fi 40017721Speterfi 40117721SpeterAC_CHECK_FUNCS(krb_get_err_text) 40217721Speter 403107484Speter 404107484Speterdnl 405107484Speterdnl WITH_GSSAPI is external 406107484Speterdnl 407107484Speterdnl TODO - I tried to put these in alphabetical order, but ACX_WITH_GSSAPI 408107484Speterdnl fails unless called after the KRB4 stuff. I don't know why. 409107484Speterdnl 41081404SpeterACX_WITH_GSSAPI 41132785Speter 412107484Speter 41332785Speterdnl 414107484Speterdnl begin --with-editor 41525839Speterdnl 416107484Speterdnl Set the default editor to use for log messages 417107484Speterdnl 418107484Speter 419107484SpeterAC_ARG_VAR( 420107484Speter [EDITOR], 421107484Speter [The text editor CVS will use by default for log messages.]) 422107484Speter 423107484Speter# Let the confiscator request a specific editor 424107484SpeterAC_ARG_WITH( 425107484Speter [editor], 426107484Speter AC_HELP_STRING( 427107484Speter [--with-editor], 428107484Speter [The default text editor CVS should use for log messages 429107484Speter (default autoselects)]), , 430128266Speter [with_editor=yes]) 431107484Speter 432128266Speter# If --with-editor was supplied with an argument, let it override $EDITOR from 433128266Speter# the user's environment. We need to unset EDITOR here because AC_CHECK_PROGS 434128266Speter# will let the value of EDITOR ride when it is set rather than searching. We 435128266Speter# ignore the --without-editor case since it will be caught below. 436128266Speterif test -n "$EDITOR" && test yes != $with_editor; then 437128266Speter AS_UNSET([EDITOR]) 438128266Speterfi 439107484Speter 440128266Speter# Set the default when --with-editor wasn't supplied or when it was supplied 441128266Speter# without an argument. 442128266Speterif test yes = $with_editor; then 443128266Speter with_editor="vim vi emacs nano pico edit" 444128266Speterfi 445128266Speter 446107484Speterif echo $with_editor |grep ^/ >/dev/null; then 447107484Speter # If $with_editor is an absolute path, issue a warning if the executable 448107484Speter # doesn't exist or isn't usable, but then trust the user and use it 449107484Speter # regardless 450107484Speter EDITOR=$with_editor 451107484Speter AC_MSG_CHECKING([for an editor]) 452107484Speter AC_MSG_RESULT([$EDITOR]) 453107484Speter if ! test -f $with_editor \ 454107484Speter || ! test -x $with_editor; then 455107484Speter # warn the user that they may encounter problems 456128266Speter AC_MSG_WARN([\`$with_editor' is not a path to an executable file]) 457107484Speter fi 458107484Speterelif test no != "${with_editor}"; then 459107484Speter # Search for an editor 460128266Speter AC_CHECK_PROGS([EDITOR], [$with_editor], [no]) 461128266Speter if test no = "${EDITOR}"; then 462128266Speter AC_MSG_ERROR([ 463128266Speter Failed to find a text file editor. CVS cannot be compiled 464128266Speter without a default log message editor. Searched for 465128266Speter \`$with_editor'. Try \`configure --with-editor'.]) 466128266Speter fi 467107484Speterelse 468128266Speter AC_MSG_ERROR([ 469128266Speter CVS cannot be compiled without a default log message editor. 470128266Speter Try \`configure --with-editor'.]) 47125839Speterfi 47225839Speter 473128266Speterdnl FIXME - Using --without-editor will probably break a compile at 474128266Speterdnl the moment, but maybe it is reasonable for someone to want to 475128266Speterdnl compile a CVS executable that refuses to run if no $EDITOR, 476128266Speterdnl $CVS_EDITOR, or -e option is specified? Making a preliminary 477128266Speterdnl design decision in this direction, subject to discussion. 478128266Speterdnl 479128266Speterdnl Still don't know if the above would be useful, but we shouldn't 480128266Speterdnl be able to get here any longer without $EDITOR defined due to the 481128266Speterdnl error checking above. 482128266SpeterAC_DEFINE_UNQUOTED( 483128266Speter [EDITOR_DFLT], ["$EDITOR"], 484128266Speter [The default editor to use, if one does not specify the "-e" option 485128266Speter to cvs, or does not have an EDITOR environment variable. If this 486128266Speter is not set to an absolute path to an executable, use the shell to 487128266Speter find where the editor actually is. This allows sites with 488128266Speter /usr/bin/vi or /usr/ucb/vi to work equally well (assuming that their 489128266Speter PATH is reasonable).]) 49017721Speter 491107484Speterdnl 492107484Speterdnl done finding an editor 493107484Speterdnl 494107484Speterdnl end --with-editor 495107484Speterdnl 496107484Speter 497175261Sobriendnl 498177391Sobriendnl begin --with-ssh 499177391Sobriendnl 500177391Sobrien 501177391Sobrien# What remote shell transport should the :extssh: client cvs default to using? 502177391SobrienAC_ARG_WITH( 503177391Sobrien [ssh], 504177391Sobrien AC_HELP_STRING( 505177391Sobrien [--with-ssh], 506177391Sobrien [The default remote shell CVS will use for :extssh: transport 507177391Sobrien (default autodetects)]), , 508177391Sobrien [with_ssh="ssh lshc ssh2"]) 509177391Sobrien 510177391Sobrienif test no = "$with_ssh"; then 511177391Sobrien AC_MSG_WARN([Failed to find usable remote shell. Using 'ssh'.]) 512177391Sobrien with_ssh=ssh 513177391Sobrienelif test yes = "$with_ssh"; then 514177391Sobrien # Make --with-ssh mean the same thing as --with-ssh=ssh 515177391Sobrien with_ssh=ssh 516177391Sobrienfi 517177391Sobrien 518177391Sobrienif echo $with_ssh |grep ^/ >/dev/null; then 519177391Sobrien # If $with_ssh is an absolute path, issue a warning if the executable 520177391Sobrien # doesn't exist or isn't usable, but then trust the user and use it 521177391Sobrien # regardless 522177391Sobrien with_default_ssh=$with_ssh 523177391Sobrien AC_MSG_CHECKING([for a remote shell]) 524177391Sobrien if ! test -f $with_ssh \ 525177391Sobrien || ! test -x $with_ssh; then 526177391Sobrien # warn the user that they may encounter problems 527177391Sobrien AC_MSG_WARN([$with_ssh is not a path to an executable file]) 528177391Sobrien fi 529177391Sobrienelse 530177391Sobrien # Search for a remote shell 531177391Sobrien AC_CHECK_PROGS([with_default_ssh], [$with_ssh], "ssh") 532177391Sobrienfi 533177391Sobrien 534177391SobrienAC_DEFINE_UNQUOTED( 535177391Sobrien [SSH_DFLT], ["$with_default_ssh"], 536177391Sobrien [The default remote shell to use, if one does not specify the 537177391Sobrien CVS_SSH environment variable.]) 538177391Sobriendnl done with finding a default CVS_SSH value 539177391Sobriendnl 540177391Sobriendnl end --with-ssh 541177391Sobriendnl 542177391Sobrien 543177391Sobrien 544177391Sobriendnl 545175261Sobriendnl begin --with-rsh 546175261Sobriendnl 547175261Sobriendnl Many sites no longer desire the use of "rsh" as the default 548175261Sobriendnl remote shell program. They typically favor "ssh" as the default 549107484Speter 550175261Sobrien# What remote shell transport should our client cvs default to using? 551175261SobrienAC_ARG_WITH( 552175261Sobrien [rsh], 553175261Sobrien AC_HELP_STRING( 554175261Sobrien [--with-rsh], 555175261Sobrien [The default remote shell CVS will use for :ext: transport 556175261Sobrien (default autodetects)]), , 557175261Sobrien dnl `remsh' is only useful on HP-UX, where `rsh' is the `restricted shell' 558175261Sobrien dnl and `remsh' is the remote shell, but look for it first since it 559175261Sobrien dnl probably won't exist on any platform where it shouldn't be preferred 560175261Sobrien dnl to `rsh'. 561177391Sobrien [with_rsh="remsh rsh ssh lshc ssh2"]) 562175261Sobrien 563175261Sobrienif test no = "$with_rsh"; then 564175261Sobrien AC_MSG_WARN([Failed to find usable remote shell. Using 'rsh'.]) 565175261Sobrien with_rsh=rsh 566175261Sobrienelif test yes = "$with_rsh"; then 567175261Sobrien # Make --with-rsh mean the same thing as --with-rsh=rsh 568175261Sobrien with_rsh=rsh 569175261Sobrienfi 570175261Sobrien 571175261Sobrienif echo $with_rsh |grep ^/ >/dev/null; then 572175261Sobrien # If $with_rsh is an absolute path, issue a warning if the executable 573175261Sobrien # doesn't exist or isn't usable, but then trust the user and use it 574175261Sobrien # regardless 575175261Sobrien with_default_rsh=$with_rsh 576175261Sobrien AC_MSG_CHECKING([for a remote shell]) 577175261Sobrien if ! test -f $with_rsh \ 578175261Sobrien || ! test -x $with_rsh; then 579175261Sobrien # warn the user that they may encounter problems 580175261Sobrien AC_MSG_WARN([$with_rsh is not a path to an executable file]) 581175261Sobrien fi 582175261Sobrienelse 583175261Sobrien # Search for a remote shell 584175261Sobrien AC_CHECK_PROGS([with_default_rsh], [$with_rsh], "rsh") 585175261Sobrienfi 586175261Sobrien 587175261SobrienAC_DEFINE_UNQUOTED( 588175261Sobrien [RSH_DFLT], ["$with_default_rsh"], 589175261Sobrien [The default remote shell to use, if one does not specify the 590175261Sobrien CVS_RSH environment variable.]) 591175261Sobriendnl done with finding a default CVS_RSH value 592107484Speterdnl 593175261Sobriendnl end --with-rsh 594175261Sobriendnl 595175261Sobrien 596175261Sobrien 597175261Sobriendnl 598107484Speterdnl Find a temporary directory 599107484Speterdnl 600107484SpeterAC_ARG_WITH( 601107484Speter [tmpdir], 602107484Speter AC_HELP_STRING( 603107484Speter [--with-tmpdir], 604107484Speter [The temporary directory CVS should use as a default 605107484Speter (default autoselects)])) 606107484Speter 607107484SpeterAC_MSG_CHECKING([for temporary directory]) 608107484Speterif test -z "$with_tmpdir" || test yes = "$with_tmpdir"; then 609128266Speter for with_tmpdir in /tmp /var/tmp no; do 610107484Speter if test -d "$with_tmpdir" && test -x "$with_tmpdir" \ 611107484Speter && test -w "$with_tmpdir" && test -r "$with_tmpdir"; then 612107484Speter break 613107484Speter fi 614107484Speter done 615107484Speter if test no = "$with_tmpdir"; then 616107484Speter AC_MSG_WARN([Failed to find usable temporary directory. Using '/tmp'.]) 617107484Speter with_tmpdir=/tmp 618107484Speter fi 619107484Speter AC_MSG_RESULT([$with_tmpdir]) 620107484Speterelif ! echo "$with_tmpdir" |grep '^[[\\/]]'; then 621107484Speter AC_MSG_RESULT([$with_tmpdir]) 622107484Speter AC_MSG_ERROR([--with-tmpdir requires an absolute path.]) 623107484Speterelif ! test -d "$with_tmpdir" || ! test -x "$with_tmpdir" \ 624107484Speter || ! test -w "$with_tmpdir" || ! test -r "$with_tmpdir"; then 625107484Speter AC_MSG_RESULT([$with_tmpdir]) 626107484Speter AC_MSG_WARN( 627107484Speter [User supplied temporary directory ('$with_tmpdir') does not 628107484Speter exist or lacks sufficient permissions for read/write.]) 629107484Speterfi 630107484Speter 631107484SpeterAC_DEFINE_UNQUOTED( 632107484Speter [TMPDIR_DFLT], ["$with_tmpdir"], 633107484Speter [Directory used for storing temporary files, if not overridden by 634107484Speter environment variables or the -T global option. There should be little 635107484Speter need to change this (-T is a better mechanism if you need to use a 636107484Speter different directory for temporary files).]) 637107484Speter 638107484Speterdnl 639107484Speterdnl done finding tmpdir 640107484Speterdnl 641107484Speter 642107484Speter 643107484Speterdnl 644107484Speterdnl Get default umask 645107484Speterdnl 646107484Speter 647107484SpeterAC_ARG_WITH( 648107484Speter [umask], 649107484Speter AC_HELP_STRING( 650107484Speter [--with-umask], 651107484Speter [Set the umask CVS will use by default in the repository (default 002)])) 652107484Speter 653107484Speterif test -z "$with_umask" || test yes = "$with_umask"; then 654107484Speter with_umask=002 655107484Speterelif test no = "$with_umask"; then 656107484Speter with_umask=000 657107484Speterfi 658107484Speter 659107484SpeterAC_DEFINE_UNQUOTED( 660107484Speter [UMASK_DFLT], [$with_umask], 661107484Speter [The default umask to use when creating or otherwise setting file or 662107484Speter directory permissions in the repository. Must be a value in the 663107484Speter range of 0 through 0777. For example, a value of 002 allows group 664107484Speter rwx access and world rx access; a value of 007 allows group rwx 665107484Speter access but no world access. This value is overridden by the value 666107484Speter of the CVSUMASK environment variable, which is interpreted as an 667107484Speter octal number.]) 668107484Speter 669107484Speterdnl 670107484Speterdnl Done setting default umask 671107484Speterdnl 672107484Speter 673109655Speterdnl 674109655Speterdnl Set CVS Administrator Group 675109655Speterdnl 676109655SpeterAC_ARG_WITH( 677109655Speter [cvs-admin-group], 678109655Speter AC_HELP_STRING( 679109655Speter [--with-cvs-admin-group=GROUP], 680109655Speter [The CVS admin command is restricted to the members of this group. 681109655Speter If this group does not exist, all users are allowed to run CVS admin. 682109655Speter To disable the CVS admin command for all users, create an empty group 683109655Speter by specifying the --with-cvs-admin-group= option. To disable access 684109655Speter control for CVS admin, run configure with the --without-cvs-admin-group 685109655Speter option. (default 'cvsadmin')]), , 686109655Speter [with_cvs_admin_group=cvsadmin]) 687107484Speter 688109655Speterif test yes = "$with_cvs_admin_group"; then 689109655Speter with_cvs_admin_group=cvsadmin 690109655Speterfi 691109655Speterif test no != "$with_cvs_admin_group"; then 692109655Speter dnl FIXME We should warn if the group doesn't exist 693109655Speter AC_DEFINE_UNQUOTED( 694109655Speter [CVS_ADMIN_GROUP], ["$with_cvs_admin_group"], 695109655Speter [The CVS admin command is restricted to the members of the group 696109655Speter CVS_ADMIN_GROUP. If this group does not exist, all users are 697109655Speter allowed to run CVS admin. To disable the CVS admin command for 698109655Speter all users, create an empty CVS_ADMIN_GROUP by running configure 699109655Speter with the --with-cvs-admin-group= option. To disable access control 700109655Speter for CVS admin, run configure with the --without-cvs-admin-group 701109655Speter option in order to comment out the define below.]) 702109655Speterfi 703109655Speter 704107484Speterdnl 705109655Speterdnl Done setting CVS Administrator Group 706109655Speterdnl 707109655Speter 708109655Speterdnl 709177391Sobriendnl end --with-* 710177391Sobriendnl 711177391Sobrien 712177391Sobrien 713177391Sobriendnl 714109655Speterdnl Set the NDBM library to use. 715109655Speterdnl 716109655Speterdnl XXX - FIXME - FIXME - FIXME - XXX 717109655Speterdnl 718109655Speterdnl This is very bad. It should really autodetect an appropriate NDBM library 719109655Speterdnl and, if it doesn't find one, decide to use MY_NDBM. I'm am defining 720109655Speterdnl this here since this is no worse than it worked when it was in options.h 721109655Speterdnl and I am cleaning out options.h so that the Windows version of CVS will 722109655Speterdnl compile properly for the next release. 723109655Speterdnl 724109655Speterdnl That's why this option is in the --with-* section rather than the 725109655Speterdnl --enable-* section. 726109655Speterdnl 727109655Speterdnl XXX - FIXME - FIXME - FIXME - XXX 728109655Speterdnl 729109655SpeterAC_ARG_ENABLE( 730109655Speter [cvs-ndbm], 731109655Speter AC_HELP_STRING( 732109655Speter [--enable-cvs-ndbm], 733109655Speter [Use the NDBM library distributed with CVS rather than attempting to use 734109655Speter a system NDBM library. Disabling this may not work. (default)]), , 735109655Speter [enable_cvs_ndbm=yes]) 736109655Speterif test no != "$enable_cvs_ndbm"; then 737109655Speter AC_DEFINE( 738109655Speter [MY_NDBM], [1], 739109655Speter [By default, CVS stores its modules and other such items in flat 740109655Speter text files (MY_NDBM enables this). Turning off MY_NDBM causes CVS 741109655Speter to look for a system-supplied ndbm database library and use it 742109655Speter instead. That may speed things up, but the default setting 743109655Speter generally works fine too.]) 744109655Speterfi 745109655Speter 746109655Speterdnl 747109655Speterdnl Done selecting NDBM library. 748109655Speterdnl 749109655Speter 750109655Speter 751109655Speterdnl 752177391Sobriendnl begin --enables 753107484Speterdnl 754107484Speter 755107484Speter 756177391Sobriendnl Allow mmap for the buffer routine replacements to be disabled in 757177391Sobriendnl case of problems. 758107484Speter 759177391SobrienAC_ARG_ENABLE( 760177391Sobrien [mmap], 761177391Sobrien AC_HELP_STRING( 762177391Sobrien [--disable-mmap], 763177391Sobrien [Don't mmap RCS files])) 764107484Speter 765177391Sobrienif test no != "$enable_mmap"; then 766177391Sobrien AC_FUNC_MMAP 767177391Sobrienfi 768177391Sobrien 76925839Speter# Check for options requesting client and server feature. If none are 77025839Speter# given and we have connect(), we want the full client & server arrangement. 771107484SpeterAC_ARG_ENABLE( 772107484Speter [client], 773107484Speter AC_HELP_STRING( 774107484Speter [--enable-client], 775107484Speter [Include code for running as a remote client (default)]), , 776107484Speter [if test "$ac_cv_search_connect" != no; then 777107484Speter enable_client=yes 778107484Speter fi]) 779107484Speterif test no != "$enable_client"; then 780107484Speter AC_DEFINE( 781107484Speter [CLIENT_SUPPORT], [1], 782107484Speter [Define if you want CVS to be able to be a remote repository client.]) 783107484Speterfi 78425839Speter 785107484SpeterAC_ARG_ENABLE( 786107484Speter [password-authenticated-client], 787107484Speter AC_HELP_STRING( 788107484Speter [--enable-password-authenticated-client], 789107484Speter [Enable pserver as a remote access method in the CVS client 790107484Speter (default)])) 79125839Speter 792107484Speterif test no != "$enable_password_authenticated_client"; then 793107484Speter if test no != "$enable_client"; then 794107484Speter AC_DEFINE( 795107484Speter [AUTH_CLIENT_SUPPORT], [1], 796107484Speter [Enable AUTH_CLIENT_SUPPORT to enable pserver as a remote access 797107484Speter method in the CVS client (default)]) 798107484Speter else 799107484Speter AC_MSG_WARN( 800128266Speter [--enable-password-authenticated-client is meaningless with 801107484Speter the CVS client disabled (--disable-client)]) 802107484Speter fi 803107484Speterfi 804107484Speter 805107484Speter 806107484Speterdnl 807107484Speterdnl Give the confiscator control over whether the server code is compiled 808107484Speterdnl 809107484SpeterAC_ARG_ENABLE( 810107484Speter [server], 811107484Speter AC_HELP_STRING( 812107484Speter [--enable-server], 813107484Speter [Include code for running as a server (default)]), , 814107484Speter [if test "$ac_cv_search_connect" != no; then 815107484Speter enable_server=yes 816107484Speter fi]) 817107484Speter 818107484Speterif test no != "$enable_server"; then 819107484Speter AC_DEFINE( 820107484Speter [SERVER_SUPPORT], [1], 821107484Speter [Define if you want CVS to be able to serve repositories to remote 822107484Speter clients.]) 823107484Speter 824107484Speter dnl 825107484Speter dnl The auth server needs to be able to check passwords against passwd 826107484Speter dnl file entries, so we only #define AUTH_SERVER_SUPPORT if we can 827107484Speter dnl find the crypt function. 828107484Speter dnl 829107484Speter AC_SEARCH_LIBS( 830107484Speter [crypt], [crypt], 831107484Speter [AC_DEFINE( 832107484Speter [HAVE_CRYPT], [1], 833107484Speter [Define if you have the crypt function.]) 834107484Speter AC_DEFINE( 835107484Speter [AUTH_SERVER_SUPPORT], [1], 836107484Speter [Define if you want to use the password authenticated server.])dnl 837107484Speter ])dnl AC_SEARCH_LIBS 838107484Speter 839107484Speter dnl 840107484Speter dnl Allow the configurer to enable server flowcontrol. Read the help 841107484Speter dnl strings below for a full explanation. 842107484Speter dnl 843107484Speter AC_ARG_ENABLE( 844107484Speter [server-flow-control], 845107484Speter AC_HELP_STRING( 846107484Speter [--enable-server-flow-control], 847107484Speter [If you are working with a large remote repository and a 'cvs 848107484Speter checkout' is swamping your network and memory, define these to 849107484Speter enable flow control. You may optionally pass a low water mark 850107484Speter in bytes and a high water mark in bytes, separated by commas. 851107484Speter (default is enabled 1M,2M)]), 852107484Speter [if test yes = $enable_server_flow_control; then 853107484Speter enable_server_flow_control=1M,2M 854107484Speter fi], 855107484Speter [enable_server_flow_control=1M,2M]) 856107484Speter if test no != $enable_server_flow_control; then 857107484Speter ccvs_lwm=`expr "$enable_server_flow_control" : '\(.*\),'` 858107484Speter ccvs_hwm=`expr "$enable_server_flow_control" : '.*,\(.*\)'` 859107484Speter ccvs_lwm_E=`expr "$ccvs_lwm" : '[[0-9]][[0-9]]*\(.*\)'` 860107484Speter ccvs_lwm=`expr "$ccvs_lwm" : '\([[0-9]][[0-9]]*\)'` 861107484Speter test "" != "$ccvs_lwm" || ccvs_lwm_E="?" 862107484Speter case $ccvs_lwm_E in 863107484Speter G) ccvs_lwm="$ccvs_lwm * 1024 * 1024 * 1024";; 864107484Speter M) ccvs_lwm="$ccvs_lwm * 1024 * 1024";; 865107484Speter k) ccvs_lwm="$ccvs_lwm * 1024";; 866107484Speter b | '') ;; 867107484Speter *) AC_MSG_ERROR([Can't parse argument to --enable-server-flow-control 868107484Speter ('$enable_server_flow_control') as <lwm>,<hwm>]) 869107484Speter esac 870107484Speter ccvs_hwm_E=`expr "$ccvs_hwm" : '[[0-9]][[0-9]]*\(.*\)'` 871107484Speter ccvs_hwm=`expr "$ccvs_hwm" : '\([[0-9]][[0-9]]*\).*'` 872107484Speter test "" != "$ccvs_hwm" || ccvs_hwm_E="?" 873107484Speter case $ccvs_hwm_E in 874107484Speter G) ccvs_hwm="$ccvs_hwm * 1024 * 1024 * 1024";; 875107484Speter M) ccvs_hwm="$ccvs_hwm * 1024 * 1024";; 876107484Speter k) ccvs_hwm="$ccvs_hwm * 1024";; 877107484Speter b | '') ccvs_hwm="$ccvs_hwm";; 878107484Speter *) AC_MSG_ERROR([Can't parse argument to --enable-server-flow-control 879107484Speter ('$enable_server_flow_control') as <lwm>,<hwm>]) 880107484Speter esac 881107484Speter 882107484Speter AC_DEFINE( 883107484Speter [SERVER_FLOWCONTROL], [1], 884107484Speter [If you are working with a large remote repository and a 'cvs 885107484Speter checkout' is swamping your network and memory, define these to 886107484Speter enable flow control. You will end up with even less probability of 887107484Speter a consistent checkout (see Concurrency in cvs.texinfo), but CVS 888107484Speter doesn't try to guarantee that anyway. The master server process 889107484Speter will monitor how far it is getting behind, if it reaches the high 890107484Speter water mark, it will signal the child process to stop generating 891107484Speter data when convenient (ie: no locks are held, currently at the 892107484Speter beginning of a new directory). Once the buffer has drained 893107484Speter sufficiently to reach the low water mark, it will be signalled to 894107484Speter start again.]) 895107484Speter AC_DEFINE_UNQUOTED( 896107484Speter [SERVER_LO_WATER], [($ccvs_lwm)], 897107484Speter [The low water mark in bytes for server flow control. Required if 898107484Speter SERVER_FLOWCONTROL is defined, and useless otherwise.]) 899107484Speter AC_DEFINE_UNQUOTED( 900107484Speter [SERVER_HI_WATER], [($ccvs_hwm)], 901107484Speter [The high water mark in bytes for server flow control. Required if 902107484Speter SERVER_FLOWCONTROL is defined, and useless otherwise.]) 903107484Speter fi # enable_server_flow_control 90425839Speterfi # enable_server 90517721Speter 906107484Speter 907107484Speterdnl 908128266Speterdnl begin --enable-case-sensitivity 909128266Speterdnl 910128266Speter 911128266SpeterAC_ARG_ENABLE( 912128266Speter [case-sensitivity], 913128266Speter AC_HELP_STRING( 914128266Speter [--enable-case-sensitivity], 915128266Speter [Force CVS to expect a case sensitive file system. Enabling this on a case 916128266Speter insensitive system should have little effect on the server or client 917128266Speter operation, though client users may ocassionally be suprised that the CVS 918128266Speter server appears to be case sensitive. Disabling this for a case sensitive 919128266Speter server disables server support for case insensitive clients, which can 920128266Speter confuse all users of case insensitive clients contacting the server. 921128266Speter Disabling this for a case sensitive client will cause the client to ask 922128266Speter servers to behave case insensitively, which could cause confusion for 923128266Speter users, but also probably no real harm. (default autoselects based on the 924128266Speter case sensitivity of the file system containing the current working 925128266Speter directory)]), 926128266Speter [case "$enable_case_sensitivity" in 927128266Speter yes | no | auto) ;; 928128266Speter *) 929128266Speter AC_MSG_ERROR([Unrecognized argument to --enable-case-sensitivity: \`$enable_case_sensitivity'. Acceptable values are \`yes', \`no', and \`auto'.]) 930128266Speter ;; 931128266Speter esac], 932128266Speter [enable_case_sensitivity=auto]) 933128266Speter 934128266Speteracx_forced=' (forced)' 935128266SpeterAC_MSG_CHECKING([for a case sensitive file system]) 936128266Speterif test $enable_case_sensitivity = auto; then 937128266Speter dnl 938128266Speter dnl Check for a case insensitive filesystem, like Mac OS X and Windows have. 939128266Speter dnl 940128266Speter AC_CACHE_VAL([acx_cv_case_sensitive], 941128266Speter [ rm -f ac_TEST_filenames_CASE_sensitive 942128266Speter echo foo >ac_test_filenames_case_sensitive 943128266Speter if test -f ac_TEST_filenames_CASE_sensitive; then 944128266Speter acx_cv_case_sensitive=no 945128266Speter else 946128266Speter acx_cv_case_sensitive=yes 947128266Speter fi 948128266Speter rm ac_test_filenames_case_sensitive 949128266Speter ]) 950128266Speter enable_case_sensitivity=$acx_cv_case_sensitive 951128266Speter acx_forced= 952128266Speterfi 953128266SpeterAC_MSG_RESULT([$enable_case_sensitivity$acx_forced]) 954128266Speterif test $enable_case_sensitivity = no; then 955128266Speter AC_DEFINE([FILENAMES_CASE_INSENSITIVE], [1], 956128266Speter [Define if this executable will be running on case insensitive 957128266Speter file systems. In the client case, this means that it will request 958128266Speter that the server pretend to be case insensitive if it isn't 959128266Speter already.]) 960128266Speter dnl Compile fncase.c (containing fncase() & fncmp()) to handle file name 961128266Speter dnl comparisons on case insensitive filesystems. 962128266Speter AC_LIBOBJ(fncase) 963128266Speterfi 964128266Speter 965128266Speterdnl 966128266Speterdnl end --enable-case-sensitivity 967128266Speterdnl 968128266Speter 969128266Speter 970128266Speterdnl 971128266Speterdnl begin --enable-encryption 972128266Speterdnl 973128266Speter 974128266Speterdnl 975107484Speterdnl Use --enable-encryption to turn on encryption support, but ignore this 976107484Speterdnl option unless either client or server is enabled. 977107484Speterdnl 978107484SpeterAC_ARG_ENABLE( 979107484Speter [encryption], 980107484Speter AC_HELP_STRING( 981107484Speter [--enable-encryption], 982107484Speter [Enable encryption support (disabled by default)]), , 983107484Speter [enable_encryption=no]) 984107484Speterif test "$enable_encryption" = yes; then 985107484Speter if test no != "$with_client" || test no != "$with_server"; then 986107484Speter AC_DEFINE( 987107484Speter [ENCRYPTION], [1], 988107484Speter [Define to enable encryption support.]) 989107484Speter else 990107484Speter AC_MSG_WARN( 991128266Speter [--enable-encryption is meaningless when neither the CVS client 992107484Speter nor the CVS server is enabled (--disable-client and --disable-server).]) 993107484Speter fi 994107484Speterfi 995107484Speter 996107484Speterdnl 997107484Speterdnl end --enable-encryption 998107484Speterdnl 999107484Speter 1000107484Speter 1001107484Speterdnl 1002107484Speterdnl begin --enable-force-editor 1003107484Speterdnl 1004107484Speter 1005107484SpeterAC_ARG_ENABLE( 1006107484Speter [force-editor], 1007107484Speter AC_HELP_STRING( 1008107484Speter [--enable-force-editor], 1009107484Speter [When committing or importing files, you must enter a log message. 1010107484Speter Normally, you can do this either via the -m flag on the command 1011107484Speter line, the -F flag on the command line, or an editor will be started 1012107484Speter for you. If you like to use logging templates (the rcsinfo file 1013107484Speter within the $CVSROOT/CVSROOT directory), you might want to force 1014107484Speter people to use the editor even if they specify a message with -m or 1015107484Speter -F. --enable-force-editor will cause the -m or -F message to be 1016107484Speter appended to the temp file when the editor is started. (disabled 1017107484Speter by default)]), , 1018107484Speter [enable_force_editor=no]) 1019107484Speter 1020107484Speterif test yes = "$enable_force_editor"; then 1021107484Speter AC_DEFINE( 1022107484Speter [FORCE_USE_EDITOR], [1], 1023107484Speter [When committing or importing files, you must enter a log message. 1024107484Speter Normally, you can do this either via the -m flag on the command 1025107484Speter line, the -F flag on the command line, or an editor will be started 1026107484Speter for you. If you like to use logging templates (the rcsinfo file 1027107484Speter within the $CVSROOT/CVSROOT directory), you might want to force 1028107484Speter people to use the editor even if they specify a message with -m or 1029107484Speter -F. Enabling FORCE_USE_EDITOR will cause the -m or -F message to be 1030107484Speter appended to the temp file when the editor is started.]) 1031107484Speterfi 1032107484Speter 1033107484Speterdnl 1034107484Speterdnl end --enable-force-editor 1035107484Speterdnl 1036107484Speter 1037107484Speter 1038107484Speterdnl 1039107484Speterdnl begin --enable-rootcommit 1040107484Speterdnl 1041107484Speter 1042107484Speterdnl 1043107484Speterdnl I don't like this here, but I don't really like options.h, either. 1044107484Speterdnl Besides, this is causing some problems currently when compiling under 1045107484Speterdnl Windows and moving it here should avoid the issue (the wrong options.h 1046107484Speterdnl is being used). 1047107484Speterdnl 1048107484Speterdnl I don't like making this a runtime option either. I think I just don't 1049107484Speterdnl like making it easy to get to, but putting it here goes along with the 1050107484Speterdnl Autoconf ideal. 1051107484Speterdnl 1052107484SpeterAC_ARG_ENABLE( 1053107484Speter [rootcommit], 1054107484Speter AC_HELP_STRING( 1055107484Speter [--enable-rootcommit], 1056107484Speter [Allow the root user to commit files (disabled by default)]), , 1057107484Speter [enable_rootcommit=no]) 1058107484Speterif test "$enable_rootcommit" = no; then 1059107484Speter AC_DEFINE( 1060107484Speter [CVS_BADROOT], [1], 1061107484Speter [When committing a permanent change, CVS and RCS make a log entry of 1062107484Speter who committed the change. If you are committing the change logged 1063107484Speter in as "root" (not under "su" or other root-priv giving program), 1064107484Speter CVS/RCS cannot determine who is actually making the change. 1065107484Speter 1066107484Speter As such, by default, CVS prohibits changes committed by users 1067107484Speter logged in as "root". You can disable checking by passing the 1068107484Speter "--enable-rootcommit" option to configure or by commenting out the 1069107484Speter lines below.]) 1070107484Speterfi 1071107484Speter 1072107484Speterdnl 1073107484Speterdnl end --enable-rootcommit 1074107484Speterdnl 1075107484Speter 1076107484Speter 1077109655Speter 1078107484Speterdnl 1079109655Speterdnl end --enable-* 1080107484Speterdnl 1081107484Speter 1082107484Speter 1083128266Speter 108434461Speterdnl For the moment we will assume that all systems which have 108534461Speterdnl the unixyness to run configure are unixy enough to do the 108634461Speterdnl PreservePermissions stuff. I have this sinking feeling that 108734461Speterdnl things won't be that simple, before long. 1088107484Speterdnl AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT, 1, 1089107484Speterdnl [Define if this system supports chown(), link(), and friends.]) 109034461Speter 1091128266Speterdnl On cygwin32, we configure like a Unix system, but we need some support 1092128266Speterdnl libraries. We do this at the end so that the new libraries are added at 1093128266Speterdnl the end of LIBS. 1094102840Speterdnl 1095102840Speterdnl FIXME: We should be trying to meet the autoconf ideal of checking for 1096102840Speterdnl the properties of the system rather than the name of the os here. In other 1097102840Speterdnl words, we should check the case sensitivty of the system and then for 1098102840Speterdnl the support functions we are using and which library we find them in. 109932785SpeterAC_CACHE_CHECK(for cygwin32, ccvs_cv_sys_cygwin32, 110032785Speter[AC_TRY_COMPILE([], [return __CYGWIN32__;], 110132785Speterccvs_cv_sys_cygwin32=yes, ccvs_cv_sys_cygwin32=no)]) 110232785Speterif test $ccvs_cv_sys_cygwin32 = yes; then 110332785Speter LIBS="$LIBS -ladvapi32" 110432785Speter 110532785Speter dnl On Windows you can only change file times if you can write to 110632785Speter dnl the file. cygwin32 should really handle this for us, but as of 110732785Speter dnl January 1998 it doesn't. 1108107484Speter AC_DEFINE(UTIME_EXPECTS_WRITABLE, 1, 1109107484Speter[Define if utime requires write access to the file (true on Windows, 1110107484Speterbut not Unix).]) 111132785Speter 111232785Speter dnl On Windows we must use setmode to change between binary and text 1113107484Speter dnl mode. This probably doesn't really require two macro definitions 1114107484Speter AC_DEFINE(USE_SETMODE_STDOUT, 1, 1115107484Speter[Define if setmode is required when writing binary data to stdout.]) 1116107484Speter AC_DEFINE(HAVE_SETMODE, 1, 1117107484Speter[Define if the diff library should use setmode for binary files.]) 111832785Speterfi 111932785Speter 1120107484Speterdnl associate the setting of the execute bit with the individual scripts 1121107484SpeterAC_CONFIG_FILES(contrib/check_cvs, [chmod +x contrib/check_cvs]) 1122107484SpeterAC_CONFIG_FILES(contrib/clmerge, [chmod +x contrib/clmerge]) 1123107484SpeterAC_CONFIG_FILES(contrib/cln_hist, [chmod +x contrib/cln_hist]) 1124107484SpeterAC_CONFIG_FILES(contrib/commit_prep, [chmod +x contrib/commit_prep]) 1125107484SpeterAC_CONFIG_FILES(contrib/cvs_acls, [chmod +x contrib/cvs_acls]) 1126107484SpeterAC_CONFIG_FILES(contrib/log, [chmod +x contrib/log]) 1127107484SpeterAC_CONFIG_FILES(contrib/log_accum, [chmod +x contrib/log_accum]) 1128107484SpeterAC_CONFIG_FILES(contrib/mfpipe, [chmod +x contrib/mfpipe]) 1129107484SpeterAC_CONFIG_FILES(contrib/pvcs2rcs, [chmod +x contrib/pvcs2rcs]) 1130128266SpeterAC_CONFIG_FILES(contrib/rcs2log:contrib/rcs2log.sh, [chmod +x contrib/rcs2log]) 1131107484SpeterAC_CONFIG_FILES(contrib/rcslock, [chmod +x contrib/rcslock]) 1132107484SpeterAC_CONFIG_FILES(contrib/sccs2rcs, [chmod +x contrib/sccs2rcs]) 1133175261SobrienAC_CONFIG_FILES(doc/mkman:doc/mkman.pl, [chmod +x doc/mkman]) 1134107484SpeterAC_CONFIG_FILES(src/cvsbug, [chmod +x src/cvsbug]) 1135130303SpeterAC_CONFIG_FILES(windows-NT/fix-msvc-mak:windows-NT/fix-msvc-mak-head.pl:windows-NT/fix-msvc-mak.pl, 1136130303Speter [chmod +x windows-NT/fix-msvc-mak]) 113717721Speter 1138107484Speterdnl the bulk files 1139107484SpeterAC_CONFIG_FILES([Makefile \ 1140107484Speter contrib/Makefile \ 1141102840Speter cvs.spec \ 114281404Speter diff/Makefile \ 114381404Speter doc/Makefile \ 114481404Speter emx/Makefile \ 114581404Speter lib/Makefile \ 114681404Speter man/Makefile \ 114781404Speter os2/Makefile \ 114881404Speter src/Makefile \ 114981404Speter tools/Makefile \ 115081404Speter vms/Makefile \ 115181404Speter windows-NT/Makefile \ 115281404Speter windows-NT/SCC/Makefile \ 1153107484Speter zlib/Makefile]) 1154107484Speter 1155107484Speterdnl and we're done 1156107484SpeterAC_OUTPUT 1157128266Speter 1158128266Speter 1159128266Speter 1160128266Speter# Report the state of this version of CVS if this is from dev. 1161128266Speterm4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[0-9]*\.[0-9]*\.[0-9]*\.[0-9]], 1162128266Speter[ cat <<EOF 1163128266Speter 1164128266SpeterYou are about to use an unreleased version of CVS. Be sure to 1165175261Sobrienread the relevant mailing lists, most importantly <info-cvs@nongnu.org>. 1166128266Speter 1167128266SpeterBelow you will find information on the status of this version of CVS. 1168128266Speter 1169128266Speter 1170128266SpeterEOF 1171128266Speter sed -n '/^\* Status/,$p' $srcdir/BUGS 1172128266Speter]) 1173