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 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542
|
dnl Process this file with autoconf to produce a configure script.
dnl $Id: configure.in,v 1.100 1999/04/20 14:49:01 src Exp $
dnl
dnl copyright 1996, 1997, 1998 Egil Kvaleberg, egil@kvaleberg.no
dnl the GNU General Public License applies
dnl
dnl $Log: configure.in,v $
dnl Revision 1.100 1999/04/20 14:49:01 src
dnl Yet another fox for INN NEWSCONFIG
dnl
dnl Revision 1.99 1999/04/20 12:38:08 src
dnl Tiny bug finding ../lib/innshellvars
dnl
dnl Revision 1.98 1999/04/20 06:45:42 src
dnl Use reasonably sane config values in documentation even for runtime config
dnl
dnl Revision 1.97 1999/04/19 03:50:56 src
dnl Added config options for newsq
dnl
dnl Revision 1.96 1999/04/19 03:32:30 src
dnl Standard profile in $PATHETC/newsx.conf
dnl
dnl Revision 1.95 1999/04/17 15:00:45 src
dnl Documentation for 1.4
dnl
dnl Revision 1.94 1999/04/15 04:26:56 src
dnl Updated automake/autoconf version
dnl
dnl Revision 1.93 1999/04/08 16:57:17 src
dnl Looking for innshellvars under ../etc and ../lib too
dnl
dnl Revision 1.92 1999/04/08 10:48:49 src
dnl Extendeddbz to configure
dnl
dnl Revision 1.91 1999/04/08 10:19:34 src
dnl Check for extendeddbz in configure
dnl
dnl Revision 1.90 1999/04/08 08:04:33 src
dnl Updated installation documentation
dnl
dnl Revision 1.89 1999/04/08 07:31:26 src
dnl Support for a list of runtime configuration files.
dnl
dnl Revision 1.88 1999/04/08 06:31:06 src
dnl Support for full runtime configuration
dnl
dnl Revision 1.87 1999/04/05 19:01:43 src
dnl Lock for scanlogs
dnl
dnl Revision 1.86 1999/04/05 13:07:22 src
dnl Various fixes for storeage-API
dnl
dnl Revision 1.85 1999/03/24 03:52:51 src
dnl Implemented "newsx" as magic exclude pattern
dnl
dnl Revision 1.84 1999/03/18 19:24:05 src
dnl Removed bash-thing
dnl
dnl Revision 1.83 1999/03/11 11:53:54 src
dnl Spec-file for building RPM package
dnl
dnl Revision 1.82 1999/03/11 08:00:05 src
dnl Created more directory
dnl
dnl Revision 1.81 1999/03/11 07:54:37 src
dnl Moved storage to lib and src
dnl
dnl Revision 1.80 1999/03/11 07:44:14 src
dnl Moved storage to src and lib
dnl
dnl Revision 1.79 1999/03/11 07:29:51 src
dnl Implemented check for spool free space
dnl
dnl Revision 1.78 1999/03/07 15:41:24 src
dnl Removed DBZ_VERSION from configuration
dnl
dnl Revision 1.77 1999/03/07 14:58:07 src
dnl Read newsconfig supported. Storage API supported.
dnl
dnl Revision 1.76 1999/03/05 16:15:16 src
dnl Version 1.4pre
dnl
dnl Revision 1.75 1999/03/05 11:20:22 src
dnl Delayed decision of dbz v3 vz. 6 to runtime.
dnl
dnl Revision 1.74 1999/03/04 17:42:51 src
dnl *** empty log message ***
dnl
dnl Revision 1.73 1999/03/04 17:18:07 src
dnl *** empty log message ***
dnl
dnl Revision 1.72 1999/03/04 16:19:07 src
dnl Fixed hostname in log
dnl
dnl Revision 1.71 1998/11/24 17:25:37 src
dnl Version 1.3pre2: Repaired INN mode hamdling of ME entry
dnl
dnl Revision 1.70 1998/11/21 19:14:17 src
dnl Added --filter option
dnl
dnl Revision 1.69 1998/10/25 13:42:25 src
dnl Now finds libinn in INN lib directory
dnl
dnl Revision 1.68 1998/10/23 03:38:35 src
dnl INN 2.1 sets VERSION, which confuses us
dnl
dnl Revision 1.67 1998/09/27 07:33:48 src
dnl Version 1.2
dnl
dnl Revision 1.66 1998/09/21 10:33:02 src
dnl Version 1.2pre3
dnl
dnl Revision 1.65 1998/09/21 10:03:32 src
dnl Repaired HAVE_LIBINN
dnl
dnl Revision 1.64 1998/09/18 07:30:51 src
dnl Implemented --inews
dnl
dnl Revision 1.63 1998/09/13 16:53:54 src
dnl Statistics lock file
dnl
dnl Revision 1.62 1998/09/13 13:51:44 src
dnl Moved getopt to lib, and implemented HAVE_GETOPT
dnl
dnl Revision 1.61 1998/09/13 13:28:32 src
dnl Implemented HAVE_SETENV
dnl
dnl Revision 1.60 1998/09/11 16:37:36 src
dnl Lockfile for logfile of posted articles and for posted article folder.
dnl
dnl Revision 1.59 1998/09/11 09:11:05 src
dnl Check for putenv and setenv, support --help
dnl
dnl Revision 1.58 1998/09/09 07:32:06 src
dnl Version 1.1
dnl
dnl Revision 1.57 1998/09/06 06:20:09 src
dnl Build libdbz.a only if not HAVE_LIBINN
dnl
dnl Revision 1.56 1998/09/03 02:49:21 src
dnl Fixed stuff detected by -Wall
dnl
dnl Revision 1.55 1998/09/03 02:19:18 src
dnl Added -Wall for GCC
dnl
dnl Revision 1.54 1998/09/02 06:50:16 src
dnl newsx version 1.0
dnl
dnl Revision 1.53 1998/09/02 06:34:30 src
dnl Support @-syntax in newsfeeds, and support AUTHINFO GENERIC
dnl
dnl Revision 1.52 1998/08/24 07:10:50 src
dnl Removed HAVE_SENDMAIL and HAVE_RNEWS
dnl
dnl Revision 1.51 1998/08/24 07:02:38 src
dnl Fixes for NeXT
dnl
AC_INIT(FAQ)
AM_INIT_AUTOMAKE(newsx, 1.4)
AM_CONFIG_HEADER(config.h)
dnl Only most recent year required:
COPYRIGHT="Copyright 1999 Egil Kvaleberg <egil@kvaleberg.no>"
BUGCATCHER="bug-newsx@kvaleberg.no"
AC_REVISION(Configure for newsx $VERSION)
dnl We need brackets:
changequote(<<, >>)
VERDATE=`date | sed 's/^[^ ]* \([^ ]*\) *\([0-9]*\) .* \([0-9]*\)$/\2 \1 \3/'`
changequote([, ])
AC_SUBST(VERSION)
AC_SUBST(VERDATE)
AC_SUBST(PACKAGE)
AC_SUBST(COPYRIGHT)
AC_SUBST(BUGCATCHER)
dnl -----------------------------------------------------------------
dnl
dnl Default list of locations to visit in search of the
dnl news configuration file
dnl
dnl Other defaults
NEWSUMASK=002
INN_EXTENDEDDBZ=0
INN_STORAGEAPI=0
dnl -----------------------------------------------------------------
dnl
dnl Command line options
dnl
AC_ARG_WITH(newshome, \
[--with-newshome=DIR news home directory is DIR], \
NEWSHOME="$withval")
AC_ARG_WITH(history, \
[--without-history do not perform history database lookup
--with-history=FILE use FILE as history database])
if test x$with_history != xno; then
AC_DEFINE_UNQUOTED(WITH_HISTORY, 1)
fi
AC_ARG_WITH(errlog, \
[--with-errlog=LOG_XX do syslog in category LOG_XX],[
if test x$with_errlog = xno; then
AC_DEFINE_UNQUOTED(WITHOUT_ERRLOG, 1)
elif test x$with_errlog != xyes ; then
AC_DEFINE_UNQUOTED(WITH_ERRLOG, $with_errlog)
fi ])
AC_ARG_WITH(inhosts, \
[--with-inhosts=DIR use DIR as in.hosts directory], \
INHOSTS="$with_inhosts")
AC_ARG_WITH(minspool, \
[--with-minspool=size use size as guideline for incoming spool size], [
if test x$with_minspool != xyes ; then
AC_DEFINE_UNQUOTED(MINSPOOL, $with_minspool)
fi ])
AC_ARG_WITH(timeout, \
[--with-timeout=secs use secs as general timeout, default is 600], [
if test x$with_timeout != xyes ; then
AC_DEFINE_UNQUOTED(TIMEOUT, $with_timeout)
fi ])
AC_ARG_WITH(ps-status, \
[--without-ps-status do not modify 'ps' status])
if test x$with_ps_status != xno; then
AC_DEFINE_UNQUOTED(PS_STATUS, 1)
fi
dnl
dnl Experimental runtime configuration
dnl
AC_ARG_WITH(newslib, \
[--with-newslib=DIR use DIR for news shareable library files], \
NEWSLIB="$withval")
AC_ARG_WITH(newsconfig, \
[--with-newsconfig=FILE use FILE(s) for runtime configuration (experimental)], \
NEWSCONFIG="$withval")
dnl -----------------------------------------------------------------
dnl
dnl Config at runtime instead?
dnl
if test x$NEWSCONFIG != x; then
dnl
dnl Experimental: Runtime configuration
dnl
AC_MSG_CHECKING(runtime news configuration)
AC_MSG_RESULT($NEWSCONFIG)
dnl default to INN to pick libraries
INN_MODE=1
else
dnl Hardcoded for Debian
PATHETC=/etc
INN_MODE=1
NEWSHOME="/var/lib/news"
AC_SUBST($SPOOL)
AC_MSG_RESULT($SPOOL)
NEWSBIN="/usr/lib/news/bin"
SPOOL="/var/spool/news"
BATCH="$SPOOL/out.going"
INCOMING="$SPOOL/in.coming"
INHOSTS="$SPOOL/in.hosts"
ACTIVE="/var/lib/news/active"
HISTORY="/var/lib/news/history"
dnl LOCKS="/usr/lib/news" "/var/run/innd"
LOCKS="/var/run/innd"
dnl INN=/etc/news/newsfeeds, CNEWS=/etc/news/sys
NEWSFEEDS="/etc/news/newsfeeds"
NEWSUSER="news"
dnl INN 2.x specific things. Let's guess - APB
INN_EXTENDEDDBZ=1
INN_STORAGEAPI=1
dnl hmmm - this seems to be unused
dnl good job since INN wants /lib on the end and cnews doesn't
NEWSLIB="$NEWSHOME/lib"
NEWSCONFIG=/etc/news/innshellvars:/usr/lib/news/config
fi
dnl
dnl News config finished
dnl
AC_SUBST(NEWSCONFIG)
AC_SUBST(NEWSHOME)
AC_SUBST(NEWSBIN)
AC_SUBST(PATHETC)
AC_SUBST(SPOOL)
AC_SUBST(BATCH)
AC_SUBST(INCOMING)
AC_SUBST(INHOSTS)
AC_SUBST(ACTIVE)
AC_SUBST(HISTORY)
AC_SUBST(LOCKS)
AC_SUBST(NEWSFEEDS)
AC_SUBST(NEWSUSER)
AC_SUBST(NEWSLIB)
AC_SUBST(INN_MODE)
AC_SUBST(NEWSUMASK)
AC_SUBST(INN_EXTENDEDDBZ)
AC_SUBST(INN_STORAGEAPI)
dnl -----------------------------------------------------------------
dnl
dnl Check out the C compiler, tools and libraries
dnl
dnl Check for CC before anything else..
AC_PROG_CC
dnl Issue all GCC warnings..
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall"
fi
dnl Check for Posixized ISC, and NeXT
AC_ISC_POSIX
if test "$ISC" != yes; then
dnl method suggested by Helmut Heller <heller@altoetting-online.de>
dnl it is not certain if this is really required, btw
AC_CACHE_CHECK([for NeXT], ac_cv_nextstep,
[if test -d /NextApps; then
AC_DEFINE(_POSIX_SOURCE)
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -posix"
else
CFLAGS="$CFLAGS -Xp"
fi
ac_cv_nextstep=yes
else
ac_cv_nextstep=no
fi])
fi
dnl Checks for programs.
AC_ARG_PROGRAM
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PROG_RANLIB
AM_C_PROTOTYPES
AC_PATH_PROG(SENDMAIL_PATH, sendmail, /usr/sbin/sendmail)
AC_PATH_PROG(RNEWS_PATH, rnews, /usr/bin/rnews)
AC_PATH_PROG(INEWS_PATH, inews, /usr/bin/inews)
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS(sys/time.h limits.h syslog.h values.h stdlib.h \
malloc.h string.h strings.h memory.h stdarg.h varargs.h \
fcntl.h sys/filio.h sys/ioctl.h sys/file.h sys/stat.h \
sys/wait.h sys/socket.h ansi/string.h sys/vfs.h \
sys/statvfs.h sys/param.h sys/mount.h libc.h)
dnl Checks for compiler characteristics.
AC_C_CONST
AC_CACHE_CHECK([for packed struct], ac_cv_gnuc_packed,
[AC_TRY_COMPILE(,
changequote(<<, >>)dnl
<<
/* NEXTSTEP Gnu C does not support this */
struct { char a; char b; } __attribute__((packed)) s;
>>,
changequote([, ])dnl
ac_cv_gnuc_packed=yes, ac_cv_gnuc_packed=no)])
if test $ac_cv_gnuc_packed = yes; then
AC_DEFINE(PACKED, [__attribute__((packed))])
else
AC_DEFINE(PACKED, [/* packed */])
fi
dnl Checks for standard include file completeness.
AC_TYPE_SIGNAL
AC_TYPE_PID_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_MODE_T
AC_CHECK_TYPE(nlink_t, short)
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MMAP
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(inet, main)
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(gen, syslog)
AC_CHECK_FUNCS(strerror strsignal strtoul waitpid)
AC_CHECK_FUNCS(putenv setenv, HAVE_SETENV=1)
AC_CHECK_FUNCS(getopt_long, HAVE_GETOPT=1)
AC_CHECK_FUNCS(statfs statvfs)
AC_SUBST(HAVE_SETENV)
AC_SUBST(HAVE_GETOPT)
dnl unistd.h presumably already verified above
if test x$ac_cv_header_unistd_h = x; then
AC_CHECK_HEADERS(unistd.h)
fi
dnl
dnl Checks for INN 2.0 and onwards
dnl
if test x$INN_MODE = x1; then
CFLAGS_save="$CFLAGS"
CFLAGS="$CFLAGS -L$NEWSLIB"
AC_CHECK_LIB(inn, HashMessageID, HAVE_LIBINN=1)
LIBS_save="$LIBS"
dnl
dnl BUG:
dnl Note that double inclusion of -lstorage seem to be required
dnl on some systems to get the QIO-functions
dnl
LIBS="$LIBS -linn -lstorage"
AC_CHECK_LIB(storage, IsToken, HAVE_LIBSTORAGE=1)
dnl
dnl Regretfully, the standard INN install does not place this
dnl crucial include-file in any standard place. So, unless it is
dnl installed manually, we have to resort to a local copy.
dnl BUG: Must really be fixed!
dnl
AC_CHECK_HEADERS(storage.h)
CFLAGS="$CFLAGS_save"
LIBS="$LIBS_save"
fi
AC_SUBST(HAVE_LIBINN)
AC_SUBST(HAVE_LIBSTORAGE)
dnl Handle extra object files and libraries
dnl Always include good old version 3.4:
MORELIBS2="../dbz/libdbzv3.a"
if test x$HAVE_SETENV != x1; then
MORELIBS2="$MORELIBS2 ../lib/libsetenv.a"
fi
if test x$HAVE_GETOPT != x1; then
MORELIBS2="$MORELIBS2 ../lib/libgetopt.a"
fi
if test x$HAVE_LIBINN = x1; then
dnl Yes, we'll use the INN library
MORELIBS1="$MORELIBS1 -L$NEWSLIB"
MORELIBS2="$MORELIBS2 -linn"
else
dnl No, so we'll use our home made stuff...
MORELIBS2="$MORELIBS2 ../dbz/libdbz.a"
fi
if test x$HAVE_LIBSTORAGE = x1; then
dnl Yes, we'll use the Storage-API library
if test x$HAVE_LIBINN != x1; then
MORELIBS1="$MORELIBS1 -L$NEWSLIB"
fi
dnl
dnl BUG:
dnl Note that double inclusion of -lstorage seem to be required
dnl on some systems to get the QIO-functions
dnl
MORELIBS2="-lstorage $MORELIBS2 -lstorage"
dnl BUG: remove...
dnl LIBS="-lstorage $LIBS -lstorage"
AC_DEFINE_UNQUOTED(HAVE_LIBSTORAGE, 1)
else
dnl No, default to dummy...
MORELIBS2="$MORELIBS2 ../lib/libstorage.a"
fi
MORELIBS="$MORELIBS1 $MORELIBS2"
AC_SUBST(MORELIBS)
dnl Extra substitutions into config.h
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_DEFINE_UNQUOTED(COPYRIGHT, "$COPYRIGHT")
AC_DEFINE_UNQUOTED(BUGCATCHER,"$BUGCATCHER")
AC_DEFINE_UNQUOTED(NEWSCONFIG,"$NEWSCONFIG")
AC_DEFINE_UNQUOTED(NEWSHOME, "$NEWSHOME")
AC_DEFINE_UNQUOTED(NEWSBIN, "$NEWSBIN")
AC_DEFINE_UNQUOTED(PATHETC, "$PATHETC")
AC_DEFINE_UNQUOTED(ACTIVE, "$ACTIVE")
AC_DEFINE_UNQUOTED(HISTORY, "$HISTORY")
AC_DEFINE_UNQUOTED(NEWSFEEDS, "$NEWSFEEDS")
AC_DEFINE_UNQUOTED(SPOOL, "$SPOOL")
AC_DEFINE_UNQUOTED(BATCH, "$BATCH")
AC_DEFINE_UNQUOTED(INCOMING, "$INCOMING")
AC_DEFINE_UNQUOTED(INHOSTS, "$INHOSTS")
AC_DEFINE_UNQUOTED(LOCKS, "$LOCKS")
AC_DEFINE_UNQUOTED(NEWSLIB, "$NEWSLIB")
AC_DEFINE_UNQUOTED(SENDMAIL_PATH,"$SENDMAIL_PATH")
AC_DEFINE_UNQUOTED(RNEWS_PATH,"$RNEWS_PATH")
AC_DEFINE_UNQUOTED(INEWS_PATH,"$INEWS_PATH")
AC_DEFINE_UNQUOTED(INN_MODE, $INN_MODE)
AC_DEFINE_UNQUOTED(NEWSUMASK, $NEWSUMASK)
AC_DEFINE_UNQUOTED(INN_EXTENDEDDBZ, $INN_EXTENDEDDBZ)
AC_DEFINE_UNQUOTED(INN_STORAGEAPI, $INN_STORAGEAPI)
dnl
dnl We must have sensible default values
dnl for all files and directories mentioned in the
dnl documentation
dnl
mkdoc ()
{
if test x`eval echo $"$1"` = x; then
eval DOC_$1="$2"
else
eval DOC_$1=$"$1"
fi
e="s%@DOC_$1@%`eval echo $'DOC_'$1`%g"
extrasub=`(echo "$extrasub"; echo "$e")`
}
mkdoc NEWSUSER "news"
mkdoc SPOOL "/var/spool/news"
mkdoc NEWSHOME "/usr/lib/news"
mkdoc NEWSBIN "/usr/lib/newsbin"
mkdoc BATCH "$DOC_SPOOL/out.going"
mkdoc INCOMING "$DOC_SPOOL/in.coming"
mkdoc INHOSTS "$DOC_SPOOL/in.hosts"
mkdoc LOCKS "$DOC_NEWSHOME"
mkdoc PATHETC "$DOC_NEWSHOME"
mkdoc NEWSFEEDS "$DOC_NEWSHOME/newsfeeds"
mkdoc ACTIVE "$DOC_NEWSHOME/active"
mkdoc HISTORY "$DOC_NEWSHOME/history"
mkdoc NEWSCONFIG "$DOC_NEWSHOME/innshellvars"
AC_OUTPUT(README doc/newsx.8 doc/newsq.1 doc/in.hosts.5 doc/newsx.conf.5 \
src/newsq more/addgroup.all newsx.spec \
Makefile src/Makefile dbz/Makefile doc/Makefile lib/Makefile more/Makefile \
test/Makefile, [ \
# Makefile uses this timestamp file to record whether config.h is up to date.
touch stamp-config])
chmod +x more/addgroup.all
if test x$INN_MODE = x1; then
if test x$HAVE_LIBINN != x1; then
echo
echo "NOTE: Could not find a libinn"
echo "This might create problems for INN 2.x"
fi
fi
|