NetBSD/gnu/libexec/uucp/configure.in

590 lines
22 KiB
Plaintext

dnl Taylor UUCP configuration file
dnl This should be processed with autoconf to produce a configure script.
dnl Copyright (c) 1992 Ian Lance Taylor
dnl
M_INIT(uucico.c)
M_HEADER_FILE(conf.h)
ILT_HEADER_COMMENT([/* Configuration header file for Taylor UUCP.
Generated on `date`. */
])
dnl
M_PROG_INSTALL
M_PROG_GCC
CFLAGS=${CFLAGS--g}
M_SUBST(CFLAGS)dnl
M_SUBST(LDFLAGS)dnl
dnl
echo checking for mail program
M_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`],
[/* 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. */])
echo checking for echo program
M_DEFINE([ECHO_PROGRAM],
[`if test -s /bin/echo; then echo '"/bin/echo"'; else echo '"echo"'; fi`],
[
/* Set ECHO_PROGRAM to a program which echoes its arguments; if echo
is a shell builtin you can just use \"echo\". */])
dnl this is just used to set LN_S in the Makefile
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
M_SUBST(LN_S)dnl
ILT_HEADER_COMMENT([
/* 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. */])
ILT_HEADER_CHECK(string.h strings.h unistd.h stdlib.h limits.h time.h)
ILT_HEADER_CHECK(sys/wait.h sys/ioctl.h dirent.h memory.h sys/param.h)
ILT_HEADER_CHECK(utime.h fcntl.h sys/file.h libc.h sysexits.h)
ILT_HEADER_CHECK(poll.h stropts.h)
ILT_HEADER_COMMENT()
ILT_SIGTYPE
ILT_LIBTHING_CHECK([time_t in time.h],
[#include <time.h>], [time_t i;], [HAVE_TIME_T],
[
/* Set HAVE_TIME_T to 1 if time_t is defined in <time.h>, as required by
the ANSI C standard. */])
ILT_LIBTHING_CHECK([time_t in sys/types.h],
[#include <sys/types.h>], [time_t i;], [HAVE_SYS_TIME_T],
[
/* Set HAVE_SYS_TIME_T to 1 if time_t is defined in <sys/types.h>; this
is only checked if HAVE_TIME_T is 0. */])
ILT_HEADER_COMMENT()
echo checking for time.h and sys/time.h being included together
echo "#include <sys/time.h>
#include <time.h>
main () { exit (0); }" > conftest.c
eval $compile
M_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`],
[/* Set HAVE_SYS_TIME_AND_TIME_H to 1 if <time.h> and <sys/time.h> 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. */])
rm -f conftest conftest.c
ILT_HEADER_COMMENT()
echo checking for termios.h and sys/ioctl.h being included together
echo "#include <termios.h>
#include <sys/ioctl.h>
main () { exit (0); }" > conftest.c
eval $compile
M_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`],
[/* Set HAVE_TERMIOS_AND_SYS_IOCTL_H to 1 if <termios.h> and <sys/ioctl.h>
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. */])
rm -f conftest conftest.c
ILT_HEADER_COMMENT()
ILT_LIBTHING_CHECK([CBREAK], [#include <sgtty.h>], [int i = CBREAK;],
[HAVE_CBREAK],
[/* 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. */])
ILT_HEADER_COMMENT([
/* 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
*/])
ILT_HEADER_COMMENT([
/* The type pid_t is used to hold a process ID number. It is normally
defined in <sys/types.h>. This is the type returned by the
functions fork or getpid. Usually int will work fine. */])
ILT_LIBTHING_CHOICE([pid_t in sys/types.h],
[#include <sys/types.h>], [pid_t x;],
ILT_HEADER_COMMENT([/* A definition of pid_t was found on your system. */]),
M_DEFINE(pid_t, int))
ILT_HEADER_COMMENT([
/* The type uid_t is used to hold a user ID number. It is normally
defined in <sys/types.h>. This is the type returned by the getuid
function. Usually int will work fine. */])
ILT_LIBTHING_CHOICE([uid_t in sys/types.h],
[#include <sys/types.h>], [uid_t x;],
ILT_HEADER_COMMENT([/* A definition of uid_t was found on your system. */]),
M_DEFINE(uid_t, int))
ILT_HEADER_COMMENT([
/* The type gid_t is used to hold a group ID number. It is sometimes
defined in <sys/types.h>. This is the type returned by the getgid
function. Usually int will work fine. */])
ILT_LIBTHING_CHOICE([gid_t in sys/types.h],
[#include <sys/types.h>], [gid_t x;],
ILT_HEADER_COMMENT([/* A definition of gid_t was found on your system. */]),
M_DEFINE(gid_t, int))
ILT_HEADER_COMMENT([
/* The type off_t is used to hold an offset in a file. It is sometimes
defined in <sys/types.h>. This is the type of the second argument to
the lseek function. Usually long will work fine. */])
ILT_LIBTHING_CHOICE([off_t in sys/types.h],
[#include <sys/types.h>], [off_t x;],
ILT_HEADER_COMMENT([/* A definition of off_t was found on your system. */]),
M_DEFINE(off_t, long))
dnl On SCO 3.2.2 sig_atomic_t is in <sys/types.h> but not <signal.h>.
ILT_LIBTHING_CHECK([sig_atomic_t in signal.h],
[#include <signal.h>], [sig_atomic_t x;],
[HAVE_SIG_ATOMIC_T_IN_SIGNAL_H],
[
/* Set HAVE_SIG_ATOMIC_T_IN_SIGNAL_H if the type sig_atomic_t is defined
in <signal.h> as required by ANSI C. */])
ILT_LIBTHING_CHECK([sig_atomic_t in sys/types.h],
[#include <sys/types.h>], [sig_atomic_t x;],
[HAVE_SIG_ATOMIC_T_IN_TYPES_H],
[
/* Set HAVE_SIG_ATOMIC_T_IN_TYPES_H if the type sig_atomic_t is defined
in <sys/types.h>. This is ignored if HAVE_SIG_ATOMIC_T_IN_SIGNAL_H is
set to 1. */])
ILT_HEADER_COMMENT([
/* 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 <signal.h> or <sys/types.h>, 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. */])
dnl The filesystem info code is from David MacKenzie's fileutils 3.1
dnl package.
echo checking how to get filesystem info
ILT_HEADER_COMMENT([
/* 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
M_DEFINE(FS_STATVFS)
elif test -f $INCLUDEDIR/sys/statfs.h -a -f $INCLUDEDIR/sys/fstyp.h; then
M_DEFINE(FS_USG_STATFS)
elif test -f $INCLUDEDIR/mntent.h; then
M_DEFINE(FS_MNTENT)
elif test -f $INCLUDEDIR/sys/mount.h -a -f $INCLUDEDIR/sys/fs_types.h; then
M_DEFINE(FS_GETMNT)
elif grep MOUNT_UFS $INCLUDEDIR/sys/mount.h >/dev/null 2>&1; then
M_DEFINE(FS_STATFS)
else
M_LIBTHING_PRESENT([ustat], , [ustat();], M_DEFINE(FS_USTAT))
fi
echo checking for void
echo "void main() { (void) exit (0); }" > conftest.c
eval $compile
M_DEFINE([HAVE_VOID],
[`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`],
[
/* Set HAVE_VOID to 1 if the compiler supports declaring functions with
a return type of void and casting values to void. */])
rm -f conftest.c conftest
echo checking for unsigned char
echo "main () { unsigned char i = (unsigned char) -1; exit (0); }" > conftest.c
eval $compile
M_DEFINE([HAVE_UNSIGNED_CHAR],
[`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`],
[
/* Set HAVE_UNSIGNED_CHAR to 1 if the compiler supports the type unsigned
char. */])
rm -f conftest.c conftest
ILT_IDENT_CHECK([int.*errno], [errno.h], [HAVE_ERRNO_DECLARATION],
[
/* Set HAVE_ERRNO_DECLARATION to 1 if errno is declared in <errno.h>. */])
echo checking for combined use of O_NONBLOCK and O_NDELAY
echo "#include <fcntl.h>
#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
M_DEFINE([COMBINED_UNBLOCK],
[`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`],
[
/* 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. */])
dnl Do some complicated tests for alloca. If we fail to find it, we
dnl look in a couple of libraries and try again.
echo checking for alloca
echo "#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* ! defined(__GNUC__) */
#ifdef sparc
#include <alloca.h>
#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
M_SUBST(ALLOCA)dnl
ILT_HEADER_COMMENT([
/* 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. */])
ILT_HEADER_COMMENT([
/* Taylor UUCP provides its own versions of the following functions,
or knows how to work around their absence. */])
undefine([index])
ILT_FUNC_CHECK(memset memcmp memchr memcpy bcopy bcmp bzero)
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
M_DEFINE(HAVE_MEMMOVE, 0)
else
dnl now check for the SCO buggy memmove. This test case is from
dnl Chip Salzenberg
changequote(,)dnl
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
changequote([,])dnl
dnl The test case must be compiled with cc without optimization
cc -o conftest conftest.c >/dev/null 2>/dev/null
if test ! -s ./conftest; then
dnl $CC worked but cc didn't; it's probably OK
M_DEFINE(HAVE_MEMMOVE, 1)
elif ./conftest 2>/dev/null; then
M_DEFINE(HAVE_MEMMOVE, 1)
else
M_DEFINE(HAVE_MEMMOVE, [0 /* Your memmove seems to be buggy. */])
fi
rm -f conftest conftest.c
fi
ILT_FUNC_CHECK(strchr strrchr index rindex strerror strtol strstr)
ILT_FUNC_CHECK(strdup strcasecmp stricmp strlwr bsearch vfprintf)
ILT_FUNC_CHECK(remove ftruncate ltrunc rename opendir dup2 waitpid wait4)
ILT_HEADER_COMMENT([
/* 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). */])
ILT_FUNC_CHECK(sigsetjmp setret)
ILT_HEADER_COMMENT([
/* 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. */])
ILT_FUNC_CHECK(sigaction sigvec sigset)
ILT_HEADER_COMMENT([
/* 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. */])
ILT_FUNC_CHECK(sigprocmask sigblock sighold)
ILT_HEADER_COMMENT([
/* 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. */])
ILT_FUNC_CHECK(getdtablesize sysconf)
ILT_HEADER_COMMENT([
/* The code will use one of the following functions when detaching
from a terminal. One of these must exist. */])
ILT_FUNC_CHECK(setpgrp setsid)
ILT_HEADER_COMMENT([
/* 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. */])
ILT_FUNC_CHECK(gethostname uname)
ILT_HEADER_COMMENT([
/* 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. */])
ILT_FUNC_CHECK(gettimeofday)
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
M_DEFINE(HAVE_FTIME, 0)
else
dnl now check for the SCO buggy ftime
echo "#include <sys/types.h>
#include <sys/timeb.h>
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
M_DEFINE(HAVE_FTIME, 1)
else
M_DEFINE(HAVE_FTIME, [0 /* Your ftime seems to be buggy. */])
fi
rm -f conftest conftest.c
fi
ILT_HEADER_COMMENT([
/* 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. */])
ILT_FUNC_CHECK(times)
ILT_HEADER_COMMENT([
/* 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. */])
ILT_FUNC_CHECK(napms nap usleep poll select)
echo '#include <stdio.h>
#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
ILT_HEADER_COMMENT([
/* If the getgrent function is available, it will be used to determine
all the groups a user belongs to when checking file access
permissions. */])
ILT_FUNC_CHECK(getgrent)
ILT_HEADER_COMMENT([
/* If the socket function is available, TCP support code will be
compiled in. */])
ILT_FUNC_CHECK(socket)
ILT_HEADER_COMMENT([
/* 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`
M_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`
M_DEFINE([HAVE_GETWD], [${havegetwd}])
if test "${havegetcwd}" != 1 -a "${havegetwd}" != 1; then
M_DEFINE([PWD_PROGRAM],
[`if test -s /bin/pwd; then echo '"/bin/pwd"'; else echo unknown; fi`])
else
M_DEFINE([PWD_PROGRAM], [unused])
fi
ILT_HEADER_COMMENT([
/* 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`
M_DEFINE([HAVE_MKDIR], [${havemkdir}])
if test "${havemkdir}" = "1"; then
UUDIR='# '
M_DEFINE([MKDIR_PROGRAM], [unused])
else
UUDIR=
M_DEFINE([MKDIR_PROGRAM],
[`if test -f /bin/mkdir; then echo '"/bin/mkdir"'; else echo unknown; fi`])
fi
M_SUBST(UUDIR)dnl
rm -f conftest conftest.c
ILT_HEADER_COMMENT([
/* 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 <sys/types.h>
`if test -f $INCLUDEDIR/sys/times.h; then echo '#include <sys/times.h>'; fi`
main () { exit(0); } extern long times ();" > conftest.c
eval $compile
M_DEFINE([TIMES_DECLARATION_OK],
[`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`],
[
/* On some systems times is declared in <sys/times.h> 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. */])
rm -f conftest conftest.c
ILT_LIBTHING_CHECK([BSD setpgrp],
[`if test -f $INCLUDEDIR/unistd.h; then echo '#include <unistd.h>'; fi`],
[getpgrp (0); setpgrp (0, 0);], [HAVE_BSD_PGRP],
[
/* 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. */])
ILT_LIBTHING_CHECK([union wait], [#include <sys/wait.h>],
[union wait u; wait (&u);], [HAVE_UNION_WAIT],
[
/* Set HAVE_UNION_WAIT to 1 if union wait is defined in the header
file <sys/wait.h>. */])
ILT_HEADER_COMMENT([
/* Define UTIME_NULL_MISSING if utime with a NULL second argument does not
set the file times to the current time. */])
M_UTIME_NULL
echo checking for long file names
(echo "1" > 123456789012345) 2>/dev/null
(echo "2" > 123456789012346) 2>/dev/null
long=`cat 123456789012345 2>/dev/null`
M_DEFINE([HAVE_LONG_NAMES],
[`if test -f 123456789012345 -a "${long}" = "1"; then echo 1; else echo 0; fi 2>/dev/null`],
[
/* Set HAVE_LONG_NAMES to 1 if the system supports file names longer
than 14 characters. */])
rm -f 123456789012345 123456789012346 2>/dev/null
echo checking for restartable system calls
dnl Remember that exit (0) is true, so this exits with true when the wait
dnl call returns something other than -1, i.e. the pid of the child,
dnl which means that the wait was restarted after the signal.
echo "#include <signal.h>
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
M_DEFINE([HAVE_RESTARTABLE_SYSCALLS],
[`(if test -s conftest && ./conftest 2>/dev/null; then echo 1; else echo 0; fi) 2>/dev/null`],
[
/* 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
<signal.h>. In both of these cases system calls can be prevented
from restarting. */])
rm -f conftest conftest.c
M_OUTPUT(.)