1dnl Copyright (c) 2003-2008 Andrey Slusar <anrays@gmail.com> 2dnl Copyright (c) 2003-2004 Alexandr Dobroslavskiy <dsas@users.sourceforge.net> 3dnl Copyright (c) 2015-2020 Yauheni Kaliuta <y.kaliuta@gmail.com> 4dnl 5AC_REVISION([Revision: 1037]) 6AC_PREREQ(2.53) 7AC_INIT([fidogate],[5.10],[y.kaliuta@gmail.com]) 8AC_DISABLE_OPTION_CHECKING 9AM_CONFIG_HEADER([config.h]) 10AC_CONFIG_SRCDIR([src/common/config.c]) 11AC_CONFIG_AUX_DIR([build]) 12AC_PREFIX_DEFAULT(/usr/local/fido) 13AM_INIT_AUTOMAKE([1.11 foreign subdir-objects]) 14AM_SILENT_RULES([yes]) 15AM_MAINTAINER_MODE 16AC_CANONICAL_HOST 17 18dnl Check for programs. 19AC_PROG_CC 20AC_PROG_CPP 21AC_PROG_INSTALL 22AC_PROG_LN_S 23AC_PROG_MAKE_SET 24AC_PROG_AWK 25AC_PROG_YACC 26 27if test "x$YACC" = "x"; then 28 AC_MSG_ERROR([yacc/bison not found, please install]) 29fi 30 31# for libtool: 32# LT_INIT 33# AC_SUBST(LIBTOOL_DEPS) 34AC_PROG_RANLIB 35AM_PROG_AR 36 37dnl Checks for header files. 38AC_FUNC_ALLOCA 39AC_HEADER_DIRENT 40AC_HEADER_STDC 41AC_HEADER_SYS_WAIT 42AC_CHECK_HEADERS(fcntl.h limits.h stddef.h sys/mount.h sys/param.h sys/statfs.h sys/stat.h) 43AC_CHECK_HEADERS(sys/statvfs.h sys/time.h sys/vfs.h syslog.h utime.h time.h) 44AC_CHECK_HEADERS(sysexits.h malloc.h) 45 46dnl Checks for typedefs, structures, and compiler characteristics. 47AC_C_CONST 48AC_TYPE_MODE_T 49AC_TYPE_OFF_T 50AC_TYPE_PID_T 51AC_TYPE_SIZE_T 52AC_HEADER_TIME 53AC_STRUCT_TM 54AC_STRUCT_TIMEZONE 55 56dnl Checks for library functions. 57AC_FUNC_CLOSEDIR_VOID 58AC_FUNC_MALLOC 59AC_FUNC_MEMCMP 60AC_FUNC_MKTIME 61dnl for future AC_FUNC_REALLOC 62AC_FUNC_SETVBUF_REVERSED 63AC_TYPE_SIGNAL 64AC_FUNC_STAT 65AC_FUNC_STRFTIME 66AC_FUNC_UTIME_NULL 67AC_FUNC_VPRINTF 68AC_CHECK_FUNCS(gettimeofday memchr memset mkdir regcomp strcasecmp strchr) 69AC_CHECK_FUNCS(strerror strncasecmp strpbrk strrchr strspn strstr stricmp utime) 70AC_CHECK_FUNCS(link mktime syslog sprintf snprintf) 71 72if ! test "x$ac_cv_func_snprintf" = xyes && \ 73 ! test "x$ac_cv_func_sprintf" = xyes; then 74 AC_MSG_ERROR(sprintf() or snprintf() required) 75fi 76 77dnl Redefine install scripts 78INSTALL_DATA='${INSTALL} -m 640' 79 80dnl Paths to major progs 81AC_HEADER_MAJOR 82AC_PATH_PROG(PERL, perl, no) 83AC_PATH_PROG(PERL5, perl5, $PERL) 84AC_PATH_PROG(ZIP, zip, no) 85AC_PATH_PROG(RAR, rar, no) 86AC_PATH_PROG(UNZIP, unzip, no) 87AC_PATH_PROG(ARC, arc, no) 88AC_PATH_PROG(LHA, lzh, no) 89AC_PATH_PROG(UUDECODE, uudecode, no) 90 91AM_ICONV 92 93AS_IF([test x$am_func_iconv != xyes], 94 AC_MSG_ERROR([working iconv not found])) 95 96config_vars= 97# Check for a --with-logdir argument 98AC_ARG_WITH(logdir, dnl 99 --with-logdir=DIR set fidogate log DIR, 100 [dnl 101case "$with_logdir" in 102yes) AC_MSG_ERROR([--with-logdir requires an argument; use --with-logdir=DIR]) ;; 103''|no) ;; 104*) logdir="$withval" ;; 105esac 106]) 107 108# Check for a --with-vardir argument 109AC_ARG_WITH(vardir, dnl 110 --with-vardir=DIR set fidogate var DIR, 111 [dnl 112case "$with_vardir" in 113yes) AC_MSG_ERROR([--with-vardir requires an argument; use --with-vardir=DIR]) ;; 114''|no) ;; 115*) vardir="$withval" ;; 116esac 117]) 118 119# Check for a --with-lockdir argument 120AC_ARG_WITH(lockdir, dnl 121 --with-lockdir=DIR set fidogate lock DIR, 122 [dnl 123case "$with_lockdir" in 124yes) AC_MSG_ERROR([--with-lockdir requires an argument; use --with-lockdir=DIR]) ;; 125''|no) ;; 126*) LOCKDIR="$withval" ;; 127esac 128]) 129 130# Check for a --with-spooldir argument 131AC_ARG_WITH(spooldir, dnl 132 --with-spooldir=DIR set fidogate spool DIR, 133 [dnl 134case "$with_spooldir" in 135yes) AC_MSG_ERROR([--with-spooldir requires an argument; use --with-spooldir=DIR]) ;; 136''|no) ;; 137*) spooldir="$withval" ;; 138esac 139]) 140 141# Check for a --with-sysconfdir argument 142AC_ARG_WITH(sysconfdir, dnl 143 --with-sysconfdir=DIR set fidogate config DIR, 144 [dnl 145case "$with_sysconfdir" in 146yes) AC_MSG_ERROR([--with-sysconfdir requires an argument; use --with-sysconfdir=DIR]) ;; 147''|no) ;; 148*) sysconfdir="$withval" ;; 149esac 150]) 151 152# Check for a --with-btbasedir argument 153AC_ARG_WITH(btbasedir, dnl 154 --with-btbasedir=DIR set fidogate BTBASE DIR, 155 [dnl 156case "$with_btbasedir" in 157yes) AC_MSG_ERROR([--with-btbasedir requires an argument; use --with-btbasedir=DIR]) ;; 158''|no);; 159*) btbasedir="$withval" 160;; 161esac 162]) 163if ! test "${btbasedir+set}" = set; then 164 btbasedir="${localstatedir}/spool/fido/bt" 165fi 166AC_SUBST(btbasedir) 167 168# Check for a --with-netmaildir argument 169AC_ARG_WITH(netmaildir, dnl 170 --with-netmaildir=DIR set fidogate NETMAIL DIR, 171 [dnl 172case "$with_netmaildir" in 173yes) AC_MSG_ERROR([--with-netmaildir requires an argument; use --with-netmaildir=DIR]) ;; 174''|no);; 175*) netmaildir="$withval" 176;; 177esac 178]) 179if ! test "${netmaildir+set}" = set; then 180 netmaildir="${btbasedir}/netmail" 181fi 182AC_SUBST(netmaildir) 183 184dnl# Check for a --with-newsbindir argument 185AC_ARG_WITH(newsbindir, dnl 186 --with-newsbindir=DIR set INN bin directory; PATHBIN, 187 [dnl 188case "$with_newsbindir" in 189yes) AC_MSG_ERROR([--with-newsbindir requires an argument; use --with-newsbindir=DIR]) ;; 190''|no) ;; 191*) newsbindir="$withval" ;; 192esac 193]) 194 195AC_ARG_WITH([news], 196 [AS_HELP_STRING([--without-news], [build fidogate without news server])]) 197 198AC_ARG_WITH([inndir], 199 [AS_HELP_STRING([--with-inndir], [main INN directory; PATHNEWS])], 200 [], 201 [with_inndir=undefined]) 202 203AC_ARG_WITH([innetcdir], 204 [AS_HELP_STRING([--with-innetcdir], [INN etc directory; PATHETC])], 205 [], 206 [with_innetcdir=undefined]) 207 208AC_ARG_WITH([inndbdir], 209 [AS_HELP_STRING([--with-inndbdir], [INN db directory; PATHDB])], 210 [], 211 [with_inndbdir=undefined]) 212 213AC_ARG_WITH([innspooldir], 214 [AS_HELP_STRING([--with-innspooldir], [INN spool directory])], 215 [], 216 [with_innspooldir=undefined]) 217 218AC_ARG_ENABLE([oldbatcher], 219 [AS_HELP_STRING([--inn-disable-old-batcher], [disable old INN batcher])]) 220 221AC_ARG_WITH([rsf], 222 [AS_HELP_STRING([--without-rsf], 223 [build fidogate without runinc send_fidogate function])]) 224 225AC_ARG_WITH(sendmail, dnl 226 --with-sendmail=PATH Specify path to sendmail, 227 [dnl 228case "$with_sendmail" in 229yes|''|no) AC_MSG_ERROR([--with-sendmail requires an argument; use --with-sendmail=PATH]) ;; 230*) SENDMAIL="$withval" ;; 231esac 232]) 233 234 235OWNER="news" 236SRFC2FTN="rfc2ftn" 237 238AC_ARG_WITH(owner, dnl 239 --with-owner=USER set possibility to run FIDOGATE from a USER, 240 [dnl 241case "$with_owner" in 242''|news|no) 243 withftnnews=false;; 244*) 245 OWNER="$withval" 246 withftnnews=true 247 SRFC2FTN="ftnnews";; 248esac 249]) 250 251AM_CONDITIONAL(ftnnews, [test x$withftnnews = xtrue]) 252 253 254AC_SUBST(OWNER) 255 256AC_SUBST(SRFC2FTN) 257 258GROUP="news" 259AC_ARG_WITH(group, dnl 260 --with-group=GROUP set possibility to run FIDOGATE from a GROUP, 261 [dnl 262case "$with_group" in 263''|news) ;; 264*) GROUP="$withval" ;; 265esac 266]) 267AC_SUBST(GROUP) 268 269AC_ARG_WITH(default-mailer,dnl 270 [--with-default-mailer=COMMAND default mailer comand],dnl 271 [ if test -n "$withval"; then 272 AC_DEFINE_UNQUOTED(DEFAULT_MAILER, "$withval", 273 [default mailer command]) 274 fi 275 ]) 276 277AC_ARG_ENABLE(local-ftn-addr, 278[ --enable-local-ftn-addr use local FTN addres],dnl 279 [case "${enableval}" in 280 yes) enable_local_ftn_addr=yes ;; 281 no) enable_local_ftn_addr=no ;; 282 *) AC_MSG_ERROR(bad value ${enableval} for --enable-local-ftn-addr) ;; 283 esac],dnl 284 enable_local_ftn_addr=no) 285 286if test $enable_local_ftn_addr = yes; then 287 AC_DEFINE(LOCAL_FTN_ADDRESSES, 288 1, 289 [ 290 Generate local FTN addresses, e.g. 291 user_name%p.f.n.z@host.domain 292 instead of 293 user_name@p.f.n.z.domain 294]) 295fi 296 297AC_ARG_ENABLE(dobsy-files, 298[ --disable-dobsy-files create Binkley-style BSY],dnl 299 [case "${enableval}" in 300 yes | no) enable_dobsy_files="${enableval}" ;; 301 *) AC_MSG_ERROR(bad value ${enableval} for --disable-dobsy-files) ;; 302 esac],dnl 303 enable_dobsy_files=yes) 304 305if test $enable_dobsy_files = yes; then 306 AC_DEFINE(DO_BSY_FILES, 307 1, 308 [Create Binkley-style BSY files for all outbound operations]) 309fi 310 311AC_ARG_ENABLE(nfs-safe-lock, 312[ --enable-nfs-safe-lock create lock files/BSY files in an NFS-safe way],dnl 313 [case "${enableval}" in 314 yes | no) enable_nfs_safe_lock="${enableval}" ;; 315 *) AC_MSG_ERROR(bad value ${enableval} for --enable-nfs-safe-lock) ;; 316 esac],dnl 317 enable_nfs_safe_lock=no) 318 319if test $enable_nfs_safe_lock = yes; then 320 AC_DEFINE(NFS_SAFE_LOCK_FILES, 321 1, 322 [Create lock files / BSY files in an NFS-safe way (see man 2 open)]) 323fi 324 325MAXMSGSIZE=14000 326AC_ARG_WITH(maxmsg-size, 327[ --with-maxmsg-size=SIZE set max. message size for FIDO [14000]], 328 MAXMSGSIZE=$withval,) 329AC_DEFINE_UNQUOTED(MAXMSGSIZE, 330 $MAXMSGSIZE, 331 [ 332Default max. message size for FIDO. Due to some more brain damage 333in FIDONET programs we have to split larger messages into several 334smaller ones. May be set with the -M option in AREAS or MaxMsgSize 335in DEFAULT_CONFIG_GATE. 336 337< 16 K -- 14000 338< 32 K -- 30000 339]) 340 341FTN_INVALID_DOMAIN="INVALID_FTN_ADDRESS" 342AC_ARG_WITH(ftn-invalid-domain, 343[ --with-ftn-invalid-domain=DOM set domain for invalid FTN addresses [INVALID_FTN_ADDRESS]], 344 FTN_INVALID_DOMAIN="$withval",) 345AC_DEFINE_UNQUOTED(FTN_INVALID_DOMAIN,"$FTN_INVALID_DOMAIN", 346 [Domain for invalid FTN addresses]) 347 348SYSLOG_FACILITY=LOG_LOCAL0 349AC_ARG_WITH(syslog-facility, 350[ --with-syslog-facility=FAC set syslog facility [LOG_LOCAL0]], 351 SYSLOG_FACILITY=$withval,) 352AC_DEFINE_UNQUOTED(FACILITY, $SYSLOG_FACILITY, 353[ 354 syslog facility used for logging if logfile == "syslog" 355 (only for HAS_SYSLOG defined) 356]) 357 358CHARSET_STDFTN="cp866" 359CHARSET_STDRFC="utf-8" 360CHARSET_STD7BIT="us-ascii" 361AC_ARG_WITH(ftn-charset, 362[ --with-ftn-charset=CHS set default assumed charset for Fido messages [cp866] ], 363 CHARSET_STDFTN="$withval",) 364AC_DEFINE_UNQUOTED(CHARSET_STDFTN, "$CHARSET_STDFTN", 365[Default assumed charset for Fido messages (see also DefaultCharset)]) 366 367AC_ARG_WITH(rfc-charset, 368[ --with-rfc-charset=CHS set default assumed charset for RFC messages if without MIME headers [koi8-r]], 369 CHARSET_STDRFC="$withval",) 370AC_DEFINE_UNQUOTED(CHARSET_STDRFC, "$CHARSET_STDRFC", 371[Default assumed charset for RFC messages if without MIME headers]) 372 373AC_ARG_WITH(7bit-charset, 374[ --with-7bit-charset=CHS set default charset for RFC messages with forced 7bit encoding [us-ascii]], 375 CHARSET_STD7BIT="$withval",) 376AC_DEFINE_UNQUOTED(CHARSET_STD7BIT, "$CHARSET_STD7BIT", 377[Default charset for RFC messages with forced 7bit encoding]) 378 379AREAFIXMAXSTR=150 380AC_ARG_WITH(afix-maxstr, 381[ --with-afix-maxstr=AFS set maximum strings in areafix reports [150] ],AREAFIXMAXSTR=$withval,) 382AC_DEFINE_UNQUOTED(AREAFIXMAXSTR,$AREAFIXMAXSTR, 383[AFS set maximum strings in areafix reports]) 384 385AC_ARG_ENABLE(aliases-local, 386[ --enable-aliases-local rewrite addresses found in ALIASES so that the sender's address is the gateway address],dnl 387 [case "${enableval}" in 388 yes | no) enable_aliases_local="${enableval}" ;; 389 *) AC_MSG_ERROR(bad value ${enableval} for --enable-aliases-local) ;; 390 esac],dnl 391 enable_aliases_local=no) 392 393if test $enable_aliases_local = yes; then 394 AC_DEFINE(ALIASES_ARE_LOCAL, 395 1, 396 [ 397 Rewrite addresses found in ALIASES so that the sender's address is the 398 gateway address. The reverse direction requires suitable MTA aliases. 399]) 400fi 401 402AC_ARG_ENABLE(ai1, 403[ --enable-ai1 Add -a option to HOSTS entries, useful only with PASSTHRU NET/ECHOMAIL],dnl 404 [case "${enableval}" in 405 yes | no) enable_ai1="${enableval}" ;; 406 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ai1) ;; 407 esac],dnl 408 enable_ai1=no) 409 410if test $enable_ai1 = yes; then 411 AC_DEFINE(AI_1, 412 1, 413 [Add -a option to HOSTS entries, useful only with PASSTHRU_NET/ECHOMAIL]) 414fi 415 416AC_ARG_ENABLE(best-aka, 417[ --disable-best-aka disable best AKA select],dnl 418 [case "${enableval}" in 419 yes | no) enable_best_aka="${enableval}" ;; 420 *) AC_MSG_ERROR(bad value ${enableval} for --disable-best-aka) ;; 421 esac],dnl 422 enable_best_aka=no) 423 424if test $enable_best_aka = yes; then 425 AC_DEFINE(BEST_AKA, 426 1, 427 [Enable best AKA select]) 428fi 429 430AC_ARG_ENABLE(ftnacl, 431[ --disable-ftnacl do'nt use ACL for FTN links ],dnl 432 [case "${enableval}" in 433 yes | no) enable_ftnacl="${enableval}" ;; 434 *) AC_MSG_ERROR(bad value ${enableval} for --disable-ftnacl) ;; 435 esac],dnl 436 enable_ftnacl=no) 437 438if test $enable_ftnacl = yes; then 439 AC_DEFINE(FTN_ACL, 440 1, 441 [Enable ACL for FTN links]) 442fi 443 444AC_ARG_WITH(desc-dir, 445[ --with-desc-dir=DIR put file descriptions into ".desc/%s.desc" file instead of files.bbs], 446 DESC_DIR="$withval",DESC_DIR=".desc") 447 448AC_ARG_ENABLE(desc-dir, 449[ --disable-desc-dir put file descriptions into files.bbs],dnl 450 [case "${enableval}" in 451 yes | no) enable_desc_dir="${enableval}" ;; 452 *) AC_MSG_ERROR(bad value ${enableval} for --disable-desc-dir) ;; 453 esac],dnl 454 enable_desc_dir=yes) 455 456if test $enable_desc_dir = yes; then 457 AC_DEFINE_UNQUOTED(DESC_DIR, 458 "$DESC_DIR",[ 459Put file descriptions into `.desc/%s.desc' file instead of files.bbs 460.../fileecho/.desc/file.zip.desc -> ".desc", 461.../fileecho/file.zip.desc "" 462]) 463fi 464 465AC_ARG_ENABLE(recode-file-desc, 466[ --disable-recode-file-desc disable recode file descriptions],dnl 467 [case "${enableval}" in 468 yes | no) enable_recode_file_desc="${enableval}" ;; 469 *) AC_MSG_ERROR(bad value ${enableval} for --disable-recode-file-desc) ;; 470 esac],dnl 471 enable_recode_file_desc=yes) 472 473if test $enable_recode_file_desc = yes; then 474 AC_DEFINE(RECODE_FILE_DESC, 475 1, 476 [Recode file descriptions]) 477fi 478 479AC_ARG_ENABLE(af-avail, 480[ --disable-af-avail change behaviour of areafix command "%list" and "%avail" ],dnl 481 [case "${enableval}" in 482 yes | no) enable_af_afail="${enableval}" ;; 483 *) AC_MSG_ERROR(bad value ${enableval} for --disable-af-afail) ;; 484 esac],dnl 485 enable_af_afail=yes) 486 487if test $enable_af_afail = yes; then 488 AC_DEFINE(AF_AVAIL, 489 1,[ 490 Enable areafix command `%avail', change behaviour of areafix 491 command `%list' 492]) 493fi 494 495AC_ARG_ENABLE(xff-echomail, 496[ --disable-xff-echomail add X-FTN-From header to gated echomail],dnl 497 [case "${enableval}" in 498 yes | no) enable_xff_echomail="${enableval}" ;; 499 *) AC_MSG_ERROR(bad value ${enableval} for --disable-xff-echomail) ;; 500 esac],dnl 501 enable_xff_echomail=yes) 502 503if test $enable_xff_echomail = yes; then 504 AC_DEFINE(X_FTN_FROM_ECHOMAIL, 505 1, 506 [Add `X-FTN-From' header in gated echomail.]) 507fi 508 509AC_ARG_ENABLE(spyes, 510[ --disable-spyes use SPYES config],dnl 511 [case "${enableval}" in 512 yes | no) enable_spyes="${enableval}" ;; 513 *) AC_MSG_ERROR(bad value ${enableval} for --disable-spyes) ;; 514 esac],dnl 515 enable_spyes=yes) 516 517if test $enable_spyes = yes; then 518 AC_DEFINE(SPYES, 519 1, 520 [Added the feature "spy forwards".]) 521fi 522 523AC_ARG_ENABLE(aflr, 524[ --disable-aflr restricted access to areafix command %listall],dnl 525 [case "${enableval}" in 526 yes | no) enable_aflr="${enableval}" ;; 527 *) AC_MSG_ERROR(bad value ${enableval} for --disable-aflr) ;; 528 esac],dnl 529 enable_aflr=yes) 530 531if test $enable_aflr = yes; then 532 AC_DEFINE(AF_LISTALL_RESTRICTED, 533 1, 534 [Restricted access to areafix command `%listall']) 535fi 536 537AC_ARG_ENABLE(fecho-pass, 538[ --disable-fecho-pass use passthrought filearea],dnl 539 [case "${enableval}" in 540 yes | no) enable_fecho_pass="${enableval}" ;; 541 *) AC_MSG_ERROR(bad value ${enableval} for --disable-fecho-pass) ;; 542 esac],dnl 543 enable_fecho_pass=yes) 544 545if test $enable_fecho_pass = yes; then 546 AC_DEFINE(FECHO_PASSTHROUGHT, 547 1, 548 [Enable passthrought filearea]) 549fi 550 551AC_ARG_ENABLE(use-filebox, 552[ --disable-use-filebox use fileboxes for fileecho],dnl 553 [case "${enableval}" in 554 yes | no) enable_use_filebox="${enableval}" ;; 555 *) AC_MSG_ERROR(bad value ${enableval} for --disable-use-filebox) ;; 556 esac],dnl 557 enable_use_filebox=yes) 558 559if test $enable_use_filebox = yes; then 560 AC_DEFINE(USE_FILEBOX, 561 1, 562 [Enable if use fileboxes for fileecho]) 563fi 564 565AC_ARG_ENABLE(tick-crc, 566[ --disable-tick-crc ftntick CRC control],dnl 567 [case "${enableval}" in 568 yes | no) enable_tick_crc="${enableval}" ;; 569 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tick-crc) ;; 570 esac],dnl 571 enable_tick_crc=yes) 572 573if test $enable_tick_crc = yes; then 574 AC_DEFINE(FTNTICK_NOCRC, 575 1, 576 [Enable if no ftntick CRC control]) 577fi 578 579AC_ARG_ENABLE(tick-history, 580[ --disable-tick-history tick dupe check],dnl 581 [case "${enableval}" in 582 yes) enable_tick_history=yes ;; 583 no) enable_tick_history=no ;; 584 *) AC_MSG_ERROR(bad value ${enableval} for --disable-tick-history) ;; 585 esac],dnl 586 enable_tick_history=yes) 587 588if test $enable_tick_history = yes; then 589 AC_DEFINE(TIC_HISTORY, 590 1, 591 [Enable tic dupe check]) 592fi 593 594AC_ARG_ENABLE(tick-password, 595[ --enable-tick-password enable separate tic password in passwd file],dnl 596 [case "${enableval}" in 597 yes) enable_tick_password=yes ;; 598 no) enable_tick_password=no ;; 599 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tick-password) ;; 600 esac],dnl 601 enable_tick_password=no) 602 603if test $enable_tick_password = yes; then 604 AC_DEFINE(TIC_PASSWORD, 605 1, 606 [Enable separate tic password in passwd file]) 607fi 608 609AC_ARG_ENABLE(no-organization, 610[ --enable-no-organization enable if no insert Origin line if it absence],dnl 611 [case "${enableval}" in 612 yes | no) enable_no_organization="${enableval}" ;; 613 *) AC_MSG_ERROR(bad value ${enableval} for --enable-no-organization) ;; 614 esac],dnl 615 enable_no_organization=no) 616 617if test $enable_no_organization = yes; then 618 AC_DEFINE(NOINSERT_ORGANIZATION, 619 1, 620 [Enable if no insert Origin line if it absence]) 621fi 622 623AC_ARG_ENABLE(insecure-not-db, 624[ --disable-insecure-not-db put insecure mail into dupe database], 625 [case "${enableval}" in 626 yes | no) enable_insecure_not_db="${enableval}" ;; 627 *) AC_MSG_ERROR(bad value ${enableval} for --disable-insecure-not-db) ;; 628 esac],dnl 629 enable_insecure_not_db=yes) 630 631if test $enable_insecure_not_db = yes; then 632 AC_DEFINE(INSECURE_DONT_PUT_INTO_DUPE_DB, 633 1, 634 [Don't put insecure mail into dupe database]) 635fi 636 637AC_ARG_ENABLE(af-ansok, 638[ --enable-af-ansok change areafix answering to "ok" if subscribing],dnl 639 [case "${enableval}" in 640 yes | no) enable_af_ansok="${enableval}" ;; 641 *) AC_MSG_ERROR(bad value ${enableval} for --enable-af-ansok) ;; 642 esac],dnl 643 enable_af_ansok=no) 644 645if test $enable_af_ansok = yes; then 646 AC_DEFINE(ANSWER_OK, 647 1, 648 [Change areafix answer when subscibing to area from `subscribe' to `ok'.]) 649fi 650 651AC_ARG_ENABLE(fs-msgid, 652[ --disable-fs-msgid set gate msgid into outgoing messages], 653 [case "${enableval}" in 654 yes | no) enable_fs_msgid="${enableval}" ;; 655 *) AC_MSG_ERROR(bad value ${enableval} for --disable-fs-msgid) ;; 656 esac],dnl 657 enable_fs_msgid=yes) 658 659if test $enable_fs_msgid = yes; then 660 AC_DEFINE(FIDO_STYLE_MSGID, 661 1, 662 [Set fido-style msgid]) 663fi 664 665AC_ARG_ENABLE(dbc-history, 666[ --enable-dbc-history use msgid correspond data base],dnl 667 [case "${enableval}" in 668 yes | no) enable_dbc_history="${enableval}" ;; 669 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dbc-history) ;; 670 esac],dnl 671 enable_dbc_history=no) 672 673if test $enable_dbc_history = yes; then 674 AC_DEFINE(DBC_HISTORY, 675 1, 676 [Set msgid correspond data base]) 677fi 678 679AC_ARG_ENABLE(afses, 680[ --enable-afses areafix send echo status],dnl 681 [case "${enableval}" in 682 yes | no) enable_afses="${enableval}" ;; 683 *) AC_MSG_ERROR(bad value ${enableval} for --enable-afses) ;; 684 esac],dnl 685 enable_afses=no) 686 687if test $enable_afses = yes; then 688 AC_DEFINE(AFSEND_ECHO_STATUS, 689 1, 690 [Enable areafix send echo status]) 691fi 692 693AC_ARG_ENABLE(sub-zonegate, 694[ --enable-sub-zonegate subscribe only zonegate],dnl 695 [case "${enableval}" in 696 yes) enable_sub_zonegate=yes ;; 697 no) enable_sub_zonegate=no ;; 698 *) AC_MSG_ERROR(bad value ${enableval} for --enable-sub-zonegate) ;; 699 esac],dnl 700 enable_sub_zonegate=no) 701 702if test $enable_sub_zonegate = yes; then 703 AC_DEFINE(SUBSCRIBE_ZONEGATE, 704 1, 705 [Enable subscribe autorization only if node listed in zonegate]) 706fi 707 708AC_ARG_ENABLE(pid2rd-tid2gtv, 709[ --enable-pid2rd-tid2gtv paste ^PID & ^TID kludges to message],dnl 710 [case "${enableval}" in 711 yes) enable_pid2rd_tid2gtv=yes ;; 712 no) enable_pid2rd_tid2gtv=no ;; 713 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pid2rd-tid2gtv) ;; 714 esac],dnl 715 enable_pid2rd_tid2gtv=no) 716 717if test $enable_pid2rd_tid2gtv = yes; then 718 AC_DEFINE(PID_READER_TID_GTV, 719 1, 720 [Enable paste ^PID (mail or news reader name) 721 and ^TID (fidogate version) kludge]) 722fi 723 724AC_ARG_ENABLE(dnt-netmail, 725[ --enable-dnt-netmail do not toss netmail],dnl 726 [case "${enableval}" in 727 yes) enable_dnt_netmail=yes ;; 728 no) enable_dnt_netmail=no ;; 729 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dnt-netmail) ;; 730 esac],dnl 731 enable_dnt_netmail=no) 732 733if test $enable_dnt_netmail = yes; then 734 AC_DEFINE(DO_NOT_TOSS_NETMAIL, 735 1, 736 [Disable tosting netmail and set directory for incoming and outgoing pkt's]) 737fi 738 739AC_ARG_ENABLE(owfl, 740[ --disable-owfl overwrite fileecho link],dnl 741 [case "${enableval}" in 742 yes) enable_owfl=yes ;; 743 no) enable_owfl=no ;; 744 *) AC_MSG_ERROR(bad value ${enableval} for --disable-owfl) ;; 745 esac],dnl 746 enable_owfl=yes) 747 748if test $enable_owfl = yes; then 749 AC_DEFINE(OVERWRITEN_FECHO_FILE_TO_LINK, 750 1, 751 [Enable overwrite hardlink if file already exist]) 752fi 753 754AC_ARG_ENABLE(active-lookup, 755[ --disable-active-lookup active file lookup],dnl 756 [case "${enableval}" in 757 yes) enable_active_lookup=yes ;; 758 no) enable_active_lookup=no ;; 759 *) AC_MSG_ERROR(bad value ${enableval} for --disable-active-lookup) ;; 760 esac],dnl 761 enable_active_lookup=yes) 762 763if test $enable_active_lookup = yes; then 764 AC_DEFINE(ACTIVE_LOOKUP,1,[Enable lookup to INN active file]) 765fi 766 767AC_ARG_ENABLE(recode-allrfc, 768[ --disable-recode-allrfc recoding some RFC header], 769 [case "${enableval}" in 770 yes) enable_recode_allrfc=yes ;; 771 no) enable_recode_allrfc=no ;; 772 *) AC_MSG_ERROR(bad value ${enableval} for --disable-recode-allrfc) ;; 773 esac], 774 enable_recode_allrfc=yes) 775if test $enable_recode_allrfc = yes; then 776 AC_DEFINE(RECODE_ALL_RFC,1,[Recode all RFC headers]) 777fi 778 779AC_ARG_ENABLE(security, 780[ --disable-security disable additional address checking],dnl 781 [case "${enableval}" in 782 yes | no) enable_security="${enableval}" ;; 783 *) AC_MSG_ERROR(bad value ${enableval} for --disable-security) ;; 784 esac],dnl 785 enable_security=yes) 786 787if test $enable_security = yes; then 788 AC_DEFINE(SECURITY, 789 1, 790 [ 791For the security reason enabled additional addresses checking in the 792.pkt header, message header, origin and echomail ^aPATH. 793If the last address in PATH is not equal to address in the pkt header, 794then the address from the pkt header is inserted into PATH. 795]) 796fi 797 798AC_ARG_ENABLE(fts-via, 799[ --disable-fts-via disable FTS format of VIA],dnl 800 [case "${enableval}" in 801 yes | no) enable_fts_via="${enableval}" ;; 802 *) AC_MSG_ERROR(bad value ${enableval} for --disable-fts-via) ;; 803 esac],dnl 804 enable_fts_via=yes) 805 806if test $enable_fts_via = yes; then 807 AC_DEFINE(FTS_VIA, 808 1, 809 [ 810Change ^AVia format from: 811 ^AVia FIDOGATE/ftntoss 2:5030/1229.0, 20010405.164323.MSK 812to: 813 ^AVia 2:5030/1229.0 @20010405.164323.MSK FIDOGATE/ftntoss 814]) 815fi 816 817AC_ARG_ENABLE(create-log-forwreq, 818[ --enable-create-log-forwreq use msgid correspond data base],dnl 819 [case "${enableval}" in 820 yes | no) enable_create_log_forwreq="${enableval}" ;; 821 *) AC_MSG_ERROR(bad value ${enableval} for --enable-create-log-forwreq) ;; 822 esac],dnl 823 enable_create_log_forwreq=no) 824 825if test $enable_create_log_forwreq = yes; then 826 AC_DEFINE(CREATE_LOG_FORWREQ, 827 1, 828 [Don't put info about create to log 829 if echo created by forward request]) 830fi 831 832AC_ARG_ENABLE(del-mime-if-rfc2, 833[ --enable-del-mime-if-rfc2 delete MIME if rfc status set to 2],dnl 834 [case "${enableval}" in 835 yes | no) enable_del_mime_if_rfc2="${enableval}" ;; 836 *) AC_MSG_ERROR(bad value ${enableval} for --enable-del-mime-if-rfc2) ;; 837 esac],dnl 838 enable_del_mime_if_rfc2=no) 839 840if test $enable_del_mime_if_rfc2 = yes; then 841 AC_DEFINE(DEL_MIME_IF_RFC2, 842 1, 843 [Delete MIME if rfc status set to 2]) 844fi 845 846AC_ARG_ENABLE(domain-to-origin, 847[ --enable-domain-to-origin paste domain name to Origin message line],dnl 848 [case "${enableval}" in 849 yes | no) enable_domain_to_origin="${enableval}" ;; 850 *) AC_MSG_ERROR(bad value ${enableval} for --enable-domain-to-origin) ;; 851 esac],dnl 852 enable_domain_to_origin=no) 853 854if test $enable_domain_to_origin = yes; then 855 AC_DEFINE(DOMAIN_TO_ORIGIN, 856 1, 857 [Paste domain name to Origin message line]) 858fi 859 860AC_ARG_ENABLE(do-not-toss-netmail, 861[ --enable-do-not-toss-netmail disable tosting netmail and set directory for incoming and outgoing pkt's],dnl 862 [case "${enableval}" in 863 yes | no) enable_do_not_toss_netmail="${enableval}" ;; 864 *) AC_MSG_ERROR(bad value ${enableval} for --enable-do-not-toss-netmail) ;; 865 esac],dnl 866 enable_do_not_toss_netmail=no) 867 868if test $enable_do_not_toss_netmail = yes; then 869 AC_DEFINE(DO_NOT_TOSS_NETMAIL, 870 1, 871 [Disable tosting netmail and set directory 872 for incoming and outgoing pkt's]) 873fi 874 875AC_ARG_ENABLE(sub-limit, 876[ --disable-sub-limit disable set limit for subscribe areas],dnl 877 [case "${enableval}" in 878 yes | no) enable_sub_limit="${enableval}" ;; 879 *) AC_MSG_ERROR(bad value ${enableval} for --disable-sub-limit) ;; 880 esac],dnl 881 enable_sub_limit=yes) 882 883if test $enable_sub_limit = yes; then 884 AC_DEFINE(SUB_LIMIT, 885 1, 886 [Enable set limit for subscribe areas]) 887fi 888 889AC_ARG_ENABLE(fix-bad-pkt-year, 890[ --enable-fix-bad-pkt-year fix bad year in pkt's],dnl 891 [case "${enableval}" in 892 yes | no) enable_fix_bad_pkt_year="${enableval}" ;; 893 *) AC_MSG_ERROR(bad value ${enableval} for --enable-fix-bad-pkt-year) ;; 894 esac],dnl 895 enable_fix_bad_pkt_year=no) 896 897if test $enable_fix_bad_pkt_year = yes; then 898 AC_DEFINE(FIX_BAD_PKT_YEAR, 899 1, 900 [Fix bad year in pkt's]) 901fi 902 903AC_ARG_ENABLE(ignore-from-if-reply, 904[ --enable-ignore-from-if-reply ignore From: field if REPLYTO or REPLYADDR was found],dnl 905 [case "${enableval}" in 906 yes | no) enable_ignore_from_if_reply="${enableval}" ;; 907 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ignore-from-if-reply) ;; 908 esac],dnl 909 enable_ignore_from_if_reply=no) 910 911if test $enable_ignore_from_if_reply = yes; then 912 AC_DEFINE(IGNORE_FROM_IF_REPLY, 913 1, 914 [Ignore From: field if REPLYTO or REPLYADDR was found]) 915fi 916 917AC_ARG_ENABLE(insert-origin, 918[ --enable-insert-origin if Origin line is not present, include link address],dnl 919 [case "${enableval}" in 920 yes | no) enable_insert_origin="${enableval}" ;; 921 *) AC_MSG_ERROR(bad value ${enableval} for --enable-insert-origin) ;; 922 esac],dnl 923 enable_insert_origin=no) 924 925if test $enable_insert_origin = yes; then 926 AC_DEFINE(INSERT_ORIGIN, 927 1, 928 [If Origin line is not present, include link address]) 929fi 930 931AC_ARG_ENABLE(old-toss, 932[ --enable-old-toss enable old style tosting],dnl 933 [case "${enableval}" in 934 yes | no) enable_old_toss="${enableval}" ;; 935 *) AC_MSG_ERROR(bad value ${enableval} for --enable-old-toss) ;; 936 esac],dnl 937 enable_old_toss=no) 938 939if test $enable_old_toss = yes; then 940 AC_DEFINE(OLD_TOSS, 941 1, 942 [Enable old style tosting]) 943fi 944 945AC_ARG_ENABLE(passthru-netmail, 946[ --enable-passthru-netmail passthru operation for NetMail: FIDO->Internet->FIDO],dnl 947 [case "${enableval}" in 948 yes | no) enable_passthru_netmail="${enableval}" ;; 949 *) AC_MSG_ERROR(bad value ${enableval} for --enable-passthru-netmail) ;; 950 esac],dnl 951 enable_passthru_netmail=no) 952 953if test $enable_passthru_netmail = yes; then 954 AC_DEFINE(PASSTHRU_NETMAIL, 955 1, 956 [Passthru operation for NetMail: FIDO->Internet->FIDO]) 957fi 958 959AC_ARG_ENABLE(passthru-echomail, 960[ --enable-passthru-echomail passthru operation for EchoMail: FIDO->Internet->FIDO],dnl 961 [case "${enableval}" in 962 yes | no) enable_passthru_echomail="${enableval}" ;; 963 *) AC_MSG_ERROR(bad value ${enableval} for --enable-passthru-echomail) ;; 964 esac],dnl 965 enable_passthru_echomail=no) 966 967if test $enable_passthru_echomail = yes; then 968 AC_DEFINE(PASSTHRU_ECHOMAIL, 969 1, 970 [Passthru operation for EchoMail: FIDO->Internet->FIDO]) 971fi 972 973AC_ARG_ENABLE(sn, 974[ --enable-sn enable SN-style active_lookup],dnl 975 [case "${enableval}" in 976 yes | no) enable_sn="${enableval}" ;; 977 *) AC_MSG_ERROR(bad value ${enableval} for --enable-sn) ;; 978 esac],dnl 979 enable_sn=no) 980 981if test $enable_sn = yes; then 982 AC_DEFINE(SN, 983 1, 984 [Enable SN-style active_lookup]) 985fi 986 987AC_ARG_ENABLE(syslog, 988[ --enable-syslog enable if you want use syslog for log messages], 989 [case "${enableval}" in 990 yes | no) enable_syslog="${enableval}" ;; 991 *) AC_MSG_ERROR(bad value ${enableval} for --enable-syslog) ;; 992 esac],dnl 993 enable_syslog=no) 994 995if test $enable_syslog = yes; then 996 AC_DEFINE(USE_SYSLOG, 997 1, 998 [Enable if you want use syslog for log messages]) 999fi 1000 1001XCT="xct" 1002AC_SUBST(XCT) 1003 1004AC_ARG_ENABLE(xct, 1005[ --enable-xct enable X-Comment-To wrapper for inn batches], 1006 [case "${enableval}" in 1007 yes | no) enable_xct="${enableval}" ;; 1008 *) AC_MSG_ERROR(bad value ${enableval} for --enable-xct) ;; 1009 esac],dnl 1010 enable_xct=no) 1011 1012if test $enable_xct = yes; then 1013 AC_DEFINE(USE_XCT, 1014 1, 1015 [Enable if you want to add To header for FTN messages when gating rfc2ftn]) 1016fi 1017 1018dnl Libraries 1019AC_SEARCH_LIBS(regcomp, rx regex, [ 1020 AC_DEFINE(HAS_POSIX_REGEX,[],[Do we have a decent regex library?]) 1021 AC_CHECK_HEADER(rxposix.h, AC_DEFINE(HAVE_RX,[],[Do we have rxposix.h?]))]) 1022 1023if test "$with_news" != no ;then 1024 1025 AS_IF([test "x$enable_oldbatcher" != "xno"], [ 1026 AS_IF([test "x$enable_xct" = "xyes"], [ 1027 BATCHER='time $PATHBIN/batcher -N $QUEUEJOBS -b500000 -p"$XCT|$RFC2FTN -b -n" $SITE $BATCHFILE' ], 1028 [BATCHER='time $PATHBIN/batcher -N $QUEUEJOBS -b500000 -p"$RFC2FTN -b -n" $SITE $BATCHFILE' ])], 1029 [BATCHER='time $RFC2FTN -f $BATCHFILE -m 500']) 1030 1031# MY CHECK IF 1032 1033 AS_CASE([$with_inndir], 1034 [yes|no], [ 1035 AC_MSG_ERROR([--with-inndir requires an argument; use --with-inndir=PATH])], 1036 [undefined], [PATHNEWS=""], 1037 [PATHNEWS="$with_inndir" 1038 AS_IF([test "$with_newsbindir" != "no"], 1039 [ PATHBIN=$with_newsbindir ], 1040 [ PATHBIN="$PATHNEWS/bin" ]) 1041 NEWSLIBDIR=$PATHNEWS 1042 RNEWS="$PATHBIN/rnews" 1043 INEWS="$PATHBIN/inews" 1044 ]) 1045#MY CHECK CASE 1046 AS_CASE([$with_innetcdir], 1047 [yes|no], [ 1048 AC_MSG_ERROR([--with-innetcdir requires an argument; use --with-innetcdir=PATH])], 1049 [undefined], [PATHETC=""], 1050 [PATHETC="$with_innetcdir"]) 1051 1052 AS_CASE([$with_inndbdir], 1053 [yes|no], [ 1054 AC_MSG_ERROR([--with-inndbdir requires an argument; use --with-inndbdir=PATH])], 1055 [undefined], [PATHDB=""], 1056 [PATHDB="$with_inndbdir"]) 1057 1058 AS_CASE([$with_innspooldir], 1059 [yes|no], [ 1060 AC_MSG_ERROR([--with-innspooldir requires an argument; use --with-innspooldir=PATH])], 1061 [undefined], [PATHARTICLES=""], 1062 [PATHARTICLES="$with_innspooldir/articles" 1063 PATHOUTGOING="$with_innspooldir/outgoing" 1064 ]) 1065 1066# if something is not provided to configure, do autodetect 1067 1068 AS_IF([test -z "$PATHNEWS" -o -z "$PATHETC" \ 1069 -o -z "$PATHDB" -o -z "$PATHARTICLES"], 1070 [ 1071 AC_MSG_NOTICE([Something from --with-inndir, --with-innetcdir, --with-inndbdir, --with-innspooldir is missing. Detecting]) 1072 AC_MSG_CHECKING(for news-library path) 1073 if ! test -x "${newsbindir}/innconfval"; then 1074 if test -x /usr/local/news/bin/innconfval ; then 1075 newsbindir=/usr/local/news/bin 1076 elif test -x /usr/lib/innconfval ; then 1077 newsbindir=/usr/lib 1078 elif test -x /usr/lib/news/innconfval ; then 1079 newsbindir=/usr/lib/news 1080 elif test -x /usr/lib/news/bin/innconfval ; then 1081 newsbindir=/usr/lib/news/bin 1082 elif test -x /usr/local/lib/news/bin/innconfval ; then 1083 newsbindir=/usr/local/lib/news/bin 1084 elif test -x /usr/local/news/innconfval ; then 1085 newsbindir=/usr/local/news 1086 elif test -x /usr/bin/innconfval ; then 1087 newsbindir=/usr/bin 1088 else 1089AC_MSG_ERROR([PLEASE INSTALL INN OR SET PATH TO innconfval DIR; use --with-newsbindir=DIR or --without-news]) 1090 exit 1; 1091 fi 1092 fi 1093 if $newsbindir/innconfval -v 2>&1 </dev/null | egrep 2\.[3\|4\|5\|6] > /dev/null; then 1094 eval `$newsbindir/innconfval -s|grep -e 'PATHNEWS\|PATHBIN\|PATHOUTGOING\|PATHDB\|PATHARTICLES\|PATHETC'` 1095 NEWSLIBDIR=${PATHNEWS} 1096 else 1097 NEWSLIBDIR="$newsbindir" 1098 fi 1099 AC_MSG_RESULT($NEWSLIBDIR) 1100 1101 if test "x${PATHOUTGOING}" = "x"; then 1102 AC_MSG_ERROR([use --with-newsbindir=DIR or --without-news option]) 1103 fi 1104 1105 XPATH="$PATHBIN:/usr/local/news/bin:/usr/lib/news:/usr/lib/news/bin:/usr/local/lib/news/bin:usr/bin" 1106 1107 AC_MSG_CHECKING(for rnews) 1108 if test "${with_rnews+set}" = set ;then 1109 RNEWS="$with_rnews" 1110 else 1111 AC_PATH_PROG(RNEWS, rnews,, $XPATH) 1112 if test "x$RNEWS" = "x"; then 1113 AC_MSG_ERROR([rnews not found]) 1114 fi 1115 fi 1116 1117 AC_MSG_CHECKING(for inews) 1118 if test "${with_inews+set}" = set ;then 1119 INEWS="$with_inews" 1120 else 1121 AC_PATH_PROG(INEWS, inews,, $XPATH) 1122 if test "x$INEWS" = "x"; then 1123 AC_MSG_ERROR([inews not found]) 1124 fi 1125 fi 1126 1127 if $NEWSLIBDIR/bin/innconfval -v 2>&1 </dev/null | egrep 2\.\[3\|4\|5\|6] > /dev/null; then 1128 AC_DEFINE(OLD_BATCHER, 1, 1129 [Enable use old batcher in runinc program]) 1130 AS_IF([test "x$enable_xct" = "xyes"], [ 1131 BATCHER='time $PATHBIN/batcher -N $QUEUEJOBS -b500000 -p"$XCT|$RFC2FTN -b -n" $SITE $BATCHFILE'], 1132 [BATCHER='time $PATHBIN/batcher -N $QUEUEJOBS -b500000 -p"$RFC2FTN -b -n" $SITE $BATCHFILE']) 1133 else 1134 BATCHER='time $RFC2FTN -f $BATCHFILE -m 500' 1135 fi 1136 1137 if test "$with_news" != no ;then 1138 if test "$with_owner" = news -a "x$with_rsf" != xno; then 1139 AC_DEFINE(USE_RUNINC_SFGT, 1, 1140 [Enable use send_fidogate function in runinc program]) 1141 fi 1142 fi 1143]) 1144else # if test "$with_news" != no ;then 1145 AC_MSG_NOTICE([Building without news support]) 1146 BATCHER='time $RFC2FTN -f $BATCHFILE -m 500' 1147 RNEWS='/none/rnews' 1148 INEWS='/none/inews' 1149 NEWSLIBDIR='/none/news-libdir' 1150 PATHOUTGOING='/none/news-pathoutgoing' 1151 PATHARTICLES='/none/news-patharticles' 1152 PATHNEWS='/none/news-pathnews' 1153 PATHBIN='/none/news-pathbin' 1154 PATHETC='/none/news-pathetc' 1155 PATHDB='/none/news-pathdb' 1156fi 1157 1158AC_SUBST(BATCHER) 1159AC_SUBST(RNEWS) 1160AC_SUBST(NEWSLIBDIR) 1161AC_SUBST(PATHOUTGOING) 1162AC_SUBST(PATHARTICLES) 1163AC_SUBST(PATHNEWS) 1164AC_SUBST(PATHBIN) 1165AC_SUBST(PATHETC) 1166AC_SUBST(PATHDB) 1167AC_SUBST(INEWS) 1168 1169AH_VERBATIM(HAVE_TM_GMTOFF, 1170[ 1171/* left from initial configurator */ 1172#undef HAVE_TM_GMTOFF 1173]) 1174 1175# Checking sendmail 1176AC_MSG_CHECKING(for sendmail) 1177if test "${with_sendmail+set}" = set ;then 1178 SENDMAIL="$with_sendmail" 1179else 1180 XPATH="/sbin:/usr/sbin:/usr/lib:/usr/ucblib:/usr/share" 1181 AC_PATH_PROG(SENDMAIL, sendmail,, $XPATH) 1182 if test "x$SENDMAIL" = "x"; then 1183 AC_MSG_ERROR([sendmail not found, re-run with valid --with-sendmail=DIR]) 1184 fi 1185fi 1186AC_SUBST(SENDMAIL) 1187 1188AC_MSG_CHECKING(for lock directory) 1189if test "${with_lockdir+set}" = set; then 1190 LOCKDIR="$with_lockdir" 1191else 1192 LOCKDIR="${localstatedir}/run/fidogate" 1193fi 1194AC_MSG_RESULT($LOCKDIR) 1195AC_SUBST(LOCKDIR) 1196 1197AC_MSG_CHECKING(for var directory) 1198if test "${with_vardir+set}" = set; then 1199 vardir="$with_vardir" 1200else 1201 vardir="${localstatedir}/lib/fidogate" 1202fi 1203AC_MSG_RESULT(${vardir}) 1204AC_SUBST(vardir) 1205 1206AC_MSG_CHECKING(for log directory) 1207if test "${with_logdir+set}" = set; then 1208 LOGDIR="$with_logdir" 1209else 1210 LOGDIR="${localstatedir}/log/fidogate" 1211fi 1212AC_MSG_RESULT($LOGDIR) 1213AC_SUBST(LOGDIR) 1214 1215AC_MSG_CHECKING(for spool directory) 1216if test "${with_spooldir+set}" = set; then 1217 SPOOLDIR="$with_spooldir" 1218else 1219 SPOOLDIR="${localstatedir}/spool/fidogate" 1220fi 1221AC_MSG_RESULT($SPOOLDIR) 1222AC_SUBST(SPOOLDIR) 1223 1224SUBSTCMD='$(PERL) $(top_srcdir)/build/subst.pl -c$(top_srcdir)/build/config.make -t$(top_srcdir)' 1225M4MAKE='$(M4) $(M4OPTIONS)' 1226 1227AC_SUBST(SUBSTCMD) 1228AC_SUBST(M4MAKE) 1229 1230AC_ARG_ENABLE([extraversion], 1231 AS_HELP_STRING([--disable-extraversion], [do not add GIT hash])) 1232 1233AS_IF([test "x$enable_extraversion" != "xno"], [ 1234 1235 if test -d $srcdir/.git; then 1236 AC_DEFINE_UNQUOTED(GIT_HASH_STR, 1237 ["`cd $srcdir && git log -1 --format=format:%h`"], 1238 [A string containing the git hash]) 1239 fi 1240 1241]) 1242 1243HOSTNAME=`hostname -s` 1244DOMAINNAME=`hostname|sed -e "s/$HOSTNAME//"` 1245AC_SUBST(HOSTNAME) 1246AC_SUBST(DOMAINNAME) 1247 1248DATE="$(date -R)" 1249AC_SUBST(DATE) 1250 1251AC_CONFIG_MACRO_DIRS([m4]) 1252 1253AC_CONFIG_COMMANDS([build_headers],[build/subst.pl -h]) 1254 1255AC_CONFIG_FILES([build/config.make \ 1256 Makefile \ 1257 src/Makefile \ 1258 tests/Makefile \ 1259 packages/rpm/fidogate.spec \ 1260 debian/changelog ]) 1261AC_OUTPUT 1262 1263# as template taken from kmod 1264AC_MSG_RESULT([ 1265 $PACKAGE $VERSION 1266 ======= 1267 1268 prefix: ${prefix} 1269 sysconfdir: ${sysconfdir} 1270 libexecdir: ${libexecdir} 1271 includedir: ${includedir} 1272 bindir: ${bindir} 1273 logdir: ${LOGDIR} 1274 vardir: ${vardir} 1275 lockdir: ${LOCKDIR} 1276 spooldir: ${SPOOLDIR} 1277 btbasedir: ${btbasedir} 1278 netmaildir: ${netmaildir} 1279 1280 compiler: ${CC} 1281 cflags: ${with_cflags} ${CFLAGS} 1282 ldflags: ${with_ldflags} ${LDFLAGS} 1283 1284 sendmail: ${SENDMAIL} 1285 owner: ${OWNER} 1286 group: ${GROUP} 1287 1288 NEWS: 1289 BATCHER: $BATCHER 1290 RNEWS: $RNEWS 1291 NEWSLIBDIR: $NEWSLIBDIR 1292 PATHOUTGOING: $PATHOUTGOING 1293 PATHARTICLES: $PATHARTICLES 1294 PATHNEWS: $PATHNEWS 1295 PATHBIN: $PATHBIN 1296 PATHETC: $PATHETC 1297 PATHDB: $PATHDB 1298 INEWS: $INEWS 1299]) 1300