11e72d8d2Sderaadtdnl configure.in for cvs 21e72d8d2SderaadtAC_INIT(src/cvs.h) 379822b2aStholoAM_INIT_AUTOMAKE(cvs, 1.11.1p1) 4bde78045StholoAC_PREREQ(2.13) 5bde78045StholoAC_PREFIX_PROGRAM(cvs) 679822b2aStholoAM_CONFIG_HEADER(config.h src/options.h) 71e72d8d2Sderaadt 8bde78045StholoAC_PROG_AWK 91e72d8d2SderaadtAC_PROG_CC 101e72d8d2SderaadtAC_PROG_INSTALL 11bde78045StholoAC_PROG_MAKE_SET 1279822b2aStholo# Automake's more advanced version of AC_PROG_RANLIB 131e72d8d2SderaadtAC_PROG_RANLIB 141e72d8d2SderaadtAC_PROG_YACC 1579822b2aStholoAC_PROG_LN_S 161e72d8d2Sderaadt 1779822b2aStholoAC_PATH_PROG(PERL, perl, no) 1879822b2aStholoAC_PATH_PROG(CSH, csh, no) 1979822b2aStholoAC_PATH_PROG(PR, pr, no) 2079822b2aStholo# For diff/util.c 2179822b2aStholoif test x"$PR" != xno; then 2279822b2aStholo AC_DEFINE_UNQUOTED([PR_PROGRAM], ["$PR"], [Path to the pr utility]) 2379822b2aStholofi 2479822b2aStholo 2579822b2aStholodnl FIXME This is truly gross. 2679822b2aStholomissing_dir=`cd $ac_aux_dir && pwd` 2779822b2aStholodnl FIXME I pulled this default list from sanity.sh. Perhaps these lists 2879822b2aStholodnl can be stored in one location? 2979822b2aSthologlocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin" 3079822b2aStholoAC_PATH_PROGS(ROFF, groff roff, $missing_dir/missing roff, $glocs) 3179822b2aStholoAC_PATH_PROG(PS2PDF, ps2pdf, $missing_dir/missing ps2pdf) 3279822b2aStholoAC_PATH_PROG(TEXI2DVI, texi2dvi, $missing_dir/missing texi2dvi) 331e72d8d2Sderaadt 341e72d8d2SderaadtAC_SYS_INTERPRETER 351e72d8d2Sderaadtif test X"$ac_cv_sys_interpreter" != X"yes" ; then 361e72d8d2Sderaadt # silly trick to avoid problems in AC macros... 371e72d8d2Sderaadt ac_msg='perl scripts using #! may not be invoked properly' 381e72d8d2Sderaadt AC_MSG_WARN($ac_msg) 391e72d8d2Sderaadtfi 401e72d8d2Sderaadt 4179822b2aStholo# BSD's logo is a devil for a reason, hey? 4279822b2aStholoAC_CACHE_CHECK(for BSD VPATH bug in make, ccvs_cv_bsd_make_vpath_bug, 4379822b2aStholo[if test ! -d ac_test_dir ; then 4479822b2aStholo AC_TRY_COMMAND([mkdir ac_test_dir]) 4579822b2aStholofi 4679822b2aStholocat >conftestmake <<EOF 4779822b2aStholoVPATH = ac_test_dir 4879822b2aStholoac_test_target: ac_test_dep 4979822b2aStholo echo BSD VPATH bug present >&2 5079822b2aStholoac_test_dep: ac_test_dep_dep 5179822b2aStholoEOF 5279822b2aStholotouch ac_test_dir/ac_test_dep_dep 5379822b2aStholotouch ac_test_dir/ac_test_dep 5479822b2aStholotouch ac_test_target 5579822b2aStholo# Don't know why, but the following test doesn't work under FreeBSD 4.2 5679822b2aStholo# without this sleep command 5779822b2aStholosleep 1 5879822b2aStholoif AC_TRY_COMMAND([make -f conftestmake 2>&1 >/dev/null |grep ^BSD\ VPATH\ bug\ present\$ >/dev/null]) ; then 5979822b2aStholo ccvs_cv_bsd_make_vpath_bug=yes 6079822b2aStholoelse 6179822b2aStholo ccvs_cv_bsd_make_vpath_bug=no 6279822b2aStholofi 6379822b2aStholoAC_TRY_COMMAND([rm -rf ac_test_dir ac_test_target conftestmake])]) 6479822b2aStholo# We also don't need to worry about the bug when $srcdir = $builddir 6579822b2aStholoAM_CONDITIONAL(MAKE_TARGETS_IN_VPATH, \ 6679822b2aStholo test $ccvs_cv_bsd_make_vpath_bug = no \ 6779822b2aStholo || test $srcdir = .) 6879822b2aStholo 69bde78045StholoAC_AIX 70bde78045StholoAC_MINIX 71bde78045StholoAC_ISC_POSIX 72bde78045Stholoif test "$ISC" = yes; then 73bde78045StholoCFLAGS="$CFLAGS -D_SYSV3" 74bde78045StholoLIBS="-lcrypt $LIBS" 75bde78045Stholofi 76bde78045Stholo 77bde78045StholoAC_HEADER_DIRENT 781e72d8d2SderaadtAC_HEADER_STDC 79bde78045StholoAC_HEADER_SYS_WAIT 801e72d8d2SderaadtAC_CHECK_HEADERS(errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \ 818143b48aSmillert limits.h stdint.h sys/file.h \ 82e79e3062Smillert sys/param.h sys/select.h sys/time.h \ 8379822b2aStholo io.h direct.h sys/bsdtypes.h sys/resource.h syslog.h) 841e72d8d2SderaadtAC_HEADER_STAT 851e72d8d2SderaadtAC_HEADER_TIME 86bde78045Stholo 87bde78045StholoAC_C_CONST 881e72d8d2SderaadtAC_TYPE_UID_T 891e72d8d2SderaadtAC_TYPE_MODE_T 901e72d8d2SderaadtAC_TYPE_PID_T 91bde78045StholoAC_TYPE_SIZE_T 92bde78045StholoAC_TYPE_SIGNAL 93bde78045Stholo 94b2b690deStholoAC_STRUCT_ST_BLKSIZE 95bde78045StholoAC_STRUCT_ST_RDEV 969fe7c2c3StholoAC_REPLACE_FUNCS(mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul) 9779822b2aStholoAC_CHECK_FUNCS(\ 9879822b2aStholo fchdir \ 9979822b2aStholo fchmod \ 10079822b2aStholo fsync \ 10179822b2aStholo ftime \ 10279822b2aStholo ftruncate \ 10379822b2aStholo getgroups \ 10479822b2aStholo getpagesize \ 10579822b2aStholo getpassphrase \ 10679822b2aStholo gettimeofday \ 10779822b2aStholo initgroups \ 10879822b2aStholo mkstemp \ 10979822b2aStholo mktemp \ 11079822b2aStholo putenv \ 11179822b2aStholo readlink \ 11279822b2aStholo sigaction \ 11379822b2aStholo sigblock \ 11479822b2aStholo sigprocmask \ 11579822b2aStholo sigsetmask \ 11679822b2aStholo sigvec \ 11779822b2aStholo tempnam \ 11879822b2aStholo timezone \ 11979822b2aStholo tzset \ 12079822b2aStholo vprintf \ 12179822b2aStholo wait3 \ 12279822b2aStholo) 12379822b2aStholo# we only need one of the following 12479822b2aStholoAC_CHECK_FUNCS([\ 12579822b2aStholo nanosleep \ 12679822b2aStholo usleep \ 12779822b2aStholo select \ 12879822b2aStholo], [break]) 129b2b690deStholo 130b2b690deStholodnl 131b2b690deStholodnl The CVS coding standard (as specified in HACKING) is that if it exists 132b2b690deStholodnl in SunOS4 and ANSI, we use it. CVS itself, of course, therefore doesn't 133b2b690deStholodnl need HAVE_* defines for such functions, but diff wants them. 134b2b690deStholodnl 135b2b690deStholoAC_DEFINE(HAVE_STRCHR) 136b2b690deStholoAC_DEFINE(HAVE_MEMCHR) 137b2b690deStholo 138b2b690deStholodnl 139bde78045Stholodnl Force lib/regex.c to use malloc instead of messing around with alloca 140bde78045Stholodnl and define the old re_comp routines that we use. 141bde78045Stholodnl 142bde78045StholoAC_DEFINE(REGEX_MALLOC) 143bde78045StholoAC_DEFINE(_REGEX_RE_COMP) 144bde78045Stholodnl 145b2b690deStholodnl AC_FUNC_VFORK is rather baroque. It seems to be rather more picky 146b2b690deStholodnl than, say, the Single Unix Specification (version 2), which simplifies 147b2b690deStholodnl a lot of cases by saying that the child process can't set any variables 148b2b690deStholodnl (thus avoiding problems with register allocation) or call any functions 149b2b690deStholodnl (thus avoiding problems with whether file descriptors are shared). 150b2b690deStholodnl It would be nice if we could just write to the Single Unix Specification. 151b2b690deStholodnl I think the only way to do redirection this way is by doing it in the 152b2b690deStholodnl parent, and then undoing it afterwards (analogous to windows-NT/run.c). 153b2b690deStholodnl That would appear to have a race condition if the user hits ^C (or 154b2b690deStholodnl some other signal) at the wrong time, as main_cleanup will try to use 155b2b690deStholodnl stdout/stderr. So maybe we are stuck with AC_FUNC_VFORK. 156b2b690deStholodnl 157b2b690deStholoAC_FUNC_VFORK 158b2b690deStholoAC_FUNC_CLOSEDIR_VOID 1597e4d5a85Stholo 1607e4d5a85Stholodnl 1612e5b458aStholodnl Check for shadow password support. 1627e4d5a85Stholodnl 1632e5b458aStholodnl We used to try to determine whether shadow passwords were actually in 1642e5b458aStholodnl use or not, but the code has been changed to work right reguardless, 1652e5b458aStholodnl so we can go back to a simple check. 166bde78045StholoAC_SEARCH_LIBS(getspnam, sec gen, AC_DEFINE(HAVE_GETSPNAM)) 1677e4d5a85Stholo 168c88482c3Stholodnl 169c88482c3Stholodnl Check for a system libz. 170c88482c3Stholodnl 1710a643772StholoAC_CHECK_LIB(z, zlibVersion, ZLIB=-lz ZLIB_DEPEND=/usr/lib/libz.a, ZLIBSUBDIRS=zlib ZLIB=$srcdir/zlib/libz.a ZLIB_DEPEND=$srcdir/zlib/libz.a ZLIB_INCLUDES=-I$srcdir/zlib) 172c88482c3StholoAC_SUBST(ZLIB) 173c88482c3StholoAC_SUBST(ZLIBSUBDIRS) 174c88482c3StholoAC_SUBST(ZLIB_INCLUDES) 1750a643772StholoAC_SUBST(ZLIB_DEPEND) 176c88482c3Stholo 177b2b690deStholodnl We always use CVS's regular expression matcher. 178b2b690deStholodnl This is because: 179b2b690deStholodnl (1) If memory serves, the syntax of the regular expressions 180b2b690deStholodnl handled by re_exec is not consistent from system to system, which 181b2b690deStholodnl is a Bad Thing because CVS passes this syntax out to the user. 182b2b690deStholodnl We might have better luck with the POSIX interface, if we really 183b2b690deStholodnl want to look for a system-supplied matcher. 184b2b690deStholodnl (2) It is necessary to make _sure_ that we get a regex.h and regex.c 185b2b690deStholodnl that match each other. In particular, rx and the CVS/emacs 186b2b690deStholodnl regex.c have a different "struct re_pattern_buffer" and so using 187b2b690deStholodnl the system regex.h and our regex.c, or vice versa, will tend to 188b2b690deStholodnl cause a core dump. 189b2b690deStholodnl (3) Just as a random data point, CVS uses re_exec (a BSD interface); 190b2b690deStholodnl libdiff uses re_compile_pattern (a GNU interface, I think). Diff 191b2b690deStholodnl should probably be fixed to have the caller (CVS) supply the regexp 192b2b690deStholodnl matching. 193b2b690deStholodnl 194b2b690deStholodnl AC_CHECK_FUNC(re_exec, :, LIBOBJS="$LIBOBJS regex.o") 1951e72d8d2SderaadtAC_FUNC_UTIME_NULL 1961e72d8d2SderaadtAC_SYS_LONG_FILE_NAMES 1971e72d8d2Sderaadt 198bde78045StholoAC_FUNC_FNMATCH 199bde78045Stholoif test "$ac_cv_func_fnmatch_works" = no; then 2001e72d8d2Sderaadt LIBOBJS="$LIBOBJS fnmatch.o" 2011e72d8d2Sderaadtfi 2021e72d8d2Sderaadt 203bde78045Stholo# Try to find connect and gethostbyname. 204bde78045StholoAC_CHECK_LIB(nsl, main, 205bde78045Stholo AC_SEARCH_LIBS(connect, xnet socket inet, AC_DEFINE(HAVE_CONNECT),, -lnsl), 206bde78045Stholo AC_SEARCH_LIBS(connect, xnet socket inet, AC_DEFINE(HAVE_CONNECT))) 207bde78045StholoAC_SEARCH_LIBS(gethostbyname, netinet nsl) 208ae5e8a9bStholo 2091e72d8d2Sderaadtdnl 21045381119Stholodnl set $(KRB4) from --with-krb4=value -- WITH_KRB4 2111e72d8d2Sderaadtdnl 212b2b690deStholodnl If you change this, keep in mind that some systems have a bogus 213b2b690deStholodnl libkrb in the system libraries, so --with-krb4=value needs to 214b2b690deStholodnl override the system -lkrb. 215b2b690deStholodnl 2161e72d8d2SderaadtKRB4=/usr/kerberos 21713571821Stholodefine(WITH_KRB4,[ 21813571821StholoAC_ARG_WITH([krb4], 21945381119Stholo [ --with-krb4=value set default \$(KRB4) from value], 22013571821Stholo [KRB4=$withval], 2211e72d8d2Sderaadt)dnl 2221e72d8d2Sderaadtecho "default place for krb4 is $KRB4" 2231e72d8d2SderaadtAC_SUBST(KRB4)])dnl 2241e72d8d2SderaadtWITH_KRB4 2251e72d8d2Sderaadt 2261e72d8d2Sderaadtkrb_h= 22713571821StholoAC_MSG_CHECKING([for krb.h]) 228b2b690deStholoif test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then 2291e72d8d2Sderaadt hold_cflags=$CFLAGS 2301e72d8d2Sderaadt CFLAGS="$CFLAGS -I$KRB4/include" 23113571821Stholo AC_TRY_LINK([#include <krb.h>],[int i;], 232b2b690deStholo [krb_h=yes krb_incdir=$KRB4/include], 233b2b690deStholo [CFLAGS=$hold_cflags 234b2b690deStholo AC_TRY_LINK([#include <krb.h>],[int i;], 235b2b690deStholo [krb_h=yes krb_incdir=])]) 2361e72d8d2Sderaadt CFLAGS=$hold_cflags 237b2b690deStholoelse 238b2b690deStholo AC_TRY_LINK([#include <krb.h>],[int i;], 239b2b690deStholo [krb_h=yes krb_incdir=]) 240b2b690deStholofi 24113571821Stholoif test -z "$krb_h"; then 24213571821Stholo AC_TRY_LINK([#include <krb.h>],[int i;], 24313571821Stholo [krb_h=yes krb_incdir=], 24413571821Stholo [if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then 24513571821Stholo hold_cflags=$CFLAGS 24613571821Stholo CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV" 24713571821Stholo AC_TRY_LINK([#include <krb.h>],[int i;], 24813571821Stholo [krb_h=yes krb_incdir=$KRB4/include/kerberosIV]) 24913571821Stholo CFLAGS=$hold_cflags 25013571821Stholo fi]) 25113571821Stholofi 25213571821StholoAC_MSG_RESULT($krb_h) 25313571821Stholo 254b2b690deStholoincludeopt= 255b2b690deStholoAC_SUBST(includeopt) 2561e72d8d2Sderaadtif test -n "$krb_h"; then 2571e72d8d2Sderaadt krb_lib= 258b2b690deStholo if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then 259b2b690deStholo hold_ldflags=$LDFLAGS 260b2b690deStholo LDFLAGS="-L${KRB4}/lib $LDFLAGS" 261b2b690deStholo AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=${KRB4}/lib], 262b2b690deStholo [LDFLAGS=$hold_ldflags 263b2b690deStholo # Using open here instead of printf so we don't 264b2b690deStholo # get confused by the cached value for printf from above. 265b2b690deStholo AC_CHECK_LIB(krb,open,[krb_lib=yes krb_libdir=])]) 266b2b690deStholo LDFLAGS=$hold_ldflags 267b2b690deStholo else 268b2b690deStholo AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=]) 269b2b690deStholo fi 2701e72d8d2Sderaadtfi 2717e4d5a85Stholo 2727e4d5a85Stholodnl 273b2b690deStholodnl Use --with-gssapi=DIR to enable GSSAPI support. 274b2b690deStholodnl 275b2b690deStholoGSSAPI=/usr/cygnus/kerbnet 276b2b690deStholodefine(WITH_GSSAPI,[ 277b2b690deStholoAC_ARG_WITH([gssapi], 278b2b690deStholo [ --with-gssapi=value GSSAPI directory], 279b2b690deStholo [GSSAPI=$withval], 280b2b690deStholo)dnl 281b2b690deStholoecho "default place for GSSAPI is $GSSAPI" 282b2b690deStholoAC_SUBST(GSSAPI)])dnl 283b2b690deStholoWITH_GSSAPI 284b2b690deStholo 285b2b690deStholohold_cppflags=$CPPFLAGS 2863c834d0fShoCPPFLAGS="$CPPFLAGS -I$GSSAPI/include/kerberosV " 2879fe7c2c3StholoAC_CHECK_HEADERS(krb5.h gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h) 288eea99451StholoCPPFLAGS=$hold_cppflags 289eea99451Stholo 2909fe7c2c3Stholoif test "$ac_cv_header_krb5_h" = "yes" && 2919fe7c2c3Stholo (test "$ac_cv_header_gssapi_h" = "yes" || 2929fe7c2c3Stholo test "$ac_cv_header_gssapi_gssapi_h" = "yes"); then 293eea99451Stholo AC_DEFINE(HAVE_GSSAPI) 2943c834d0fSho includeopt="${includeopt} -I$GSSAPI/include/kerberosV" 295eea99451Stholo # FIXME: This is ugly, but these things don't seem to be standardized. 296eea99451Stholo if test "$ac_cv_header_gssapi_h" = "yes"; then 2970456bce5Sjsg LIBS="$LIBS -L$GSSAPI/lib -lgssapi -lkrb5 -lcrypto" 298eea99451Stholo else 2990456bce5Sjsg LIBS="$LIBS -L$GSSAPI/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err" 300eea99451Stholo fi 301eea99451Stholo save_CPPFLAGS=$CPPFLAGS 3023c834d0fSho CPPFLAGS="-I$GSSAPI/include/kerberosV $CPPFLAGS" 303eea99451Stholo if test "$ac_cv_header_gssapi_h" = "yes"; then 304eea99451Stholo AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)) 305eea99451Stholo else 306eea99451Stholo AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)) 307eea99451Stholo fi 308eea99451Stholo CPPFLAGS=$save_CPPFLAGS 309b2b690deStholo # This is necessary on Irix 5.3, in order to link against libkrb5 -- 310b2b690deStholo # there, an_to_ln.o refers to things defined only in -lgen. 311eea99451Stholo AC_CHECK_LIB(gen, compile) 312eea99451Stholofi 313b2b690deStholo 3140a643772Stholoif test -n "$krb_h"; then 3150a643772Stholo if test -n "$krb_lib"; then 3160a643772Stholo AC_DEFINE(HAVE_KERBEROS) 3170a643772Stholo test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}" 3180a643772Stholo LIBS="${LIBS} -lkrb" 3190a643772Stholo # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before 3200a643772Stholo # -ldes in the command line. Don't do it permanently so that we honor 3210a643772Stholo # the user's setting for LDFLAGS 3220a643772Stholo hold_ldflags=$LDFLAGS 3230a643772Stholo test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}" 3240a643772Stholo AC_CHECK_LIB(des,printf,[LIBS="${LIBS} -ldes"]) 3250a643772Stholo LDFLAGS=$hold_ldflags 3260a643772Stholo if test -n "$krb_incdir"; then 3270a643772Stholo includeopt="${includeopt} -I$krb_incdir" 3280a643772Stholo fi 3290a643772Stholo fi 3300a643772Stholofi 3310a643772StholoAC_CHECK_FUNCS(krb_get_err_text) 3320a643772Stholo 333b2b690deStholodnl 3347e4d5a85Stholodnl Use --with-encryption to turn on encryption support 3357e4d5a85Stholodnl 3367e4d5a85StholoAC_ARG_ENABLE(encryption, 3377e4d5a85Stholo [ --enable-encryption enable encryption support], 3387e4d5a85Stholo [case "${enableval}" in 3397e4d5a85Stholo yes) encryption=true ;; 3407e4d5a85Stholo no) encryption=false ;; 3417e4d5a85Stholo *) AC_MSG_ERROR(bad value ${enableval} for encryption option) ;; 3427e4d5a85Stholo esac], 3437e4d5a85Stholo [encryption=false]) 3447e4d5a85Stholoif test "$encryption" = "true"; then 3457e4d5a85Stholo AC_DEFINE(ENCRYPTION) 3467e4d5a85Stholofi 3477e4d5a85Stholo 3481e72d8d2SderaadtAC_CHECK_FUNC(gethostname, :, LIBOBJS="$LIBOBJS hostname.o") 3491e72d8d2Sderaadt 350ae5e8a9bStholo# Check for options requesting client and server feature. If none are 351ae5e8a9bStholo# given and we have connect(), we want the full client & server arrangement. 352ae5e8a9bStholoAC_ARG_ENABLE(client, 353ae5e8a9bStholo[ --enable-client include code for running as a remote client (default) 354ae5e8a9bStholo --disable-client don't include remote client code], 355ae5e8a9bStholo[if test "$enable_client" = yes; then 3561e72d8d2Sderaadt AC_DEFINE(CLIENT_SUPPORT) 357ae5e8a9bStholofi], 358bde78045Stholo[if test "$ac_cv_search_connect" != no; then 359ae5e8a9bStholo AC_DEFINE(CLIENT_SUPPORT) 360ae5e8a9bStholofi]) 361ae5e8a9bStholoAC_ARG_ENABLE(server, 362ae5e8a9bStholo[ --enable-server include code for running as a server (default) 363ae5e8a9bStholo --disable-server don't include server code], 364ae5e8a9bStholo[if test "$enable_server" = yes; then 3651e72d8d2Sderaadt AC_DEFINE(SERVER_SUPPORT) 366ae5e8a9bStholofi], 367bde78045Stholo[if test "$ac_cv_search_connect" != no; then 368ae5e8a9bStholo AC_DEFINE(SERVER_SUPPORT) 369ae5e8a9bStholo enable_server=yes 370ae5e8a9bStholofi]) 371ae5e8a9bStholo 37278c87a5cStholodnl For the moment we will assume that all systems which have 37378c87a5cStholodnl the unixyness to run configure are unixy enough to do the 37478c87a5cStholodnl PreservePermissions stuff. I have this sinking feeling that 37578c87a5cStholodnl things won't be that simple, before long. 376bde78045Stholodnl AC_DEFINE(PRESERVE_PERMISSIONS_SUPPORT) 37778c87a5cStholo 378b2b690deStholodnl On cygwin32, we configure like a Unix system, but we use the 379b2b690deStholodnl Windows support code in lib/fncase.c to handle the case 380b2b690deStholodnl insensitive file system. We also need some support libraries. We 381b2b690deStholodnl do this at the end so that the new libraries are added at the end 382b2b690deStholodnl of LIBS. 383b2b690deStholoAC_CACHE_CHECK(for cygwin32, ccvs_cv_sys_cygwin32, 384b2b690deStholo[AC_TRY_COMPILE([], [return __CYGWIN32__;], 385b2b690deStholoccvs_cv_sys_cygwin32=yes, ccvs_cv_sys_cygwin32=no)]) 386b2b690deStholoif test $ccvs_cv_sys_cygwin32 = yes; then 387b2b690deStholo LIBOBJS="$LIBOBJS fncase.o" 388b2b690deStholo LIBS="$LIBS -ladvapi32" 389b2b690deStholo 390b2b690deStholo dnl On Windows you can only change file times if you can write to 391b2b690deStholo dnl the file. cygwin32 should really handle this for us, but as of 392b2b690deStholo dnl January 1998 it doesn't. 393b2b690deStholo AC_DEFINE(UTIME_EXPECTS_WRITABLE) 394b2b690deStholo 395b2b690deStholo dnl On Windows we must use setmode to change between binary and text 396b2b690deStholo dnl mode. 397b2b690deStholo AC_DEFINE(USE_SETMODE_STDOUT) 398b2b690deStholo AC_DEFINE(HAVE_SETMODE) 399b2b690deStholofi 400b2b690deStholo 4011e72d8d2Sderaadttest -f src/options.h && ( 4021e72d8d2Sderaadt AC_MSG_WARN(saving ./src/options.h in ./src/options.h-SAVED) 4031e72d8d2Sderaadt AC_MSG_WARN(You may wish to check that local options have not been lost.) 4041e72d8d2Sderaadt AC_MSG_WARN(Do not re-run ./configure or ./config.status until you have....) 4051e72d8d2Sderaadt cp ./src/options.h ./src/options.h-SAVED 4061e72d8d2Sderaadt) 4071e72d8d2Sderaadt 40879822b2aStholoAC_OUTPUT([Makefile \ 4099fe7c2c3Stholo contrib/Makefile \ 41079822b2aStholo contrib/clmerge \ 41179822b2aStholo contrib/cln_hist \ 41279822b2aStholo contrib/commit_prep \ 41379822b2aStholo contrib/cvs_acls \ 41479822b2aStholo contrib/log \ 41579822b2aStholo contrib/log_accum \ 41679822b2aStholo contrib/mfpipe \ 41779822b2aStholo contrib/rcslock \ 41879822b2aStholo contrib/sccs2rcs \ 41979822b2aStholo diff/Makefile \ 42079822b2aStholo doc/Makefile \ 42179822b2aStholo emx/Makefile \ 42279822b2aStholo lib/Makefile \ 42379822b2aStholo man/Makefile \ 42479822b2aStholo os2/Makefile \ 42579822b2aStholo src/Makefile \ 42679822b2aStholo src/cvsbug \ 42779822b2aStholo tools/Makefile \ 42879822b2aStholo vms/Makefile \ 42979822b2aStholo windows-NT/Makefile \ 430*90c45c29Stb windows-NT/SCC/Makefile], 43179822b2aStholo [chmod -f +x \ 43279822b2aStholo contrib/clmerge \ 43379822b2aStholo contrib/cln_hist \ 43479822b2aStholo contrib/commit_prep \ 43579822b2aStholo contrib/cvs_acls \ 43679822b2aStholo contrib/log \ 43779822b2aStholo contrib/log_accum \ 43879822b2aStholo contrib/mfpipe \ 43979822b2aStholo contrib/rcslock \ 44079822b2aStholo contrib/sccs2rcs \ 44179822b2aStholo src/cvsbug]) 442