Annotation of coherent/g/usr/lib/uucp/tay104/configure.in, revision 1.1.1.1

1.1       root        1: dnl Taylor UUCP configuration file
                      2: dnl This should be processed with autoconf to produce a configure script.
                      3: dnl Copyright (c) 1992 Ian Lance Taylor
                      4: dnl
                      5: AC_INIT(policy.h)
                      6: AC_CONFIG_HEADER(conf.h)
                      7: AC_PROG_CC
                      8: AC_PROG_CPP
                      9: AC_GCC_TRADITIONAL
                     10: AC_PROG_INSTALL
                     11: AC_PROG_RANLIB
                     12: AC_ISC_POSIX
                     13: AC_MINIX
                     14: AC_AIX
                     15: AC_DYNIX_SEQ
                     16: AC_IRIX_SUN
                     17: AC_CROSS_CHECK
                     18: dnl
                     19: CFLAGS=${CFLAGS--g}
                     20: AC_SUBST(CFLAGS)dnl
                     21: AC_SUBST(LDFLAGS)dnl
                     22: dnl
                     23: echo checking for mail program
                     24: if test -s /usr/ucb/mail; then
                     25:  AC_DEFINE([MAIL_PROGRAM], `echo '"/usr/ucb/mail"'`)
                     26: elif test -s /bin/mail; then
                     27:  AC_DEFINE([MAIL_PROGRAM], `echo '"/bin/mail"'`)
                     28: elif test -s /usr/bin/mail; then
                     29:  AC_DEFINE([MAIL_PROGRAM], `echo '"/usr/bin/mail"'`)
                     30: elif test -s /usr/bin/mailx; then
                     31:  AC_DEFINE([MAIL_PROGRAM], `echo '"/usr/bin/mailx"'`)
                     32: fi
                     33: echo checking for echo program
                     34: if (PATH= echo test) 2>/dev/null | grep test >/dev/null 2>&1; then
                     35:  AC_DEFINE([ECHO_PROGRAM], `echo '"echo"'`)
                     36: elif test -s /bin/echo; then
                     37:  AC_DEFINE([ECHO_PROGRAM], `echo '"/bin/echo"'`)
                     38: fi
                     39: AC_LN_S
                     40: dnl
                     41: AC_HAVE_HEADERS(stddef.h string.h strings.h unistd.h stdlib.h limits.h)
                     42: AC_HAVE_HEADERS(time.h sys/wait.h sys/ioctl.h dirent.h memory.h sys/param.h)
                     43: AC_HAVE_HEADERS(utime.h fcntl.h sys/file.h sys/times.h libc.h sysexits.h)
                     44: AC_HAVE_HEADERS(poll.h tiuser.h xti.h sys/tli.h stropts.h ftw.h glob.h)
                     45: AC_HAVE_HEADERS(sys/types.tcp.h)
                     46: dnl
                     47: AC_COMPILE_CHECK([sys/select.h],
                     48: [#include <sys/select.h>
                     49: #include <sys/time.h>],
                     50: [int i;],
                     51: [AC_DEFINE(HAVE_SYS_SELECT_H)])
                     52: dnl
                     53: AC_MAJOR_HEADER
                     54: dnl
                     55: AC_RETSIGTYPE
                     56: dnl
                     57: AC_COMPILE_CHECK([time.h and sys/time.h being included together],
                     58: [#include <sys/time.h>
                     59: #include <time.h>],
                     60: [int i;],
                     61: AC_DEFINE([HAVE_SYS_TIME_AND_TIME_H]))
                     62: dnl
                     63: AC_COMPILE_CHECK([termios.h and sys/ioctl.h being included together],
                     64: [#include <termios.h>
                     65: #include <sys/ioctl.h>],
                     66: [int i;],
                     67: AC_DEFINE([HAVE_TERMIOS_AND_SYS_IOCTL_H]))
                     68: dnl
                     69: AC_COMPILE_CHECK([CBREAK],
                     70: [#include <sgtty.h>], [int i = CBREAK;],
                     71: AC_DEFINE([HAVE_CBREAK]))
                     72: dnl
                     73: AC_COMPILE_CHECK([pid_t in sys/types.h],
                     74: [#include <sys/types.h>], [pid_t x;], ,
                     75: AC_DEFINE(PID_T, int))
                     76: dnl
                     77: AC_COMPILE_CHECK([uid_t in sys/types.h],
                     78: [#include <sys/types.h>], [uid_t x;], ,
                     79: AC_DEFINE(UID_T, int))
                     80: dnl
                     81: AC_COMPILE_CHECK([gid_t in sys/types.h],
                     82: [#include <sys/types.h>], [gid_t x;], ,
                     83: AC_DEFINE(GID_T, int))
                     84: dnl
                     85: AC_COMPILE_CHECK([off_t in sys/types.h],
                     86: [#include <sys/types.h>], [off_t x;], ,
                     87: AC_DEFINE(OFF_T, long))
                     88: dnl
                     89: dnl On SCO 3.2.2 sig_atomic_t is in <sys/types.h> but not <signal.h>.
                     90: AC_COMPILE_CHECK([sig_atomic_t in signal.h],
                     91: [#include <signal.h>], [sig_atomic_t x;],
                     92: AC_DEFINE([HAVE_SIG_ATOMIC_T_IN_SIGNAL_H]))
                     93: dnl
                     94: AC_COMPILE_CHECK([sig_atomic_t in sys/types.h],
                     95: [#include <sys/types.h>], [sig_atomic_t x;],
                     96: AC_DEFINE([HAVE_SIG_ATOMIC_T_IN_TYPES_H]))
                     97: dnl
                     98: case $DEFS in
                     99: *HAVE_STDDEF_H*)
                    100:   AC_COMPILE_CHECK([size_t in stddef.h],
                    101:   [#include <stddef.h>], [size_t x;],
                    102:   AC_DEFINE([HAVE_SIZE_T_IN_STDDEF_H])) ;;
                    103: esac
                    104: dnl
                    105: AC_COMPILE_CHECK([size_t in sys/types.h],
                    106: [#include <sys/types.h>], [size_t x;],
                    107: AC_DEFINE([HAVE_SIZE_T_IN_TYPES_H]))
                    108: dnl
                    109: AC_COMPILE_CHECK([time_t in time.h],
                    110: [#include <time.h>], [time_t i;],
                    111: AC_DEFINE([HAVE_TIME_T_IN_TIME_H]))
                    112: dnl
                    113: AC_COMPILE_CHECK([time_t in sys/types.h],
                    114: [#include <sys/types.h>], [time_t i;],
                    115: AC_DEFINE([HAVE_TIME_T_IN_TYPES_H]))
                    116: dnl
                    117: dnl The filesystem info code is from David MacKenzie's fileutils 3.4
                    118: dnl package.
                    119: echo checking how to get filesystem space usage
                    120: # SVR4
                    121: AC_TEST_CPP([#include <sys/statvfs.h>],
                    122:   AC_DEFINE(STAT_STATVFS) space=1)
                    123: if test -z "$space"; then
                    124: # AIX
                    125: AC_HEADER_EGREP(f_nlsdirtype, sys/statfs.h, 
                    126:   AC_DEFINE(STAT_STATFS2_BSIZE) space=1)
                    127: fi
                    128: if test -z "$space"; then
                    129: # SVR3
                    130: AC_TEST_CPP([#include <sys/statfs.h>], 
                    131:   AC_DEFINE(STAT_STATFS4) space=1)
                    132: fi
                    133: if test -z "$space"; then
                    134: # 4.3BSD
                    135: AC_TEST_CPP([#include <sys/vfs.h>],
                    136:   AC_DEFINE(STAT_STATFS2_BSIZE) space=1)
                    137: fi
                    138: if test -z "$space"; then
                    139: # 4.4BSD
                    140: AC_HEADER_EGREP(MOUNT_UFS, sys/mount.h,
                    141:   AC_DEFINE(STAT_STATFS2_FSIZE) space=1)
                    142: fi
                    143: if test -z "$space"; then
                    144: # Ultrix
                    145: AC_TEST_CPP([#include <sys/mount.h>],
                    146:   AC_DEFINE(STAT_STATFS2_FS_DATA) space=1)
                    147: fi
                    148: if test -z "$space"; then
                    149: AC_FUNC_CHECK(ustat, AC_DEFINE(STAT_USTAT))
                    150: fi
                    151: dnl
                    152: AC_COMPILE_CHECK([void],
                    153: [], [extern void foo (); (void) exit (0);],
                    154: AC_DEFINE([HAVE_VOID]))
                    155: dnl
                    156: AC_COMPILE_CHECK([unsigned char],
                    157: [], [unsigned char i = (unsigned char) -1;],
                    158: AC_DEFINE([HAVE_UNSIGNED_CHAR]))
                    159: dnl
                    160: AC_COMPILE_CHECK([errno],
                    161: [#include <errno.h>], [int i = errno; errno = 1;],
                    162: AC_DEFINE([HAVE_ERRNO_DECLARATION]))
                    163: dnl
                    164: undefine([index])
                    165: AC_HAVE_FUNCS(memset memcmp memchr memcpy bcopy bcmp bzero)
                    166: AC_HAVE_FUNCS(strchr strrchr index rindex strerror strtol strstr)
                    167: AC_HAVE_FUNCS(strdup strcasecmp strncasecmp stricmp strnicmp)
                    168: AC_HAVE_FUNCS(bsearch vfprintf)
                    169: AC_HAVE_FUNCS(remove ftruncate ltrunc rename opendir dup2 waitpid wait4)
                    170: AC_HAVE_FUNCS(sigsetjmp setret sigaction sigvec sigset)
                    171: AC_HAVE_FUNCS(sigprocmask sigblock sighold getdtablesize sysconf)
                    172: AC_HAVE_FUNCS(setpgrp setsid setreuid gethostname uname)
                    173: AC_HAVE_FUNCS(gettimeofday ftw glob)
                    174: dnl Check for getline, but not in -linet, since ISC has an
                    175: dnl incompatible version there.
                    176: SAVELIBS="$LIBS"
                    177: LIBS=`echo $LIBS | sed 's/-linet//'`
                    178: AC_HAVE_FUNCS(getline)
                    179: LIBS="$SAVELIBS"
                    180: dnl Check for the SCO buggy ftime; the code can cope with the bug,
                    181: dnl though it would prefer not to, so if we're cross-configuring we
                    182: dnl accept that ftime exists.
                    183: AC_FUNC_CHECK(ftime,
                    184: [AC_TEST_PROGRAM([
                    185: #include <sys/types.h>
                    186: #include <sys/timeb.h>
                    187: main ()
                    188: {
                    189:   struct timeb s, slast;
                    190:   int c = 0;
                    191:   ftime (&slast);
                    192:   while (c < 10)
                    193:     {
                    194:       ftime (&s);
                    195:       if (s.time < slast.time
                    196:          || (s.time == slast.time && s.millitm < slast.millitm))
                    197:        exit (1);
                    198:       if (s.time != slast.time)
                    199:        ++c;
                    200:       slast.time = s.time;
                    201:       slast.millitm = s.millitm;
                    202:     }
                    203:   exit (0);
                    204: }
                    205: ],
                    206: AC_DEFINE(HAVE_FTIME),
                    207: echo 1>&2 "Your ftime seems to be buggy",
                    208: AC_DEFINE(HAVE_FTIME))])
                    209: dnl
                    210: AC_HAVE_FUNCS(times)
                    211: AC_HAVE_FUNCS(napms nap usleep poll select)
                    212: case $DEFS in
                    213: *HAVE_NAPMS*) ;;
                    214: *HAVE_NAP*)  ;;
                    215: *HAVE_USLEEP*) ;;
                    216: *HAVE_POLL*) ;;
                    217: *HAVE_SELECT*) ;;
                    218: *) echo 1>&2 'WARNING: No way to sleep for less than one second'
                    219:    echo 1>&2 '         \p in chat scripts will sleep for a full second'
                    220:    ;;
                    221: esac
                    222: dnl
                    223: AC_HAVE_FUNCS(getgrent)
                    224: dnl
                    225: changequote(,)dnl
                    226: trfrom='[a-z]' trto='[A-Z]'
                    227: changequote([,])dnl
                    228: for i in socket t_open; do
                    229:   def=HAVE_`echo $i|tr "$trfrom" "$trto"`
                    230:   AC_FUNC_CHECK([$i],[AC_DEFINE($def)],[missing=1])dnl
                    231:   for lib in "-lsocket" "-lsocket -lnsl" "-lnsl" "-lxti"; do
                    232:     if test -n "$missing"; then
                    233:       case $LIBS in
                    234:       *${lib}*) ;;
                    235:       *)
                    236:        SAVELIBS="$LIBS"
                    237:        LIBS="$LIBS $lib"
                    238:        missing=
                    239:        AC_COMPILE_CHECK([$i with $lib], , [extern char $i(); $i();],
                    240:                         [AC_DEFINE($def)],
                    241:                         [missing=1; LIBS="$SAVELIBS"])dnl
                    242:        ;;
                    243:       esac
                    244:     fi
                    245:   done
                    246: done
                    247: dnl
                    248: AC_HAVE_FUNCS(getcwd getwd)
                    249: case $DEFS in
                    250: *HAVE_GETCWD*) ;;
                    251: *HAVE_GETCD*) ;;
                    252: *) UNIXOBJS="$UNIXOBJS getcwd.o"
                    253:    if test -s /bin/pwd; then
                    254:      AC_DEFINE([PWD_PROGRAM], `echo '"/bin/pwd"'`)
                    255:    fi ;;
                    256: esac
                    257: dnl
                    258: AC_HAVE_FUNCS(mkdir)
                    259: case $DEFS in
                    260: *HAVE_MKDIR*) UUDIR='# ' ;;
                    261: *) UUDIR=
                    262:    UNIXOBJS="$UNIXOBJS mkdir.o"
                    263:    if test -s /bin/mkdir; then
                    264:      AC_DEFINE([MKDIR_PROGRAM], `echo '"/bin/mkdir"'`)
                    265:    fi ;;
                    266: esac
                    267: AC_SUBST(UUDIR)dnl
                    268: dnl
                    269: AC_HAVE_FUNCS(rmdir)
                    270: case $DEFS in
                    271: *HAVE_RMDIR*) ;;
                    272: *) UNIXOBJS="$UNIXOBJS rmdir.o"
                    273:    if test -s /bin/rmdir; then
                    274:      AC_DEFINE([RMDIR_PROGRAM], `echo '"/bin/rmdir"'`)
                    275:    fi ;;
                    276: esac
                    277: dnl
                    278: dnl Figure out which functions we need from lib subdirectory
                    279: case $DEFS in
                    280: *HAVE_BSEARCH*) ;;
                    281: *) LIBOBJS="$LIBOBJS bsrch.o" ;;
                    282: esac
                    283: case $DEFS in
                    284: *HAVE_BZERO*) ;;
                    285: *HAVE_MEMSET*) ;;
                    286: *) LIBOBJS="$LIBOBJS bzero.o" ;;
                    287: esac
                    288: case $DEFS in
                    289: *HAVE_GETLINE*) ;;
                    290: *) LIBOBJS="$LIBOBJS getlin.o" ;;
                    291: esac
                    292: case $DEFS in
                    293: *HAVE_MEMCHR*) ;;
                    294: *) LIBOBJS="$LIBOBJS memchr.o" ;;
                    295: esac
                    296: case $DEFS in
                    297: *HAVE_MEMCMP*) ;;
                    298: *HAVE_BCMP*) ;;
                    299: *) LIBOBJS="$LIBOBJS memcmp.o" ;;
                    300: esac
                    301: case $DEFS in
                    302: *HAVE_MEMCPY*) ;;
                    303: *HAVE_BCOPY*) ;;
                    304: *) LIBOBJS="$LIBOBJS memcpy.o" ;;
                    305: esac
                    306: case $DEFS in
                    307: *HAVE_STRCASECMP*) ;;
                    308: *HAVE_STRICMP*) ;;
                    309: *) LIBOBJS="$LIBOBJS strcas.o" ;;
                    310: esac
                    311: case $DEFS in
                    312: *HAVE_STRCHR*) ;;
                    313: *HAVE_INDEX*) ;;
                    314: *) LIBOBJS="$LIBOBJS strchr.o" ;;
                    315: esac
                    316: case $DEFS in
                    317: *HAVE_STRDUP*) ;;
                    318: *) LIBOBJS="$LIBOBJS strdup.o" ;;
                    319: esac
                    320: case $DEFS in
                    321: *HAVE_STRNCASECMP*) ;;
                    322: *HAVE_STRNICMP*) ;;
                    323: *) LIBOBJS="$LIBOBJS strncs.o" ;;
                    324: esac
                    325: case $DEFS in
                    326: *HAVE_STRRCHR*) ;;
                    327: *HAVE_RINDEX*) ;;
                    328: *) LIBOBJS="$LIBOBJS strrch.o" ;;
                    329: esac
                    330: case $DEFS in
                    331: *HAVE_STRSTR*) ;;
                    332: *) LIBOBJS="$LIBOBJS strstr.o" ;;
                    333: esac
                    334: case $DEFS in
                    335: *HAVE_STRTOL*) ;;
                    336: *) LIBOBJS="$LIBOBJS strtol.o" ;;
                    337: esac
                    338: AC_SUBST(LIBOBJS)dnl
                    339: dnl Figure out which functions we need from unix subdirectory
                    340: case $DEFS in
                    341: *HAVE_OPENDIR*) ;;
                    342: *) UNIXOBJS="$UNIXOBJS dirent.o" ;;
                    343: esac
                    344: case $DEFS in
                    345: *HAVE_DUP2*) ;;
                    346: *) UNIXOBJS="$UNIXOBJS dup2.o" ;;
                    347: esac
                    348: case $DEFS in
                    349: *HAVE_FTW*) ;;
                    350: *) UNIXOBJS="$UNIXOBJS ftw.o" ;;
                    351: esac
                    352: case $DEFS in
                    353: *HAVE_REMOVE*) ;;
                    354: *) UNIXOBJS="$UNIXOBJS remove.o" ;;
                    355: esac
                    356: case $DEFS in
                    357: *HAVE_RENAME*) ;;
                    358: *) UNIXOBJS="$UNIXOBJS rename.o" ;;
                    359: esac
                    360: case $DEFS in
                    361: *HAVE_STRERROR*) ;;
                    362: *) UNIXOBJS="$UNIXOBJS strerr.o" ;;
                    363: esac
                    364: AC_SUBST(UNIXOBJS)
                    365: dnl
                    366: case $DEFS in
                    367: *HAVE_SIGVEC*)
                    368:   AC_COMPILE_CHECK([sv_flags],
                    369:   [#include <signal.h>], [struct sigvec s; s.sv_flags = 0;],
                    370:   AC_DEFINE([HAVE_SIGVEC_SV_FLAGS])) ;;
                    371: esac
                    372: dnl
                    373: dnl See whether we can make an extern declaration
                    374: define(ILT_CHECK_DECLARATION,
                    375: [changequote(,)dnl
                    376: trfrom='[a-z]' trto='[A-Z]'
                    377: changequote([,])dnl
                    378: AC_COMPILE_CHECK([$1 declared as "$2"],
                    379: [#include <sys/types.h>
                    380: #include <pwd.h>
                    381: #include <grp.h>
                    382: #ifdef HAVE_LIBC_H
                    383: #include <libc.h>
                    384: #endif
                    385: #ifdef HAVE_SYS_TIMES_H
                    386: #include <sys/times.h>
                    387: #endif
                    388: extern $2 $1 ();], ,
                    389: AC_DEFINE(`echo $1 | tr "$trfrom" "$trto"`_DECLARATION_OK))])
                    390: dnl
                    391: ILT_CHECK_DECLARATION(times, long)
                    392: ILT_CHECK_DECLARATION(getpwnam, struct passwd *)
                    393: ILT_CHECK_DECLARATION(getpwuid, struct passwd *)
                    394: ILT_CHECK_DECLARATION(getgrent, struct group *)
                    395: dnl
                    396: AC_COMPILE_CHECK([BSD setpgrp],
                    397: [#ifdef HAVE_UNISTD_H
                    398: #include <unistd.h>
                    399: #endif],
                    400: [getpgrp (0); setpgrp (0, 0);],
                    401: AC_DEFINE([HAVE_BSD_PGRP]))
                    402: dnl
                    403: AC_COMPILE_CHECK([union wait],
                    404: [#include <sys/wait.h>
                    405: #ifndef WIFEXITED
                    406: #define WIFEXITED(u) ((u).w_termsig == 0)
                    407: #endif],
                    408: [union wait u; if (WIFEXITED (u)) wait (&u);],
                    409: AC_DEFINE([HAVE_UNION_WAIT]))
                    410: dnl
                    411: if test -n "$cross_compiling"; then
                    412:  AC_DEFINE([HAVE_LONG_FILE_NAMES], [0])
                    413:  AC_DEFINE([HAVE_RESTARTABLE_SYSCALLS], [-1])
                    414: else
                    415:  AC_RESTARTABLE_SYSCALLS
                    416:  AC_LONG_FILE_NAMES
                    417: fi
                    418: dnl
                    419: AC_OUTPUT(Makefile uuconf/Makefile lib/Makefile unix/Makefile)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.