: # Guess values for system-dependent variables and create Makefiles. # Generated automatically by autoconf. # Copyright (C) 1991 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [TARGET] # All args except --srcdir=DIR are ignored. trap 'rm -f conftest conftest.c; exit 1' 1 3 15 set +u # Make sure unset variables are ok. for arg in $*; do # Handle --srcdir with a space before the argument. if test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir= # Handle --host with a space before the argument. elif test x$next_host = xyes; then next_host= else case $arg in +srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*) srcdir=`echo $arg | sed 's/[+-]s[a-z]*=//'` ;; +srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s) next_srcdir=yes ;; +host=* | --host=* | --hos=* | --ho=* | --h=*) ;; +host | --host | --hos | --ho | --h) next_host=yes ;; +gas | --gas | --ga | --g) ;; +nfp | --nfp | --nf | --n) ;; *) ;; esac fi done INCLUDEDIR=${INCLUDEDIR-/usr/include} rm -f conftest conftest.c compile='$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1' # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. unique_file=uucico.c # Makefile rules whose targets are searched for in VPATH need to use $<. # However, old makes do not support it, so we use a combination # construction in Makefile.in: `$file<'. # If srcdir is `.', we use sed to change that to `file' for old makes. # Otherwise, we use sed to change it to `$<'. # vpsub is the sed program, which changes `$file<' to one or the other. vpsub='s,\$\([-./a-zA-Z0-9_][-./a-zA-Z0-9_]*\)<,\1,g' # Find the source files, if location was not specified. if test x$srcdir = x; then srcdirdefaulted=yes; srcdir=. if test ! -r $unique_file; then srcdir=`pwd`/..; fi fi if test $srcdir != .; then VPATH='VPATH = $(srcdir)' vpsub='s,\$\([-./a-zA-Z0-9_][-./a-zA-Z0-9_]*\)<,\$<,g' fi if test ! -r $srcdir/$unique_file; then if test x$srcdirdefaulted = xyes; then echo "configure: Can not find sources in \`.' or \`..'." 1>&2 else echo "configure: Can not find sources in \`${srcdir}'." 1>&2 fi exit 1 fi # The Bourne shell writes "command not found" to /dev/tty, so if we get # a usage message on stderr, we have the program. # # ksh and zsh write "command not found" to stderr, but test -n does not # want any output if there is no program. So we use the `type' builtin # instead for them (and bash). if test "$RANDOM" = "$RANDOM"; then checkfor='test -n "`$checkprog $checkargs 2>&1`"' else checkfor='type $checkprog >/dev/null' fi exec 6>conf.h trap 'rm -f conftest conftest.c conf.h; exit 1' 1 3 15 echo 1>&6 "/* conf.h */" echo 1>&6 "/* Configuration header file for Taylor UUCP. Generated on `date`. */ " echo checking for install # Make sure to not get the incompatible SysV /etc/install. if test -z "$INSTALL" || test -z "$INSTALLDATA"; then saveifs="$IFS"; IFS="$IFS:" for dir in $PATH; do test -z "$dir" && dir=. if test $dir != /etc && test -f $dir/install; then test -z "$INSTALL" && INSTALL="$dir/install -c" test -z "$INSTALLDATA" && INSTALLDATA="$dir/install -c -m 644" break fi done IFS="$saveifs" fi INSTALL=${INSTALL-cp} INSTALLDATA=${INSTALLDATA-cp} echo checking for gcc checkprog=gcc checkargs='' test -z "$CC" && eval $checkfor && CC='gcc -O' CC=${CC-cc} CFLAGS=${CFLAGS--g} echo checking for mail program echo 1>&6 "/* Set MAIL_PROGRAM to a program which takes a mail address as an argument and accepts a mail message to send to that address on stdin. */ #define MAIL_PROGRAM `if test -s /usr/ucb/mail; then echo '"/usr/ucb/mail"'; else if test -s /bin/mail; then echo '"/bin/mail"'; else echo 'undefined'; fi; fi`" echo checking for echo program echo 1>&6 " /* Set ECHO_PROGRAM to a program which echoes its arguments; if echo is a shell builtin you can just use \"echo\". */ #define ECHO_PROGRAM `if test -s /bin/echo; then echo '"/bin/echo"'; else echo '"echo"'; fi`" echo checking for symbolic links if ln -s X NoSucHFile 2>/dev/null; then LN_S='ln -s' else LN_S='ln' fi rm -f NoSucHFile echo 1>&6 " /* The following macros indicate what header files you have. Set the macro to 1 if you have the corresponding header file, or 0 if you do not. */" for hdr in string.h strings.h unistd.h stdlib.h limits.h time.h do havehdr=HAVE_`echo ${hdr} | tr "[a-z]./" "[A-Z]__"` echo checking for ${hdr} echo 1>&6 "#define ${havehdr} `if test -f $INCLUDEDIR/${hdr}; then echo 1; else echo 0; fi` /* <${hdr}> */" done for hdr in sys/wait.h sys/ioctl.h dirent.h memory.h sys/param.h do havehdr=HAVE_`echo ${hdr} | tr "[a-z]./" "[A-Z]__"` echo checking for ${hdr} echo 1>&6 "#define ${havehdr} `if test -f $INCLUDEDIR/${hdr}; then echo 1; else echo 0; fi` /* <${hdr}> */" done for hdr in utime.h fcntl.h sys/file.h libc.h sysexits.h do havehdr=HAVE_`echo ${hdr} | tr "[a-z]./" "[A-Z]__"` echo checking for ${hdr} echo 1>&6 "#define ${havehdr} `if test -f $INCLUDEDIR/${hdr}; then echo 1; else echo 0; fi` /* <${hdr}> */" done for hdr in poll.h stropts.h do havehdr=HAVE_`echo ${hdr} | tr "[a-z]./" "[A-Z]__"` echo checking for ${hdr} echo 1>&6 "#define ${havehdr} `if test -f $INCLUDEDIR/${hdr}; then echo 1; else echo 0; fi` /* <${hdr}> */" done echo 1>&6 "" echo checking for signal handler type pattern='void[ ]*(\*signal[ ]*(' echo 1>&6 "/* Set SIGtype to the return type of a signal handler. On newer systems this will be void; some older systems use int. */ #define SIGtype `if grep "$pattern" $INCLUDEDIR/signal.h >/dev/null 2>&1 || grep "$pattern" $INCLUDEDIR/sys/signal.h >/dev/null 2>&1; then echo void else echo int fi`" echo checking for time_t in time.h echo "#include main() { exit(0); } t() { time_t i; }" > conftest.c eval $compile echo 1>&6 " /* Set HAVE_TIME_T to 1 if time_t is defined in , as required by the ANSI C standard. */ #define HAVE_TIME_T `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo checking for time_t in sys/types.h echo "#include main() { exit(0); } t() { time_t i; }" > conftest.c eval $compile echo 1>&6 " /* Set HAVE_SYS_TIME_T to 1 if time_t is defined in ; this is only checked if HAVE_TIME_T is 0. */ #define HAVE_SYS_TIME_T `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo 1>&6 "" echo checking for time.h and sys/time.h being included together echo "#include #include main () { exit (0); }" > conftest.c eval $compile echo 1>&6 "/* Set HAVE_SYS_TIME_AND_TIME_H to 1 if and can both be included in a single source file; if you don't have either or both of them, it doesn't matter what you set this to. */ #define HAVE_SYS_TIME_AND_TIME_H `(if test -f $INCLUDEDIR/time.h -a -f $INCLUDEDIR/sys/time.h -a -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo 1>&6 "" echo checking for termios.h and sys/ioctl.h being included together echo "#include #include main () { exit (0); }" > conftest.c eval $compile echo 1>&6 "/* Set HAVE_TERMIOS_AND_SYS_IOCTL_H to 1 if and can both be included in a single source file; if you don't have either or both of them, it doesn't matter what you set this to. */ #define HAVE_TERMIOS_AND_SYS_IOCTL_H `(if test -f $INCLUDEDIR/termios.h -a -f $INCLUDEDIR/sys/ioctl.h -a -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo 1>&6 "" echo checking for CBREAK echo "#include main() { exit(0); } t() { int i = CBREAK; }" > conftest.c eval $compile echo 1>&6 "/* If you are configuring by hand, you should set one of the terminal driver options in policy.h. If you are autoconfiguring, the script will check whether your system defines CBREAK, which is a terminal setting; if your system supports CBREAK, and you don't set a terminal driver in policy.h, the code will assume that you have a BSD style terminal driver. */ #define HAVE_CBREAK `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo 1>&6 " /* The package needs several standard types. If you are using the configure script, it will look in standard places for these types, and give default definitions for them here if it doesn't find them. The default definitions should work on most systems, but you may want to check them. If you are configuring by hand, you will have to figure out whether the types are defined on your system, and what they should be defined to. Each of the types should be defined using #define. For example, #define pid_t int */" echo 1>&6 " /* The type pid_t is used to hold a process ID number. It is normally defined in . This is the type returned by the functions fork or getpid. Usually int will work fine. */" echo checking for pid_t in sys/types.h echo "#include main() { exit(0); } t() {pid_t x; }" >conftest.c eval $compile if test -s conftest && ./conftest 2>/dev/null; then echo 1>&6 "/* A definition of pid_t was found on your system. */" else echo 1>&6 "#define pid_t int" fi rm -f conftest conftest.c echo 1>&6 " /* The type uid_t is used to hold a user ID number. It is normally defined in . This is the type returned by the getuid function. Usually int will work fine. */" echo checking for uid_t in sys/types.h echo "#include main() { exit(0); } t() {uid_t x; }" >conftest.c eval $compile if test -s conftest && ./conftest 2>/dev/null; then echo 1>&6 "/* A definition of uid_t was found on your system. */" else echo 1>&6 "#define uid_t int" fi rm -f conftest conftest.c echo 1>&6 " /* The type gid_t is used to hold a group ID number. It is sometimes defined in . This is the type returned by the getgid function. Usually int will work fine. */" echo checking for gid_t in sys/types.h echo "#include main() { exit(0); } t() {gid_t x; }" >conftest.c eval $compile if test -s conftest && ./conftest 2>/dev/null; then echo 1>&6 "/* A definition of gid_t was found on your system. */" else echo 1>&6 "#define gid_t int" fi rm -f conftest conftest.c echo 1>&6 " /* The type off_t is used to hold an offset in a file. It is sometimes defined in . This is the type of the second argument to the lseek function. Usually long will work fine. */" echo checking for off_t in sys/types.h echo "#include main() { exit(0); } t() {off_t x; }" >conftest.c eval $compile if test -s conftest && ./conftest 2>/dev/null; then echo 1>&6 "/* A definition of off_t was found on your system. */" else echo 1>&6 "#define off_t long" fi rm -f conftest conftest.c echo checking for sig_atomic_t in signal.h echo "#include main() { exit(0); } t() { sig_atomic_t x; }" > conftest.c eval $compile echo 1>&6 " /* Set HAVE_SIG_ATOMIC_T_IN_SIGNAL_H if the type sig_atomic_t is defined in as required by ANSI C. */ #define HAVE_SIG_ATOMIC_T_IN_SIGNAL_H `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo checking for sig_atomic_t in sys/types.h echo "#include main() { exit(0); } t() { sig_atomic_t x; }" > conftest.c eval $compile echo 1>&6 " /* Set HAVE_SIG_ATOMIC_T_IN_TYPES_H if the type sig_atomic_t is defined in . This is ignored if HAVE_SIG_ATOMIC_T_IN_SIGNAL_H is set to 1. */ #define HAVE_SIG_ATOMIC_T_IN_TYPES_H `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo 1>&6 " /* The type sig_atomic_t is used to hold a value which may be referenced in a single atomic operation. If it is not defined in either or , you may want to give it a definition here (if you don't, the code will use char). If your compiler does not support sig_atomic_t, there is no type which is really correct; fortunately, for this package it does not really matter very much. */" echo checking how to get filesystem info echo 1>&6 " /* When Taylor UUCP is talking to another instance of itself, it will tell the other side the size of a file before it is transferred. If the package can determine how much disk space is available, it will use this information to avoid filling up the disk. Define one of the following macros to tell the code how to determine the amount of available disk space. It is possible that none of these are appropriate; it will do no harm to use none of them, but, of course, nothing will then prevent the package from filling up the disk. Note that this space check is only useful when talking to another instance of Taylor UUCP. FS_STATVFS the statvfs function FS_USG_STATFS the four argument statfs function FS_MNTENT the two argument statfs function with the f_bsize field FS_STATFS the two argument statfs function with the f_fsize field FS_GETMNT the two argument statfs function with the fd_req field FS_USTAT the ustat function with 512 byte blocks. */" if test -f $INCLUDEDIR/sys/statvfs.h -a -f $INCLUDEDIR/sys/fstyp.h; then echo 1>&6 "#define FS_STATVFS " elif test -f $INCLUDEDIR/sys/statfs.h -a -f $INCLUDEDIR/sys/fstyp.h; then echo 1>&6 "#define FS_USG_STATFS " elif test -f $INCLUDEDIR/mntent.h; then echo 1>&6 "#define FS_MNTENT " elif test -f $INCLUDEDIR/sys/mount.h -a -f $INCLUDEDIR/sys/fs_types.h; then echo 1>&6 "#define FS_GETMNT " elif grep MOUNT_UFS $INCLUDEDIR/sys/mount.h >/dev/null 2>&1; then echo 1>&6 "#define FS_STATFS " else echo checking for ustat echo " main() { exit(0); } t() { ustat(); }" > conftest.c eval $compile if test -s conftest && ./conftest 2>/dev/null; then echo 1>&6 "#define FS_USTAT " fi rm -f conftest conftest.c fi echo checking for void echo "void main() { (void) exit (0); }" > conftest.c eval $compile echo 1>&6 " /* Set HAVE_VOID to 1 if the compiler supports declaring functions with a return type of void and casting values to void. */ #define HAVE_VOID `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest.c conftest echo checking for unsigned char echo "main () { unsigned char i = (unsigned char) -1; exit (0); }" > conftest.c eval $compile echo 1>&6 " /* Set HAVE_UNSIGNED_CHAR to 1 if the compiler supports the type unsigned char. */ #define HAVE_UNSIGNED_CHAR `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest.c conftest echo checking for "int.*errno" in "errno.h" echo 1>&6 " /* Set HAVE_ERRNO_DECLARATION to 1 if errno is declared in . */ #define HAVE_ERRNO_DECLARATION `if grep 'int.*errno' $INCLUDEDIR/errno.h >/dev/null 2>&1; then echo 1; else echo 0; fi`" echo checking for combined use of O_NONBLOCK and O_NDELAY echo "#include #ifndef O_NDELAY #ifdef FNDELAY #define O_NDELAY FNDELAY #else #define O_NDELAY 0 #endif #endif #ifndef O_NONBLOCK #ifdef FNBLOCK #define O_NONBLOCK FNBLOCK #else #define O_NONBLOCK 0 #endif #endif main () { exit (fcntl (open ("'"conftest.c"'", O_RDONLY), F_SETFL, O_NONBLOCK | O_NDELAY)); }" > conftest.c eval $compile echo 1>&6 " /* Set COMBINED_UNBLOCK to 1 if the flags O_NONBLOCK and O_NDELAY can both be specified at once on a file descriptor. If your system does not support both flags, it doesn't matter what you set this to. */ #define COMBINED_UNBLOCK `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" echo checking for alloca echo "#ifdef __GNUC__ #define alloca __builtin_alloca #else /* ! defined(__GNUC__) */ #ifdef sparc #include #else /* ! defined (sparc) */ #ifdef _AIX #pragma alloca #else /* ! defined (_AIX) */ char *alloca (); #endif /* ! defined (_AIX) */ #endif /* ! defined (sparc) */ #endif /* ! defined (__GNUC__) */ main() { exit(0); } t() { char *p = (char *) alloca(1); }" > conftest.c eval $compile if test -s conftest && ./conftest 2>/dev/null; then : else OLIBS=$LIBS if test -f /usr/ucblib/libucb.a; then LIBS="$LIBS -L/usr/ucblib -lucb" # SVR4 elif test -f /lib/libPW.a; then LIBS="$LIBS -lPW" # SVR2 and SVR3 else ALLOCA=alloca.o fi if test "$OLIBS" != "$LIBS"; then eval $compile if test -s conftest && ./conftest 2>/dev/null; then : else LIBS=$OLIBS ALLOCA=alloca.o fi fi fi echo 1>&6 " /* There are now a number of functions to check for. For each of these, the macro HAVE_FUNC should be set to 1 if your system has FUNC. For example, HAVE_STRERROR should be set to 1 if your system has strerror, 0 otherwise. */" echo 1>&6 " /* Taylor UUCP provides its own versions of the following functions, or knows how to work around their absence. */" for func in memset memcmp memchr memcpy bcopy bcmp bzero do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo checking for memmove echo "main () { exit (0); } t() { memmove(); }" > conftest.c eval $compile havememmove=`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null` rm -f conftest conftest.c if test "${havememmove}" != "1"; then echo 1>&6 "#define HAVE_MEMMOVE 0" else echo "main() { register int x1, x2, x3; char s[2]; x1 = 1; x2 = 2; x3 = 3; memmove(s, "'""'", 1); exit((x1 != 1) || (x2 != 2) || (x3 != 3)); }" > conftest.c cc -o conftest conftest.c >/dev/null 2>/dev/null if test ! -s ./conftest; then echo 1>&6 "#define HAVE_MEMMOVE 1" elif ./conftest 2>/dev/null; then echo 1>&6 "#define HAVE_MEMMOVE 1" else echo 1>&6 "#define HAVE_MEMMOVE 0 /* Your memmove seems to be buggy. */" fi rm -f conftest conftest.c fi for func in strchr strrchr index rindex strerror strtol strstr do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done for func in strdup strcasecmp stricmp strlwr bsearch vfprintf do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done for func in remove ftruncate ltrunc rename opendir dup2 waitpid wait4 do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* If you have either sigsetjmp or setret, it will be used instead of setjmp. These functions will only be used if your system restarts system calls after interrupts (see HAVE_RESTARTABLE_SYSCALLS, below). */" for func in sigsetjmp setret do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* The code needs to know what function to use to set a signal handler. If will try to use each of the following functions in turn. If none are available, it will use signal, which is assumed to always exist. */" for func in sigaction sigvec sigset do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* The code will try to use each of the following functions in turn when blocking signals from delivery. If none are available, a relatively unimportant race condition will exist. */" for func in sigprocmask sigblock sighold do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* If you have either of the following functions, it will be used to determine the number of file descriptors which may be open. Otherwise, the code will use OPEN_MAX if defined, then NOFILE if defined, then 20. */" for func in getdtablesize sysconf do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* The code will use one of the following functions when detaching from a terminal. One of these must exist. */" for func in setpgrp setsid do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* If you do not specify the local node name in the main configuration file, Taylor UUCP will try to use each of the following functions in turn. If neither is available, you must specify the local node name in the configuration file. */" for func in gethostname uname do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* The code will try to use each of the following functions in turn to determine the current time. If none are available, it will use time, which is assume to always exist. */" for func in gettimeofday do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo checking for ftime echo "main () { exit (0); } t() { ftime(); }" > conftest.c eval $compile haveftime=`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null` rm -f conftest conftest.c if test "${haveftime}" != "1"; then echo 1>&6 "#define HAVE_FTIME 0" else echo "#include #include main () { struct timeb s, slast; int c = 0; ftime (&slast); while (c < 10) { ftime (&s); if (s.time < slast.time || (s.time == slast.time && s.millitm < slast.millitm)) exit (1); if (s.time != slast.time) ++c; slast.time = s.time; slast.millitm = s.millitm; } exit (0); }" > conftest.c eval $compile if test -s ./conftest && ./conftest 2>/dev/null; then echo 1>&6 "#define HAVE_FTIME 1" else echo 1>&6 "#define HAVE_FTIME 0 /* Your ftime seems to be buggy. */" fi rm -f conftest conftest.c fi echo 1>&6 " /* If neither gettimeofday nor ftime is available, the code will use times (if available) to measure a span of time. See also the discussion of TIMES_TICK in policy.h. */" for func in times do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* When a chat script requests a pause of less than a second with \\p, Taylor UUCP will try to use each of the following functions in turn. If none are available, it will sleep for a full second. Also, the (non-portable) tstuu program requires either select or poll. */" for func in napms nap usleep poll select do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo '#include #include "conf.h" main () { #if ! HAVE_NAPMS #if ! HAVE_NAP #if ! HAVE_USLEEP #if ! HAVE_POLL #if ! HAVE_SELECT fprintf (stderr, "WARNING: No way to sleep for less than one second\n"); fprintf (stderr, " \\p in chat scripts will sleep for a full second\n"); #endif #endif #endif #endif #endif }' > conftest.c eval $compile if test -s ./conftest; then ./conftest fi rm -f conftest conftest.c echo 1>&6 " /* If the getgrent function is available, it will be used to determine all the groups a user belongs to when checking file access permissions. */" for func in getgrent do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* If the socket function is available, TCP support code will be compiled in. */" for func in socket do havefunc=HAVE_`echo ${func} | tr "[a-z]" "[A-Z]"` echo checking for ${func} echo "main() { exit (0); } t() { ${func}(); }" > conftest.c eval $compile echo 1>&6 "#define ${havefunc} `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c done echo 1>&6 " /* The code needs to know to how to get the name of the current directory. If getcwd is available it will be used, otherwise if getwd is available it will be used. Otherwise, set PWD_PROGRAM to the name of the program which will print the name of the current working directory. */" echo checking for getcwd echo "main() { exit (0); } t() { getcwd(); }" >conftest.c eval $compile havegetcwd=`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null` echo 1>&6 "#define HAVE_GETCWD ${havegetcwd}" echo checking for getwd echo "main() { exit (0); } t() { getwd(); }" >conftest.c eval $compile havegetwd=`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null` echo 1>&6 "#define HAVE_GETWD ${havegetwd}" if test "${havegetcwd}" != 1 -a "${havegetwd}" != 1; then echo 1>&6 "#define PWD_PROGRAM `if test -s /bin/pwd; then echo '"/bin/pwd"'; else echo unknown; fi`" else echo 1>&6 "#define PWD_PROGRAM unused" fi echo 1>&6 " /* The code needs to know how to create directories. If you have the mkdir function, set HAVE_MKDIR to 1 and replace @UUDIR@ in Makefile.in with '# ' (the configure script will set @UUDIR@ according to the variable UUDIR). Otherwise, set HAVE_MKDIR to 0, remove @UUDIR@ from Makefile.in, and set MKDIR_PROGRAM to the name of the program which will create a directory named on the command line. */" echo checking for mkdir echo "main() { exit (0); } t() { mkdir(); }" > conftest.c eval $compile havemkdir=`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null` echo 1>&6 "#define HAVE_MKDIR ${havemkdir}" if test "${havemkdir}" = "1"; then UUDIR='# ' echo 1>&6 "#define MKDIR_PROGRAM unused" else UUDIR= echo 1>&6 "#define MKDIR_PROGRAM `if test -f /bin/mkdir; then echo '"/bin/mkdir"'; else echo unknown; fi`" fi rm -f conftest conftest.c echo 1>&6 " /* That's the end of the list of the functions. Now there are a few last miscellaneous items. */" echo checking whether times can be declared as long echo "#include `if test -f $INCLUDEDIR/sys/times.h; then echo '#include '; fi` main () { exit(0); } extern long times ();" > conftest.c eval $compile echo 1>&6 " /* On some systems times is declared in as returning int, so the code cannot safely declare it as returning long. On the other hand, on some systems times will not work unless it is declared as returning long. Set TIMES_DECLARATION_OK to 1 if times can be safely declared as returning long. If you will not be using times, it doesn't matter what you set this to. */ #define TIMES_DECLARATION_OK `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo checking for BSD setpgrp echo "`if test -f $INCLUDEDIR/unistd.h; then echo '#include '; fi` main() { exit(0); } t() { getpgrp (0); setpgrp (0, 0); }" > conftest.c eval $compile echo 1>&6 " /* Set HAVE_BSD_PGRP to 1 if your getpgrp call takes 1 argument and your setpgrp calls takes 2 argument (on System V they generally take no arguments). You can safely set this to 1 on System V, provided the call will compile without any errors. */ #define HAVE_BSD_PGRP `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo checking for union wait echo "#include main() { exit(0); } t() { union wait u; wait (&u); }" > conftest.c eval $compile echo 1>&6 " /* Set HAVE_UNION_WAIT to 1 if union wait is defined in the header file . */ #define HAVE_UNION_WAIT `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c echo 1>&6 " /* Define UTIME_NULL_MISSING if utime with a NULL second argument does not set the file times to the current time. */" echo checking utime with null argument rm -f uttest; > uttest # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. echo '#include #include main() { struct stat s, t; exit(!(stat ("uttest", &s) == 0 && utime("uttest", (long *)0) == 0 && stat("uttest", &t) == 0 && t.st_mtime >= s.st_mtime && t.st_mtime - s.st_mtime < 120)); }' > conftest.c eval $compile ./conftest 2>/dev/null || echo 1>&6 "#define UTIME_NULL_MISSING " rm -f conftest conftest.c uttest core echo checking for long file names (echo "1" > 123456789012345) 2>/dev/null (echo "2" > 123456789012346) 2>/dev/null long=`cat 123456789012345 2>/dev/null` echo 1>&6 " /* Set HAVE_LONG_NAMES to 1 if the system supports file names longer than 14 characters. */ #define HAVE_LONG_NAMES `if test -f 123456789012345 -a "${long}" = "1"; then echo 1; else echo 0; fi 2>/dev/null`" rm -f 123456789012345 123456789012346 2>/dev/null echo checking for restartable system calls echo "#include ucatch (isig) { } main () { int i = fork (); if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } signal (SIGINT, ucatch); exit (wait (&i) == -1); }" > conftest.c eval $compile echo 1>&6 " /* If slow system calls are restarted after interrupts, set HAVE_RESTARTABLE_SYSCALLS to 1. This is ignored if HAVE_SIGACTION is 1 or if HAVE_SIGVEC is 1 and SV_INTERRUPT is defined in . In both of these cases system calls can be prevented from restarting. */ #define HAVE_RESTARTABLE_SYSCALLS `(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`" rm -f conftest conftest.c trap 'for dir in .; do rm -f $dir/Makefile; done; rm -f config.status conf.h; exit 1' 1 3 15 for dir in .; do test -d $dir || mkdir $dir echo creating $dir/Makefile echo '# Generated automatically from Makefile.in by configure.' > $dir/Makefile sed -e " $vpsub s,@srcdir@,$srcdir, s,@VPATH@,$VPATH, s,@DEFS@,$DEFS, s,@LIBS@,$LIBS, s,@INSTALL@,$INSTALL, s,@INSTALLDATA@,$INSTALLDATA, s,@CC@,$CC, s,@CFLAGS@,$CFLAGS, s,@LDFLAGS@,$LDFLAGS, s,@LN_S@,$LN_S, s,@ALLOCA@,$ALLOCA, s,@UUDIR@,$UUDIR, " $srcdir/$dir/Makefile.in >> $dir/Makefile done echo creating config.status echo "\ DEFS=\"$DEFS\" LIBS=\"$LIBS\" INSTALL=\"$INSTALL\" INSTALLDATA=\"$INSTALLDATA\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" LN_S=\"$LN_S\" ALLOCA=\"$ALLOCA\" UUDIR=\"$UUDIR\" " > config.status