1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(sendpage.c)
AC_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CC
AC_GCC_TRADITIONAL
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_CHECK_PROGS(STRIP,strip,strip)
AC_PATH_PROG(SENDMAIL, sendmail, no, `echo $PATH | sed "s/:/ /"` /usr/sbin /usr/lib)
AC_DEFINE_UNQUOTED(PATH_SENDMAIL, "$ac_cv_path_SENDMAIL")
dnl Checks for libraries.
[ LDFLAGS="$LDFLAGS -L." ]
[ CFLAGS="$CFLAGS -I." ]
AC_CHECK_FUNCS(dbopen)
death_by_dbopen=no; if test $ac_cv_func_dbopen = no; then
death_by_dbopen=yes
for lib in db1 db_185 db; do
AC_CHECK_LIB($lib, dbopen, [ death_by_dbopen=no
LIBS="$LIBS -l$lib"; break])
done
fi
if test $death_by_dbopen = yes; then
AC_MSG_ERROR([Couldn't find a useful DB. Read 'INSTALL' on how to make 'libdb.a'])
fi
AC_CHECK_FUNCS(syslog)
if test $ac_cv_func_syslog = no; then
# syslog is not in the default libraries. See if it's in some other.
for lib in bsd socket inet; do
AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG)
LIBS="$LIBS -l$lib"; break])
done
fi
dnl Check for POSIX?
AC_MSG_CHECKING(for _POSIX_VERSION in unistd.h)
if grep _POSIX_VERSION [/usr/include/unistd.h] >/dev/null 2>&1 ||
grep _POSIX_VERSION [/usr/include/sys/unistd.h] >/dev/null 2>&1
then
AC_MSG_RESULT(yes)
AC_DEFINE(FAKE_POSIX_SOURCE)
else
AC_MSG_RESULT(no)
fi
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(errno.h db.h db_185.h malloc.h sys/time.h unistd.h signal.h fcntl.h limits.h sys/ioctl.h syslog.h termios.h sys/param.h sys/modem.h)
if test $ac_cv_header_db_h = no && test $ac_cv_header_db_185_h = no; then
AC_MSG_CHECKING([for db_185.h in source directory])
if test -f "${srcdir}/db_185.h" ; then
ac_cv_header_db_185_h=yes
AC_DEFINE(HAVE_DB_185_H)
fi
AC_MSG_RESULT($ac_cv_header_db_185_h)
fi
dnl AC_HEADER_TIME
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIGNAL
AC_TYPE_PID_T
AC_STRUCT_TM
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(sigaction memcpy mkstemp strstr)
AC_REPLACE_FUNCS(strerror)
dnl Check for particulars
AC_ARG_WITH(libdb,
[ --with-libs=PATHNAME Specify location of additional libraries ],
[ LDFLAGS="$LDFLAGS -L$withval"],)
AC_ARG_WITH(inc,
[ --with-incs=PATHNAME Specify location of additional includes ],
[ CFLAGS="$CFLAGS -I$withval"],)
AC_ARG_WITH(cf,
[ --with-cf=PATHNAME Specify your sendpage.cf pathname ],
[ sendpage_cv_config=$withval ],
[ sendpage_cv_config=/etc/sendpage.cf ])
AC_DEFINE_UNQUOTED(PATH_SENDPAGE_CONFIG, "$sendpage_cv_config")
PATH_SENDPAGE_CONFIG="$sendpage_cv_config"
AC_SUBST(PATH_SENDPAGE_CONFIG)
AC_ARG_WITH(queue,
[ --with-queue=PATHNAME Specify your sendpage queue pathname ],
[ sendpage_cv_queue=$withval ],
[ sendpage_cv_queue=/var/spool/pqueue ])
AC_DEFINE_UNQUOTED(PATH_QUEUE, "$sendpage_cv_queue")
PATH_QUEUE="$sendpage_cv_queue"
AC_SUBST(PATH_QUEUE)
AC_ARG_WITH(pid,
[ --with-pid=PATHNAME Specify your sendpage.pid pathname ],
[ sendpage_cv_pidfile=$withval ],
[ sendpage_cv_pidfile=${sendpage_cv_queue}/sendpage.pid ])
AC_DEFINE_UNQUOTED(PATH_SENDPAGE_PIDFILE,"$sendpage_cv_pidfile")
AC_ARG_WITH(header,
[ --with-header=FILENAME Specify your sendpage queue filename header ],
[ sendpage_cv_head=$withval ],
[ sendpage_cv_head=sendpageQ ])
AC_DEFINE_UNQUOTED(QUEUE_HEAD,"$sendpage_cv_head")
AC_ARG_WITH(group,
[ --with-group=GID Specify the group sendpage should run with ],
[ sendpage_cv_group=$withval ],
[ sendpage_cv_group=uucp ])
AC_DEFINE_UNQUOTED(SENDPAGE_GROUP,$sendpage_cv_group)
SENDPAGE_GROUP="$sendpage_cv_group"
AC_SUBST(SENDPAGE_GROUP)
AC_ARG_WITH(user,
[ --with-user=UID Specify the user sendpage should run with ],
[ sendpage_cv_user=$withval ],
[ sendpage_cv_user=sendpage ])
AC_DEFINE_UNQUOTED(SENDPAGE_USER,$sendpage_cv_user)
SENDPAGE_USER="$sendpage_cv_user"
AC_SUBST(SENDPAGE_USER)
AC_ARG_WITH(perms,
[ --with-perms=MODE Specify the permissions sendpage should run with ],
[ sendpage_cv_perms=$withval ],
[ sendpage_cv_perms=6755 ])
AC_DEFINE_UNQUOTED(SENDPAGE_PERMISSIONS,$sendpage_cv_perms)
SENDPAGE_PERMISSIONS="$sendpage_cv_perms"
AC_SUBST(SENDPAGE_PERMISSIONS)
AC_ARG_WITH(runtime,
[ --with-runtime=TIME Specify how often queue is rerun after error ],
[ sendpage_cv_runtime=$withval ],
[ sendpage_cv_runtime=30 ])
AC_DEFINE_UNQUOTED(QUEUE_RUNTIME,$sendpage_cv_runtime)
AC_ARG_WITH(checktime,
[ --with-checktime=TIME Specify how often queue is checked regularly ],
[ sendpage_cv_checktime=$withval ],
[ sendpage_cv_checktime=10 ])
AC_DEFINE_UNQUOTED(QUEUE_CHECKTIME,$sendpage_cv_checktime)
AC_ARG_WITH(piperead,
[ --with-piperead=TIME Specify how long to read from a pipe ],
[ sendpage_cv_piperead=$withval ],
[ sendpage_cv_piperead=30 ])
AC_DEFINE_UNQUOTED(PIPE_READ_SECONDS,$sendpage_cv_piperead)
AC_ARG_WITH(pagelen,
[ --with-pagelen=TIME Specify how long a default single page is ],
[ sendpage_cv_pagelen=$withval ],
[ sendpage_cv_pagelen=60 ])
AC_DEFINE_UNQUOTED(DEFAULT_MAX_PAGELEN,$sendpage_cv_pagelen)
AC_ARG_WITH(syslog,
[ --with-syslog=LOGLEVEL Specify what logging facility sendpage should use],
[ sendpage_cv_syslog=$withval ],
[ sendpage_cv_syslog=LOG_MAIL ])
AC_DEFINE_UNQUOTED(LOG_SENDPAGE,$sendpage_cv_syslog)
AC_ARG_WITH(lockdir,
[ --with-lockdir=DIR Specify where UUCP style lock should happen ],
[ sendpage_cv_lockdir=$withval ],
[ if test -d /var/locks ; then
sendpage_cv_lockdir="/var/locks/"
elif test -d /var/lock ; then
sendpage_cv_lockdir="/var/lock/"
elif test -d /var/spool/lock ; then
sendpage_cv_lockdir="/var/spool/lock/"
elif test -d /var/spool/locks ; then
sendpage_cv_lockdir="/var/spool/locks/"
else
sendpage_cv_lockdir="${sendpage_cv_queue}/"
fi])
AC_DEFINE_UNQUOTED(TTY_LOCKDIR,"$sendpage_cv_lockdir")
AC_ARG_WITH(pager-modem,
[ --with-pager-modem=DEVICE Specify what device sendpage should dial out on ],
[ sendpage_cv_pager_modem=$withval ],
[ sendpage_cv_pager_modem="/dev/pager-modem" ])
AC_DEFINE_UNQUOTED(MODEM_DEV,"$sendpage_cv_pager_modem")
AC_ARG_WITH(modem-init,
[ --with-modem-init=STRING Specify what init string to use on modem ],
[ sendpage_cv_modem_init=$withval ],
[ sendpage_cv_modem_init="ATEQVX4L1HS7=120S11=55" ])
AC_DEFINE_UNQUOTED(MODEM_INIT,"$sendpage_cv_modem_init")
AC_ARG_ENABLE(slow-pc,
[ --disable-slow-pc Specify if you have a slow paging central ],
[if test $enableval=yes; then
AC_DEFINE(SLOW_PAGING_CENTRAL)
fi],
AC_DEFINE(SLOW_PAGING_CENTRAL))
AC_ARG_ENABLE(verbose-mail,
[ --disable-verbose-mail Be slightly quieter on email replies ],
[if test $enableval=yes; then
AC_DEFINE(VERBOSE_MAIL_REPLY)
fi],
AC_DEFINE(VERBOSE_MAIL_REPLY))
AC_ARG_ENABLE(paranoid-replies,
[ --disable-paranoid-replies Pass possible shell args to sendmail ],
[if test $enableval=yes; then
AC_DEFINE(PARANOID_REPLIES)
fi],
AC_DEFINE(PARANOID_REPLIES))
AC_ARG_ENABLE(dtr-toggle,
[ --disable-dtr-toggle Don't toggle DTR on modem ],
[if test $enableval=yes; then
AC_DEFINE(TOGGLE_DTR)
fi],
AC_DEFINE(TOGGLE_DTR))
AC_ARG_ENABLE(uucp-locking,
[ --disable-uucp-locking Don't use UUCP style device locking ],
[if test $enableval=yes; then
AC_DEFINE(UUCP_LOCKING)
fi],
AC_DEFINE(UUCP_LOCKING))
AC_ARG_ENABLE(wait-word,
[ --disable-wait-word Wait for numeric modem responses ],
[if test $enableval=yes; then
AC_DEFINE(WAIT_WORD)
fi],
AC_DEFINE(WAIT_WORD))
AC_ARG_ENABLE(loose-lookup,
[ --disable-loose-lookup Force PET codes to make stricter lookups ],
[if test $enableval=yes; then
AC_DEFINE(PET_LESS_STRICT_LOOKUP)
fi],
AC_DEFINE(PET_LESS_STRICT_LOOKUP))
AC_ARG_ENABLE(send-pluses,
[ --enable-send-pluses Send "+++" to modem ],
[if test $enableval=yes; then
AC_DEFINE(SEND_MODEM_PLUS)
fi])
AC_ARG_ENABLE(arsystem,
[ --enable-arsystem Specify if you have an ARSystem notifier ],
[if test $enableval = yes; then
AC_DEFINE(ARSYSTEM_NOTIFIER)
fi])
AC_OUTPUT(Makefile)
|