1 dnl Process this file with autoconf to produce a configure script.
3 dnl /* ========================================================================
4 dnl * Copyright 2013 Eduardo Chappa
5 dnl * Copyright 2006-2008 University of Washington
7 dnl * Licensed under the Apache License, Version 2.0 (the "License");
8 dnl * you may not use this file except in compliance with the License.
9 dnl * You may obtain a copy of the License at
11 dnl * http://www.apache.org/licenses/LICENSE-2.0
13 dnl * ========================================================================
18 AC_REVISION([Rev:1 by chappa@washington.edu])
20 dnl Alpine Version Number is in $srcdir/VERSION
21 AC_INIT([alpine],[m4_normalize(m4_include(VERSION))],[chappa@washington.edu])
23 AC_CONFIG_SRCDIR([include/system.h])
24 AC_CONFIG_HEADERS([include/config.h])
26 AM_INIT_AUTOMAKE([foreign nostdinc])
34 AC_MSG_NOTICE([Configuring for $PACKAGE_STRING ($host))])
36 # start out with intent to build Web Alpine
37 WEB_BUILD=web/src/alpined.d
50 AC_PATH_PROG(AR, ar, ar)
51 AC_PATH_PROG(RM, rm, rm)
52 AC_PATH_PROG(CP, cp, cp)
53 AC_PATH_PROG(LN, ln, ln)
54 AC_PATH_PROG(SED, sed, sed)
55 AC_PATH_PROG(MAKE, make)
57 dnl COMPILE-TIME OPTIONS
59 AM_GNU_GETTEXT_VERSION([0.16.1])
60 AM_GNU_GETTEXT([external])
62 dnl enable dmalloc per http://dmalloc.com
63 dnl NOTE: does not check c-client
64 AC_MSG_CHECKING([option: dmalloc enabled])
65 AC_ARG_ENABLE(dmalloc, AS_HELP_STRING([--enable-dmalloc],[Enable dmalloc debugging]))
66 if test x$enable_dmalloc = "xyes" ; then
72 AC_ARG_WITH(dmalloc-dir,
73 AS_HELP_STRING([--with-dmalloc-dir=DIR],[Root of dmalloc lib/include path]),
75 if test "x$withval" != "xno" ; then
76 enable_dmalloc = "yes"
77 CPPFLAGS="$CPPCFLAGS -I${withval}"
78 LDFLAGS="$LDFLAGS -L${withval}"
82 if test x$enable_dmalloc = "xyes" ; then
83 AC_DEFINE(ENABLE_DMALLOC, 1, [Define enable dmalloc debugging])
86 localedir="\${datadir}/locale"
87 AC_ARG_WITH(localedir,
88 AS_HELP_STRING([--with-localedir=DIR],[Name of gettext locale directory]),
100 AC_SUBST(localedir, "[$localedir]")
102 # Setup OS-Specific features
105 dnl OS X Universal Binary Support
106 AC_ARG_ENABLE(osx-universal-binaries,
107 AS_HELP_STRING([--enable-osx-universal-binaries],[Produce universal binaries under OS X [[default=no]]]))
108 if test "x$enable_osx_universal_binaries" = "xyes" ; then
109 if test "x$enable_dependency_tracking" != xno ; then
110 AC_MSG_ERROR([--enable-osx-universal-binary requires --disable-dependency-tracking.
111 Please re-run configure with these options:
112 --disable-dependency-tracking --enable-osx-universal-binary])
114 if [test -d /Developer/SDKs/MacOSX10.5.sdk] ; then
115 alpine_sysroot=/Developer/SDKs/MacOSX10.5.sdk
116 elif [test -d /Developer/SDKs/MacOSX10.4u.sdk] ; then
117 alpine_sysroot=/Developer/SDKs/MacOSX10.4u.sdk
119 AC_MSG_ERROR([No suitable MacOSX SDK found. Make sure Xcode tools are installed])
121 ub_cflags="-isysroot $alpine_sysroot -arch ppc -arch i386"
122 ub_ldflags="-Wl,-syslibroot,$alpine_sysroot -arch ppc -arch i386"
123 AM_CFLAGS="$AM_CFLAGS $ub_cflags"
124 AM_LDFLAGS="$AM_LDFLAGS $ub_ldflags"
125 alpine_c_client_cflags="$alpine_c_client_cflags $ub_cflags"
126 alpine_c_client_ldflags="$alpine_c_client_ldflags $ub_ldflags"
131 AC_ARG_WITH(include-path,
132 AS_HELP_STRING([--with-include-path=PATHS],[Colon-separated list of directories used for include file search]),
140 new_cppflags="-I`echo ${withval} | ${SED} 's/:/ -I/g'`"
141 CPPFLAGS="$CPPFLAGS ${new_cppflags}"
142 alpine_c_client_cflags="$alpine_c_client_cflags ${new_cppflags}"
147 AC_ARG_WITH(lib-path,
148 AS_HELP_STRING([--with-lib-path=PATHS],[Colon-separated list of directories used for library search]),
156 new_ldflags="-L`echo ${withval} | ${SED} 's/:/ -L/g'`"
157 LDFLAGS="$LDFLAGS $new_ldflags"
158 alpine_c_client_ldflags="$alpine_c_client_ldflags ${new_ldflags}"
163 AC_ARG_WITH(pubcookie,
164 AS_HELP_STRING([--with-pubcookie],[Include support for UW-Pubcookie Web Authentication]),
166 if test "x$withval" != "xno" ; then
167 WEB_PUBCOOKIE_BUILD=web/src/pubcookie
173 AS_HELP_STRING([--with-web-bin=PATH],[Directory to hold Web Alpine component binary files]),
186 dnl disable debug, turned on by default
187 AC_MSG_CHECKING([option: debugging is enabled])
188 AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug],[Exclude debug messages from source]))
189 if test x$enable_debug != "xno" ; then
190 AM_CFLAGS="$AM_CFLAGS -g"
191 AC_DEFINE([DEBUG], [1], [Compile in debugging])
192 AC_DEFINE([DEBUGJOURNAL], [1], [Display debug messages in journal])
195 dnl ??? set AM_CFLAGS to optimize ???
199 dnl disable optimization, on by default
200 AC_MSG_CHECKING([option: optimization is enabled])
201 AC_ARG_ENABLE(optimization, AS_HELP_STRING([--disable-optimization],[Exclude optimizing compiler flags]))
202 if test x$enable_optimization != "xno" ; then
205 CFLAGS="`echo $AM_CFLAGS | ${SED} 's/-O2//'`"
206 alpine_c_client_gccoptlevel="-O0"
210 dnl disable mouse support
211 AC_MSG_CHECKING([option: mouse support enabled])
212 AC_ARG_ENABLE(mouse, AS_HELP_STRING([--disable-mouse],[Disable mouse support]))
213 if test x$enable_mouse != "xno" ; then
214 AC_DEFINE([MOUSE], [], [Compile in mouse support])
221 AC_MSG_CHECKING([option: quotas enabled])
222 AC_ARG_ENABLE(quotas, AS_HELP_STRING([--enable-quotas],[Enable disk quota checking on startup]))
223 if test x$enable_quotas = "xyes" ; then
224 AC_DEFINE([USE_QUOTAS], [], [Compile in quota check on startup])
230 AC_MSG_CHECKING([option: From changing enabled])
231 AC_ARG_ENABLE(from_changing, AS_HELP_STRING([--disable-from-changing],[Disallow users changing From addresss]))
232 if test x$enable_from_changing != "xno" ; then
235 AC_DEFINE([NEVER_ALLOW_CHANGING_FROM], [], [Disallow users changing their From address])
239 dnl enable background posting support
240 AC_MSG_CHECKING([option: background post enabled])
241 AC_ARG_ENABLE(background-post, AS_HELP_STRING([--disable-background-post],[Disable background posting]))
242 if test x$enable_background_post != "xno" ; then
243 AC_DEFINE([BACKGROUND_POST], [], [Enable background posting support])
249 dnl enable keyboard locking support
250 AC_MSG_CHECKING([option: keyboard lock enabled])
251 AC_ARG_ENABLE(keyboard-lock, AS_HELP_STRING([--disable-keyboard-lock],[Disable keyboard locking]))
252 if test x$enable_keyboard_lock != "xno" ; then
253 AC_DEFINE([KEYBOARD_LOCK], [], [Enable keyboard lock support])
259 dnl enable from encoding support
260 AC_MSG_CHECKING([option: from encoding enabled])
261 AC_ARG_ENABLE(from-encoding, AS_HELP_STRING([--enable-from-encoding],[Enable From encoding in sent messages]))
262 if test x$enable_from_encoding = "xyes" ; then
263 AC_DEFINE([ENCODE_FROMS], [], [Enable From address encoding in sent messages])
269 dnl OPTION: name of local submission agent
270 dnl Might not be sendmail, but it MUST speak SMTP on stdin/stdout
271 AC_ARG_WITH(smtp-msa,
272 AS_HELP_STRING([--with-smtp-msa=PATH],[Local Mail Submission Agent (sendmail)]),
278 AC_PATH_PROG(SENDMAIL, sendmail, "", $PATH:/usr/sbin:/usr/lib)
286 AC_PATH_PROG(SENDMAIL, sendmail, "", $PATH:/usr/sbin:/usr/lib)
288 if test -n "$SENDMAIL" ; then
289 AC_DEFINE_UNQUOTED([SENDMAIL], "$SENDMAIL", [Local mail submission agent])
292 dnl OPTION: local msa arguments
293 smtp_msa_flags="-bs -odb -oem"
294 AC_ARG_WITH(smtp-msa-flags,
295 AS_HELP_STRING([--with-smtp-msa-flags=FLAGS],[MSA flags for SMTP on stdin/stdout (-bs -odb -oem)]),
297 if test "x$withval" != "xno" ; then
298 smtp_msa_flags=$withval
301 AC_DEFINE_UNQUOTED([SENDMAILFLAGS], "$smtp_msa_flags", [Local MSA flags for SMTP on stdin/stdout])
303 dnl OPTION: name of local news posting agent and flags
306 AS_HELP_STRING([--with-npa=PATH],[Posting agent when no nntp-servers defined (inews)]),
312 AC_PATH_PROG(NPA_PROG, inews, "", $PATH:/usr/sbin:/usr/lib)
320 AC_PATH_PROG(NPA_PROG, inews, "", $PATH:/usr/sbin:/usr/lib)
324 AC_ARG_WITH(npa-flags,
325 AS_HELP_STRING([--with-npa-flags=FLAGS],[Flags to allow posting via local agent (-h)]),
327 if test "x$withval" != "xno" ; then
331 if test -n "$NPA_PROG" ; then
332 AC_DEFINE_UNQUOTED([SENDNEWS], "$NPA_PROG $npa_flags", [Posting agent to use when no nntp-servers defined])
335 dnl OPTION: password changing program
336 AC_ARG_WITH(password-prog,
337 AS_HELP_STRING([--with-password-prog=PATH],[Password change program (/bin/passwd)]),
343 AC_PATH_PROG(PWPROG, passwd, "", $PATH:/usr/sbin:/usr/lib)
346 AC_PATH_PROG(PWPROG, $withval, "", $PATH:/usr/sbin:/usr/lib)
351 AC_PATH_PROG(PWPROG, passwd, "", $PATH:/usr/sbin:/usr/lib)
353 if test -n "$PWPROG" ; then
354 AC_DEFINE_UNQUOTED([PASSWD_PROG], "$PWPROG", [Program users use to change their password])
357 dnl OPTION: basic spell checking program
358 AC_ARG_WITH(simple-spellcheck,
359 AS_HELP_STRING([--with-simple-spellcheck=PROG],[Spellcheck program reads stdin, emits misspellings on stdout]),
361 if test "x$withval" != "xno" ; then
366 AC_CHECK_PROG([SPELLPROG], [hunspell], [hunspell], [])
367 if test -z "$SPELLPROG" ; then
368 AC_CHECK_PROG([SPELLPROG], [aspell], [aspell], [])
369 if test -z "$SPELLPROG" ; then
370 AC_CHECK_PROG([SPELLPROG], [ispell], [ispell], [])
371 if test -z "$SPELLPROG" ; then
378 if test "x$SPELLPROG" != "xno" ; then
379 AC_PATH_PROG(alpine_simple_spellcheck, $SPELLPROG)
380 if test -n "$alpine_simple_spellcheck" ; then
383 alpine_simple_spellcheck="$alpine_simple_spellcheck -l"
386 alpine_simple_spellcheck="$alpine_simple_spellcheck --dont-backup --mode=email list"
389 alpine_simple_spellcheck="$alpine_simple_spellcheck -l"
397 dnl OPTION: interactive spell checking program
398 AC_ARG_WITH(interactive-spellcheck,
399 AS_HELP_STRING([--with-interactive-spellcheck=PROG],[Interactive, filewise spell checker]),
401 if test "x$withval" != "xno" ; then
406 AC_CHECK_PROG([ISPELLPROG], [hunspell], [hunspell], [])
407 if test -z "$ISPELLPROG" ; then
408 AC_CHECK_PROG([ISPELLPROG], [aspell], [aspell], [])
409 if test -z "$SPELLPROG" ; then
415 if test "x$ISPELLPROG" != "xno" ; then
416 AC_PATH_PROG(alpine_interactive_spellcheck, $ISPELLPROG)
417 if test -n "$alpine_interactive_spellcheck" ; then
418 case "$ISPELLPROG" in
420 alpine_interactive_spellcheck="$alpine_interactive_spellcheck --dont-backup --mode=email check"
428 if test -n "$alpine_interactive_spellcheck" ; then
429 AC_DEFINE_UNQUOTED([DF_VAR_SPELLER], "$alpine_interactive_spellcheck", [Interactive, filewise spell checker])
432 if test -z "$alpine_simple_spellcheck" -a -n "$alpine_interactive_spellcheck" ; then
433 alpine_simple_spellcheck=test
435 AC_DEFINE_UNQUOTED([SPELLER], "$alpine_simple_spellcheck", [Simple spell checker: reads stdin, emits misspellings on stdout])
437 dnl OPTION: system-pinerc
438 dnl NOTE: historically we used /lib for the config dir.
439 dnl don't ask, it was a long time ago. but, we can't
440 dnl change it now without breaking compatibility
442 NONE) dpv=/usr/local/lib/pine.conf ;;
443 *) dpv=${prefix}/lib/pine.conf ;;
445 AC_ARG_WITH(system-pinerc,
446 AS_HELP_STRING([--with-system-pinerc=VALUE],[System pinerc (/usr/local/lib/pine.conf)]),
458 AC_DEFINE_UNQUOTED(SYSTEM_PINERC, "$dpv", [System pinerc])
460 dnl OPTION: system-fixed-pinerc
461 dnl NOTE: historically we used /lib for the config dir.
462 dnl don't ask, it was a long time ago. but, we can't
463 dnl change it now without breaking compatibility
465 NONE) dpv=/usr/local/lib/pine.conf.fixed ;;
466 *) dpv=${prefix}/lib/pine.conf.fixed ;;
468 AC_ARG_WITH(system-fixed-pinerc,
469 AS_HELP_STRING([--with-system-fixed-pinerc=VALUE],[System fixed pinerc (/usr/local/lib/pine.conf.fixed)]),
481 AC_DEFINE_UNQUOTED(SYSTEM_PINERC_FIXED, "$dpv", [System fixed pinerc])
483 dnl OPTION: local support information, file that contains information on
484 dnl how to contact local support for Alpine.
485 dnl NOTE: historically we used /lib for the config dir.
486 dnl don't ask, it was a long time ago. but, we can't
487 dnl change it now without breaking compatibility
489 NONE) dpv=/usr/local/lib/pine.info ;;
490 *) dpv=${prefix}/lib/pine.info ;;
492 AC_ARG_WITH(local-support-info,
493 AS_HELP_STRING([--with-local-support-info=VALUE],[Local Support Info File (/usr/local/lib/pine.info)]),
505 AC_DEFINE_UNQUOTED(SYSTEM_PINE_INFO_PATH, "$dpv", [Local Support Info File])
507 dnl Function to simplify setting alpine/pico defaults
508 dnl usage: PINEVAR(configure-name, definition-name, definition-value, help)
513 AS_HELP_STRING([--with-$1=VALUE],[$4 ($3)]),
515 if test "x$withval" != "xno" ; then
519 AC_DEFINE_UNQUOTED($2, "$dpv", [Default configuration value])
522 dnl Function to simplify setting pine/pico defaults
523 dnl usage: PINEVAR_UNQUOTED(configure-name, definition-name, definition-value, help)
524 AC_DEFUN([PINEVAR_UNQUOTED],
528 AS_HELP_STRING([--with-$1=VALUE],[$4 ($3)]),
530 if test "x$withval" != "xno" ; then
534 AC_DEFINE_UNQUOTED($2, $dpv, [Default configuration value])
537 PINEVAR(mailcheck-interval, DF_MAILCHECK, 150, [Specify default mail-check-interval])
538 PINEVAR_UNQUOTED(checkpoint-interval, CHECK_POINT_TIME, 420, [Specify default checkpoint-interval])
539 PINEVAR_UNQUOTED(checkpoint-frequency, CHECK_POINT_FREQ, 12, [State change count before checkpoint])
540 PINEVAR_UNQUOTED(display-rows, DEFAULT_LINES_ON_TERMINAL, 24, [Initial rows on display])
541 PINEVAR_UNQUOTED(display-columns, DEFAULT_COLUMNS_ON_TERMINAL, 80, [Initial columns on display])
542 PINEVAR_UNQUOTED(max-display-rows, MAX_SCREEN_ROWS, 200, [Maximum display rows])
543 PINEVAR_UNQUOTED(max-display-columns, MAX_SCREEN_COLS, 500, [Maximum display columns])
544 PINEVAR(fill-column, DF_FILLCOL, 74, [Default fill column])
545 PINEVAR_UNQUOTED(max_fill-column, MAX_FILLCOL, 80, [Maximum fill column])
546 PINEVAR_UNQUOTED(debug-level, DEFAULT_DEBUG, 2, [Specify default debug verbosity level])
547 PINEVAR_UNQUOTED(debug-files, NUMDEBUGFILES, 4, [Specify number of debug files])
548 PINEVAR(debug-file, DEBUGFILE, [.pine-debug], [Specify debug file name])
549 PINEVAR(forwarded-keyword, FORWARDED_FLAG, ["\$Forwarded"], [IMAP (c-client) keyword to store forwarded status])
550 PINEVAR(display-overlap, DF_OVERLAP, [2], [Lines preserved while paging])
551 PINEVAR(display-margin, DF_MARGIN, [0], [Lines visible while scrolling])
552 PINEVAR(default-fcc, DF_DEFAULT_FCC, [sent-mail], [Default sent mail folder])
553 PINEVAR(default-save-folder, DEFAULT_SAVE, [saved-messages], [Default save folder])
554 PINEVAR(default-legacy-postponed-folder, POSTPONED_MAIL, [postponed-mail], [Pre Pine 3.90 postponed folder])
555 PINEVAR(default-postponed-folder, POSTPONED_MSGS, [postponed-msgs], [Default postponed folder])
556 PINEVAR(default-trash-folder, TRASH_FOLDER, [Trash], [Default Trash folder for Web Alpine])
557 PINEVAR(default-interrupted-mail, INTERRUPTED_MAIL, [.pine-interrupted-mail], [Default folder for interrupted mail])
558 PINEVAR(default-dead-letter-folder, DEADLETTER, [dead.letter], [Default dead letter folder])
559 PINEVAR(default-mail-directory, DF_MAIL_DIRECTORY, [mail], [Default mail directory])
560 PINEVAR(default-inbox-name, INBOX_NAME, [INBOX], [Default inbox name])
561 PINEVAR(default-signature-file, DF_SIGNATURE_FILE, [.signature], [Default signature file])
562 PINEVAR(default-elm-style-save, DF_ELM_STYLE_SAVE, [no], [Default to Elm style save])
563 PINEVAR(default-header-in-reply, DF_HEADER_IN_REPLY, [no], [Include header in reply])
564 PINEVAR(default-old-style-reply, DF_OLD_STYLE_REPLY, [no], [Default to old style reply])
565 PINEVAR(default-use-only-domain-name, DF_USE_ONLY_DOMAIN_NAME, [no], [Default to using only the domain name])
566 PINEVAR(default-save-by-sender, DF_SAVE_BY_SENDER, [no], [Default to save by sender])
567 PINEVAR(default-sort-key, DF_SORT_KEY, [arrival], [Default sort key])
568 PINEVAR(default-addressbook-sort-rule, DF_AB_SORT_RULE, [fullname-with-lists-last], [Default addressbook sort rule])
569 PINEVAR(default-folder-sort-rule, DF_FLD_SORT_RULE, [alphabetical], [Default folder sort rule])
570 PINEVAR(default-saved-message-name-rule, DF_SAVED_MSG_NAME_RULE, [default-folder], [Default saved message name rule])
571 PINEVAR(default-fcc-rule, DF_FCC_RULE, [default-fcc], [Default fcc rule])
572 PINEVAR(default-standard-printer, DF_STANDARD_PRINTER, [lpr], [Default standard printern])
573 PINEVAR(default-ansi-printer, ANSI_PRINTER, [attached-to-ansi], [ANSI printer definition])
574 PINEVAR(default-addressbook, DF_ADDRESSBOOK, [.addressbook], [Default addressbook name])
575 PINEVAR(default-local-fullname, DF_LOCAL_FULLNAME, ["Local Support"], [Default local support fullname])
576 PINEVAR(default-local-address, DF_LOCAL_ADDRESS, [postmaster], [Default local support address])
577 PINEVAR(default-keyboard-lock-count, DF_KBLOCK_PASSWD_COUNT, [1], [Default keyboard lock count])
578 PINEVAR(default-remote-addressbook-history, DF_REMOTE_ABOOK_HISTORY, [3], [Default address book history count])
579 PINEVAR(smime-public-cert-directory, DF_PUBLICCERT_DIR, [.alpine-smime/public], [Default Public Cert Directory])
580 PINEVAR(smime-private-key-directory, DF_PRIVATEKEY_DIR, [.alpine-smime/private], [Default Private Key Directory])
581 PINEVAR(smime-cacert-directory, DF_CACERT_DIR, [.alpine-smime/ca], [Default Cert Authority Directory])
582 PINEVAR_UNQUOTED(default-printer, DF_DEFAULT_PRINTER, [ANSI_PRINTER], [Default printer])
585 AC_ARG_WITH(passfile,
586 AS_HELP_STRING([--with-passfile=FILENAME],[Password cache file (NOT secure, NOT recommended)]),
594 alpine_PASSFILE=$withval
599 dnl os-specific credential cache?
600 AC_ARG_WITH(local-password-cache,
601 AS_HELP_STRING([--without-local-password-cache],[Disable OS-specific password cache, if supported]),
603 alpine_os_credential_cache=$withval
606 dnl Particular os-specific credential cache?
607 AC_ARG_WITH(local-password-cache-method,
608 AS_HELP_STRING([--with-local-password-cache-method],[OS-specific credential cache (OSX=APPLEKEYCHAIN, Windows=WINCRED)]),
610 alpine_os_credential_cache_method=$withval
613 if test -n "$alpine_PASSFILE" ; then
614 case $alpine_os_credential_cache in
618 alpine_os_credential_cache="no"
619 AC_MSG_NOTICE([--with-passfile definition overrides OS-Specific password caching])
622 AC_DEFINE_UNQUOTED([PASSFILE], "$alpine_PASSFILE", [Password cache file (NOT secure. NOT recommended)])
626 AC_ARG_WITH(default-sshpath,
627 AS_HELP_STRING([--with-default-sshpath=FILENAME],[set default value of ssh command path (defining should cause ssh to be preferred to rsh)]),
635 AC_DEFINE_UNQUOTED([DF_SSHPATH], "$withval", [set default value of ssh command path (defining should cause ssh to be preferred to rsh)])
641 AC_ARG_WITH(default-sshcmd,
642 AS_HELP_STRING([--with-default-sshcmd=PERCENT_S_STRING],[set default value of ssh command string (usually "%s %s -l %s exec /etc/r%sd")]),
650 AC_DEFINE_UNQUOTED([DF_SSHCMD], "$withval", [set default value of ssh command string (usually "%s %s -l %s exec /etc/r%sd")])
656 dnl Set SSLDIR for c-client make
658 AS_HELP_STRING([--without-ssl],[Disable SSL support (OpenSSL)]),
659 [ with_ssl=$withval ])
661 if test "x$with_ssl" = "xno" ; then
662 alpine_SSLTYPE="none"
664 dnl preload c-client default locations/options
667 if test -f /etc/fedora-release -o -f /etc/redhat-release -o -f /etc/redhat_version ; then
668 alpine_SSLTYPE="nopwd"
669 if test -d /etc/pki/tls ; then
670 alpine_SSLDIR="/etc/pki/tls"
672 alpine_SSLDIR="/usr/share/ssl"
674 elif test -f /etc/SuSE-release ; then
675 alpine_SSLTYPE="nopwd"
676 alpine_SSLDIR="/usr/share/ssl"
677 alpine_SSLCERTS="/etc/ssl/certs"
678 elif test -d /etc/osso-af-init ; then
679 alpine_SSLTYPE="nopwd"
681 alpine_SSLCERTS="/usr/share/certs"
683 alpine_SSLTYPE="nopwd"
685 alpine_SSLCERTS="/etc/ssl/certs"
689 alpine_SSLTYPE="nopwd"
690 alpine_SSLCERTS="/System/Library/OpenSSL/certs"
693 alpine_SSLTYPE="nopwd"
695 alpine_SSLCERTS="/etc/ssl/certs"
697 *-sco-sysv* | *-sysv*UnixWare | *-sysv*OpenUNIX)
698 alpine_SSLTYPE="sco.nopwd"
699 alpine_SSLDIR=/usr/local/ssl
702 if test -d /usr/sfw/include/openssl ; then
703 alpine_SSLDIR="/usr/sfw"
704 elif test -d /opt/csw/include/openssl ; then
705 alpine_SSLDIR="/opt/csw"
706 if test -d /opt/csw/ssl/certs ; then
707 alpine_SSLCERTS="/opt/csw/ssl/certs"
710 if test -z "$alpine_SSLCERTS" -a -d /etc/certs ; then
711 alpine_SSLCERTS="/etc/certs"
715 alpine_SSLTYPE="nopwd"
716 alpine_SSLDIR=/usr/local/ssl
721 AS_HELP_STRING([--with-ssl-dir=DIR],[Root of SSL lib/include path]),
723 if test "x$withval" != "xno" ; then
724 alpine_SSLDIR=$withval
728 AC_ARG_WITH(ssl-certs-dir,
729 AS_HELP_STRING([--with-ssl-certs-dir=DIR],[Path to SSL certificate directory]),
731 if test "x$withval" != "xno" ; then
732 alpine_SSLCERTS=$withval
736 AC_ARG_WITH(ssl-include-dir,
737 AS_HELP_STRING([--with-ssl-include-dir=DIR],[SSL include file path]),
739 if test "x$withval" != "xno" ; then
740 alpine_SSLINCLUDE=$withval
744 AC_ARG_WITH(ssl-lib-dir,
745 AS_HELP_STRING([--with-ssl-lib-dir=DIR],[SSL library path]),
747 if test "x$withval" != "xno" ; then
748 alpine_SSLLIB=$withval
751 dnl setup globals so tests below work
752 if test -n "$alpine_SSLINCLUDE" ; then
753 CPPCFLAGS="-I$alpine_SSLINCLUDE $CPPFLAGS"
754 elif test -n "$alpine_SSLDIR" ; then
755 CPPFLAGS="-I${alpine_SSLDIR}/include $CPPFLAGS"
757 if test -n "$alpine_SSLLIB" ; then
758 LDFLAGS="-L$alpine_SSLLIB $LDFLAGS"
759 elif test -n "$alpine_SSLDIR" ; then
760 LDFLAGS="-L${alpine_SSLDIR}/lib $LDFLAGS"
764 dnl Include Kerberos?
765 dnl Set GSSDIR for c-client make
767 AS_HELP_STRING([--without-krb5],[Disable Kerberos support]),
768 [ with_krb5=$withval ])
770 if test "x$with_krb5" = "xno" ; then
771 alpine_GSSTYPE="none"
775 AC_ARG_WITH(krb5-dir,
776 AS_HELP_STRING([--with-krb5-dir=DIR],[Root of Kerberos lib/include path]),
778 if test "x$withval" != "xno" ; then
779 CPPFLAGS="$CPPFLAGS -I${withval}/include"
780 LDFLAGS="$LDFLAGS -L${withval}/lib"
784 AC_ARG_WITH(krb5-include-dir,
785 AS_HELP_STRING([--with-krb5-include-dir=DIR],[Kerberos include file path]),
787 if test "x$withval" != "xno" ; then
788 CPPFLAGS="$CPPFLAGS -I$withval"
792 AC_ARG_WITH(krb5-lib-dir,
793 AS_HELP_STRING([--with-krb5-lib-dir=DIR],[Kerberos library path]),
795 if test "x$withval" != "xno" ; then
796 LDFLAGS="$LDFLAGS -L$withval"
803 AS_HELP_STRING([--without-ldap],[Disable LDAP query support]),
804 [ with_ldap=$withval ])
806 if test "x$with_ldap" = "xno" ; then
808 AC_MSG_NOTICE([Excluding LDAP Support])
810 dnl Do stuff to figure out where OpenLDAP is
813 AC_ARG_WITH(ldap-dir,
814 AS_HELP_STRING([--with-ldap-dir=DIR],[Root of LDAP lib/include path]),
816 if test "x$withval" != "xno" ; then
817 CPPFLAGS="$CPPFLAGS -I${withval}/include"
818 LDFLAGS="$LDFLAGS -L${withval}/lib"
822 AC_ARG_WITH(ldap-include-dir,
823 AS_HELP_STRING([--with-ldap-include-dir=DIR],[Directory containing LDAP include files]),
825 if test "x$withval" != "xno" ; then
826 CPPFLAGS="$CPPFLAGS -I$withval"
830 AC_ARG_WITH(ldap-lib-dir,
831 AS_HELP_STRING([--with-ldap-lib-dir=DIR],[LDAP library path]),
833 if test "x$withval" != "xno" ; then
834 LDFLAGS="$LDFLAGS -L$withval"
841 AS_HELP_STRING([--without-smime],[Disable S/MIME]),
842 [ with_smime=$withval ])
846 AS_HELP_STRING([--without-tcl],[Disable TCL, thus Web Alpine support]),
847 [ with_tcl=$withval ])
849 if test "x$with_tcl" = "xno" ; then
851 AC_MSG_NOTICE([Excluding TCL Support, and thus Web Alpine Support])
854 AS_HELP_STRING([--with-tcl-lib=LIBRARY],[Specific TCL Library, like \"tcl8.5\"]),
856 if test "x$withval" != "xno" ; then
857 alpine_TCLLIB=$withval
860 AC_ARG_WITH(tcl-include,
861 AS_HELP_STRING([--with-tcl-include=DIR],[Directory containing TCL include files]),
863 if test "x$withval" != "xno" ; then
864 CPPFLAGS="$CPPFLAGS -I$withval"
865 alpine_TCLINC=$withval
870 AC_ARG_WITH(supplied-regex,
871 AS_HELP_STRING([--with-supplied-regex],[Use regex library supplied with alpine]),
872 [ alpine_REGEX=$withval ])
875 AS_HELP_STRING([--without-pthread],[Do NOT test for nor build with POSIX thread support]),
876 [ with_pthread=$withval ])
878 AC_ARG_WITH(system-mail-directory,
879 AS_HELP_STRING([--with-system-mail-directory=DIR],[Directory where local mail is delivered]),
881 if test "x$withval" != "xno" ; then
882 alpine_with_local_maildir="$withval"
886 AC_ARG_WITH(c-client-target,
887 AS_HELP_STRING([--with-c-client-target=TARGET],[IMAP build target (see imap/Makefile)]),
889 if test "x$withval" != "xno" ;then
890 alpine_with_c_client_target="$withval"
897 AS_HELP_STRING([--without-ipv6],[Disable IPv6, primarily to work around resolver problems]),
898 [ with_ipv6=$withval ])
900 if test "x$with_ipv6" = "xno" ; then
901 AC_MSG_NOTICE([Excluding IPv6 Support])
902 c_client_specials="${c_client_specials}IP6=4 "
905 c_client_ip6="touch imap/ip6"
911 if test x$enable_dmalloc = "xyes" ; then
912 if test "x$with_pthread" = "xyes" ; then
913 dmalloc_lib=dmallocth
918 AC_CHECK_LIB($dmalloc_lib,dmalloc_shutdown,,
920 AC_MSG_ERROR($dmalloc_lib requested, but -ldmalloc not found)
924 dnl which terminal cabability database
925 AC_CHECK_LIB(tinfo, setupterm,
931 AC_CHECK_LIB(ncurses, setupterm,
934 LIBS="$LIBS -lncurses"
937 AC_CHECK_LIB(curses, setupterm,
940 LIBS="$LIBS -lcurses"
943 AC_CHECK_LIB(termlib, tgetent,
946 LIBS="$LIBS -ltermlib"
949 AC_CHECK_LIB(termcap, tgetent,
952 LIBS="$LIBS -ltermcap"
955 AC_MSG_ERROR(Terminfo/termcap not found)
961 case $alpine_termdata in
963 AC_DEFINE(HAS_TERMINFO, [1], [Define if systems uses terminfo terminal database])
966 AC_DEFINE(HAS_TERMCAP, [1], [Define if systems uses termcap terminal database])
970 dnl provide LDAP support?
971 if test "$alpine_with_ldap" = "yes" ; then
973 AC_CHECK_LIB(lber, ber_alloc,
977 AC_SEARCH_LIBS(ldap_init,ldap,
982 AC_SEARCH_LIBS(ldap_open,ldap,
988 if test "$alpine_has_ldap" = "yes" ; then
989 AC_MSG_NOTICE([Including LDAP Support])
990 AC_DEFINE([ENABLE_LDAP], [], [Enable LDAP query support])
992 dnl we use deprecated functions (ldap_get_values)
993 dnl OpenLDAP 2.3.x doesn't define LDAP_DEPRECATED by default like 2.2.x
994 AC_MSG_CHECKING([if we should define LDAP_DEPRECATED])
1002 if (LDAP_VENDOR_VERSION >= 20300)
1010 AC_DEFINE(LDAP_DEPRECATED, 1,
1011 [Define if you use OpenLDAP 2.3.x deprecated functions])
1018 AC_MSG_WARN([cross compiling: not checking])
1023 AC_MSG_NOTICE([Cannot find LDAP functions! Excluding LDAP support.])
1027 dnl provide SSL support?
1028 if test "x$alpine_SSLTYPE" != "xnone" ; then
1029 AC_SEARCH_LIBS(SSL_library_init,ssl,
1034 alpine_SSLTYPE = "none"
1036 if test "x$alpine_SSLTYPE" = "xnone" ; then
1037 AC_MSG_NOTICE([OpenSSL libraries NOT found])
1039 AC_MSG_NOTICE([OpenSSL libraries FOUND])
1043 dnl Crypto support is needed
1044 if test "x$alpine_SSLTYPE" != "xnone" ; then
1045 AC_SEARCH_LIBS(SSLeay,crypto,
1047 LIBS="$LIBS -lcrypto"
1050 alpine_CRYPTO = "none"
1052 if test "x$alpine_CRYPTO" = "xnone" ; then
1053 AC_MSG_ERROR(crypto library NOT found)
1055 AC_MSG_NOTICE([crypto library found])
1059 dnl PAM support is needed to build c-client, and hence Alpine.
1060 if test "x$alpine_PAM" != "xnone" ; then
1061 AC_SEARCH_LIBS(pam_start,pam,
1064 AC_CHECK_HEADER([security/pam_appl.h],,
1067 alpine_pam_none_reason="header files not found"
1072 alpine_pam_none_reason="library files not found"
1074 if test -n "$alpine_pam_none_reason" ; then
1075 AC_MSG_ERROR(No PAM support: $alpine_pam_none_reason)
1080 dnl provide KRB5 support?
1081 if test "x$alpine_GSSTYPE" != "xnone" ; then
1082 AC_SEARCH_LIBS(gss_init_sec_context,gss gssapi gssapi_krb5,
1086 AC_CHECK_HEADER([gssapi/gssapi_generic.h],,
1088 if test ! -d /usr/kerberos/include ; then
1089 alpine_GSSTYPE="none"
1090 alpine_gss_none_reason="header files not found"
1095 alpine_GSSTYPE="none"
1096 alpine_gss_none_reason="libraries not found"
1098 if test -n "$alpine_gss_none_reason" ; then
1099 AC_MSG_NOTICE([NOT including Kerberos Support: $alpine_gss_none_reason])
1103 dnl check for tcl libraries for Web Alpine (HACKY)
1104 if test -n "$WEB_BUILD" ; then
1105 AC_SEARCH_LIBS([Tcl_Eval],[$alpine_TCLLIB tcl8.5 tcl8.4 tcl8.3 tcl84 tcl83 tcl],,
1110 dnl look for header file
1111 if test -n "$alpine_TCLINC" ; then
1112 AC_CHECK_HEADER($alpine_TCLINC,,
1116 if test -z "$WEB_BUILD" ; then
1117 AC_MSG_NOTICE([Tcl Include file NOT found])
1120 AC_CHECK_HEADER(tcl.h,,
1122 for dir in tcl8.5 tcl8.4 tcl8.3 tcl84 tcl83 ; do
1123 AC_CHECK_FILE([/usr/include/$dir/tcl.h],
1127 if test "$found" = "yes" ; then
1128 CPPFLAGS="$CPPFLAGS -I/usr/include/$dir"
1132 if test "$found" != "yes" ; then
1134 AC_MSG_NOTICE([header file tcl.h NOT found: Web Alpine will not be built])
1140 dnl Local or supplied regex?
1141 if test x$alpine_REGEX != "xyes" ; then
1142 AC_SEARCH_LIBS([regcomp],posix regexp regex re,,
1144 if test x$alpine_REGEX = "xno" ; then
1145 AC_MSG_ERROR(Unable to find system regex library)
1151 if test x$alpine_REGEX != "xyes" ; then
1152 AC_CHECK_HEADER([regex.h],,
1154 if test x$alpine_REGEX = "xno" ; then
1155 AC_MSG_ERROR(Unable to find system regex include file)
1161 AC_DEFINE(HAVE_REGEX_H,1,[Regular expression header file exists])
1162 if test x$alpine_REGEX = "xyes" ; then
1163 CPPFLAGS="$CPPFLAGS -I${top_builddir}/regex"
1164 LDFLAGS="$LDFLAGS -L${top_builddir}/regex -lregex"
1168 if test "x$with_pthread" != "xno" ; then
1169 AC_MSG_CHECKING([for pthread support])
1172 AC_MSG_RESULT([yes])
1175 AC_MSG_NOTICE([WARNING: pthread support on OpenBSD is unstable!])
1176 AM_CFLAGS="$AM_CFLAGS -pthread"
1179 LIBS="$PTHREAD_LIBS $LIBS"
1180 AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
1182 AC_DEFINE([HAVE_PTHREAD], [1], [System has pthread support])
1188 AC_SEARCH_LIBS([nanosleep], [rt posix4],
1190 AC_DEFINE([HAVE_NANOSLEEP], [1], [Define if system supports subsecond, non-alarm sleep])
1203 AC_HEADER_TIOCGWINSZ
1205 AC_CHECK_HEADERS([unistd.h])
1207 AC_CHECK_HEADERS([errno.h \
1232 dnl terminal line discipline?
1233 AC_CHECK_HEADER([termios.h],
1234 AC_DEFINE(HAS_TERMIOS, [1], [Define if systems uses termios terminal control]),
1236 AC_CHECK_HEADER([termio.h],
1237 AC_DEFINE(HAS_TERMIO, [1], [Define if systems uses termio terminal control]),
1239 AC_CHECK_HEADER([sgtty.h],
1240 AC_DEFINE(HAS_SGTTY, [1], [Define if systems uses old BSD-style terminal control]),
1242 AC_MSG_ERROR(Unable to figure out terminal control method)
1250 AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void.
1251 Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
1252 AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
1253 [AC_LANG_PROGRAM([#include <sys/types.h>
1256 [return *(signal (0, 0)) (0) == 1;])],
1257 [ac_cv_type_signal=int],
1258 [ac_cv_type_signal=void])])
1259 AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
1260 (`int' or `void').])
1268 AC_CHECK_TYPES([union wait])
1270 AC_CHECK_HEADERS([stdint.h], [uint16=uint16_t], [
1271 AC_CHECK_HEADERS([inttypes.h], [uint16=uint16_t], [
1272 AC_CHECK_HEADERS([sys/types.h], [uint16=u_int16_t], [
1273 AC_CHECK_SIZEOF(unsigned short)
1274 if test $ac_cv_sizeof_unsigned_short -eq 2 ; then
1275 uint16="unsigned short"
1277 AC_CHECK_SIZEOF(unsigned int)
1278 if $ac_cv_sizeof_unsigned_int -eq 2 ; then
1279 uint16="unsigned int"
1281 AC_MSG_ERROR(Unable to determine 16 bit integer type)
1287 AC_DEFINE_UNQUOTED([UINT16], $uint16, [System defined unsigned 16 bit integer])
1289 AC_CHECK_HEADERS([stdint.h], [uint32=uint32_t], [
1290 AC_CHECK_HEADERS([inttypes.h], [uint32=uint32_t], [
1291 AC_CHECK_HEADERS([sys/types.h], [uint32=u_int32_t], [
1292 AC_CHECK_SIZEOF(unsigned int)
1293 if test $ac_cv_sizeof_unsigned_int -eq 4 ; then
1294 uint32="unsigned int"
1296 AC_CHECK_SIZEOF(unsigned long)
1297 if $ac_cv_sizeof_unsigned_long -eq 4 ; then
1298 uint32="unsigned long"
1300 AC_MSG_ERROR(Unable to determine 32 bit integer type)
1306 AC_DEFINE_UNQUOTED([UINT32], $uint32, [System defined unsigned 32 bit integer])
1308 AC_CACHE_CHECK(argument pointer type of qsort compare function and base,
1309 ac_cv_func_qsort_argtype,
1310 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1316 extern sortf(const void *, const void *);
1319 const void *b; { return 0; }
1321 qsort(base, 2, sizeof(char *), sortf);
1322 ]])],[ac_cv_func_qsort_argtype=void],[ac_cv_func_qsort_argtype=char])
1324 AC_DEFINE_UNQUOTED([qsort_t], $ac_cv_func_qsort_argtype, [qsort compare function argument type])
1326 dnl check for "struct passwd" ?
1328 AC_FUNC_SELECT_ARGTYPES
1332 dnl CHECK FOR LIBRARY FUNCTIONS
1335 AC_CHECK_FUNCS([strchr \
1368 AC_SEARCH_LIBS([gethostname],[nsl])
1370 AC_SEARCH_LIBS([socket],[socket],,
1375 AC_SEARCH_LIBS([bind],[bind],,
1380 dnl check for POSIX signal interface
1381 AC_CHECK_FUNCS([sigaction sigemptyset sigaddset sigprocmask],
1383 AC_DEFINE([POSIX_SIGNALS], [], [Define if system supports POSIX signal interface])
1386 AC_CHECK_FUNCS([sigset sigrelse],
1388 AC_DEFINE([SYSV_SIGNALS], [], [Define if system supports SYSV signal interface])
1392 AC_SEARCH_LIBS([syslog], [bsd socket inet],
1394 AC_DEFINE([HAVE_SYSLOG], [1], [Define if system supplies syslog() logging])
1398 dnl HOST-OS SPECIFIC DEFINITIONS
1399 dnl Tests and assignments below are mostly to coax the appropriate
1400 dnl build from c-client. Most of this will go away when c-client
1401 dnl adopts configure
1403 *-linux-gnu*|*-k*bsd*-gnu*)
1404 alpine_path_delim="/"
1405 alpine_mode_readonly="(0600)"
1406 if test -f /etc/fedora-release ; then
1408 if test -d /etc/pki/tls ; then
1409 alpine_c_client_target="lfd"
1411 alpine_c_client_target="lrh"
1413 elif test -f /etc/mandrake-release ; then
1415 alpine_c_client_target="lmd"
1416 elif test -f /etc/redhat-release -o -f /etc/redhat_version ; then
1418 if test -d /etc/pki/tls ; then
1419 alpine_c_client_target="lr5"
1421 alpine_c_client_target="lrh"
1423 elif test -f /etc/debian_release -o -f /etc/debian_version ; then
1424 if test -d /etc/osso-af-init ; then
1426 alpine_c_client_target="ln8"
1429 alpine_c_client_target="ldb"
1431 elif test -f /etc/SuSE-release ; then
1433 alpine_c_client_target="lsu"
1436 AC_CHECK_LIB(pam, pam_start,
1438 alpine_c_client_target="lnp"
1441 if test -f /etc/shadow ; then
1442 alpine_c_client_target="slx"
1444 alpine_c_client_target="lnx"
1451 alpine_path_delim="/"
1452 alpine_mode_readonly="(0600)"
1453 LIBS="$LIBS -framework Carbon -framework ApplicationServices -framework Security"
1454 AM_CFLAGS="$AM_CFLAGS -Dbsd"
1455 dnl SEE include/system.h
1456 AC_DEFINE([OSX_TARGET],[1],[OSX TARGET])
1457 case "$alpine_os_credential_cache" in
1461 AC_DEFINE([APPLEKEYCHAIN], [1], [Use Apple OS X key chain for credential caching])
1464 AC_CHECK_LIB(pam, pam_start,
1466 alpine_c_client_target="oxp"
1469 alpine_c_client_target="osx"
1473 if test x$GCC = "xyes" ; then
1475 alpine_c_client_target="gso"
1478 alpine_c_client_target="soc"
1479 AC_DEFINE([__EXTENSIONS__], [1], [Enable extended pthread features on Solaris])
1481 alpine_path_delim="/"
1482 alpine_mode_readonly="(0600)"
1483 dnl possible other OS's need this.
1484 dnl Use autoconf 2.61's AC_USE_SYSTEM_EXTENSIONS at some point
1488 alpine_path_delim="/"
1489 alpine_mode_readonly="(0600)"
1490 alpine_c_client_target="s40"
1493 if test x$GCC = "xyes" ; then
1495 alpine_c_client_target="go5"
1498 alpine_c_client_target="sc5"
1500 alpine_path_delim="/"
1501 alpine_mode_readonly="(0600)"
1502 dnl possible other OS's need this.
1503 dnl Use autoconf 2.61's AC_USE_SYSTEM_EXTENSIONS at some point
1507 alpine_path_delim="/"
1508 alpine_mode_readonly="(0600)"
1509 alpine_c_client_target="nx3"
1513 alpine_path_delim="/"
1514 alpine_mode_readonly="(0600)"
1515 alpine_c_client_target="neb"
1519 alpine_path_delim="/"
1520 alpine_mode_readonly="(0600)"
1521 alpine_c_client_target="neb"
1525 alpine_path_delim="/"
1526 alpine_mode_readonly="(0600)"
1527 alpine_c_client_target="bsi"
1531 alpine_path_delim="/"
1532 alpine_mode_readonly="(0600)"
1533 alpine_c_client_target="bsf"
1534 LIBS="$LIBS $LIBINTL"
1538 alpine_path_delim="/"
1539 alpine_mode_readonly="(0600)"
1540 alpine_c_client_target="bso"
1541 LIBS="$LIBS $LIBINTL"
1545 alpine_path_delim="/"
1546 alpine_mode_readonly="(0600)"
1547 alpine_c_client_target="a52"
1551 alpine_path_delim="/"
1552 alpine_mode_readonly="(0600)"
1553 alpine_c_client_target="a41"
1557 alpine_path_delim="/"
1558 alpine_mode_readonly="(0600)"
1559 alpine_c_client_target="a32"
1561 *-*UNIX_SV | *-*-sysv5UnixWare7* | *-*OpenUNIX*)
1563 alpine_path_delim="/"
1564 alpine_mode_readonly="(0600)"
1565 alpine_c_client_target="uw2"
1569 alpine_path_delim="/"
1570 alpine_mode_readonly="(0600)"
1571 alpine_c_client_target="osf"
1575 alpine_path_delim="/"
1576 alpine_mode_readonly="(S_IREAD | S_IWRITE)"
1577 alpine_c_client_target="cyg"
1578 LIBS="$LIBS $LIBINTL"
1580 windows* | *-*-pw32*)
1582 alpine_path_delim="\\"
1583 alpine_mode_readonly="(S_IREAD | S_IWRITE)"
1584 alpine_c_client_target="wnt"
1585 AC_DEFINE([_WINDOWS], [1], [Windows is just too different])
1588 AC_MSG_ERROR(Unrecognized system: $host)
1592 dnl set pico newmail check directory
1593 if test -n "$alpine_with_local_maildir" ; then
1594 alpine_local_maildir=$alpine_with_local_maildir
1595 elif test -d /var/spool/mail ; then
1596 alpine_local_maildir="/var/spool/mail"
1597 elif test -d /var/mail ; then
1598 alpine_local_maildir="/var/mail"
1600 alpine_local_maildir="/usr/spool/mail"
1603 dnl set c-client make target
1604 if test -n "$alpine_with_c_client_target" ; then
1605 alpine_c_client_target=$alpine_with_c_client_target
1608 AC_DEFINE_UNQUOTED([SYSTYPE], "$systype", [Pine-Centric Host Specifier])
1609 AC_DEFINE_UNQUOTED([C_FILESEP],'$alpine_path_delim',[File name separator as character constant])
1610 AC_DEFINE_UNQUOTED([S_FILESEP],"$alpine_path_delim",[File name separator as string constant])
1611 AC_DEFINE_UNQUOTED([MAILDIR],"$alpine_local_maildir",[Path to local inboxes for pico newmail check])
1612 AC_DEFINE_UNQUOTED([MODE_READONLY], $alpine_mode_readonly, [File mode used to set readonly access])
1614 dnl c-client make particulars
1615 AC_SUBST([C_CLIENT_TARGET], $alpine_c_client_target)
1616 AC_SUBST([C_CLIENT_WITH_IPV6], $c_client_ip6)
1617 if test "x$alpine_SSLTYPE" = "xnone" ; then
1618 AC_MSG_NOTICE([* * * NOT Including SSL Support])
1619 c_client_specials="${c_client_specials}SSLTYPE=none "
1621 dnl issue any warnings for common OpenSSL issues
1623 if test -n "$alpine_SSLCERTS" -a -d "$alpine_SSLCERTS" ; then
1624 certdir="$alpine_SSLCERTS"
1625 elif test -n "$alpine_SSLDIR" -a -d "${alpine_SSLDIR}/certs" ; then
1626 certdir="${alpine_SSLDIR}/certs"
1628 AC_MSG_NOTICE([SSL Problem: certificate directory not found])
1631 if test "x$with_smime" != "xno" ; then
1632 if test -n "$certdir" ; then
1633 AC_DEFINE([SMIME], [], [Enable S/MIME code])
1634 AC_DEFINE_UNQUOTED([SMIME_SSLCERTS],"$certdir",[Directory where S/MIME CACerts are located])
1638 if test ! -f ${certdir}/factory.pem ; then
1639 AC_MSG_NOTICE([* * * SSL file "${certdir}/factory.pem" is missing.])
1640 AC_MSG_NOTICE([* * * This might indicate that CA certs did not get properly])
1641 AC_MSG_NOTICE([* * * installed. If you get certificate validation failures])
1642 AC_MSG_NOTICE([* * * in Alpine, this might be the reason for them.])
1645 if test -z "`ls ${certdir} | $EGREP '^@<:@0-9A-Fa-f@:>@{8}\.@<:@0-9@:>@'`" ; then
1646 AC_MSG_NOTICE([* * * No 8-hexdigit symlinks in certificate directory "${certdir}".])
1647 AC_MSG_NOTICE([* * * This might indicate that CA certs did not get properly])
1648 AC_MSG_NOTICE([* * * installed. If you get certificate validation failures])
1649 AC_MSG_NOTICE([* * * in Alpine, this might be the reason for them.])
1652 if test -n "$alpine_SSLDIR" ; then
1653 c_client_specials="${c_client_specials}SSLDIR=$alpine_SSLDIR "
1656 if test -n "$alpine_SSLCERTS" ; then
1657 c_client_specials="${c_client_specials}SSLCERTS=$alpine_SSLCERTS "
1660 if test -n "$alpine_SSLINCLUDE" ; then
1661 c_client_specials="${c_client_specials}SSLINCLUDE=$alpine_SSLINCLUDE "
1664 if test -n "$alpine_SSLLIB" ; then
1665 c_client_specials="${c_client_specials}SSLLIB=$alpine_SSLLIB "
1670 if test "x$alpine_GSSTYPE" != "xnone" ; then
1671 c_client_specials="${c_client_specials}EXTRAAUTHENTICATORS=gss "
1672 AC_MSG_NOTICE([* * * Including Kerberos5 functionality])
1675 if test -n "$CPPFLAGS" ; then
1676 alpine_c_client_cflags="$alpine_c_client_cflags ${CPPFLAGS}"
1678 if test -n "$CFLAGS" ; then
1679 alpine_c_client_cflags="$alpine_c_client_cflags ${CFLAGS}"
1682 if test -n "$alpine_c_client_cflags" ; then
1683 AC_SUBST(C_CLIENT_CFLAGS, EXTRACFLAGS=\"$alpine_c_client_cflags\")
1686 if test -n "$LDFLAGS" ; then
1687 alpine_c_client_ldflags="$alpine_c_client_ldflags ${LDFLAGS}"
1689 if test -n "$LIBS" ; then
1690 alpine_c_client_ldflags="$alpine_c_client_ldflags ${LIBS}"
1693 if test -n "$alpine_c_client_ldflags" ; then
1694 AC_SUBST(C_CLIENT_LDFLAGS, EXTRALDFLAGS=\"$alpine_c_client_ldflags\")
1697 if test -n "$alpine_c_client_gccoptlevel" ; then
1698 AC_SUBST(C_CLIENT_GCCOPTLEVEL, GCCOPTLEVEL=\"$alpine_c_client_gccoptlevel\")
1701 AC_SUBST([C_CLIENT_SPECIALS], $c_client_specials)
1703 dnl Deal with Web Alpine
1704 if test -z "$WEB_BUILD" ; then
1705 WEB_PUBCOOKIE_BUILD=
1706 AC_MSG_NOTICE([* * * TCL libraries could not be found.])
1707 AC_MSG_NOTICE([* * * WEB ALPINE COMPONENT WILL NOT BE BUILT.])
1709 if test -n "$WEB_PUBCOOKIE_BUILD" ; then
1710 if test "x$alpine_GSSTYPE" = "xnone" ; then
1711 WEB_PUBCOOKIE_BUILD=
1712 AC_MSG_NOTICE([* * * Kerberos5 support not found.])
1713 AC_MSG_NOTICE([* * * WEB ALPINE PUBCOOKIE COMPONENT WILL NOT BE BUILT.])
1714 elif test -z "$WEB_BINDIR" ; then
1715 WEB_PUBCOOKIE_BUILD=
1716 AC_MSG_NOTICE([* * * Web Alpine binary directory not provided.])
1717 AC_MSG_ERROR([* * * --with-pubcookie requires --with-web-bin=PATH.
1718 Please re-run configure with these options:
1719 --with-pubcookie --with-web-bin=/usr/local/libexec/alpine/bin])
1721 AC_DEFINE([PUBCOOKIE],[1],[Include support for UW Pubcookie Web Authentication])
1722 WEB_PUBCOOKIE_LIB=../pubcookie/libauthgssproxy.a
1723 WEB_PUBCOOKIE_LINK=gssapi_proxy.l
1728 AC_SUBST([REGEX_BUILD])
1730 AC_SUBST([WEB_BUILD])
1731 AC_SUBST([WEB_BINDIR])
1732 AC_SUBST([WEB_PUBCOOKIE_BUILD])
1733 AC_SUBST([WEB_PUBCOOKIE_LIB])
1734 AC_SUBST([WEB_PUBCOOKIE_LINK])
1736 AC_SUBST([AM_CFLAGS])
1737 AC_SUBST([AM_LDFLAGS])
1739 AC_CONFIG_FILES([m4/Makefile po/Makefile.in regex/Makefile \
1740 pith/osdep/Makefile pith/charconv/Makefile pith/Makefile \
1741 pico/osdep/Makefile pico/Makefile \
1742 alpine/osdep/Makefile alpine/Makefile \
1743 web/src/Makefile web/src/pubcookie/Makefile \
1744 web/src/alpined.d/Makefile \