diff options
| author | bwarsaw | 2007-05-28 20:21:41 +0000 |
|---|---|---|
| committer | bwarsaw | 2007-05-28 20:21:41 +0000 |
| commit | b18f632faa6de17badabb3c6c7ba61752ac84c37 (patch) | |
| tree | 8b444330b288c5dfc9b25be639d429abfaeb3d3d | |
| parent | 5ff792b13599920527b48f92f8bad880668f8f26 (diff) | |
| download | mailman-b18f632faa6de17badabb3c6c7ba61752ac84c37.tar.gz mailman-b18f632faa6de17badabb3c6c7ba61752ac84c37.tar.zst mailman-b18f632faa6de17badabb3c6c7ba61752ac84c37.zip | |
111 files changed, 6396 insertions, 2958 deletions
diff --git a/Mailman/Cgi/admin.py b/Mailman/Cgi/admin.py index ae9850fba..553f26656 100644 --- a/Mailman/Cgi/admin.py +++ b/Mailman/Cgi/admin.py @@ -182,10 +182,7 @@ def admin_overview(msg=''): bgcolor=mm_cfg.WEB_HEADER_COLOR) # Skip any mailing list that isn't advertised. advertised = [] - listnames = list(Utils.list_names()) - listnames.sort() - - for name in listnames: + for name in sorted(config.list_manager.names): mlist = MailList.MailList(name, lock=False) if mlist.advertised: if hostname not in mlist.web_page_url: diff --git a/Mailman/Cgi/listinfo.py b/Mailman/Cgi/listinfo.py index b43d10f91..13689b767 100644 --- a/Mailman/Cgi/listinfo.py +++ b/Mailman/Cgi/listinfo.py @@ -82,10 +82,7 @@ def listinfo_overview(msg=''): # Skip any mailing lists that isn't advertised. advertised = [] - listnames = list(Utils.list_names()) - listnames.sort() - - for name in listnames: + for name in sorted(config.list_manager.names): mlist = MailList.MailList(name, lock=False) if mlist.advertised: if hostname not in mlist.web_page_url: diff --git a/Mailman/Cgi/options.py b/Mailman/Cgi/options.py index f357bcf15..29f05cf7b 100644 --- a/Mailman/Cgi/options.py +++ b/Mailman/Cgi/options.py @@ -895,7 +895,7 @@ def loginpage(mlist, doc, user, lang): def lists_of_member(mlist, user): hostname = mlist.host_name onlists = [] - for listname in Utils.list_names(): + for listname in config.list_manager.names: # The current list will always handle things in the mainline if listname == mlist.internal_name(): continue diff --git a/Mailman/Commands/cmd_lists.py b/Mailman/Commands/cmd_lists.py index 10e8aad71..6d23d4745 100644 --- a/Mailman/Commands/cmd_lists.py +++ b/Mailman/Commands/cmd_lists.py @@ -21,8 +21,8 @@ """ from Mailman import mm_cfg -from Mailman import Utils from Mailman.MailList import MailList +from Mailman.configuration import config from Mailman.i18n import _ @@ -43,10 +43,8 @@ def process(res, args): return STOP hostname = mlist.host_name res.results.append(_('Public mailing lists at %(hostname)s:')) - lists = Utils.list_names() - lists.sort() i = 1 - for listname in lists: + for listname in sorted(config.list_manager.names): if listname == mlist.internal_name(): xlist = mlist else: diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index 7008be8f9..87d5db125 100644 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -26,6 +26,9 @@ import os +from munepy import Enum + + def seconds(s): return s def minutes(m): return m * 60 def hours(h): return h * 60 * 60 @@ -79,7 +82,7 @@ SITE_OWNER_ADDRESS = 'changeme@example.com' DEFAULT_HOST_NAME = None DEFAULT_URL = None -HOME_PAGE = 'index.html' +HOME_PAGE = 'index.html' # Normally when a site administrator authenticates to a web page with the site # password, they get a cookie which authorizes them as the list admin. It @@ -104,6 +107,11 @@ PASSWORD_SCHEME = 'ssha' # Database options ##### +# Initialization function for creating the IListManager, IUserManager, and +# IMessageManager objects, as a Python dotted name. This function must take +# zero arguments. +MANAGERS_INIT_FUNCTION = 'Mailman.database.initialize' + # Use this to set the SQLAlchemy database engine URL. You generally have one # primary database connection for all of Mailman. List data and most rosters # will store their data in this database, although external rosters may access @@ -467,6 +475,15 @@ NNTP_REWRITE_DUPLICATE_HEADERS = [ ('mime-version', 'X-MIME-Version'), ] +# Some list posts and mail to the -owner address may contain DomainKey or +# DomainKeys Identified Mail (DKIM) signature headers <http://www.dkim.org/>. +# Various list transformations to the message such as adding a list header or +# footer or scrubbing attachments or even reply-to munging can break these +# signatures. It is generally felt that these signatures have value, even if +# broken and even if the outgoing message is resigned. However, some sites +# may wish to remove these headers by setting this to Yes. +REMOVE_DKIM_HEADERS = No + # All `normal' messages which are delivered to the entire list membership go # through this pipeline of handler modules. Lists themselves can override the # global pipeline by defining a `pipeline' attribute. @@ -525,6 +542,8 @@ OWNER_PIPELINE = [ # - propagate -- Boolean specifying whether to propagate log message from this # logger to the root "mailman" logger. You cannot override # settings for the root logger. +# +# The file name may be absolute, or relative to Mailman's etc directory. LOG_CONFIG_FILE = None # This defines log format strings for the SMTPDirect delivery module (see @@ -664,9 +683,9 @@ VERP_DELIVERY_INTERVAL = 0 # friendly Subject: on the message, but requires cooperation from the MTA. # Format is like VERP_FORMAT above, but with the following substitutions: # -# %(addr)s -- the list-confirm mailbox will be set here -# %(cookie)s -- the confirmation cookie will be set here -VERP_CONFIRM_FORMAT = '%(addr)s+%(cookie)s' +# $address -- the list-confirm address +# $cookie -- the confirmation cookie +VERP_CONFIRM_FORMAT = '$address+$cookie' # This is analogous to VERP_REGEXP, but for splitting apart the # VERP_CONFIRM_FORMAT. MUAs have been observed that mung @@ -1295,6 +1314,24 @@ ReceiveNonmatchingTopics = 64 Moderate = 128 DontReceiveDuplicates = 256 + +class DeliveryMode(Enum): + # Non-digest delivery + Regular = 1 + # Digest delivery modes + MIME = 2 + Plain = 3 + + +class DeliveryStatus(Enum): + Enabled = 0 + # Disabled reason + Unknown = 1 + ByUser = 2 + ByAdmin = 3 + ByBounce = 4 + + # A mapping between short option tags and their flag OPTINFO = {'hide' : ConcealSubscription, 'nomail' : DisableDelivery, diff --git a/Mailman/Errors.py b/Mailman/Errors.py index 10081f08d..6b5abac5a 100644 --- a/Mailman/Errors.py +++ b/Mailman/Errors.py @@ -212,3 +212,33 @@ class BadPasswordSchemeError(PasswordError): def __str__(self): return 'A bad password scheme was given: %s' % self.scheme_name + + + +class UserError(MailmanError): + """A general user-related error occurred.""" + + +class RosterError(UserError): + """A roster-related error occurred.""" + + +class RosterExistsError(RosterError): + """The named roster already exists.""" + + + +class AddressError(MailmanError): + """A general address-related error occurred.""" + + +class ExistingAddressError(AddressError): + """The given email address already exists.""" + + +class AddressAlreadyLinkedError(AddressError): + """The address is already linked to a user.""" + + +class AddressNotLinkedError(AddressError): + """The address is not linked to the user.""" diff --git a/Mailman/Gui/Language.py b/Mailman/Gui/Language.py index 8f73a8b3f..7b7433232 100644 --- a/Mailman/Gui/Language.py +++ b/Mailman/Gui/Language.py @@ -23,7 +23,7 @@ from Mailman import Utils from Mailman import i18n from Mailman import mm_cfg from Mailman.Gui.GUIBase import GUIBase -from Mailman.database.languages import Language +from Mailman.database.tables.languages import Language _ = i18n._ diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py index 8abdbb972..9dee4fcb0 100644 --- a/Mailman/Handlers/CleanseDKIM.py +++ b/Mailman/Handlers/CleanseDKIM.py @@ -25,9 +25,12 @@ and it will also give the MTA the opportunity to regenerate valid keys originating at the Mailman server for the outgoing message. """ +from Mailman.configuration import config + def process(mlist, msg, msgdata): - del msg['domainkey-signature'] - del msg['dkim-signature'] - del msg['authentication-results'] + if config.REMOVE_DKIM_HEADERS: + del msg['domainkey-signature'] + del msg['dkim-signature'] + del msg['authentication-results'] diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py index a7a825852..4c53b11ac 100644 --- a/Mailman/Handlers/Scrubber.py +++ b/Mailman/Handlers/Scrubber.py @@ -174,7 +174,19 @@ def process(mlist, msg, msgdata=None): if ctype == 'text/plain': # We need to choose a charset for the scrubbed message, so we'll # arbitrarily pick the charset of the first text/plain part in the - # message. Also get the RFC 3676 stuff from this part. + # message. + # + # Also get the RFC 3676 stuff from this part. This seems to + # work okay for scrub_nondigest. It will also work as far as + # scrubbing messages for the archive is concerned, but Pipermail + # doesn't pay any attention to the RFC 3676 parameters. The plain + # format digest is going to be a disaster in any case as some of + # messages will be format="flowed" and some not. ToDigest creates + # its own Content-Type: header for the plain digest which won't + # have RFC 3676 parameters. If the message Content-Type: headers + # are retained for display in the digest, the parameters will be + # there for information, but not for the MUA. This is the best we + # can do without having get_payload() process the parameters. if charset is None: charset = part.get_content_charset(lcset) format = part.get_param('format') @@ -318,7 +330,8 @@ URL: %(url)s partcharset = part.get_content_charset('us-ascii') try: t = unicode(t, partcharset, 'replace') - except (UnicodeError, LookupError, ValueError, TypeError): + except (UnicodeError, LookupError, ValueError, TypeError, + AssertionError): # What is the cause to come this exception now ? # Replace funny characters. We use errors='replace'. u = unicode(t, 'ascii', 'replace') @@ -331,6 +344,13 @@ URL: %(url)s charsets.append(partcharset) # Now join the text and set the payload sep = _('-------------- next part --------------\n') + # The i18n separator is in the list's charset. Coerce it to the + # message charset. + try: + s = unicode(sep, lcset, 'replace') + sep = s.encode(charset, 'replace') + except (UnicodeError, LookupError, ValueError): + pass rept = sep.join(text) # Replace entire message with text and scrubbed notice. # Try with message charsets and utf-8 diff --git a/Mailman/ListAdmin.py b/Mailman/ListAdmin.py index bcef7d2c9..cadf0146e 100644 --- a/Mailman/ListAdmin.py +++ b/Mailman/ListAdmin.py @@ -24,6 +24,8 @@ Pending subscriptions which are requiring a user's confirmation are handled elsewhere. """ +from __future__ import with_statement + import os import time import email @@ -71,104 +73,99 @@ class ListAdmin: self.next_request_id = 1 def InitTempVars(self): - self.__db = None - self.__filename = os.path.join(self.fullpath(), 'request.pck') + self._db = None + self._filename = os.path.join(self.full_path, 'request.pck') - def __opendb(self): - if self.__db is None: + def _opendb(self): + if self._db is None: assert self.Locked() try: - fp = open(self.__filename) - try: - self.__db = cPickle.load(fp) - finally: - fp.close() + with open(self._filename) as fp: + self._db = cPickle.load(fp) except IOError, e: - if e.errno <> errno.ENOENT: raise - self.__db = {} + if e.errno <> errno.ENOENT: + raise + self._db = {} # put version number in new database - self.__db['version'] = IGN, config.REQUESTS_FILE_SCHEMA_VERSION + self._db['version'] = IGN, config.REQUESTS_FILE_SCHEMA_VERSION - def __closedb(self): - if self.__db is not None: + def _closedb(self): + if self._db is not None: assert self.Locked() # Save the version number - self.__db['version'] = IGN, config.REQUESTS_FILE_SCHEMA_VERSION + self._db['version'] = IGN, config.REQUESTS_FILE_SCHEMA_VERSION # Now save a temp file and do the tmpfile->real file dance. BAW: # should we be as paranoid as for the config.pck file? Should we # use pickle? - tmpfile = self.__filename + '.tmp' - fp = open(tmpfile, 'w') - try: - cPickle.dump(self.__db, fp, 1) + tmpfile = self._filename + '.tmp' + with open(tmpfile, 'w') as fp: + cPickle.dump(self._db, fp, 1) fp.flush() os.fsync(fp.fileno()) - finally: - fp.close() - self.__db = None + self._db = None # Do the dance - os.rename(tmpfile, self.__filename) + os.rename(tmpfile, self._filename) - def __nextid(self): + @property + def _next_id(self): assert self.Locked() while True: + missing = object() next = self.next_request_id self.next_request_id += 1 - if not self.__db.has_key(next): - break - return next + if self._db.setdefault(next, missing) is missing: + yield next def SaveRequestsDb(self): - self.__closedb() + self._closedb() def NumRequestsPending(self): - self.__opendb() + self._opendb() # Subtract one for the version pseudo-entry - return len(self.__db) - 1 + return len(self._db) - 1 - def __getmsgids(self, rtype): - self.__opendb() - ids = [k for k, (op, data) in self.__db.items() if op == rtype] - ids.sort() + def _getmsgids(self, rtype): + self._opendb() + ids = sorted([k for k, (op, data) in self._db.items() if op == rtype]) return ids def GetHeldMessageIds(self): - return self.__getmsgids(HELDMSG) + return self._getmsgids(HELDMSG) def GetSubscriptionIds(self): - return self.__getmsgids(SUBSCRIPTION) + return self._getmsgids(SUBSCRIPTION) def GetUnsubscriptionIds(self): - return self.__getmsgids(UNSUBSCRIPTION) + return self._getmsgids(UNSUBSCRIPTION) def GetRecord(self, id): - self.__opendb() - type, data = self.__db[id] + self._opendb() + type, data = self._db[id] return data def GetRecordType(self, id): - self.__opendb() - type, data = self.__db[id] + self._opendb() + type, data = self._db[id] return type def HandleRequest(self, id, value, comment=None, preserve=None, forward=None, addr=None): - self.__opendb() - rtype, data = self.__db[id] + self._opendb() + rtype, data = self._db[id] if rtype == HELDMSG: - status = self.__handlepost(data, value, comment, preserve, - forward, addr) + status = self._handlepost(data, value, comment, preserve, + forward, addr) elif rtype == UNSUBSCRIPTION: - status = self.__handleunsubscription(data, value, comment) + status = self._handleunsubscription(data, value, comment) else: assert rtype == SUBSCRIPTION - status = self.__handlesubscription(data, value, comment) + status = self._handlesubscription(data, value, comment) if status <> DEFER: # BAW: Held message ids are linked to Pending cookies, allowing # the user to cancel their post before the moderator has approved # it. We should probably remove the cookie associated with this # id, but we have no way currently of correlating them. :( - del self.__db[id] + del self._db[id] def HoldMessage(self, msg, reason, msgdata={}): # Make a copy of msgdata so that subsequent changes won't corrupt the @@ -176,9 +173,9 @@ class ListAdmin: # not be relevant when the message is resurrected. msgdata = msgdata.copy() # assure that the database is open for writing - self.__opendb() + self._opendb() # get the next unique id - id = self.__nextid() + id = self._next_id # get the message sender sender = msg.get_sender() # calculate the file name for the message text and write it to disk @@ -187,8 +184,7 @@ class ListAdmin: else: ext = 'txt' filename = 'heldmsg-%s-%d.%s' % (self.internal_name(), id, ext) - fp = open(os.path.join(config.DATA_DIR, filename), 'w') - try: + with open(os.path.join(config.DATA_DIR, filename), 'w') as fp: if config.HOLD_MESSAGES_AS_PICKLES: cPickle.dump(msg, fp, 1) else: @@ -196,8 +192,6 @@ class ListAdmin: g(msg, 1) fp.flush() os.fsync(fp.fileno()) - finally: - fp.close() # save the information to the request database. for held message # entries, each record in the database will be of the following # format: @@ -211,10 +205,10 @@ class ListAdmin: # msgsubject = msg.get('subject', _('(no subject)')) data = time.time(), sender, msgsubject, reason, filename, msgdata - self.__db[id] = (HELDMSG, data) + self._db[id] = (HELDMSG, data) return id - def __handlepost(self, record, value, comment, preserve, forward, addr): + def _handlepost(self, record, value, comment, preserve, forward, addr): # For backwards compatibility with pre 2.0beta3 ptime, sender, subject, reason, filename, msgdata = record path = os.path.join(config.DATA_DIR, filename) @@ -225,24 +219,19 @@ class ListAdmin: spamfile = DASH.join(parts) # Preserve the message as plain text, not as a pickle try: - fp = open(path) + with open(path) as fp: + msg = cPickle.load(fp) except IOError, e: - if e.errno <> errno.ENOENT: raise + if e.errno <> errno.ENOENT: + raise return LOST - try: - msg = cPickle.load(fp) - finally: - fp.close() # Save the plain text to a .msg file, not a .pck file outpath = os.path.join(config.SPAM_DIR, spamfile) head, ext = os.path.splitext(outpath) outpath = head + '.msg' - outfp = open(outpath, 'w') - try: + with open(outpath, 'w') as outfp: g = Generator(outfp) g(msg, 1) - finally: - outfp.close() # Now handle updates to the database rejection = None fp = None @@ -256,7 +245,8 @@ class ListAdmin: try: msg = readMessage(path) except IOError, e: - if e.errno <> errno.ENOENT: raise + if e.errno <> errno.ENOENT: + raise return LOST msg = readMessage(path) msgdata['approved'] = 1 @@ -281,7 +271,7 @@ class ListAdmin: elif value == config.REJECT: # Rejected rejection = 'Refused' - self.__refuse(_('Posting of your message titled "%(subject)s"'), + self._refuse(_('Posting of your message titled "%(subject)s"'), sender, comment or _('[No reason given]'), lang=self.getMemberLanguage(sender)) else: @@ -297,7 +287,8 @@ class ListAdmin: try: copy = readMessage(path) except IOError, e: - if e.errno <> errno.ENOENT: raise + if e.errno <> errno.ENOENT: + raise raise Errors.LostHeldMessage(path) # It's possible the addr is a comma separated list of addresses. addrs = getaddresses([addr]) @@ -354,9 +345,9 @@ class ListAdmin: def HoldSubscription(self, addr, fullname, password, digest, lang): # Assure that the database is open for writing - self.__opendb() + self._opendb() # Get the next unique id - id = self.__nextid() + id = self._next_id # Save the information to the request database. for held subscription # entries, each record in the database will be one of the following # format: @@ -367,7 +358,7 @@ class ListAdmin: # the digest flag # the user's preferred language data = time.time(), addr, fullname, password, digest, lang - self.__db[id] = (SUBSCRIPTION, data) + self._db[id] = (SUBSCRIPTION, data) # # TBD: this really shouldn't go here but I'm not sure where else is # appropriate. @@ -399,7 +390,7 @@ class ListAdmin: elif value == config.DISCARD: pass elif value == config.REJECT: - self.__refuse(_('Subscription request'), addr, + self._refuse(_('Subscription request'), addr, comment or _('[No reason given]'), lang=lang) else: @@ -413,16 +404,16 @@ class ListAdmin: pass # TBD: disgusting hack: ApprovedAddMember() can end up closing # the request database. - self.__opendb() + self._opendb() return REMOVE def HoldUnsubscription(self, addr): # Assure the database is open for writing - self.__opendb() + self._opendb() # Get the next unique id - id = self.__nextid() + id = self._next_id # All we need to do is save the unsubscribing address - self.__db[id] = (UNSUBSCRIPTION, addr) + self._db[id] = (UNSUBSCRIPTION, addr) log.info('%s: held unsubscription request from %s', self.internal_name(), addr) # Possibly notify the administrator of the hold @@ -444,14 +435,14 @@ class ListAdmin: self.preferred_language) msg.send(self, **{'tomoderators': 1}) - def __handleunsubscription(self, record, value, comment): + def _handleunsubscription(self, record, value, comment): addr = record if value == config.DEFER: return DEFER elif value == config.DISCARD: pass elif value == config.REJECT: - self.__refuse(_('Unsubscription request'), addr, comment) + self._refuse(_('Unsubscription request'), addr, comment) else: assert value == config.UNSUBSCRIBE try: @@ -461,7 +452,7 @@ class ListAdmin: pass return REMOVE - def __refuse(self, request, recip, comment, origmsg=None, lang=None): + def _refuse(self, request, recip, comment, origmsg=None, lang=None): # As this message is going to the requestor, try to set the language # to his/her language choice, if they are a member. Otherwise use the # list's preferred language. @@ -492,82 +483,16 @@ class ListAdmin: subject, text, lang) msg.send(self) - def _UpdateRecords(self): - # Subscription records have changed since MM2.0.x. In that family, - # the records were of length 4, containing the request time, the - # address, the password, and the digest flag. In MM2.1a2, they grew - # an additional language parameter at the end. In MM2.1a4, they grew - # a fullname slot after the address. This semi-public method is used - # by the update script to coerce all subscription records to the - # latest MM2.1 format. - # - # Held message records have historically either 5 or 6 items too. - # These always include the requests time, the sender, subject, default - # rejection reason, and message text. When of length 6, it also - # includes the message metadata dictionary on the end of the tuple. - # - # In Mailman 2.1.5 we converted these files to pickles. - filename = os.path.join(self.fullpath(), 'request.db') - try: - fp = open(filename) - try: - self.__db = marshal.load(fp) - finally: - fp.close() - os.unlink(filename) - except IOError, e: - if e.errno <> errno.ENOENT: raise - filename = os.path.join(self.fullpath(), 'request.pck') - try: - fp = open(filename) - try: - self.__db = cPickle.load(fp) - finally: - fp.close() - except IOError, e: - if e.errno <> errno.ENOENT: raise - self.__db = {} - for id, (op, info) in self.__db.items(): - if op == SUBSCRIPTION: - if len(info) == 4: - # pre-2.1a2 compatibility - when, addr, passwd, digest = info - fullname = '' - lang = self.preferred_language - elif len(info) == 5: - # pre-2.1a4 compatibility - when, addr, passwd, digest, lang = info - fullname = '' - else: - assert len(info) == 6, 'Unknown subscription record layout' - continue - # Here's the new layout - self.__db[id] = when, addr, fullname, passwd, digest, lang - elif op == HELDMSG: - if len(info) == 5: - when, sender, subject, reason, text = info - msgdata = {} - else: - assert len(info) == 6, 'Unknown held msg record layout' - continue - # Here's the new layout - self.__db[id] = when, sender, subject, reason, text, msgdata - # All done - self.__closedb() - def readMessage(path): # For backwards compatibility, we must be able to read either a flat text # file or a pickle. ext = os.path.splitext(path)[1] - fp = open(path) - try: + with open(path) as fp: if ext == '.txt': msg = email.message_from_file(fp, Message.Message) else: assert ext == '.pck' msg = cPickle.load(fp) - finally: - fp.close() return msg diff --git a/Mailman/LockFile.py b/Mailman/LockFile.py index b240ce5a4..d83cef7e2 100644 --- a/Mailman/LockFile.py +++ b/Mailman/LockFile.py @@ -321,6 +321,16 @@ class LockFile: if self._owned: self.finalize() + # Python 2.5 context manager protocol support. + def __enter__(self): + self.lock() + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.unlock() + # Don't suppress any exception that might have occurred. + return False + # Use these only if you're transfering ownership to a child process across # a fork. Use at your own risk, but it should be race-condition safe. # _transfer_to() is called in the parent, passing in the pid of the child. diff --git a/Mailman/MailList.py b/Mailman/MailList.py index cb310dd74..343040157 100644 --- a/Mailman/MailList.py +++ b/Mailman/MailList.py @@ -36,8 +36,10 @@ import email.Iterators from UserDict import UserDict from cStringIO import StringIO +from string import Template from types import MethodType from urlparse import urlparse +from zope.interface import implements from email.Header import Header from email.Utils import getaddresses, formataddr, parseaddr @@ -49,7 +51,8 @@ from Mailman import Version from Mailman import database from Mailman.UserDesc import UserDesc from Mailman.configuration import config -from Mailman.database.languages import Language +from Mailman.database.tables.languages import Language +from Mailman.interfaces import * # Base classes from Mailman import Pending @@ -89,84 +92,49 @@ slog = logging.getLogger('mailman.subscribe') class MailList(object, HTMLFormatter, Deliverer, ListAdmin, Archiver, Digester, SecurityManager, Bouncer, GatewayManager, Autoresponder, TopicMgr, Pending.Pending): - def __new__(cls, *args, **kws): - # Search positional and keyword arguments to find the name of the - # existing list that is being opened, with the latter taking - # precedence. If no name can be found, then make sure there are no - # arguments, otherwise it's an error. - if 'name' in kws: - listname = kws.pop('name') - elif not args: - if not kws: - # We're probably being created from the ORM layer, so just let - # the super class do its thing. - return super(MailList, cls).__new__(cls, *args, **kws) - raise ValueError("'name' argument required'") - else: - listname = args[0] - fqdn_listname = Utils.fqdn_listname(listname) - listname, hostname = Utils.split_listname(fqdn_listname) - mlist = database.find_list(listname, hostname) - if not mlist: - raise Errors.MMUnknownListError(fqdn_listname) - return mlist - # - # A MailList object's basic Python object model support - # - def __init__(self, name=None, lock=True, check_version=True): - # No timeout by default. If you want to timeout, open the list - # unlocked, then lock explicitly. - # + implements( + IMailingList, + IMailingListAddresses, + IMailingListIdentity, + IMailingListRosters, + ) + + def __init__(self, data): + self._data = data # Only one level of mixin inheritance allowed for baseclass in self.__class__.__bases__: if hasattr(baseclass, '__init__'): baseclass.__init__(self) # Initialize volatile attributes - self.InitTempVars(name, check_version) - # This extension mechanism allows list-specific overrides of any - # method (well, except __init__(), InitTempVars(), and InitVars() - # I think). Note that fullpath() will return None when we're creating - # the list, which will only happen when name is None. - if name is None: - return - filename = os.path.join(self.fullpath(), 'extend.py') - dict = {} + self.InitTempVars() + # Give the extension mechanism a chance to process this list. try: - execfile(filename, dict) - except IOError, e: - # Ignore missing files, but log other errors - if e.errno == errno.ENOENT: - pass - else: - elog.error('IOError reading list extension: %s', e) + from Mailman.ext import init_mlist + except ImportError: + pass else: - func = dict.get('extend') - if func: - func(self) - if lock: - # This will load the database. - self.Lock() - else: - self.Load(name, check_version) + init_mlist(self) def __getattr__(self, name): + missing = object() if name.startswith('_'): return super(MailList, self).__getattr__(name) - # Because we're using delegation, we want to be sure that attribute - # access to a delegated member function gets passed to the - # sub-objects. This of course imposes a specific name resolution - # order. - try: - return getattr(self._memberadaptor, name) - except AttributeError: - for guicomponent in self._gui: - try: - return getattr(guicomponent, name) - except AttributeError: - pass - else: - raise AttributeError(name) + # Delegate to the database model object if it has the attribute. + obj = getattr(self._data, name, missing) + if obj is not missing: + return obj + # Delegate to the member adapter next. + obj = getattr(self._memberadaptor, name, missing) + if obj is not missing: + return obj + # Finally, delegate to one of the gui components. + for guicomponent in self._gui: + obj = getattr(guicomponent, name, missing) + if obj is not missing: + return obj + # Nothing left to delegate to, so it's got to be an error. + raise AttributeError(name) def __repr__(self): if self.Locked(): @@ -212,43 +180,63 @@ class MailList(object, HTMLFormatter, Deliverer, ListAdmin, # # Useful accessors # - def internal_name(self): - return self._internal_name - - def fullpath(self): + @property + def full_path(self): return self._full_path + + + # IMailingListIdentity + @property def fqdn_listname(self): - return '%s@%s' % (self._internal_name, self.host_name) + return Utils.fqdn_listname(self._data.list_name, self._data.host_name) + + + + # IMailingListAddresses + + @property + def posting_address(self): + return self.fqdn_listname @property - def no_reply_address(self): + def noreply_address(self): return '%s@%s' % (config.NO_REPLY_ADDRESS, self.host_name) - def getListAddress(self, extra=None): - if extra is None: - return self.fqdn_listname - return '%s-%s@%s' % (self.internal_name(), extra, self.host_name) + @property + def owner_address(self): + return '%s-owner@%s' % (self.list_name, self.host_name) + + @property + def request_address(self): + return '%s-request@%s' % (self.list_name, self.host_name) - # For backwards compatibility - def GetBouncesEmail(self): - return self.getListAddress('bounces') + @property + def bounces_address(self): + return '%s-bounces@%s' % (self.list_name, self.host_name) - def GetOwnerEmail(self): - return self.getListAddress('owner') + @property + def join_address(self): + return '%s-join@%s' % (self.list_name, self.host_name) - def GetRequestEmail(self, cookie=''): - if config.VERP_CONFIRMATIONS and cookie: - return self.GetConfirmEmail(cookie) - else: - return self.getListAddress('request') + @property + def leave_address(self): + return '%s-leave@%s' % (self.list_name, self.host_name) + + @property + def subscribe_address(self): + return '%s-subscribe@%s' % (self.list_name, self.host_name) + + @property + def unsubscribe_address(self): + return '%s-unsubscribe@%s' % (self.list_name, self.host_name) - def GetConfirmEmail(self, cookie): - return config.VERP_CONFIRM_FORMAT % { - 'addr' : '%s-confirm' % self.internal_name(), - 'cookie': cookie, - } + '@' + self.host_name + def confirm_address(self, cookie): + local_part = Template(config.VERP_CONFIRM_FORMAT).safe_substitute( + address = '%s-confirm' % self.list_name, + cookie = cookie) + return '%s@%s' % (local_part, self.host_name) def GetConfirmJoinSubject(self, listname, cookie): if config.VERP_CONFIRMATIONS and cookie: @@ -303,12 +291,11 @@ class MailList(object, HTMLFormatter, Deliverer, ListAdmin, user = Utils.ObscureEmail(user) return '%s/%s' % (url, urllib.quote(user.lower())) - # # Instance and subcomponent initialization # - def InitTempVars(self, name, check_version=True): + def InitTempVars(self): """Set transient variables of this and inherited classes.""" # Because of the semantics of the database layer, it's possible that # this method gets called more than once on an existing object. For @@ -325,27 +312,9 @@ class MailList(object, HTMLFormatter, Deliverer, ListAdmin, __import__(adaptor_module) mod = sys.modules[adaptor_module] self._memberadaptor = getattr(mod, adaptor_class)(self) - # The timestamp is set whenever we load the state from disk. If our - # timestamp is newer than the modtime of the config.pck file, we don't - # need to reload, otherwise... we do. - self._timestamp = 0 - self._make_lock(name or '<site>') - # XXX FIXME Sometimes name is fully qualified, sometimes it's not. - if name: - if '@' in name: - self._internal_name, self.host_name = name.split('@', 1) - self._full_path = os.path.join(config.LIST_DATA_DIR, name) - else: - self._internal_name = name - self.host_name = config.DEFAULT_EMAIL_HOST - if check_version: - self._full_path = os.path.join(config.LIST_DATA_DIR, - name + '@' + - self.host_name) - else: - self._full_path = os.path.join(config.LIST_DATA_DIR, name) - else: - self._full_path = '' + self._make_lock(self.fqdn_listname) + self._full_path = os.path.join(config.LIST_DATA_DIR, + self.fqdn_listname) # Only one level of mixin inheritance allowed for baseclass in self.__class__.__bases__: if hasattr(baseclass, 'InitTempVars'): @@ -597,18 +566,9 @@ class MailList(object, HTMLFormatter, Deliverer, ListAdmin, self.SaveRequestsDb() self.CheckHTMLArchiveDir() - def Load(self, fqdn_listname=None, check_version=True): - if fqdn_listname is None: - fqdn_listname = self.fqdn_listname - if not Utils.list_exists(fqdn_listname): - raise Errors.MMUnknownListError(fqdn_listname) + def Load(self): database.load(self) self._memberadaptor.load() - if check_version: - # XXX for now disable version checks. We'll fold this into schema - # updates eventually. - #self.CheckVersion(dict) - self.CheckValues() @@ -623,7 +583,6 @@ class MailList(object, HTMLFormatter, Deliverer, ListAdmin, self.InitVars() # Then reload the database (but don't recurse). Force a reload even # if we have the most up-to-date state. - self._timestamp = 0 self.Load(self.fqdn_listname, check_version=False) # We must hold the list lock in order to update the schema waslocked = self.Locked() @@ -955,7 +914,7 @@ class MailList(object, HTMLFormatter, Deliverer, ListAdmin, self.setMemberName(addr, name) if not globally: return - for listname in Utils.list_names(): + for listname in config.list_manager.names: # Don't bother with ourselves if listname == self.internal_name(): continue @@ -1047,7 +1006,7 @@ class MailList(object, HTMLFormatter, Deliverer, ListAdmin, # oldaddr is a member. if not globally: return - for listname in Utils.list_names(): + for listname in config.list_manager.names: # Don't bother with ourselves if listname == self.internal_name(): continue diff --git a/Mailman/Makefile.in b/Mailman/Makefile.in index 43536ec22..e71d86ce8 100644 --- a/Mailman/Makefile.in +++ b/Mailman/Makefile.in @@ -44,7 +44,7 @@ SHELL= /bin/sh MODULES= $(srcdir)/*.py SUBDIRS= Cgi Archiver Handlers Bouncers Queue MTA Gui Commands \ - bin database testing + bin database docs ext interfaces testing # Modes for directories and executables created by the install # process. Default to group-writable directories but diff --git a/Mailman/Pending.py b/Mailman/Pending.py index f5794453d..1d133e018 100644 --- a/Mailman/Pending.py +++ b/Mailman/Pending.py @@ -17,6 +17,8 @@ """Track pending actions which require confirmation.""" +from __future__ import with_statement + import os import sha import time @@ -51,7 +53,7 @@ _default = object() class Pending: def InitTempVars(self): - self.__pendfile = os.path.join(self.fullpath(), 'pending.pck') + self._pendfile = os.path.join(self.full_path, 'pending.pck') def pend_new(self, op, *content, **kws): """Create a new entry in the pending database, returning cookie for it. @@ -87,14 +89,12 @@ class Pending: def __load(self): try: - fp = open(self.__pendfile) + with open(self._pendfile) as fp: + return cPickle.load(fp) except IOError, e: - if e.errno <> errno.ENOENT: raise + if e.errno <> errno.ENOENT: + raise return {'evictions': {}} - try: - return cPickle.load(fp) - finally: - fp.close() def __save(self, db): evictions = db['evictions'] @@ -112,15 +112,12 @@ class Pending: if not db.has_key(cookie): del evictions[cookie] db['version'] = config.PENDING_FILE_SCHEMA_VERSION - tmpfile = '%s.tmp.%d.%d' % (self.__pendfile, os.getpid(), now) - fp = open(tmpfile, 'w') - try: + tmpfile = '%s.tmp.%d.%d' % (self._pendfile, os.getpid(), now) + with open(tmpfile, 'w') as fp: cPickle.dump(db, fp) fp.flush() os.fsync(fp.fileno()) - finally: - fp.close() - os.rename(tmpfile, self.__pendfile) + os.rename(tmpfile, self._pendfile) def pend_confirm(self, cookie, expunge=True): """Return data for cookie, or None if not found. diff --git a/Mailman/Queue/LMTPRunner.py b/Mailman/Queue/LMTPRunner.py index 0d2214641..81c912653 100644 --- a/Mailman/Queue/LMTPRunner.py +++ b/Mailman/Queue/LMTPRunner.py @@ -48,7 +48,6 @@ import asyncore from email.utils import parseaddr -from Mailman import Utils from Mailman.Message import Message from Mailman.Queue.Runner import Runner from Mailman.Queue.sbcache import get_switchboard @@ -122,7 +121,7 @@ class LMTPRunner(Runner, smtpd.SMTPServer): # since the set of mailing lists could have changed. However, on # a big site this could be fairly expensive, so we may need to # cache this in some way. - listnames = Utils.list_names() + listnames = set(config.list_manager.names) # Parse the message data. XXX Should we reject the message # immediately if it has defects? Usually only spam has defects. msg = email.message_from_string(data, Message) diff --git a/Mailman/Queue/MaildirRunner.py b/Mailman/Queue/MaildirRunner.py index 012aacc4a..ff193bf22 100644 --- a/Mailman/Queue/MaildirRunner.py +++ b/Mailman/Queue/MaildirRunner.py @@ -56,7 +56,6 @@ import logging from email.Parser import Parser from email.Utils import parseaddr -from Mailman import Utils from Mailman.Message import Message from Mailman.Queue.Runner import Runner from Mailman.Queue.sbcache import get_switchboard @@ -101,9 +100,8 @@ class MaildirRunner(Runner): self._parser = Parser(Message) def _oneloop(self): - # Refresh this each time through the list. BAW: could be too - # expensive. - listnames = Utils.list_names() + # Refresh this each time through the list. + listnames = list(config.list_manager.names) # Cruise through all the files currently in the new/ directory try: files = os.listdir(self._dir) diff --git a/Mailman/Queue/Runner.py b/Mailman/Queue/Runner.py index 4b782b3e3..2045022fa 100644 --- a/Mailman/Queue/Runner.py +++ b/Mailman/Queue/Runner.py @@ -92,16 +92,16 @@ class Runner: # Ask the switchboard for the message and metadata objects # associated with this filebase. msg, msgdata = self._switchboard.dequeue(filebase) - except email.Errors.MessageParseError, e: - # It's possible to get here if the message was stored in the - # pickle in plain text, and the metadata had a _parsemsg key - # that was true, /and/ if the message had some bogosity in - # it. It's almost always going to be spam or bounced spam. - # There's not much we can do (and we didn't even get the - # metadata, so just log the exception and continue. + except Exception, e: + # This used to just catch email.Errors.MessageParseError, + # but other problems can occur in message parsing, e.g. + # ValueError, and exceptions can occur in unpickling too. + # We don't want the runner to die, so we just log and skip + # this entry, but preserve it for analysis. self._log(e) - log.error('Ignoring unparseable message: %s', filebase) - self._switchboard.finish(filebase) + log.error('Skipping and preserving unparseable message: %s', + filebase) + self._switchboard.finish(filebase, preserve=True) continue try: self._onefile(msg, msgdata) @@ -116,9 +116,21 @@ class Runner: self._log(e) # Put a marker in the metadata for unshunting msgdata['whichq'] = self._switchboard.whichq() - new_filebase = self._shunt.enqueue(msg, msgdata) - log.error('SHUNTING: %s', new_filebase) - self._switchboard.finish(filebase) + # It is possible that shunting can throw an exception, e.g. a + # permissions problem or a MemoryError due to a really large + # message. Try to be graceful. + try: + new_filebase = self._shunt.enqueue(msg, msgdata) + log.error('SHUNTING: %s', new_filebase) + self._switchboard.finish(filebase) + except Exception, e: + # The message wasn't successfully shunted. Log the + # exception and try to preserve the original queue entry + # for possible analysis. + self._log(e) + log.error('SHUNTING FAILED, preserving original entry: %s', + filebase) + self._switchboard.finish(filebase, preserve=True) # Other work we want to do each time through the loop Utils.reap(self._kids, once=True) self._doperiodic() diff --git a/Mailman/Queue/Switchboard.py b/Mailman/Queue/Switchboard.py index fabb1d099..6f5cd6222 100644 --- a/Mailman/Queue/Switchboard.py +++ b/Mailman/Queue/Switchboard.py @@ -149,12 +149,20 @@ class Switchboard: msg = email.message_from_string(msg, Message.Message) return msg, data - def finish(self, filebase): + def finish(self, filebase, preserve=False): bakfile = os.path.join(self.__whichq, filebase + '.bak') try: - os.unlink(bakfile) + if preserve: + psvfile = os.path.join(config.SHUNTQUEUE_DIR, + filebase + '.psv') + # Create the directory if it doesn't yet exist. + Utils.makedirs(config.SHUNTQUEUE_DIR, 0770) + os.rename(bakfile, psvfile) + else: + os.unlink(bakfile) except EnvironmentError, e: - elog.exception('Failed to unlink backup file: %s', bakfile) + elog.exception('Failed to unlink/preserve backup file: %s', + bakfile) def files(self, extension='.pck'): times = {} diff --git a/Mailman/Utils.py b/Mailman/Utils.py index afb2f1fd5..27a61567e 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -40,7 +40,6 @@ from email.Errors import HeaderParseError from string import ascii_letters, digits, whitespace from Mailman import Errors -from Mailman import database from Mailman import passwords from Mailman.SafeDict import SafeDict from Mailman.configuration import config @@ -66,13 +65,13 @@ log = logging.getLogger('mailman.error') def list_exists(fqdn_listname): """Return true iff list `fqdn_listname' exists.""" listname, hostname = split_listname(fqdn_listname) - return bool(database.find_list(listname, hostname)) + return bool(config.list_manager.find_list(listname, hostname)) def list_names(): """Return the fqdn names of all lists in default list directory.""" return ['%s@%s' % (listname, hostname) - for listname, hostname in database.get_list_names()] + for listname, hostname in config.list_manager.get_list_names()] def split_listname(listname): @@ -81,8 +80,10 @@ def split_listname(listname): return listname, config.DEFAULT_EMAIL_HOST -def fqdn_listname(listname): - return AT.join(split_listname(listname)) +def fqdn_listname(listname, hostname=None): + if hostname is None: + return AT.join(split_listname(listname)) + return AT.join((listname, hostname)) diff --git a/Mailman/bin/bumpdigests.py b/Mailman/bin/bumpdigests.py index 602ecd763..94a010950 100644 --- a/Mailman/bin/bumpdigests.py +++ b/Mailman/bin/bumpdigests.py @@ -20,7 +20,6 @@ import optparse from Mailman import Errors from Mailman import MailList -from Mailman import Utils from Mailman import Version from Mailman.configuration import config from Mailman.i18n import _ @@ -52,7 +51,7 @@ def main(): opts, args, parser = parseargs() config.load(opts.config) - listnames = set(args or Utils.list_names()) + listnames = set(args or config.list_manager.names) if not listnames: print _('Nothing to do.') sys.exit(0) diff --git a/Mailman/bin/change_pw.py b/Mailman/bin/change_pw.py index 57080d4fa..3830b76ae 100644 --- a/Mailman/bin/change_pw.py +++ b/Mailman/bin/change_pw.py @@ -114,13 +114,10 @@ def main(): # Cull duplicates domains = set(opts.domains) - if opts.all: - listnames = set(Utils.list_names()) - else: - listnames = set(opts.listnames) + listnames = set(config.list_manager.names if opts.all else opts.listnames) if domains: - for name in Utils.list_names(): + for name in config.list_manager.names: mlist = openlist(name) if mlist.host_name in domains: listnames.add(name) diff --git a/Mailman/bin/checkdbs.py b/Mailman/bin/checkdbs.py index 1423421c9..691417780 100755 --- a/Mailman/bin/checkdbs.py +++ b/Mailman/bin/checkdbs.py @@ -132,7 +132,7 @@ def main(): i18n.set_language(config.DEFAULT_SERVER_LANGUAGE) - for name in Utils.list_names(): + for name in config.list_manager.names: # The list must be locked in order to open the requests database mlist = MailList.MailList(name) try: diff --git a/Mailman/bin/disabled.py b/Mailman/bin/disabled.py index 36999793b..81916e7d9 100644 --- a/Mailman/bin/disabled.py +++ b/Mailman/bin/disabled.py @@ -23,7 +23,6 @@ from Mailman import Errors from Mailman import MailList from Mailman import MemberAdaptor from Mailman import Pending -from Mailman import Utils from Mailman import Version from Mailman import loginit from Mailman.Bouncer import _BounceInfo @@ -122,7 +121,7 @@ def main(): elog = logging.getLogger('mailman.error') blog = logging.getLogger('mailman.bounce') - listnames = set(opts.listnames or Utils.list_names()) + listnames = set(opts.listnames or config.list_manager.names) who = tuple(opts.who) msg = _('[disabled by periodic sweep and cull, no message available]') diff --git a/Mailman/bin/export.py b/Mailman/bin/export.py index b0b5519ef..42b5a17b0 100644 --- a/Mailman/bin/export.py +++ b/Mailman/bin/export.py @@ -31,7 +31,6 @@ from xml.sax.saxutils import escape from Mailman import Defaults from Mailman import Errors from Mailman import MemberAdaptor -from Mailman import Utils from Mailman import Version from Mailman.MailList import MailList from Mailman.configuration import config @@ -308,7 +307,7 @@ def main(): listname = '%s@%s' % (listname, config.DEFAULT_EMAIL_HOST) listnames.append(listname) else: - listnames = Utils.list_names() + listnames = config.list_manager.names dumper.dump(listnames) dumper.close() finally: diff --git a/Mailman/bin/find_member.py b/Mailman/bin/find_member.py index a0116cd03..187345bfe 100644 --- a/Mailman/bin/find_member.py +++ b/Mailman/bin/find_member.py @@ -21,7 +21,6 @@ import optparse from Mailman import Errors from Mailman import MailList -from Mailman import Utils from Mailman import Version from Mailman.configuration import config from Mailman.i18n import _ @@ -79,9 +78,8 @@ def main(): parser, opts, args = parseargs() config.load(opts.config) - if not opts.listnames: - opts.listnames = Utils.list_names() - includes = set(listname.lower() for listname in opts.listnames) + listnames = opts.listnames or config.list_manager.names + includes = set(listname.lower() for listname in listnames) excludes = set(listname.lower() for listname in opts.excludes) listnames = includes - excludes diff --git a/Mailman/bin/gate_news.py b/Mailman/bin/gate_news.py index 71cf060d8..491660f2f 100644 --- a/Mailman/bin/gate_news.py +++ b/Mailman/bin/gate_news.py @@ -164,7 +164,7 @@ def poll_newsgroup(mlist, conn, first, last, glock): def process_lists(glock): - for listname in Utils.list_names(): + for listname in config.list_manager.names: glock.refresh() # Open the list unlocked just to check to see if it is gating news to # mail. If not, we're done with the list. Otherwise, lock the list diff --git a/Mailman/bin/genaliases.py b/Mailman/bin/genaliases.py index 4ce8160fd..239f88c91 100644 --- a/Mailman/bin/genaliases.py +++ b/Mailman/bin/genaliases.py @@ -21,7 +21,6 @@ import sys import optparse from Mailman import MailList -from Mailman import Utils from Mailman import Version from Mailman.configuration import config from Mailman.i18n import _ @@ -68,7 +67,7 @@ def main(): lock.lock() # Group lists by virtual hostname mlists = {} - for listname in Utils.list_names(): + for listname in config.list_manager.names: mlist = MailList.MailList(listname, lock=False) mlists.setdefault(mlist.host_name, []).append(mlist) try: diff --git a/Mailman/bin/list_lists.py b/Mailman/bin/list_lists.py index b4ca44366..14a57f002 100644 --- a/Mailman/bin/list_lists.py +++ b/Mailman/bin/list_lists.py @@ -19,7 +19,6 @@ import optparse from Mailman import Defaults from Mailman import MailList -from Mailman import Utils from Mailman import Version from Mailman.i18n import _ from Mailman.initialize import initialize @@ -66,12 +65,10 @@ def main(): parser, opts, args = parseargs() initialize(opts.config) - names = list(Utils.list_names()) - names.sort() mlists = [] longest = 0 - for n in names: + for n in sorted(config.list_manager.names): mlist = MailList.MailList(n, lock=False) if opts.advertised and not mlist.advertised: continue diff --git a/Mailman/bin/list_owners.py b/Mailman/bin/list_owners.py index b9f12047d..5bc01eeee 100644 --- a/Mailman/bin/list_owners.py +++ b/Mailman/bin/list_owners.py @@ -18,7 +18,6 @@ import sys import optparse -from Mailman import Utils from Mailman import Version from Mailman.MailList import MailList from Mailman.configuration import config @@ -55,7 +54,7 @@ def main(): parser, opts, args = parseargs() config.load(opts.config) - listnames = args or Utils.list_names() + listnames = set(args or config.list_manager.names) bylist = {} for listname in listnames: diff --git a/Mailman/bin/nightly_gzip.py b/Mailman/bin/nightly_gzip.py index 4bd9271bc..efd054293 100644 --- a/Mailman/bin/nightly_gzip.py +++ b/Mailman/bin/nightly_gzip.py @@ -25,7 +25,6 @@ except ImportError: sys.exit(0) from Mailman import MailList -from Mailman import Utils from Mailman import Version from Mailman.configuration import config from Mailman.i18n import _ @@ -86,7 +85,7 @@ def main(): return # Process all the specified lists - for listname in set(args or Utils.list_names()): + for listname in set(args or config.list_manager.names): mlist = MailList.MailList(listname, lock=False) if not mlist.archive: continue diff --git a/Mailman/bin/senddigests.py b/Mailman/bin/senddigests.py index 96e3cfabd..a2c7089df 100644 --- a/Mailman/bin/senddigests.py +++ b/Mailman/bin/senddigests.py @@ -19,7 +19,6 @@ import sys import optparse from Mailman import MailList -from Mailman import Utils from Mailman import Version from Mailman.i18n import _ from Mailman.initialize import initialize @@ -59,7 +58,7 @@ def main(): opts, args, parser = parseargs() initialize(opts.config) - for listname in set(opts.listnames or Utils.list_names()): + for listname in set(opts.listnames or config.list_manager.names): mlist = MailList.MailList(listname, lock=False) if mlist.digest_send_periodic: mlist.Lock() diff --git a/Mailman/bin/update.py b/Mailman/bin/update.py index 281f40420..93bb0021b 100644 --- a/Mailman/bin/update.py +++ b/Mailman/bin/update.py @@ -242,10 +242,6 @@ def dolist(listname): for addr in noinfo.keys(): mlist.setDeliveryStatus(addr, ENABLED) - # Update the held requests database - print _("""Updating the held requests database.""") - mlist._UpdateRecords() - mbox_dir = make_varabs('archives/private/%s.mbox' % (listname)) mbox_file = make_varabs('archives/private/%s.mbox/%s' % (listname, listname)) @@ -538,121 +534,6 @@ def dequeue(filebase): -def update_pending(): - file20 = os.path.join(config.DATA_DIR, 'pending_subscriptions.db') - file214 = os.path.join(config.DATA_DIR, 'pending.pck') - db = None - # Try to load the Mailman 2.0 file - try: - fp = open(file20) - except IOError, e: - if e.errno <> errno.ENOENT: - raise - else: - print _('Updating Mailman 2.0 pending_subscriptions.db database') - db = marshal.load(fp) - # Convert to the pre-Mailman 2.1.5 format - db = Pending._update(db) - if db is None: - # Try to load the Mailman 2.1.x where x < 5, file - try: - fp = open(file214) - except IOError, e: - if e.errno <> errno.ENOENT: - raise - else: - print _('Updating Mailman 2.1.4 pending.pck database') - db = cPickle.load(fp) - if db is None: - print _('Nothing to do.') - return - # Now upgrade the database to the 2.1.5 format. Each list now has its own - # pending.pck file, but only the RE_ENABLE operation actually recorded the - # listname in the request. For the SUBSCRIPTION, UNSUBSCRIPTION, and - # CHANGE_OF_ADDRESS operations, we know the address of the person making - # the request so we can repend this request just for the lists the person - # is a member of. For the HELD_MESSAGE operation, we can check the list's - # requests.pck file for correlation. Evictions will take care of any - # misdirected pendings. - reenables_by_list = {} - addrops_by_address = {} - holds_by_id = {} - subs_by_address = {} - for key, val in db.items(): - if key in ('evictions', 'version'): - continue - try: - op = val[0] - data = val[1:] - except (IndexError, ValueError): - print _('Ignoring bad pended data: $key: $val') - continue - if op in (Pending.UNSUBSCRIPTION, Pending.CHANGE_OF_ADDRESS): - # data[0] is the address being unsubscribed - addrops_by_address.setdefault(data[0], []).append((key, val)) - elif op == Pending.SUBSCRIPTION: - # data[0] is a UserDesc object - addr = data[0].address - subs_by_address.setdefault(addr, []).append((key, val)) - elif op == Pending.RE_ENABLE: - # data[0] is the mailing list's internal name - reenables_by_list.setdefault(data[0], []).append((key, val)) - elif op == Pending.HELD_MESSAGE: - # data[0] is the hold id. There better only be one entry per id - id = data[0] - if holds_by_id.has_key(id): - print _('WARNING: Ignoring duplicate pending ID: $id.') - else: - holds_by_id[id] = (key, val) - # Now we have to lock every list and re-pend all the appropriate - # requests. Note that this will reset all the expiration dates, but that - # should be fine. - for listname in Utils.list_names(): - mlist = MailList.MailList(listname) - # This is not the most efficient way to do this because it loads and - # saves the pending.pck file each time. :( - try: - for cookie, data in reenables_by_list.get(listname, []): - mlist.pend_repend(cookie, data) - for id, (cookie, data) in holds_by_id.items(): - try: - rec = mlist.GetRecord(id) - except KeyError: - # Not for this list - pass - else: - mlist.pend_repend(cookie, data) - del holds_by_id[id] - for addr, recs in subs_by_address.items(): - # We shouldn't have a subscription confirmation if the address - # is already a member of the mailing list. - if mlist.isMember(addr): - continue - for cookie, data in recs: - mlist.pend_repend(cookie, data) - for addr, recs in addrops_by_address.items(): - # We shouldn't have unsubscriptions or change of address - # requests for addresses which aren't members of the list. - if not mlist.isMember(addr): - continue - for cookie, data in recs: - mlist.pend_repend(cookie, data) - mlist.Save() - finally: - mlist.Unlock() - try: - os.unlink(file20) - except OSError, e: - if e.errno <> errno.ENOENT: - raise - try: - os.unlink(file214) - except OSError, e: - if e.errno <> errno.ENOENT: - raise - - - def main(): parser, opts, args = parseargs() initialize(opts.config) @@ -682,8 +563,7 @@ Exiting.""") 'scripts/mailowner', 'mail/wrapper', 'Mailman/pythonlib', 'cgi-bin/archives', 'Mailman/MailCommandHandler'): remove_old_sources(mod) - listnames = Utils.list_names() - if not listnames: + if not config.list_manager.names: print _('no lists == nothing to do, exiting') return # For people with web archiving, make sure the directories @@ -695,7 +575,7 @@ If your archives are big, this could take a minute or two...""") os.path.walk("%s/public_html/archives" % config.PREFIX, archive_path_fixer, "") print _('done') - for listname in listnames: + for listname in config.list_manager.names: # With 2.2.0a0, all list names grew an @domain suffix. If you find a # list without that, move it now. if not '@' in listname: @@ -732,10 +612,6 @@ If your archives are big, this could take a minute or two...""") mlist.Unlock() os.unlink(wmfile) print _('- usenet watermarks updated and gate_watermarks removed') - # In Mailman 2.1, the pending database format and file name changed, but - # in Mailman 2.1.5 it changed again. This should update all existing - # files to the 2.1.5 format. - update_pending() # In Mailman 2.1, the qfiles directory has a different structure and a # different content. Also, in Mailman 2.1.5 we collapsed the message # files from separate .msg (pickled Message objects) and .db (marshalled diff --git a/Mailman/bin/withlist.py b/Mailman/bin/withlist.py index b108e4a18..ac1ab0aac 100644 --- a/Mailman/bin/withlist.py +++ b/Mailman/bin/withlist.py @@ -22,7 +22,6 @@ import optparse from Mailman import Errors from Mailman import MailList -from Mailman import Utils from Mailman import Version from Mailman import interact from Mailman.configuration import config @@ -235,7 +234,8 @@ def main(): r = None if opts.all: - r = [do_list(listname, args, func) for listname in Utils.list_names()] + r = [do_list(listname, args, func) + for listname in config.list_manager.names] elif dolist: listname = args.pop(0).lower().strip() r = do_list(listname, args, func) diff --git a/Mailman/configuration.py b/Mailman/configuration.py index a0d35e483..3247204b3 100644 --- a/Mailman/configuration.py +++ b/Mailman/configuration.py @@ -97,6 +97,7 @@ class Configuration(object): self.DATA_DIR = datadir = os.path.join(VAR_PREFIX, 'data') self.ETC_DIR = etcdir = os.path.join(VAR_PREFIX, 'etc') self.SPAM_DIR = os.path.join(VAR_PREFIX, 'spam') + self.EXT_DIR = os.path.join(VAR_PREFIX, 'ext') self.WRAPPER_DIR = os.path.join(EXEC_PREFIX, 'mail') self.BIN_DIR = os.path.join(PREFIX, 'bin') self.SCRIPTS_DIR = os.path.join(PREFIX, 'scripts') diff --git a/Mailman/constants.py b/Mailman/constants.py new file mode 100644 index 000000000..852704364 --- /dev/null +++ b/Mailman/constants.py @@ -0,0 +1,44 @@ +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Various constants and enumerations.""" + +from munepy import Enum + + + +class DeliveryMode(Enum): + # Regular (i.e. non-digest) delivery + regular = 1 + # Plain text digest delivery + plaintext_digests = 2 + # MIME digest delivery + mime_digests = 3 + # Summary digests + summary_digests = 4 + + + +class DeliveryStatus(Enum): + # Delivery is enabled + enabled = 1 + # Delivery was disabled by the user + by_user = 2 + # Delivery was disabled due to bouncing addresses + by_bounces = 3 + # Delivery was disabled by an administrator or moderator + by_moderator = 4 diff --git a/Mailman/database/Makefile.in b/Mailman/database/Makefile.in index 8936d791b..56fcb3f29 100644 --- a/Mailman/database/Makefile.in +++ b/Mailman/database/Makefile.in @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# Copyright (C) 2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -42,6 +42,7 @@ PACKAGEDIR= $(prefix)/Mailman/database SHELL= /bin/sh MODULES= *.py +SUBDIRS= tables model # Modes for directories and executables created by the install # process. Default to group-writable directories but @@ -55,17 +56,37 @@ INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE) # Rules all: + for d in $(SUBDIRS); \ + do \ + (cd $$d; $(MAKE)); \ + done install: for f in $(MODULES); \ do \ $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \ done + for d in $(SUBDIRS); \ + do \ + (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) install); \ + done finish: + @for d in $(SUBDIRS); \ + do \ + (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) finish); \ + done clean: + for d in $(SUBDIRS); \ + do \ + (cd $$d; $(MAKE) clean); \ + done distclean: -rm *.pyc -rm Makefile + for d in $(SUBDIRS); \ + do \ + (cd $$d; $(MAKE) distclean); \ + done diff --git a/Mailman/database/__init__.py b/Mailman/database/__init__.py index 808ad9fd0..6c6312d0a 100644 --- a/Mailman/database/__init__.py +++ b/Mailman/database/__init__.py @@ -15,31 +15,35 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # USA. -# This module exposes the higher level interface methods that the rest of -# Mailman should use. It essentially hides the dbcontext and the SQLAlchemy -# session from all other code. The preferred way to use these methods is: -# -# from Mailman import database -# database.add_list(foo) +from __future__ import with_statement import os +from elixir import objectstore + +from Mailman.database.listmanager import ListManager +from Mailman.database.usermanager import UserManager + +__all__ = [ + 'initialize', + 'flush', + ] + + def initialize(): - from Mailman import database from Mailman.LockFile import LockFile from Mailman.configuration import config - from Mailman.database.dbcontext import dbcontext + from Mailman.database import model # Serialize this so we don't get multiple processes trying to create the # database at the same time. lockfile = os.path.join(config.LOCK_DIR, '<dbcreatelock>') - lock = LockFile(lockfile) - lock.lock() - try: - dbcontext.connect() - finally: - lock.unlock() - for attr in dir(dbcontext): - if attr.startswith('api_'): - exposed_name = attr[4:] - setattr(database, exposed_name, getattr(dbcontext, attr)) + with LockFile(lockfile): + model.initialize() + config.list_manager = ListManager() + config.user_manager = UserManager() + flush() + + +def flush(): + objectstore.flush() diff --git a/Mailman/database/dbcontext.py b/Mailman/database/dbcontext.py index 5421fb6f2..eaf87be93 100644 --- a/Mailman/database/dbcontext.py +++ b/Mailman/database/dbcontext.py @@ -16,19 +16,17 @@ # USA. import os +import sys import logging import weakref -from sqlalchemy import BoundMetaData, create_session +from elixir import create_all, metadata, objectstore +from sqlalchemy import create_engine from string import Template from urlparse import urlparse from Mailman import Version from Mailman.configuration import config -from Mailman.database import address -from Mailman.database import languages -from Mailman.database import listdata -from Mailman.database import version from Mailman.database.txnsupport import txn @@ -39,19 +37,9 @@ class MlistRef(weakref.ref): self.fqdn_listname = mlist.fqdn_listname -class Tables(object): - def bind(self, table, attrname=None): - if attrname is None: - attrname = table.name.lower() - setattr(self, attrname, table) - - class DBContext(object): def __init__(self): - self.tables = Tables() - self.metadata = None - self.session = None # Special transaction used only for MailList.Lock() .Save() and # .Unlock() interface. self._mlist_txns = {} @@ -75,37 +63,30 @@ class DBContext(object): # engines, and yes, we could have chmod'd the file after the fact, but # half dozen and all... self._touch(url) - self.metadata = BoundMetaData(url) - self.metadata.engine.echo = config.SQLALCHEMY_ECHO - # Create all the table objects, and then let SA conditionally create - # them if they don't yet exist. NOTE: this order matters! - for module in (languages, address, listdata, version): - module.make_table(self.metadata, self.tables) - self.metadata.create_all() - # Validate schema version, updating if necessary (XXX) - r = self.tables.version.select( - self.tables.version.c.component=='schema').execute() - row = r.fetchone() - if row is None: + engine = create_engine(url) + engine.echo = config.SQLALCHEMY_ECHO + metadata.connect(engine) + # Load and create the Elixir active records. This works by + # side-effect. + import Mailman.database.model + create_all() + # Validate schema version. + v = Mailman.database.model.Version.get_by(component='schema') + if not v: # Database has not yet been initialized - self.tables.version.insert().execute( + v = Mailman.database.model.Version( component='schema', version=Version.DATABASE_SCHEMA_VERSION) - elif row.version <> Version.DATABASE_SCHEMA_VERSION: + objectstore.flush() + elif v.version <> Version.DATABASE_SCHEMA_VERSION: # XXX Update schema - raise SchemaVersionMismatchError(row.version) - self.session = create_session() - - def close(self): - self.session.close() - self.session = None + raise SchemaVersionMismatchError(v.version) def _touch(self, url): parts = urlparse(url) - # XXX Python 2.5; use parts.scheme and parts.path - if parts[0] <> 'sqlite': + if parts.scheme <> 'sqlite': return - path = os.path.normpath(parts[2]) + path = os.path.normpath(parts.path) fd = os.open(path, os.O_WRONLY | os.O_NONBLOCK | os.O_CREAT, 0666) # Ignore errors if fd > 0: @@ -114,7 +95,7 @@ class DBContext(object): # Cooperative method for use with @txn decorator def _withtxn(self, meth, *args, **kws): try: - txn = self.session.create_transaction() + txn = objectstore.session.current.create_transaction() rtn = meth(*args, **kws) except: txn.rollback() @@ -133,7 +114,7 @@ class DBContext(object): # Don't try to re-lock a list if mlist.fqdn_listname in self._mlist_txns: return - txn = self.session.create_transaction() + txn = objectstore.session.current.create_transaction() mref = MlistRef(mlist, self._unlock_mref) # If mlist.host_name is changed, its fqdn_listname attribute will no # longer match, so its transaction will not get committed when the @@ -155,7 +136,7 @@ class DBContext(object): def api_load(self, mlist): # Mark the MailList object such that future attribute accesses will # refresh from the database. - self.session.expire(mlist) + objectstore.session.current.expire(mlist) def api_save(self, mlist): # When dealing with MailLists, .Save() will always be followed by @@ -172,29 +153,22 @@ class DBContext(object): @txn def api_add_list(self, mlist): - self.session.save(mlist) + objectstore.session.current.save(mlist) @txn def api_remove_list(self, mlist): - self.session.delete(mlist) + objectstore.session.current.delete(mlist) @txn def api_find_list(self, listname, hostname): from Mailman.MailList import MailList - q = self.session.query(MailList) + q = objectstore.session.current.query(MailList) mlists = q.select_by(list_name=listname, host_name=hostname) assert len(mlists) <= 1, 'Duplicate mailing lists!' if mlists: return mlists[0] return None - @txn - def api_get_list_names(self): - table = self.tables.listdata - results = table.select().execute() - return [(row[table.c.list_name], row[table.c.host_name]) - for row in results.fetchall()] - dbcontext = DBContext() diff --git a/Mailman/database/listmanager.py b/Mailman/database/listmanager.py new file mode 100644 index 000000000..de8abbd58 --- /dev/null +++ b/Mailman/database/listmanager.py @@ -0,0 +1,81 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""SQLAlchemy/Elixir based provider of IListManager.""" + +import weakref + +from elixir import * +from zope.interface import implements + +from Mailman import Errors +from Mailman.Utils import split_listname, fqdn_listname +from Mailman.configuration import config +from Mailman.database.model import MailingList +from Mailman.interfaces import IListManager + + + +class ListManager(object): + implements(IListManager) + + def __init__(self): + self._objectmap = weakref.WeakKeyDictionary() + + def create(self, fqdn_listname): + listname, hostname = split_listname(fqdn_listname) + mlist = MailingList.get_by(list_name=listname, + host_name=hostname) + if mlist: + raise Errors.MMListAlreadyExistsError(fqdn_listname) + mlist = MailingList(fqdn_listname) + # Wrap the database model object in an application MailList object and + # return the latter. Keep track of the wrapper so we can clean it up + # when we're done with it. + from Mailman.MailList import MailList + wrapper = MailList(mlist) + self._objectmap[mlist] = wrapper + return wrapper + + def delete(self, mlist): + # Delete the wrapped backing data. XXX It's kind of icky to reach + # into the MailList object this way. + mlist._data.delete_rosters() + mlist._data.delete() + mlist._data = None + + def get(self, fqdn_listname): + listname, hostname = split_listname(fqdn_listname) + mlist = MailingList.get_by(list_name=listname, + host_name=hostname) + if not mlist: + raise Errors.MMUnknownListError(fqdn_listname) + from Mailman.MailList import MailList + wrapper = self._objectmap.setdefault(mlist, MailList(mlist)) + return wrapper + + @property + def mailing_lists(self): + # Don't forget, the MailingList objects that this class manages must + # be wrapped in a MailList object as expected by this interface. + for fqdn_listname in self.names: + yield self.get(fqdn_listname) + + @property + def names(self): + for mlist in MailingList.select(): + yield fqdn_listname(mlist.list_name, mlist.host_name) diff --git a/Mailman/database/model/Makefile.in b/Mailman/database/model/Makefile.in new file mode 100644 index 000000000..2db8ce45e --- /dev/null +++ b/Mailman/database/model/Makefile.in @@ -0,0 +1,71 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +# NOTE: Makefile.in is converted into Makefile by the configure script +# in the parent directory. Once configure has run, you can recreate +# the Makefile by running just config.status. + +# Variables set by configure + +VPATH= @srcdir@ +srcdir= @srcdir@ +bindir= @bindir@ +prefix= @prefix@ +exec_prefix= @exec_prefix@ +DESTDIR= + +CC= @CC@ +CHMOD= @CHMOD@ +INSTALL= @INSTALL@ + +DEFS= @DEFS@ + +# Customizable but not set by configure + +OPT= @OPT@ +CFLAGS= $(OPT) $(DEFS) +PACKAGEDIR= $(prefix)/Mailman/database/model +SHELL= /bin/sh + +MODULES= *.py + +# Modes for directories and executables created by the install +# process. Default to group-writable directories but +# user-only-writable for executables. +DIRMODE= 775 +EXEMODE= 755 +FILEMODE= 644 +INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE) + + +# Rules + +all: + +install: + for f in $(MODULES); \ + do \ + $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \ + done + +finish: + +clean: + +distclean: + -rm *.pyc + -rm Makefile diff --git a/Mailman/database/model/__init__.py b/Mailman/database/model/__init__.py new file mode 100644 index 000000000..11ca11f89 --- /dev/null +++ b/Mailman/database/model/__init__.py @@ -0,0 +1,96 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +__all__ = [ + 'Address', + 'Language', + 'MailingList', + 'Profile', + 'Roster', + 'RosterSet', + 'User', + 'Version', + ] + +import os +import sys +import elixir + +from sqlalchemy import create_engine +from string import Template +from urlparse import urlparse + +import Mailman.Version + +elixir.delay_setup = True + +from Mailman import constants +from Mailman.Errors import SchemaVersionMismatchError +from Mailman.configuration import config +from Mailman.database.model.address import Address +from Mailman.database.model.language import Language +from Mailman.database.model.mailinglist import MailingList +from Mailman.database.model.profile import Profile +from Mailman.database.model.roster import Roster +from Mailman.database.model.rosterset import RosterSet +from Mailman.database.model.user import User +from Mailman.database.model.version import Version + + + +def initialize(): + # Calculate the engine url + url = Template(config.SQLALCHEMY_ENGINE_URL).safe_substitute(config.paths) + # XXX By design of SQLite, database file creation does not honor + # umask. See their ticket #1193: + # http://www.sqlite.org/cvstrac/tktview?tn=1193,31 + # + # This sucks for us because the mailman.db file /must/ be group writable, + # however even though we guarantee our umask is 002 here, it still gets + # created without the necessary g+w permission, due to SQLite's policy. + # This should only affect SQLite engines because its the only one that + # creates a little file on the local file system. This kludges around + # their bug by "touch"ing the database file before SQLite has any chance + # to create it, thus honoring the umask and ensuring the right + # permissions. We only try to do this for SQLite engines, and yes, we + # could have chmod'd the file after the fact, but half dozen and all... + touch(url) + engine = create_engine(url) + engine.echo = config.SQLALCHEMY_ECHO + elixir.metadata.connect(engine) + elixir.setup_all() + # Validate schema version. + v = Version.get_by(component='schema') + if not v: + # Database has not yet been initialized + v = Version(component='schema', + version=Mailman.Version.DATABASE_SCHEMA_VERSION) + elixir.objectstore.flush() + elif v.version <> Mailman.Version.DATABASE_SCHEMA_VERSION: + # XXX Update schema + raise SchemaVersionMismatchError(v.version) + + +def touch(url): + parts = urlparse(url) + if parts.scheme <> 'sqlite': + return + path = os.path.normpath(parts.path) + fd = os.open(path, os.O_WRONLY | os.O_NONBLOCK | os.O_CREAT, 0666) + # Ignore errors + if fd > 0: + os.close(fd) diff --git a/Mailman/database/model/address.py b/Mailman/database/model/address.py new file mode 100644 index 000000000..53d5016e5 --- /dev/null +++ b/Mailman/database/model/address.py @@ -0,0 +1,46 @@ +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +from elixir import * +from email.utils import formataddr +from zope.interface import implements + +from Mailman.interfaces import IAddress + + +ROSTER_KIND = 'Mailman.database.model.roster.Roster' +USER_KIND = 'Mailman.database.model.user.User' + + +class Address(Entity): + implements(IAddress) + + has_field('address', Unicode) + has_field('real_name', Unicode) + has_field('verified', Boolean) + has_field('registered_on', DateTime) + has_field('validated_on', DateTime) + # Relationships + has_and_belongs_to_many('rosters', of_kind=ROSTER_KIND) + belongs_to('user', of_kind=USER_KIND) + + def __str__(self): + return formataddr((self.real_name, self.address)) + + def __repr__(self): + return '<Address: %s [%s]>' % ( + str(self), ('verified' if self.verified else 'not verified')) diff --git a/Mailman/database/address.py b/Mailman/database/model/language.py index 672a366b1..3597a128d 100644 --- a/Mailman/database/address.py +++ b/Mailman/database/model/language.py @@ -15,16 +15,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # USA. -"""Email addresses.""" +from elixir import * -from sqlalchemy import * - - -def make_table(metadata, tables): - table = Table( - 'Address', metadata, - Column('address_id', Integer, primary_key=True), - Column('address', Unicode(4096)), - ) - tables.bind(table) +class Language(Entity): + has_field('code', Unicode) diff --git a/Mailman/database/model/mailinglist.py b/Mailman/database/model/mailinglist.py new file mode 100644 index 000000000..28e2c11dc --- /dev/null +++ b/Mailman/database/model/mailinglist.py @@ -0,0 +1,275 @@ +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +from elixir import * +from zope.interface import implements + +from Mailman.Utils import fqdn_listname, split_listname +from Mailman.configuration import config +from Mailman.interfaces import * + + + +class MailingList(Entity): + implements( + IMailingList, + IMailingListAddresses, + IMailingListIdentity, + IMailingListRosters, + ) + + # List identity + has_field('list_name', Unicode), + has_field('host_name', Unicode), + # Attributes not directly modifiable via the web u/i + has_field('web_page_url', Unicode), + has_field('admin_member_chunksize', Integer), + # Attributes which are directly modifiable via the web u/i. The more + # complicated attributes are currently stored as pickles, though that + # will change as the schema and implementation is developed. + has_field('next_request_id', Integer), + has_field('next_digest_number', Integer), + has_field('admin_responses', PickleType), + has_field('postings_responses', PickleType), + has_field('request_responses', PickleType), + has_field('digest_last_sent_at', Float), + has_field('one_last_digest', PickleType), + has_field('volume', Integer), + has_field('last_post_time', Float), + # OldStyleMemberships attributes, temporarily stored as pickles. + has_field('bounce_info', PickleType), + has_field('delivery_status', PickleType), + has_field('digest_members', PickleType), + has_field('language', PickleType), + has_field('members', PickleType), + has_field('passwords', PickleType), + has_field('topics_userinterest', PickleType), + has_field('user_options', PickleType), + has_field('usernames', PickleType), + # Attributes which are directly modifiable via the web u/i. The more + # complicated attributes are currently stored as pickles, though that + # will change as the schema and implementation is developed. + has_field('accept_these_nonmembers', PickleType), + has_field('acceptable_aliases', PickleType), + has_field('admin_immed_notify', Boolean), + has_field('admin_notify_mchanges', Boolean), + has_field('administrivia', Boolean), + has_field('advertised', Boolean), + has_field('anonymous_list', Boolean), + has_field('archive', Boolean), + has_field('archive_private', Boolean), + has_field('archive_volume_frequency', Integer), + has_field('autorespond_admin', Boolean), + has_field('autorespond_postings', Boolean), + has_field('autorespond_requests', Integer), + has_field('autoresponse_admin_text', Unicode), + has_field('autoresponse_graceperiod', Integer), + has_field('autoresponse_postings_text', Unicode), + has_field('autoresponse_request_text', Unicode), + has_field('ban_list', PickleType), + has_field('bounce_info_stale_after', Integer), + has_field('bounce_matching_headers', Unicode), + has_field('bounce_notify_owner_on_disable', Boolean), + has_field('bounce_notify_owner_on_removal', Boolean), + has_field('bounce_processing', Boolean), + has_field('bounce_score_threshold', Integer), + has_field('bounce_unrecognized_goes_to_list_owner', Boolean), + has_field('bounce_you_are_disabled_warnings', Integer), + has_field('bounce_you_are_disabled_warnings_interval', Integer), + has_field('collapse_alternatives', Boolean), + has_field('convert_html_to_plaintext', Boolean), + has_field('default_member_moderation', Boolean), + has_field('description', Unicode), + has_field('digest_footer', Unicode), + has_field('digest_header', Unicode), + has_field('digest_is_default', Boolean), + has_field('digest_send_periodic', Boolean), + has_field('digest_size_threshhold', Integer), + has_field('digest_volume_frequency', Integer), + has_field('digestable', Boolean), + has_field('discard_these_nonmembers', PickleType), + has_field('emergency', Boolean), + has_field('encode_ascii_prefixes', Boolean), + has_field('filter_action', Integer), + has_field('filter_content', Boolean), + has_field('filter_filename_extensions', PickleType), + has_field('filter_mime_types', PickleType), + has_field('first_strip_reply_to', Boolean), + has_field('forward_auto_discards', Boolean), + has_field('gateway_to_mail', Boolean), + has_field('gateway_to_news', Boolean), + has_field('generic_nonmember_action', Integer), + has_field('goodbye_msg', Unicode), + has_field('header_filter_rules', PickleType), + has_field('hold_these_nonmembers', PickleType), + has_field('include_list_post_header', Boolean), + has_field('include_rfc2369_headers', Boolean), + has_field('info', Unicode), + has_field('linked_newsgroup', Unicode), + has_field('max_days_to_hold', Integer), + has_field('max_message_size', Integer), + has_field('max_num_recipients', Integer), + has_field('member_moderation_action', Boolean), + has_field('member_moderation_notice', Unicode), + has_field('mime_is_default_digest', Boolean), + has_field('mod_password', Unicode), + has_field('msg_footer', Unicode), + has_field('msg_header', Unicode), + has_field('new_member_options', Integer), + has_field('news_moderation', Boolean), + has_field('news_prefix_subject_too', Boolean), + has_field('nntp_host', Unicode), + has_field('nondigestable', Boolean), + has_field('nonmember_rejection_notice', Unicode), + has_field('obscure_addresses', Boolean), + has_field('pass_filename_extensions', PickleType), + has_field('pass_mime_types', PickleType), + has_field('password', Unicode), + has_field('personalize', Integer), + has_field('post_id', Integer), + has_field('preferred_language', Unicode), + has_field('private_roster', Boolean), + has_field('real_name', Unicode), + has_field('reject_these_nonmembers', PickleType), + has_field('reply_goes_to_list', Boolean), + has_field('reply_to_address', Unicode), + has_field('require_explicit_destination', Boolean), + has_field('respond_to_post_requests', Boolean), + has_field('scrub_nondigest', Boolean), + has_field('send_goodbye_msg', Boolean), + has_field('send_reminders', Boolean), + has_field('send_welcome_msg', Boolean), + has_field('subject_prefix', Unicode), + has_field('subscribe_auto_approval', PickleType), + has_field('subscribe_policy', Integer), + has_field('topics', PickleType), + has_field('topics_bodylines_limit', Integer), + has_field('topics_enabled', Boolean), + has_field('umbrella_list', Boolean), + has_field('umbrella_member_suffix', Unicode), + has_field('unsubscribe_policy', Integer), + has_field('welcome_msg', Unicode), + # Indirect relationships + has_field('owner_rosterset', Unicode), + has_field('moderator_rosterset', Unicode), + # Relationships +## has_and_belongs_to_many( +## 'available_languages', +## of_kind='Mailman.database.model.languages.Language') + + def __init__(self, fqdn_listname): + super(MailingList, self).__init__() + listname, hostname = split_listname(fqdn_listname) + self.list_name = listname + self.host_name = hostname + # Create two roster sets, one for the owners and one for the + # moderators. MailingLists are connected to RosterSets indirectly, in + # order to preserve the ability to store user data and list data in + # different databases. + name = fqdn_listname + ' owners' + self.owner_rosterset = name + roster = config.user_manager.create_roster(name) + config.user_manager.create_rosterset(name).add(roster) + name = fqdn_listname + ' moderators' + self.moderator_rosterset = name + roster = config.user_manager.create_roster(name) + config.user_manager.create_rosterset(name).add(roster) + + def delete_rosters(self): + listname = fqdn_listname(self.list_name, self.host_name) + # Delete the list owner roster and roster set. + name = listname + ' owners' + roster = config.user_manager.get_roster(name) + assert roster, 'Missing roster: %s' % name + config.user_manager.delete_roster(roster) + rosterset = config.user_manager.get_rosterset(name) + assert rosterset, 'Missing roster set: %s' % name + config.user_manager.delete_rosterset(rosterset) + name = listname + ' moderators' + roster = config.user_manager.get_roster(name) + assert roster, 'Missing roster: %s' % name + config.user_manager.delete_roster(roster) + rosterset = config.user_manager.get_rosterset(name) + assert rosterset, 'Missing roster set: %s' % name + config.user_manager.delete_rosterset(rosterset) + + # IMailingListRosters + + @property + def owners(self): + for user in _collect_users(self.owner_rosterset): + yield user + + @property + def moderators(self): + for user in _collect_users(self.moderator_rosterset): + yield user + + @property + def administrators(self): + for user in _collect_users(self.owner_rosterset, + self.moderator_rosterset): + yield user + + @property + def owner_rosters(self): + rosterset = config.user_manager.get_rosterset(self.owner_rosterset) + for roster in rosterset.rosters: + yield roster + + @property + def moderator_rosters(self): + rosterset = config.user_manager.get_rosterset(self.moderator_rosterset) + for roster in rosterset.rosters: + yield roster + + def add_owner_roster(self, roster): + rosterset = config.user_manager.get_rosterset(self.owner_rosterset) + rosterset.add(roster) + + def delete_owner_roster(self, roster): + rosterset = config.user_manager.get_rosterset(self.owner_rosterset) + rosterset.delete(roster) + + def add_moderator_roster(self, roster): + rosterset = config.user_manager.get_rosterset(self.moderator_rosterset) + rosterset.add(roster) + + def delete_moderator_roster(self, roster): + rosterset = config.user_manager.get_rosterset(self.moderator_rosterset) + rosterset.delete(roster) + + + +def _collect_users(*rosterset_names): + users = set() + for name in rosterset_names: + # We have to indirectly look up the roster set's name in the user + # manager. This is how we enforce separation between the list manager + # and the user manager storages. + rosterset = config.user_manager.get_rosterset(name) + assert rosterset is not None, 'No RosterSet named: %s' % name + for roster in rosterset.rosters: + # Rosters collect addresses. It's not required that an address is + # linked to a user, but it must be the case that all addresses on + # the owner roster are linked to a user. Get the user that's + # linked to each address and add it to the set. + for address in roster.addresses: + user = config.user_manager.get_user(address.address) + assert user is not None, 'Unlinked address: ' + address.address + users.add(user) + return users diff --git a/Mailman/database/model/profile.py b/Mailman/database/model/profile.py new file mode 100644 index 000000000..49e108728 --- /dev/null +++ b/Mailman/database/model/profile.py @@ -0,0 +1,46 @@ +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +from elixir import * +from email.utils import formataddr +from zope.interface import implements + +from Mailman.constants import DeliveryMode +from Mailman.database.types import EnumType +from Mailman.interfaces import IProfile + + +class Profile(Entity): + implements(IProfile) + + has_field('acknowledge_posts', Boolean) + has_field('hide_address', Boolean) + has_field('preferred_language', Unicode) + has_field('receive_list_copy', Boolean) + has_field('receive_own_postings', Boolean) + has_field('delivery_mode', EnumType) + # Relationships + belongs_to('user', of_kind='Mailman.database.model.user.User') + + def __init__(self): + super(Profile, self).__init__() + self.acknowledge_posts = False + self.hide_address = True + self.preferred_language = 'en' + self.receive_list_copy = True + self.receive_own_postings = True + self.delivery_mode = DeliveryMode.regular diff --git a/Mailman/database/model/roster.py b/Mailman/database/model/roster.py new file mode 100644 index 000000000..bf8447433 --- /dev/null +++ b/Mailman/database/model/roster.py @@ -0,0 +1,51 @@ +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +from elixir import * +from zope.interface import implements + +from Mailman.Errors import ExistingAddressError +from Mailman.interfaces import IRoster + + +ADDRESS_KIND = 'Mailman.database.model.address.Address' +ROSTERSET_KIND = 'Mailman.database.model.rosterset.RosterSet' + + +class Roster(Entity): + implements(IRoster) + + has_field('name', Unicode) + # Relationships + has_and_belongs_to_many('addresses', of_kind=ADDRESS_KIND) + has_and_belongs_to_many('roster_set', of_kind=ROSTERSET_KIND) + + def create(self, email_address, real_name=None): + """See IRoster""" + from Mailman.database.model.address import Address + addr = Address.get_by(address=email_address) + if addr: + raise ExistingAddressError(email_address) + addr = Address(address=email_address, real_name=real_name) + # Make sure all the expected links are made, including to the null + # (i.e. everyone) roster. + self.addresses.append(addr) + addr.rosters.append(self) + null_roster = Roster.get_by(name='') + null_roster.addresses.append(addr) + addr.rosters.append(null_roster) + return addr diff --git a/Mailman/database/model/rosterset.py b/Mailman/database/model/rosterset.py new file mode 100644 index 000000000..f84b52c15 --- /dev/null +++ b/Mailman/database/model/rosterset.py @@ -0,0 +1,41 @@ +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +from elixir import * +from zope.interface import implements + +from Mailman.interfaces import IRosterSet + +ROSTER_KIND = 'Mailman.database.model.roster.Roster' + + + +# Internal implementation of roster sets for use with mailing lists. These +# are owned by the user storage. +class RosterSet(Entity): + implements(IRosterSet) + + has_field('name', Unicode) + has_and_belongs_to_many('rosters', of_kind=ROSTER_KIND) + + def add(self, roster): + if roster not in self.rosters: + self.rosters.append(roster) + + def delete(self, roster): + if roster in self.rosters: + self.rosters.remove(roster) diff --git a/Mailman/database/model/user.py b/Mailman/database/model/user.py new file mode 100644 index 000000000..be634b9df --- /dev/null +++ b/Mailman/database/model/user.py @@ -0,0 +1,50 @@ +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +from elixir import * +from email.utils import formataddr +from zope.interface import implements + +from Mailman import Errors +from Mailman.database.model import Address +from Mailman.interfaces import IUser + + +class User(Entity): + implements(IUser) + + has_field('real_name', Unicode) + has_field('password', Unicode) + # Relationships + has_one('profile', of_kind='Mailman.database.model.profile.Profile') + has_many('addresses', of_kind='Mailman.database.model.address.Address') + + def link(self, address): + if address.user is not None: + raise Errors.AddressAlreadyLinkedError(address) + address.user = self + self.addresses.append(address) + + def unlink(self, address): + if address.user is None: + raise Errors.AddressNotLinkedError(address) + address.user = None + self.addresses.remove(address) + + def controls(self, address): + found = Address.get_by(address=address.address) + return bool(found and found.user is self) diff --git a/Mailman/database/model/version.py b/Mailman/database/model/version.py new file mode 100644 index 000000000..e22e8ae11 --- /dev/null +++ b/Mailman/database/model/version.py @@ -0,0 +1,25 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +from elixir import * + + +class Version(Entity): + with_fields( + component = Field(String), + version = Field(Integer), + ) diff --git a/Mailman/database/tables/Makefile.in b/Mailman/database/tables/Makefile.in new file mode 100644 index 000000000..dd99e125f --- /dev/null +++ b/Mailman/database/tables/Makefile.in @@ -0,0 +1,71 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +# NOTE: Makefile.in is converted into Makefile by the configure script +# in the parent directory. Once configure has run, you can recreate +# the Makefile by running just config.status. + +# Variables set by configure + +VPATH= @srcdir@ +srcdir= @srcdir@ +bindir= @bindir@ +prefix= @prefix@ +exec_prefix= @exec_prefix@ +DESTDIR= + +CC= @CC@ +CHMOD= @CHMOD@ +INSTALL= @INSTALL@ + +DEFS= @DEFS@ + +# Customizable but not set by configure + +OPT= @OPT@ +CFLAGS= $(OPT) $(DEFS) +PACKAGEDIR= $(prefix)/Mailman/database/tables +SHELL= /bin/sh + +MODULES= *.py + +# Modes for directories and executables created by the install +# process. Default to group-writable directories but +# user-only-writable for executables. +DIRMODE= 775 +EXEMODE= 755 +FILEMODE= 644 +INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE) + + +# Rules + +all: + +install: + for f in $(MODULES); \ + do \ + $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \ + done + +finish: + +clean: + +distclean: + -rm *.pyc + -rm Makefile diff --git a/Mailman/database/tables/__init__.py b/Mailman/database/tables/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/Mailman/database/tables/__init__.py diff --git a/Mailman/database/tables/addresses.py b/Mailman/database/tables/addresses.py new file mode 100644 index 000000000..922984646 --- /dev/null +++ b/Mailman/database/tables/addresses.py @@ -0,0 +1,45 @@ +# Copyright (C) 2006-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Email addresses.""" + +from sqlalchemy import * + + + +class Address(object): + pass + + +def make_table(metadata, tables): + address_table = Table( + 'Addresses', metadata, + Column('address_id', Integer, primary_key=True), + Column('profile_id', Integer, ForeignKey('Profiles.profile_id')), + Column('address', Unicode), + Column('verified', Boolean), + Column('bounce_info', PickleType), + ) + # Associate Rosters + address_rosters_table = Table( + 'AddressRoster', metadata, + Column('roster_id', Integer, ForeignKey('Rosters.roster_id')), + Column('address_id', Integer, ForeignKey('Addresses.address_id')), + ) + mapper(Address, address_table) + tables.bind(address_table) + tables.bind(address_rosters_table, 'address_rosters') diff --git a/Mailman/database/languages.py b/Mailman/database/tables/languages.py index 6032a67df..fa10974b7 100644 --- a/Mailman/database/languages.py +++ b/Mailman/database/tables/languages.py @@ -37,16 +37,16 @@ class Language(object): def make_table(metadata, tables): language_table = Table( - 'Language', metadata, + 'Languages', metadata, # Two letter language code Column('language_id', Integer, primary_key=True), Column('code', Unicode), ) # Associate List available_languages_table = Table( - 'AvailableLanguage', metadata, + 'AvailableLanguages', metadata, Column('list_id', Integer, ForeignKey('Listdata.list_id')), - Column('language_id', Integer, ForeignKey('Language.language_id')), + Column('language_id', Integer, ForeignKey('Languages.language_id')), ) mapper(Language, language_table) tables.bind(language_table) diff --git a/Mailman/database/listdata.py b/Mailman/database/tables/listdata.py index 9f537b229..fff396980 100644 --- a/Mailman/database/listdata.py +++ b/Mailman/database/tables/listdata.py @@ -29,6 +29,12 @@ def make_table(metadata, tables): Column('list_name', Unicode), Column('web_page_url', Unicode), Column('admin_member_chunksize', Integer), + # Foreign keys - XXX ondelete='all, delete=orphan' ?? + Column('owner', Integer, ForeignKey('RosterSets.rosterset_id')), + Column('moderator', Integer, ForeignKey('RosterSets.rosterset_id')), + # Attributes which are directly modifiable via the web u/i. The more + # complicated attributes are currently stored as pickles, though that + # will change as the schema and implementation is developed. Column('next_request_id', Integer), Column('next_digest_number', Integer), Column('admin_responses', PickleType), @@ -116,7 +122,6 @@ def make_table(metadata, tables): Column('member_moderation_notice', Unicode), Column('mime_is_default_digest', Boolean), Column('mod_password', Unicode), - Column('moderator', PickleType), Column('msg_footer', Unicode), Column('msg_header', Unicode), Column('new_member_options', Integer), @@ -126,7 +131,6 @@ def make_table(metadata, tables): Column('nondigestable', Boolean), Column('nonmember_rejection_notice', Unicode), Column('obscure_addresses', Boolean), - Column('owner', PickleType), Column('pass_filename_extensions', PickleType), Column('pass_mime_types', PickleType), Column('password', Unicode), @@ -157,14 +161,18 @@ def make_table(metadata, tables): ) # Avoid circular imports from Mailman.MailList import MailList - from Mailman.database.languages import Language + from Mailman.database.tables.languages import Language + from Mailman.database.tables.rosters import RosterSet # We need to ensure MailList.InitTempVars() is called whenever a MailList # instance is created from a row. Use a mapper extension for this. - props = dict(available_languages= - relation(Language, - secondary=tables.available_languages, - lazy=False)) + props = dict( + # listdata* <-> language* + available_languages= relation(Language, + secondary=tables.available_languages, + lazy=False)) mapper(MailList, table, + # The mapper extension ensures MailList.InitTempVars() is called + # whenever a MailList instance is created from a row. extension=MailListMapperExtension(), properties=props) tables.bind(table) diff --git a/Mailman/database/tables/profiles.py b/Mailman/database/tables/profiles.py new file mode 100644 index 000000000..9f65bdf03 --- /dev/null +++ b/Mailman/database/tables/profiles.py @@ -0,0 +1,77 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Mailman user profile information.""" + +from sqlalchemy import * + +from Mailman import Defaults + + + +class Profile(object): + pass + + + +# Both of these Enum types are stored in the database as integers, and +# converted back into their enums on retrieval. + +class DeliveryModeType(types.TypeDecorator): + impl = types.Integer + + def convert_bind_param(self, value, engine): + return int(value) + + def convert_result_value(self, value, engine): + return Defaults.DeliveryMode(value) + + +class DeliveryStatusType(types.TypeDecorator): + impl = types.Integer + + def convert_bind_param(self, value, engine): + return int(value) + + def convert_result_value(self, value, engine): + return Defaults.DeliveryStatus(value) + + + +def make_table(metadata, tables): + table = Table( + 'Profiles', metadata, + Column('profile_id', Integer, primary_key=True), + # OldStyleMemberships attributes, temporarily stored as pickles. + Column('ack', Boolean), + Column('delivery_mode', DeliveryModeType), + Column('delivery_status', DeliveryStatusType), + Column('hide', Boolean), + Column('language', Unicode), + Column('nodupes', Boolean), + Column('nomail', Boolean), + Column('notmetoo', Boolean), + Column('password', Unicode), + Column('realname', Unicode), + Column('topics', PickleType), + ) + # Avoid circular references + from Mailman.database.tables.addresses import Address + # profile -> address* + props = dict(addresses=relation(Address, cascade='all, delete-orphan')) + mapper(Profile, table, properties=props) + tables.bind(table) diff --git a/Mailman/database/tables/rosters.py b/Mailman/database/tables/rosters.py new file mode 100644 index 000000000..eea0cbb39 --- /dev/null +++ b/Mailman/database/tables/rosters.py @@ -0,0 +1,59 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Collections of email addresses. + +Rosters contain email addresses. RosterSets contain Rosters. Most attributes +on the listdata table take RosterSets so that it's easy to compose just about +any combination of addresses. +""" + +from sqlalchemy import * + +from Mailman.database.tables.addresses import Address + + + +class Roster(object): + pass + + +class RosterSet(object): + pass + + + +def make_table(metadata, tables): + table = Table( + 'Rosters', metadata, + Column('roster_id', Integer, primary_key=True), + ) + # roster* <-> address* + props = dict(addresses= + relation(Address, + secondary=tables.address_rosters, + lazy=False)) + mapper(Roster, table, properties=props) + tables.bind(table) + table = Table( + 'RosterSets', metadata, + Column('rosterset_id', Integer, primary_key=True), + ) + # rosterset -> roster* + props = dict(rosters=relation(Roster, cascade='all, delete=orphan')) + mapper(RosterSet, table, properties=props) + tables.bind(table) diff --git a/Mailman/database/version.py b/Mailman/database/tables/versions.py index 57c50b0ef..09fd21bf7 100644 --- a/Mailman/database/version.py +++ b/Mailman/database/tables/versions.py @@ -23,9 +23,9 @@ from sqlalchemy import * def make_table(metadata, tables): table = Table( - 'Version', metadata, + 'Versions', metadata, Column('version_id', Integer, primary_key=True), - Column('component', String(20)), + Column('component', String), Column('version', Integer), ) tables.bind(table) diff --git a/Mailman/database/types.py b/Mailman/database/types.py new file mode 100644 index 000000000..00ad29559 --- /dev/null +++ b/Mailman/database/types.py @@ -0,0 +1,40 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +import sys + +from sqlalchemy import types + + + +# SQLAlchemy custom type for storing enums in the database. +class EnumType(types.TypeDecorator): + # Enums can be stored as strings of the form: + # full.path.to.Enum:intval + impl = types.String + + def convert_bind_param(self, value, engine): + return '%s:%s.%d' % (value.enumclass.__module__, + value.enumclass.__name__, + int(value)) + + def convert_result_value(self, value, engine): + path, intvalue = value.rsplit(':', 1) + modulename, classname = intvalue.rsplit('.', 1) + __import__(modulename) + cls = getattr(sys.modules[modulename], classname) + return cls[int(intvalue)] diff --git a/Mailman/database/usermanager.py b/Mailman/database/usermanager.py new file mode 100644 index 000000000..97a740803 --- /dev/null +++ b/Mailman/database/usermanager.py @@ -0,0 +1,91 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""SQLAlchemy/Elixir based provider of IUserManager.""" + +from __future__ import with_statement + +import os + +from elixir import * +from zope.interface import implements + +from Mailman import Errors +from Mailman.LockFile import LockFile +from Mailman.configuration import config +from Mailman.database.model import * +from Mailman.interfaces import IUserManager + + + +class UserManager(object): + implements(IUserManager) + + def __init__(self): + # Create the null roster if it does not already exist. It's more + # likely to exist than not so try to get it before creating it. + lockfile = os.path.join(config.LOCK_DIR, '<umgrcreatelock>') + with LockFile(lockfile): + roster = self.get_roster('') + if roster is None: + self.create_roster('') + objectstore.flush() + + def create_roster(self, name): + roster = Roster.get_by(name=name) + if roster: + raise Errors.RosterExistsError(name) + return Roster(name=name) + + def get_roster(self, name): + return Roster.get_by(name=name) + + def delete_roster(self, roster): + roster.delete() + + @property + def rosters(self): + for roster in Roster.select(): + yield roster + + def create_rosterset(self, name): + return RosterSet(name=name) + + def delete_rosterset(self, rosterset): + rosterset.delete() + + def get_rosterset(self, name): + return RosterSet.get_by(name=name) + + def create_user(self): + user = User() + # Users always have a profile + user.profile = Profile() + user.profile.user = user + return user + + def delete_user(self, user): + user.delete() + + @property + def users(self): + for user in User.select(): + yield user + + def get_user(self, address): + found = Address.get_by(address=address) + return found and found.user diff --git a/Mailman/docs/Makefile.in b/Mailman/docs/Makefile.in new file mode 100644 index 000000000..0662d8a3e --- /dev/null +++ b/Mailman/docs/Makefile.in @@ -0,0 +1,82 @@ +# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +# NOTE: Makefile.in is converted into Makefile by the configure script +# in the parent directory. Once configure has run, you can recreate +# the Makefile by running just config.status. + +# Variables set by configure + +VPATH= @srcdir@ +srcdir= @srcdir@ +bindir= @bindir@ +prefix= @prefix@ +exec_prefix= @exec_prefix@ +DESTDIR= + +CC= @CC@ +CHMOD= @CHMOD@ +INSTALL= @INSTALL@ + +DEFS= @DEFS@ + +# Customizable but not set by configure + +OPT= @OPT@ +CFLAGS= $(OPT) $(DEFS) +PACKAGEDIR= $(prefix)/Mailman/docs +SHELL= /bin/sh + +OTHERFILES= *.txt +MODULES= *.py + +# Modes for directories and executables created by the install +# process. Default to group-writable directories but +# user-only-writable for executables. +DIRMODE= 775 +EXEMODE= 755 +FILEMODE= 644 +INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE) + +# Directories make should decend into +SUBDIRS= + +# Rules + +all: + +install: + for f in $(MODULES) $(OTHERFILES); \ + do \ + $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \ + done + for d in $(SUBDIRS); \ + do \ + (cd $$d; $(MAKE) DESTDIR=$(DESTDIR) install); \ + done + +finish: + +clean: + +distclean: + -rm *.pyc + -rm Makefile + @for d in $(SUBDIRS); \ + do \ + (cd $$d; $(MAKE) distclean); \ + done diff --git a/Mailman/docs/__init__.py b/Mailman/docs/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/Mailman/docs/__init__.py diff --git a/Mailman/docs/addresses.txt b/Mailman/docs/addresses.txt new file mode 100644 index 000000000..a8cf9f655 --- /dev/null +++ b/Mailman/docs/addresses.txt @@ -0,0 +1,144 @@ +Email addresses and rosters +=========================== + +Addresses represent email address, and nothing more. Some addresses are tied +to users that Mailman knows about. For example, a list member is a user that +the system knows about, but a non-member posting from a brand new email +address is a counter-example. + + +Creating a roster +----------------- + +Email address objects are tied to rosters, and rosters are tied to the user +manager. To get things started, access the global user manager and create a +new roster. + + >>> from Mailman.database import flush + >>> from Mailman.configuration import config + >>> mgr = config.user_manager + >>> roster_1 = mgr.create_roster('roster-1') + >>> sorted(roster_1.addresses) + [] + + +Creating addresses +------------------ + +Creating a simple email address object is straight forward. + + >>> addr_1 = roster_1.create('aperson@example.com') + >>> flush() + >>> addr_1.address + 'aperson@example.com' + >>> addr_1.real_name is None + True + +You can also create an email address object with a real name. + + >>> addr_2 = roster_1.create('bperson@example.com', 'Barney Person') + >>> addr_2.address + 'bperson@example.com' + >>> addr_2.real_name + 'Barney Person' + +You can also iterate through all the addresses on a roster. + + >>> sorted(addr.address for addr in roster_1.addresses) + ['aperson@example.com', 'bperson@example.com'] + +You can create another roster and add a bunch of existing addresses to the +second roster. + + >>> roster_2 = mgr.create_roster('roster-2') + >>> flush() + >>> sorted(roster_2.addresses) + [] + >>> for address in roster_1.addresses: + ... roster_2.addresses.append(address) + >>> roster_2.create('cperson@example.com', 'Charlie Person') + <Address: Charlie Person <cperson@example.com> [not verified]> + >>> sorted(addr.address for addr in roster_2.addresses) + ['aperson@example.com', 'bperson@example.com', 'cperson@example.com'] + +The first roster hasn't been affected. + + >>> sorted(addr.address for addr in roster_1.addresses) + ['aperson@example.com', 'bperson@example.com'] + + +Removing addresses +------------------ + +You can remove an address from a roster just by deleting it. + + >>> for addr in roster_1.addresses: + ... if addr.address == 'aperson@example.com': + ... break + >>> addr.address + 'aperson@example.com' + >>> roster_1.addresses.remove(addr) + >>> sorted(addr.address for addr in roster_1.addresses) + ['bperson@example.com'] + +Again, this doesn't affect the other rosters. + + >>> sorted(addr.address for addr in roster_2.addresses) + ['aperson@example.com', 'bperson@example.com', 'cperson@example.com'] + + +Registration and validation +--------------------------- + +Addresses have two dates, the date the address was registered on and the date +the address was validated on. Neither date isset by default. + + >>> addr = roster_1.create('dperson@example.com', 'David Person') + >>> addr.registered_on is None + True + >>> addr.validated_on is None + True + +The registered date takes a Python datetime object. + + >>> from datetime import datetime + >>> addr.registered_on = datetime(2007, 5, 8, 22, 54, 1) + >>> print addr.registered_on + 2007-05-08 22:54:01 + >>> addr.validated_on is None + True + +And of course, you can also set the validation date. + + >>> addr.validated_on = datetime(2007, 5, 13, 22, 54, 1) + >>> print addr.registered_on + 2007-05-08 22:54:01 + >>> print addr.validated_on + 2007-05-13 22:54:01 + + +The null roster +--------------- + +All address objects that have been created are members of the null roster. + + >>> all = mgr.get_roster('') + >>> sorted(addr.address for addr in all.addresses) + ['aperson@example.com', 'bperson@example.com', + 'cperson@example.com', 'dperson@example.com'] + +And conversely, all addresses should have the null roster on their list of +rosters. + + >>> for addr in all.addresses: + ... assert all in addr.rosters, 'Address is missing null roster' + + +Clean up +-------- + + >>> for roster in mgr.rosters: + ... mgr.delete_roster(roster) + >>> flush() + >>> sorted(roster.name for roster in mgr.rosters) + [] diff --git a/Mailman/docs/mlist-addresses.txt b/Mailman/docs/mlist-addresses.txt new file mode 100644 index 000000000..257cf95c7 --- /dev/null +++ b/Mailman/docs/mlist-addresses.txt @@ -0,0 +1,85 @@ +Mailing list addresses +====================== + +Every mailing list has a number of addresses which are publicly available. +These are defined in the IMailingListAddresses interface. + + >>> from Mailman.configuration import config + >>> from Mailman.interfaces import IMailingListAddresses + >>> mlist = config.list_manager.create('_xtest@example.com') + >>> IMailingListAddresses.providedBy(mlist) + True + +The posting address is where people send messages to be posted to the mailing +list. This is exactly the same as the fully qualified list name. + + >>> mlist.fqdn_listname + '_xtest@example.com' + >>> mlist.posting_address + '_xtest@example.com' + +Messages to the mailing list's 'no reply' address always get discarded without +prejudice. + + >>> mlist.noreply_address + 'noreply@example.com' + +The mailing list's owner address reaches the human moderators. + + >>> mlist.owner_address + '_xtest-owner@example.com' + +The request address goes to the list's email command robot. + + >>> mlist.request_address + '_xtest-request@example.com' + +The bounces address accepts and processes all potential bounces. + + >>> mlist.bounces_address + '_xtest-bounces@example.com' + +The join (a.k.a. subscribe) address is where someone can email to get added to +the mailing list. The subscribe alias is a synonym for join, but it's +deprecated. + + >>> mlist.join_address + '_xtest-join@example.com' + >>> mlist.subscribe_address + '_xtest-subscribe@example.com' + +The leave (a.k.a. unsubscribe) address is where someone can email to get added +to the mailing list. The unsubscribe alias is a synonym for leave, but it's +deprecated. + + >>> mlist.leave_address + '_xtest-leave@example.com' + >>> mlist.unsubscribe_address + '_xtest-unsubscribe@example.com' + + +Email confirmations +------------------- + +Email confirmation messages are sent when actions such as subscriptions need +to be confirmed. It requires that a cookie be provided, which will be +included in the local part of the email address. The exact format of this is +dependent on the VERP_CONFIRM_FORMAT configuration variable. + + >>> mlist.confirm_address('cookie') + '_xtest-confirm+cookie@example.com' + >>> mlist.confirm_address('wookie') + '_xtest-confirm+wookie@example.com' + + >>> old_format = config.VERP_CONFIRM_FORMAT + >>> config.VERP_CONFIRM_FORMAT = '$address---$cookie' + >>> mlist.confirm_address('cookie') + '_xtest-confirm---cookie@example.com' + >>> config.VERP_CONFIRM_FORMAT = old_format + + +Clean up +-------- + + >>> for mlist in config.list_manager.mailing_lists: + ... config.list_manager.delete(mlist) diff --git a/Mailman/docs/mlist-rosters.txt b/Mailman/docs/mlist-rosters.txt new file mode 100644 index 000000000..490a07e0c --- /dev/null +++ b/Mailman/docs/mlist-rosters.txt @@ -0,0 +1,118 @@ +Mailing list rosters +==================== + +Mailing lists use rosters to manage and organize users for various purposes. +In order to allow for separate storage of mailing list data and user data, the +connection between mailing list objects and rosters is indirect. Mailing +lists manage roster names, and these roster names are used to find the rosters +that contain the actual users. + + +Privileged rosters +------------------ + +Mailing lists have two types of privileged users, owners and moderators. +Owners get to change the configuration of mailing lists and moderators get to +approve or deny held messages and subscription requests. + +When a mailing list is created, it automatically contains a roster for the +list owners and a roster for the list moderators. + + >>> from Mailman.database import flush + >>> from Mailman.configuration import config + >>> mlist = config.list_manager.create('_xtest@example.com') + >>> flush() + >>> sorted(roster.name for roster in mlist.owner_rosters) + ['_xtest@example.com owners'] + >>> sorted(roster.name for roster in mlist.moderator_rosters) + ['_xtest@example.com moderators'] + +These rosters are initially empty. + + >>> owner_roster = list(mlist.owner_rosters)[0] + >>> sorted(address for address in owner_roster.addresses) + [] + >>> moderator_roster = list(mlist.moderator_rosters)[0] + >>> sorted(address for address in moderator_roster.addresses) + [] + +You can create new rosters and add them to the list of owner or moderator +rosters. + + >>> roster_1 = config.user_manager.create_roster('roster-1') + >>> roster_2 = config.user_manager.create_roster('roster-2') + >>> roster_3 = config.user_manager.create_roster('roster-3') + >>> flush() + +Make roster-1 an owner roster, roster-2 a moderator roster, and roster-3 both +an owner and a moderator roster. + + >>> mlist.add_owner_roster(roster_1) + >>> mlist.add_moderator_roster(roster_2) + >>> mlist.add_owner_roster(roster_3) + >>> mlist.add_moderator_roster(roster_3) + >>> flush() + + >>> sorted(roster.name for roster in mlist.owner_rosters) + ['_xtest@example.com owners', 'roster-1', 'roster-3'] + >>> sorted(roster.name for roster in mlist.moderator_rosters) + ['_xtest@example.com moderators', 'roster-2', 'roster-3'] + + +Privileged users +---------------- + +Rosters are the lower level way of managing owners and moderators, but usually +you just want to know which users have owner and moderator privileges. You +can get the list of such users by using different attributes. + +Because the rosters are all empty to start with, we can create a bunch of +users that will end up being our owners and moderators. + + >>> aperson = config.user_manager.create_user() + >>> bperson = config.user_manager.create_user() + >>> cperson = config.user_manager.create_user() + +These users need addresses, because rosters manage addresses. + + >>> address_1 = roster_1.create('aperson@example.com', 'Anne Person') + >>> aperson.link(address_1) + >>> address_2 = roster_2.create('bperson@example.com', 'Ben Person') + >>> bperson.link(address_2) + >>> address_3 = roster_1.create('cperson@example.com', 'Claire Person') + >>> cperson.link(address_3) + >>> roster_3.addresses.append(address_3) + >>> flush() + +Now that everything is set up, we can iterate through the various collections +of privileged users. Here are the owners of the list. + + >>> from Mailman.interfaces import IUser + >>> addresses = [] + >>> for user in mlist.owners: + ... assert IUser.providedBy(user), 'Non-IUser owner found' + ... for address in user.addresses: + ... addresses.append(address.address) + >>> sorted(addresses) + ['aperson@example.com', 'cperson@example.com'] + +Here are the moderators of the list. + + >>> addresses = [] + >>> for user in mlist.moderators: + ... assert IUser.providedBy(user), 'Non-IUser moderator found' + ... for address in user.addresses: + ... addresses.append(address.address) + >>> sorted(addresses) + ['bperson@example.com', 'cperson@example.com'] + +The administrators of a mailing list are the union of the owners and +moderators. + + >>> addresses = [] + >>> for user in mlist.administrators: + ... assert IUser.providedBy(user), 'Non-IUser administrator found' + ... for address in user.addresses: + ... addresses.append(address.address) + >>> sorted(addresses) + ['aperson@example.com', 'bperson@example.com', 'cperson@example.com'] diff --git a/Mailman/docs/use-listmanager.txt b/Mailman/docs/use-listmanager.txt new file mode 100644 index 000000000..9e237f02f --- /dev/null +++ b/Mailman/docs/use-listmanager.txt @@ -0,0 +1,124 @@ +Using the IListManager interface +================================ + +The IListManager is how you create, delete, and retrieve mailing list +objects. The Mailman system instantiates an IListManager for you based on the +configuration variable MANAGERS_INIT_FUNCTION. The instance is accessible +on the global config object. + + >>> from Mailman.database import flush + >>> from Mailman.configuration import config + >>> from Mailman.interfaces import IListManager + >>> IListManager.providedBy(config.list_manager) + True + >>> mgr = config.list_manager + + +Creating a mailing list +----------------------- + +Creating the list returns the newly created IMailList object. + + >>> from Mailman.interfaces import IMailingList + >>> mlist = mgr.create('_xtest@example.com') + >>> flush() + >>> IMailingList.providedBy(mlist) + True + +This object has an identity. + + >>> from Mailman.interfaces import IMailingListIdentity + >>> IMailingListIdentity.providedBy(mlist) + True + +All lists with identities have a short name, a host name, and a fully +qualified listname. This latter is what uniquely distinguishes the mailing +list to the system. + + >>> mlist.list_name + '_xtest' + >>> mlist.host_name + 'example.com' + >>> mlist.fqdn_listname + '_xtest@example.com' + +If you try to create a mailing list with the same name as an existing list, +you will get an exception. + + >>> mlist_dup = mgr.create('_xtest@example.com') + Traceback (most recent call last): + ... + MMListAlreadyExistsError: _xtest@example.com + + +Deleting a mailing list +----------------------- + +Deleting an existing mailing list also deletes its rosters and roster sets. + + >>> sorted(r.name for r in config.user_manager.rosters) + ['', '_xtest@example.com moderators', '_xtest@example.com owners'] + + >>> mgr.delete(mlist) + >>> flush() + >>> sorted(mgr.names) + [] + >>> sorted(r.name for r in config.user_manager.rosters) + [''] + +Attempting to access attributes of the deleted mailing list raises an +exception: + + >>> mlist.fqdn_listname + Traceback (most recent call last): + ... + AttributeError: fqdn_listname + +After deleting the list, you can create it again. + + >>> mlist = mgr.create('_xtest@example.com') + >>> flush() + >>> mlist.fqdn_listname + '_xtest@example.com' + + +Retrieving a mailing list +------------------------- + +When a mailing list exists, you can ask the list manager for it and you will +always get the same object back. + + >>> mlist_2 = mgr.get('_xtest@example.com') + >>> mlist_2 is mlist + True + +Don't try to get a list that doesn't exist yet though, or you will get an +exception. + + >>> mgr.get('_xtest_2@example.com') + Traceback (most recent call last): + ... + MMUnknownListError: _xtest_2@example.com + + +Iterating over all mailing lists +-------------------------------- + +Once you've created a bunch of mailing lists, you can use the list manager to +iterate over either the list objects, or the list names. + + >>> mlist_3 = mgr.create('_xtest_3@example.com') + >>> mlist_4 = mgr.create('_xtest_4@example.com') + >>> flush() + >>> sorted(mgr.names) + ['_xtest@example.com', '_xtest_3@example.com', '_xtest_4@example.com'] + >>> sorted(m.fqdn_listname for m in mgr.mailing_lists) + ['_xtest@example.com', '_xtest_3@example.com', '_xtest_4@example.com'] + + +Cleaning up +----------- + + >>> for mlist in mgr.mailing_lists: + ... mgr.delete(mlist) + >>> flush() diff --git a/Mailman/docs/use-usermanager.txt b/Mailman/docs/use-usermanager.txt new file mode 100644 index 000000000..f79bff8c6 --- /dev/null +++ b/Mailman/docs/use-usermanager.txt @@ -0,0 +1,100 @@ +The user manager and rosters +============================ + +The IUserManager is how you create, delete, and roster objects. Rosters +manage collections of users. The Mailman system instantiates an IUserManager +for you based on the configuration variable MANAGERS_INIT_FUNCTION. The +instance is accessible on the global config object. + + >>> from Mailman.configuration import config + >>> from Mailman.interfaces import IUserManager + >>> mgr = config.user_manager + >>> IUserManager.providedBy(mgr) + True + + +The default roster +------------------ + +The user manager always contains at least one roster, the 'null' roster or +'all inclusive roster'. + + >>> sorted(roster.name for roster in mgr.rosters) + [''] + + +Adding rosters +-------------- + +You create a roster to hold users. The only thing a roster needs is a name, +basically just an identifying string. + + >>> from Mailman.database import flush + >>> from Mailman.interfaces import IRoster + >>> roster = mgr.create_roster('roster-1') + >>> IRoster.providedBy(roster) + True + >>> roster.name + 'roster-1' + >>> flush() + +If you try to create a roster with the same name as an existing roster, you +will get an exception. + + >>> roster_dup = mgr.create_roster('roster-1') + Traceback (most recent call last): + ... + RosterExistsError: roster-1 + + +Deleting a roster +----------------- + +Delete the roster, and you can then create it again. + + >>> mgr.delete_roster(roster) + >>> flush() + >>> roster = mgr.create_roster('roster-1') + >>> flush() + >>> roster.name + 'roster-1' + + +Retrieving a roster +------------------- + +When a roster exists, you can ask the user manager for it and you will always +get the same object back. + + >>> roster_2 = mgr.get_roster('roster-1') + >>> roster_2.name + 'roster-1' + >>> roster is roster_2 + True + +Trying to get a roster that does not yet exist returns None. + + >>> print mgr.get_roster('no roster') + None + + +Iterating over all the rosters +------------------------------ + +Once you've created a bunch of rosters, you can use the user manager to +iterate over all the rosters. + + >>> roster_2 = mgr.create_roster('roster-2') + >>> roster_3 = mgr.create_roster('roster-3') + >>> roster_4 = mgr.create_roster('roster-4') + >>> flush() + >>> sorted(roster.name for roster in mgr.rosters) + ['', 'roster-1', 'roster-2', 'roster-3', 'roster-4'] + + +Cleaning up +----------- + + >>> for roster in mgr.rosters: + ... mgr.delete_roster(roster) + >>> flush() diff --git a/Mailman/docs/users.txt b/Mailman/docs/users.txt new file mode 100644 index 000000000..caad6b216 --- /dev/null +++ b/Mailman/docs/users.txt @@ -0,0 +1,180 @@ +Users +===== + +Users are entities that combine addresses, preferences, and a password +scheme. Password schemes can be anything from a traditional +challenge/response type password string to an OpenID url. + + +Create, deleting, and managing users +------------------------------------ + +Users are managed by the IUserManager. Users don't have any unique +identifying information, and no such id is needed to create them. + + >>> from Mailman.database import flush + >>> from Mailman.configuration import config + >>> mgr = config.user_manager + >>> user = mgr.create_user() + +Users have a real name, a password scheme, a default profile, and a set of +addresses that they control. All of these data are None or empty for a newly +created user. + + >>> user.real_name is None + True + >>> user.password is None + True + >>> user.addresses + [] + +You can iterate over all the users in a user manager. + + >>> another_user = mgr.create_user() + >>> flush() + >>> all_users = list(mgr.users) + >>> len(list(all_users)) + 2 + >>> user is not another_user + True + >>> user in all_users + True + >>> another_user in all_users + True + +You can also delete users from the user manager. + + >>> mgr.delete_user(user) + >>> mgr.delete_user(another_user) + >>> flush() + >>> len(list(mgr.users)) + 0 + + +Simple user information +----------------------- + +Users may have a real name and a password scheme. + + >>> user = mgr.create_user() + >>> user.password = 'my password' + >>> user.real_name = 'Zoe Person' + >>> flush() + >>> only_person = list(mgr.users)[0] + >>> only_person.password + 'my password' + >>> only_person.real_name + 'Zoe Person' + +The password and real name can be changed at any time. + + >>> user.real_name = 'Zoe X. Person' + >>> user.password = 'another password' + >>> only_person.real_name + 'Zoe X. Person' + >>> only_person.password + 'another password' + + +Users and addresses +------------------- + +One of the pieces of information that a user links to is a set of email +addresses, in the form of IAddress objects. A user can control many +addresses, but addresses may be control by only one user. + +Given a user and an address, you can link the two together. + + >>> roster = mgr.get_roster('') + >>> address = roster.create('aperson@example.com', 'Anne Person') + >>> user.link(address) + >>> flush() + >>> sorted(address.address for address in user.addresses) + ['aperson@example.com'] + +But don't try to link an address to more than one user. + + >>> another_user = mgr.create_user() + >>> another_user.link(address) + Traceback (most recent call last): + ... + AddressAlreadyLinkedError: Anne Person <aperson@example.com> + +You can also ask whether a given user controls a given address. + + >>> user.controls(address) + True + >>> not_my_address = roster.create('bperson@example.com', 'Ben Person') + >>> user.controls(not_my_address) + False + +Given a text email address, the user manager can find the user that controls +that address. + + >>> mgr.get_user('aperson@example.com') is user + True + >>> mgr.get_user('bperson@example.com') is None + True + +Addresses can also be unlinked from a user. + + >>> user.unlink(address) + >>> user.controls(address) + False + >>> mgr.get_user('aperson@example.com') is None + True + +But don't try to unlink the address from a user it's not linked to. + + >>> user.unlink(address) + Traceback (most recent call last): + ... + AddressNotLinkedError: Anne Person <aperson@example.com> + >>> another_user.unlink(address) + Traceback (most recent call last): + ... + AddressNotLinkedError: Anne Person <aperson@example.com> + >>> mgr.delete_user(another_user) + + +Users and profiles +------------------ + +Users always have a default profile. + + >>> from Mailman.interfaces import IProfile + >>> IProfile.providedBy(user.profile) + True + +A profile is a set of preferences such as whether the user wants to receive an +acknowledgment of all of their posts to a mailing list... + + >>> user.profile.acknowledge_posts + False + +...whether the user wants to hide their email addresses on web pages and in +postings to the list... + + >>> user.profile.hide_address + True + +...the language code for the user's preferred language... + + >>> user.profile.preferred_language + 'en' + +...whether the user wants to receive the list's copy of a message if they are +explicitly named in one of the recipient headers... + + >>> user.profile.receive_list_copy + True + +...whether the user wants to receive a copy of their own postings... + + >>> user.profile.receive_own_postings + True + +...and the preferred delivery method. + + >>> print user.profile.delivery_mode + DeliveryMode.regular diff --git a/Mailman/enum.py b/Mailman/enum.py deleted file mode 100644 index 893e988ba..000000000 --- a/Mailman/enum.py +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright (C) 2004-2007 by the Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -# USA. - -"""Enumeration meta class. - -To define your own enumeration, do something like: - ->>> class Colors(Enum): -... red = 1 -... green = 2 -... blue = 3 - -Enum subclasses cannot be instantiated, but you can convert them to integers -and from integers. Returned enumeration attributes are singletons and can be -compared by identity only. -""" - -COMMASPACE = ', ' - -# Based on example by Jeremy Hylton -# Modified and extended by Barry Warsaw - - - -class EnumMetaclass(type): - def __init__(cls, name, bases, dict): - # cls == the class being defined - # name == the name of the class - # bases == the class's bases - # dict == the class attributes - super(EnumMetaclass, cls).__init__(name, bases, dict) - # Store EnumValues here for easy access. - cls._enums = {} - # Figure out the set of enum values on the base classes, to ensure - # that we don't get any duplicate values (which would screw up - # conversion from integer). - for basecls in cls.__mro__: - if hasattr(basecls, '_enums'): - cls._enums.update(basecls._enums) - # For each class attribute, create an EnumValue and store that back on - # the class instead of the int. Skip Python reserved names. Also add - # a mapping from the integer to the instance so we can return the same - # object on conversion. - for attr in dict: - if not (attr.startswith('__') and attr.endswith('__')): - intval = dict[attr] - enumval = EnumValue(name, intval, attr) - if intval in cls._enums: - raise TypeError('Multiple enum values: %s' % enumval) - # Store as an attribute on the class, and save the attr name - setattr(cls, attr, enumval) - cls._enums[intval] = attr - - def __getattr__(cls, name): - if name == '__members__': - return cls._enums.values() - raise AttributeError(name) - - def __repr__(cls): - enums = ['%s: %d' % (cls._enums[k], k) for k in sorted(cls._enums)] - return '<%s {%s}>' % (cls.__name__, COMMASPACE.join(enums)) - - def __iter__(cls): - for i in sorted(cls._enums): - yield getattr(cls, cls._enums[i]) - - def __getitem__(cls, i): - # i can be an integer or a string - attr = cls._enums.get(i) - if attr is None: - # It wasn't an integer -- try attribute name - try: - return getattr(cls, i) - except (AttributeError, TypeError): - raise ValueError(i) - return getattr(cls, attr) - - # Support both MyEnum[i] and MyEnum(i) - __call__ = __getitem__ - - - -class EnumValue(object): - """Class to represent an enumeration value. - - EnumValue('Color', 'red', 12) prints as 'Color.red' and can be converted - to the integer 12. - """ - def __init__(self, classname, value, enumname): - self._classname = classname - self._value = value - self._enumname = enumname - - def __repr__(self): - return 'EnumValue(%s, %s, %d)' % ( - self._classname, self._enumname, self._value) - - def __str__(self): - return self._enumname - - def __int__(self): - return self._value - - # Support only comparison by identity. Yes, really raise - # NotImplementedError instead of returning NotImplemented. - def __eq__(self, other): - raise NotImplementedError - - __ne__ = __eq__ - __lt__ = __eq__ - __gt__ = __eq__ - __le__ = __eq__ - __ge__ = __eq__ - - - -class Enum: - __metaclass__ = EnumMetaclass diff --git a/Mailman/ext/Makefile.in b/Mailman/ext/Makefile.in new file mode 100644 index 000000000..be14be4f4 --- /dev/null +++ b/Mailman/ext/Makefile.in @@ -0,0 +1,71 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +# NOTE: Makefile.in is converted into Makefile by the configure script +# in the parent directory. Once configure has run, you can recreate +# the Makefile by running just config.status. + +# Variables set by configure + +VPATH= @srcdir@ +srcdir= @srcdir@ +bindir= @bindir@ +prefix= @prefix@ +exec_prefix= @exec_prefix@ +DESTDIR= + +CC= @CC@ +CHMOD= @CHMOD@ +INSTALL= @INSTALL@ + +DEFS= @DEFS@ + +# Customizable but not set by configure + +OPT= @OPT@ +CFLAGS= $(OPT) $(DEFS) +PACKAGEDIR= $(prefix)/Mailman/ext +SHELL= /bin/sh + +MODULES= *.py + +# Modes for directories and executables created by the install +# process. Default to group-writable directories but +# user-only-writable for executables. +DIRMODE= 775 +EXEMODE= 755 +FILEMODE= 644 +INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE) + + +# Rules + +all: + +install: + for f in $(MODULES); \ + do \ + $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \ + done + +finish: + +clean: + +distclean: + -rm *.pyc + -rm Makefile diff --git a/Mailman/ext/__init__.py b/Mailman/ext/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/Mailman/ext/__init__.py diff --git a/Mailman/initialize.py b/Mailman/initialize.py index a47fbd045..2e7e65b70 100644 --- a/Mailman/initialize.py +++ b/Mailman/initialize.py @@ -25,11 +25,15 @@ by the command line arguments. """ import os +import sys import Mailman.configuration import Mailman.database +import Mailman.ext import Mailman.loginit +DOT = '.' + # These initialization calls are separated for the testing framework, which @@ -47,6 +51,15 @@ def initialize_1(config, propagate_logs): os.umask(007) Mailman.configuration.config.load(config) Mailman.loginit.initialize(propagate_logs) + # Set up site extensions directory + Mailman.ext.__path__.append(Mailman.configuration.config.EXT_DIR) + # Initialize the IListManager, IMemberManager, and IMessageManager + modparts = Mailman.configuration.config.MANAGERS_INIT_FUNCTION.split(DOT) + funcname = modparts.pop() + modname = DOT.join(modparts) + __import__(modname) + initfunc = getattr(sys.modules[modname], funcname) + initfunc() def initialize_2(): diff --git a/Mailman/interfaces/Makefile.in b/Mailman/interfaces/Makefile.in new file mode 100644 index 000000000..d16bf9b70 --- /dev/null +++ b/Mailman/interfaces/Makefile.in @@ -0,0 +1,71 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +# NOTE: Makefile.in is converted into Makefile by the configure script +# in the parent directory. Once configure has run, you can recreate +# the Makefile by running just config.status. + +# Variables set by configure + +VPATH= @srcdir@ +srcdir= @srcdir@ +bindir= @bindir@ +prefix= @prefix@ +exec_prefix= @exec_prefix@ +DESTDIR= + +CC= @CC@ +CHMOD= @CHMOD@ +INSTALL= @INSTALL@ + +DEFS= @DEFS@ + +# Customizable but not set by configure + +OPT= @OPT@ +CFLAGS= $(OPT) $(DEFS) +PACKAGEDIR= $(prefix)/Mailman/interfaces +SHELL= /bin/sh + +MODULES= *.py + +# Modes for directories and executables created by the install +# process. Default to group-writable directories but +# user-only-writable for executables. +DIRMODE= 775 +EXEMODE= 755 +FILEMODE= 644 +INSTALL_PROGRAM=$(INSTALL) -m $(EXEMODE) + + +# Rules + +all: + +install: + for f in $(MODULES); \ + do \ + $(INSTALL) -m $(FILEMODE) $(srcdir)/$$f $(DESTDIR)$(PACKAGEDIR); \ + done + +finish: + +clean: + +distclean: + -rm *.pyc + -rm Makefile diff --git a/Mailman/interfaces/__init__.py b/Mailman/interfaces/__init__.py new file mode 100644 index 000000000..e04ad1e78 --- /dev/null +++ b/Mailman/interfaces/__init__.py @@ -0,0 +1,46 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +import os +import sys + +from zope.interface import implementedBy +from zope.interface.interfaces import IInterface + +__all__ = [] + + + +def _populate(): + import Mailman.interfaces + iface_mod = sys.modules['Mailman.interfaces'] + # Expose interfaces defined in sub-modules into the top-level package + for filename in os.listdir(os.path.dirname(iface_mod.__file__)): + base, ext = os.path.splitext(filename) + if ext <> '.py': + continue + modname = 'Mailman.interfaces.' + base + __import__(modname) + module = sys.modules[modname] + for name in dir(module): + obj = getattr(module, name) + if IInterface.providedBy(obj): + setattr(iface_mod, name, obj) + __all__.append(name) + + +_populate() diff --git a/Mailman/interfaces/address.py b/Mailman/interfaces/address.py new file mode 100644 index 000000000..5f6a9193d --- /dev/null +++ b/Mailman/interfaces/address.py @@ -0,0 +1,44 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for email address related information.""" + +from zope.interface import Interface, Attribute + + + +class IAddress(Interface): + """Email address related information.""" + + address = Attribute( + """Read-only text email address.""") + + real_name = Attribute( + """Optional real name associated with the email address.""") + + registered_on = Attribute( + """The date and time at which this email address was registered. + + Registeration is really the date at which this address became known to + us. It may have been explicitly registered by a user, or it may have + been implicitly registered, e.g. by showing up in a non-member + posting.""") + + validated_on = Attribute( + """The date and time at which this email address was validated, or + None if the email address has not yet been validated. The specific + method of validation is not defined here.""") diff --git a/Mailman/interfaces/listmanager.py b/Mailman/interfaces/listmanager.py new file mode 100644 index 000000000..113ca35af --- /dev/null +++ b/Mailman/interfaces/listmanager.py @@ -0,0 +1,61 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for list storage, deleting, and finding.""" + +from zope.interface import Interface, Attribute + + + +class IListManager(Interface): + """The interface of the global list manager. + + The list manager manages IMailingList objects. You can add and remove + IMailingList objects from the list manager, and you can retrieve them + from the manager via their fully qualified list name + (e.g. 'mylist@example.com'). + """ + + def create(fqdn_listname): + """Create an IMailingList with the given fully qualified list name. + + Raises MMListAlreadyExistsError if the named list already exists. + """ + + def get(fqdn_listname): + """Return the IMailingList with the given fully qualified list name. + + Raises MMUnknownListError if the names list does not exist. + """ + + def delete(mlist): + """Remove the IMailingList from the backend storage.""" + + def get(fqdn_listname): + """Find the IMailingList with the matching fully qualified list name. + + Returns the matching IMailList instance or None if there was no + matching mailing list. fqdn_listname + """ + + mailing_lists = Attribute( + """An iterator over all the IMailingList objects managed by this list + manager.""") + + names = Attribute( + """An iterator over the fully qualified list names of all mailing + lists managed by this list manager.""") diff --git a/Mailman/interfaces/mailinglist.py b/Mailman/interfaces/mailinglist.py new file mode 100644 index 000000000..c162801ab --- /dev/null +++ b/Mailman/interfaces/mailinglist.py @@ -0,0 +1,28 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Marker interface for a mailing list.""" + +from zope.interface import Interface, Attribute + + + +class IMailingList(Interface): + """Marker interface for a mailing list. + + This is usually composed with several other interfaces. + """ diff --git a/Mailman/interfaces/manager.py b/Mailman/interfaces/manager.py new file mode 100644 index 000000000..fe22ec74d --- /dev/null +++ b/Mailman/interfaces/manager.py @@ -0,0 +1,57 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Generic database object manager interface.""" + +from zope.interface import Interface, Attribute + + + +class IManaged(Interface): + """An object managed by an IManager.""" + + name = Attribute("""The name of the managed object.""") + + + +class IManager(Interface): + """Create and manage profiles.""" + + def create(name): + """Create and return a new IManaged object. + + name is the unique name for this object. Raises + ExistingManagedObjectError if an IManaged object with the given name + already exists. + """ + + def get(name): + """Return the named IManaged object. + + Raises NoSuchManagedObjectError if the named IManaged object does not + exist. + """ + + def delete(name): + """Delete the named IManaged object. + + Raises NoSuchManagedObjectError if the named IManaged object does not + exist. + """ + + iterator = Attribute( + """Return an iterator over the all the IManaged objects.""") diff --git a/Mailman/interfaces/mlistdigests.py b/Mailman/interfaces/mlistdigests.py new file mode 100644 index 000000000..bd9467b14 --- /dev/null +++ b/Mailman/interfaces/mlistdigests.py @@ -0,0 +1,66 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for digest related information.""" + +from zope.interface import Interface, Attribute + + + +class IMailingListDigests(Interface): + """Digest related information for the mailing list.""" + + volume_number = Attribute( + """A monotonically increasing integer sequentially assigned to each + new digest volume. The volume number may be bumped either + automatically (i.e. on a defined schedule) or manually. When the + volume number is bumped, the digest number is always reset to 1.""") + + digest_number = Attribute( + """A sequence number for a specific digest in a given volume. When + the digest volume number is bumped, the digest number is reset to + 1.""") + + def bump(): + """Bump the digest's volume number to the next integer in the + sequence, and reset the digest number to 1. + """ + + message_count = Attribute( + """The number of messages in the digest currently being collected.""") + + digest_size = Attribute( + """The approximate size in kilobytes of the digest currently being + collected.""") + + messages = Attribute( + """An iterator over all the messages in the digest currently being + created. Returns individual IPostedMessage objects. + """) + + limits = Attribute( + """An iterator over the IDigestLimiters associated with this digest. + Each limiter can make a determination of whether the digest has + reached the threshold for being automatically sent.""") + + def send(): + """Send this digest now.""" + + decorators = Attribute( + """An iterator over all the IDecorators associated with this digest. + When a digest is being sent, each decorator may modify the final + digest text.""") diff --git a/Mailman/interfaces/mlistemail.py b/Mailman/interfaces/mlistemail.py new file mode 100644 index 000000000..958ea324d --- /dev/null +++ b/Mailman/interfaces/mlistemail.py @@ -0,0 +1,78 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for the email addresses associated with a mailing list.""" + +from zope.interface import Interface, Attribute + + + +class IMailingListAddresses(Interface): + """The email addresses associated with a mailing list. + + All attributes are read-only. + """ + + posting_address = Attribute( + """The address to which messages are posted for copying to the full + list membership, where 'full' of course means those members for which + delivery is currently enabled.""") + + noreply_address = Attribute( + """The address to which all messages will be immediately discarded, + without prejudice or record. This address is specific to the ddomain, + even though it's available on the IMailingListAddresses interface. + Generally, humans should never respond directly to this address.""") + + owner_address = Attribute( + """The address which reaches the owners and moderators of the mailing + list. There is no address which reaches just the owners or just the + moderators of a mailing list.""") + + request_address = Attribute( + """The address which reaches the email robot for this mailing list. + This robot can process various email commands such as changing + delivery options, getting information or help about the mailing list, + or processing subscrptions and unsubscriptions (although for the + latter two, it's better to use the join_address and leave_address.""") + + bounces_address = Attribute( + """The address which reaches the automated bounce processor for this + mailing list. Generally, humans should never respond directly to this + address.""") + + join_address = Attribute( + """The address to which subscription requests should be sent. See + subscribe_address for a backward compatible alias.""") + + leave_address = Attribute( + """The address to which unsubscription requests should be sent. See + unsubscribe_address for a backward compatible alias.""") + + subscribe_address = Attribute( + """Deprecated address to which subscription requests may be sent. + This address is provided for backward compatibility only. See + join_address for the preferred alias.""") + + leave_address = Attribute( + """Deprecated address to which unsubscription requests may be sent. + This address is provided for backward compatibility only. See + leave_address for the preferred alias.""") + + def confirm_address(cookie=''): + """The address used for various forms of email confirmation.""" + diff --git a/Mailman/interfaces/mlistid.py b/Mailman/interfaces/mlistid.py new file mode 100644 index 000000000..ecd4b39cb --- /dev/null +++ b/Mailman/interfaces/mlistid.py @@ -0,0 +1,46 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for a mailing list identity.""" + +from zope.interface import Interface, Attribute + + + +class IMailingListIdentity(Interface): + """The basic identifying information of a mailing list.""" + + list_name = Attribute( + """The read-only short name of the mailing list. Note that where a + Mailman installation supports multiple domains, this short name may + not be unique. Use the fqdn_listname attribute for a guaranteed + unique id for the mailing list. This short name is always the local + part of the posting email address. For example, if messages are + posted to mylist@example.com, then the list_name is 'mylist'.""") + + host_name = Attribute( + """The read-only domain name 'hosting' this mailing list. This is + always the domain name part of the posting email address, and it may + bear no relationship to the web url used to access this mailing list. + For example, if messages are posted to mylist@example.com, then the + host_name is 'example.com'.""") + + fqdn_listname = Attribute( + """The read-only fully qualified name of the mailing list. This is + the guaranteed unique id for the mailing list, and it is always the + address to which messages are posted, e.g. mylist@example.com. It is + always comprised of the list_name + '@' + host_name.""") diff --git a/Mailman/interfaces/mlistrequest.py b/Mailman/interfaces/mlistrequest.py new file mode 100644 index 000000000..b9e1d4702 --- /dev/null +++ b/Mailman/interfaces/mlistrequest.py @@ -0,0 +1,29 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for a web request accessing a mailing list.""" + +from zope.interface import Interface, Attribute + + + +class IMailingListRequest(Interface): + """The web request accessing a mailing list.""" + + location = Attribute( + """The url location of the request, used to calculate relative urls by + other components.""") diff --git a/Mailman/interfaces/mlistrosters.py b/Mailman/interfaces/mlistrosters.py new file mode 100644 index 000000000..1b407f472 --- /dev/null +++ b/Mailman/interfaces/mlistrosters.py @@ -0,0 +1,96 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for mailing list rosters and roster sets.""" + +from zope.interface import Interface, Attribute + + + +class IMailingListRosters(Interface): + """Mailing list rosters, roster sets, and members. + + This are all the email addresses that might possibly get messages from or + relating to this mailing list. + """ + + owners = Attribute( + """The IUser owners of this mailing list. + + This does not include the IUsers who are moderators but not owners of + the mailing list.""") + + moderators = Attribute( + """The IUser moderators of this mailing list. + + This does not include the IUsers who are owners but not moderators of + the mailing list.""") + + administrators = Attribute( + """The IUser administrators of this mailing list. + + This includes the IUsers who are both owners and moderators of the + mailing list.""") + + owner_rosters = Attribute( + """An iterator over the IRosters containing all the owners of this + mailing list.""") + + moderator_rosters = Attribute( + """An iterator over the IRosters containing all the moderators of this + mailing list.""") + + def add_owner_roster(roster): + """Add an IRoster to this mailing list's set of owner rosters.""" + + def delete_owner_roster(roster): + """Remove an IRoster from this mailing list's set of owner rosters.""" + + def add_moderator_roster(roster): + """Add an IRoster to this mailing list's set of moderator rosters.""" + + def delete_moderator_roster(roster): + """Remove an IRoster from this mailing list's set of moderator + rosters.""" + + members = Attribute( + """An iterator over all the members of the mailing list, regardless of + whether they are to receive regular messages or digests, or whether + they have their delivery disabled or not.""") + + regular_members = Attribute( + """An iterator over all the IMembers who are to receive regular + postings (i.e. non-digests) from the mailing list, regardless of + whether they have their delivery disabled or not.""") + + digest_members = Attribute( + """An iterator over all the IMembers who are to receive digests of + postings to this mailing list, regardless of whether they have their + deliver disabled or not, or of the type of digest they are to + receive.""") + + member_rosters = Attribute( + """An iterator over the IRosters containing all the members of this + mailing list.""") + + def add_member_roster(roster): + """Add the given IRoster to the list of rosters for the members of this + mailing list.""" + + def remove_member_roster(roster): + """Remove the given IRoster to the list of rosters for the members of + this mailing list.""" diff --git a/Mailman/interfaces/mliststats.py b/Mailman/interfaces/mliststats.py new file mode 100644 index 000000000..9ed25b1ce --- /dev/null +++ b/Mailman/interfaces/mliststats.py @@ -0,0 +1,38 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for various mailing list statistics.""" + +from zope.interface import Interface, Attribute + + + +class IMailingListStatistics(Interface): + """Various statistics of a mailing list.""" + + creation_date = Attribute( + """The date and time that the mailing list was created.""") + + last_post_date = Attribute( + """The date and time a message was last posted to the mailing list.""") + + post_number = Attribute( + """A monotonically increasing integer sequentially assigned to each + list posting.""") + + last_digest_date = Attribute( + """The date and time a digest of this mailing list was last sent.""") diff --git a/Mailman/interfaces/mlistweb.py b/Mailman/interfaces/mlistweb.py new file mode 100644 index 000000000..16eb94281 --- /dev/null +++ b/Mailman/interfaces/mlistweb.py @@ -0,0 +1,39 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for the web addresses associated with a mailing list.""" + +from zope.interface import Interface, Attribute + + + +class IMailingListURLs(Interface): + """The web addresses associated with a mailing list.""" + + protocol = Attribute( + """The web protocol to use to contact the server providing the web + interface for this mailing list, e.g. 'http' or 'https'.""") + + web_host = Attribute( + """The read-only domain name of the host to contact for interacting + with the web interface of the mailing list.""") + + def script_url(target, context=None): + """Return the url to the given script target. If 'context' is not + given, or is None, then an absolute url is returned. If context is + given, it must be an IMailingListRequest object, and the returned url + will be relative to that object's 'location' attribute.""" diff --git a/Mailman/interfaces/permissions.py b/Mailman/interfaces/permissions.py new file mode 100644 index 000000000..c6c5e015a --- /dev/null +++ b/Mailman/interfaces/permissions.py @@ -0,0 +1,28 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interfaces for various permissions.""" + +from zope.interface import Interface, Attribute + + + +class IPostingPermission(Interface): + """Posting related permissions.""" + + okay_to_post = Attribute( + """Boolean specifying whether it is okay to post to the list.""") diff --git a/Mailman/interfaces/profile.py b/Mailman/interfaces/profile.py new file mode 100644 index 000000000..ed3968f9d --- /dev/null +++ b/Mailman/interfaces/profile.py @@ -0,0 +1,53 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for a profile, which describes delivery related information.""" + +from zope.interface import Interface, Attribute + + + +class IProfile(Interface): + """Delivery related information.""" + + acknowledge_posts = Attribute( + """Boolean specifying whether to send an acknowledgment receipt for + every posting to the mailing list. + """) + + hide_address = Attribute( + """Boolean specifying whether to hide this email address from fellow + list members. + """) + + preferred_language = Attribute( + """Preferred language for interacting with a mailing list.""") + + receive_list_copy = Attribute( + """Boolean specifying whether to receive a list copy if the user is + explicitly named in one of the recipient headers. + """) + + receive_own_postings = Attribute( + """Boolean specifying whether to receive a list copy of the user's own + postings to the mailing list. + """) + + delivery_mode = Attribute( + """The preferred delivery mode. + + This is an enum constant of the type DeliveryMode.""") diff --git a/Mailman/interfaces/roster.py b/Mailman/interfaces/roster.py new file mode 100644 index 000000000..7ddbd5101 --- /dev/null +++ b/Mailman/interfaces/roster.py @@ -0,0 +1,42 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for a roster of members.""" + +from zope.interface import Interface, Attribute + + + +class IRoster(Interface): + """A roster is a collection of IUsers.""" + + name = Attribute( + """The name for this roster. + + Rosters are considered equal if they have the same name.""") + + addresses = Attribute( + """An iterator over all the addresses managed by this roster.""") + + def create(email_address, real_name=None): + """Create an IAddress and return it. + + email_address is textual email address to add. real_name is the + optional real name that gets associated with the email address. + + Raises ExistingAddressError if address already exists. + """ diff --git a/Mailman/interfaces/rosterset.py b/Mailman/interfaces/rosterset.py new file mode 100644 index 000000000..12f28bffa --- /dev/null +++ b/Mailman/interfaces/rosterset.py @@ -0,0 +1,47 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface for a collection of rosters.""" + +from zope.interface import Interface, Attribute + + + +class IRosterSet(Interface): + """A collection of IRosters.""" + + serial = Attribute( + """The unique integer serial number for this roster set. + + This is necessary to enforce the separation between the list storage + and the user/roster storage. You should always reference a roster set + indirectly through its serial number.""") + + rosters = Attribute( + """An iterator over all the IRosters in this collection.""") + + def add(roster): + """Add the IRoster to this collection. + + Does nothing if the roster is already a member of this collection. + """ + + def delete(roster): + """Delete the IRoster from this collection. + + Does nothing if the roster is not a member of this collection. + """ diff --git a/Mailman/interfaces/user.py b/Mailman/interfaces/user.py new file mode 100644 index 000000000..6990eee4b --- /dev/null +++ b/Mailman/interfaces/user.py @@ -0,0 +1,59 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface describing the basics of a user.""" + +from zope.interface import Interface, Attribute + + + +class IUser(Interface): + """A basic user.""" + + real_name = Attribute( + """This user's Real Name.""") + + password = Attribute( + """This user's password information.""") + + profile = Attribute( + """The default IProfile for this user.""") + + addresses = Attribute( + """An iterator over all the IAddresses controlled by this user.""") + + def link(address): + """Link this user to the given IAddress. + + Raises AddressAlreadyLinkedError if this IAddress is already linked to + another user. + """ + + def unlink(address): + """Unlink this IAddress from the user. + + Raises AddressNotLinkedError if this address is not linked to this + user, either because it's not linked to any user or it's linked to + some other user. + """ + + def controls(address): + """Determine whether this user controls the given email address. + + 'address' is a text email address. This method returns true if the + user controls the given email address, otherwise false. + """ diff --git a/Mailman/interfaces/usermanager.py b/Mailman/interfaces/usermanager.py new file mode 100644 index 000000000..302fe9b60 --- /dev/null +++ b/Mailman/interfaces/usermanager.py @@ -0,0 +1,82 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Interface describing a user manager service.""" + +from zope.interface import Interface, Attribute + + + +class IUserManager(Interface): + """The interface of a global user manager service. + + Different user managers have different concepts of what a user is, and the + users managed by different IUserManagers are completely independent. This + is how you can separate the user contexts for different domains, on a + multiple domain system. + + There is one special roster, the null roster ('') which contains all + IUsers in all IRosters. + """ + + def create_roster(name): + """Create and return the named IRoster. + + Raises RosterExistsError if the named roster already exists. + """ + + def get_roster(name): + """Return the named IRoster. + + Raises NoSuchRosterError if the named roster doesnot yet exist. + """ + + def delete_roster(name): + """Delete the named IRoster. + + Raises NoSuchRosterError if the named roster doesnot yet exist. + """ + + rosters = Attribute( + """An iterator over all IRosters managed by this user manager.""") + + def create_user(): + """Create and return an IUser.""" + + def delete_user(user): + """Delete the given IUser.""" + + def get_user(address): + """Get the user that controls the given email address, or None. + + 'address' is a text email address. + """ + + users = Attribute( + """An iterator over all the IUsers managed by this user manager.""") + + def create_rosterset(): + """Create and return a new IRosterSet. + + IRosterSets manage groups of IRosters. + """ + + def delete_rosterset(rosterset): + """Delete the given IRosterSet.""" + + def get_rosterset(serial): + """Return the IRosterSet that matches the serial number, or None.""" diff --git a/Mailman/loginit.py b/Mailman/loginit.py index 678875707..c3b3aac05 100644 --- a/Mailman/loginit.py +++ b/Mailman/loginit.py @@ -121,7 +121,8 @@ def initialize(propagate=False): # minimal overloading of our logger configurations. cp = ReallySafeConfigParser() if config.LOG_CONFIG_FILE: - cp.read(config.LOG_CONFIG_FILE) + path = os.path.join(config.ETC_DIR, config.LOG_CONFIG_FILE) + cp.read(os.path.normpath(path)) # Create the subloggers for logger in LOGGERS: log = logging.getLogger('mailman.' + logger) diff --git a/Mailman/passwords.py b/Mailman/passwords.py index 615bbcc17..9e7c5615c 100644 --- a/Mailman/passwords.py +++ b/Mailman/passwords.py @@ -28,9 +28,9 @@ import hmac from array import array from base64 import urlsafe_b64decode as decode from base64 import urlsafe_b64encode as encode +from munepy import Enum from Mailman import Errors -from Mailman.enum import Enum SALT_LENGTH = 20 # bytes ITERATIONS = 2000 diff --git a/Mailman/testing/inmemory.py b/Mailman/testing/inmemory.py index ca5313452..1489f0ffb 100644 --- a/Mailman/testing/inmemory.py +++ b/Mailman/testing/inmemory.py @@ -134,65 +134,6 @@ class Address(object): -class RegularDelivery(object): - implements(IRegularDelivery) - - -class PlainTextDigestDelivery(object): - implements(IPlainTextDigestDelivery) - - -class MIMEDigestDelivery(object): - implements(IMIMEDigestDeliver) - - - -class DeliveryEnabled(object): - implements(IDeliveryStatus) - - @property - def enabled(self): - return True - - -class DeliveryDisabled(object): - implements(IDeliveryStatus) - - @property - def enabled(self): - return False - - -class DeliveryDisabledByUser(DeliveryDisabled): - implements(IDeliveryDisabledByUser) - - -class DeliveryDisabledbyAdministrator(DeliveryDisabled): - implements(IDeliveryDisabledByAdministrator) - - reason = u'Unknown' - - -class DeliveryDisabledByBounces(DeliveryDisabled): - implements(IDeliveryDisabledByBounces) - - bounce_info = 'XXX' - - -class DeliveryTemporarilySuspended(object): - implements(IDeliveryTemporarilySuspended) - - def __init__(self, start_date, end_date): - self.start_date = start_date - self.end_date = end_date - - @property - def enabled(self): - now = datetime.datetime.now() - return not (self.start_date <= now < self.end_date) - - - class OkayToPost(object): implements(IPostingPermission) @@ -201,21 +142,6 @@ class OkayToPost(object): -class Profile(object): - implements(IProfile) - - # System defaults - acknowledge = False - hide = True - language = 'en' - list_copy = True - own_postings = True - delivery_mode = RegularDelivery() - delivery_status = DeliveryEnabled() - posting_permission = OkayToPost() - - - class Roster(object): implements(IRoster) @@ -247,24 +173,6 @@ class Roster(object): -class Member(object): - implements(IMember) - - def __init__(self, address, roster, profile=None): - self._address = address - self._roster = roster - self.profile = profile or Profile() - - @property - def address(self): - return self._address - - @property - def roster(self): - return self._roster - - - class ListManager(object): implements(IListManager) diff --git a/Mailman/testing/test_address.py b/Mailman/testing/test_address.py new file mode 100644 index 000000000..a04b3e795 --- /dev/null +++ b/Mailman/testing/test_address.py @@ -0,0 +1,30 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Doctest harness for testing IAddress interface.""" + +import doctest +import unittest + +options = doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE + + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(doctest.DocFileSuite('../docs/addresses.txt', + optionflags=options)) + return suite diff --git a/Mailman/testing/test_enum.py b/Mailman/testing/test_enum.py deleted file mode 100644 index a8c389bb4..000000000 --- a/Mailman/testing/test_enum.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright (C) 2007 by the Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -# USA. - -"""Unit tests for Enums.""" - -import operator -import unittest - -from Mailman.enum import Enum - - - -class Colors(Enum): - red = 1 - green = 2 - blue = 3 - - -class MoreColors(Colors): - pink = 4 - cyan = 5 - - -class OtherColors(Enum): - red = 1 - blue = 2 - yellow = 3 - - - -class TestEnum(unittest.TestCase): - def test_enum_basics(self): - unless = self.failUnless - raises = self.assertRaises - # Cannot compare by equality - raises(NotImplementedError, operator.eq, Colors.red, Colors.red) - raises(NotImplementedError, operator.ne, Colors.red, Colors.red) - raises(NotImplementedError, operator.lt, Colors.red, Colors.red) - raises(NotImplementedError, operator.gt, Colors.red, Colors.red) - raises(NotImplementedError, operator.le, Colors.red, Colors.red) - raises(NotImplementedError, operator.ge, Colors.red, Colors.red) - raises(NotImplementedError, operator.eq, Colors.red, 1) - raises(NotImplementedError, operator.ne, Colors.red, 1) - raises(NotImplementedError, operator.lt, Colors.red, 1) - raises(NotImplementedError, operator.gt, Colors.red, 1) - raises(NotImplementedError, operator.le, Colors.red, 1) - raises(NotImplementedError, operator.ge, Colors.red, 1) - # Comparison by identity - unless(Colors.red is Colors.red) - unless(Colors.red is MoreColors.red) - unless(Colors.red is not OtherColors.red) - unless(Colors.red is not Colors.blue) - - def test_enum_conversions(self): - eq = self.assertEqual - unless = self.failUnless - raises = self.assertRaises - unless(Colors.red is Colors['red']) - unless(Colors.red is Colors[1]) - unless(Colors.red is Colors('red')) - unless(Colors.red is Colors(1)) - unless(Colors.red is not Colors['blue']) - unless(Colors.red is not Colors[2]) - unless(Colors.red is not Colors('blue')) - unless(Colors.red is not Colors(2)) - unless(Colors.red is MoreColors['red']) - unless(Colors.red is MoreColors[1]) - unless(Colors.red is MoreColors('red')) - unless(Colors.red is MoreColors(1)) - unless(Colors.red is not OtherColors['red']) - unless(Colors.red is not OtherColors[1]) - unless(Colors.red is not OtherColors('red')) - unless(Colors.red is not OtherColors(1)) - raises(ValueError, Colors.__getitem__, 'magenta') - raises(ValueError, Colors.__getitem__, 99) - raises(ValueError, Colors.__call__, 'magenta') - raises(ValueError, Colors.__call__, 99) - eq(int(Colors.red), 1) - eq(int(Colors.blue), 3) - eq(int(MoreColors.red), 1) - eq(int(OtherColors.blue), 2) - - def test_enum_duplicates(self): - try: - # This is bad because kyle and kenny have the same integer value. - class Bad(Enum): - cartman = 1 - stan = 2 - kyle = 3 - kenny = 3 - butters = 4 - except TypeError: - got_error = True - else: - got_error = False - self.failUnless(got_error) - - def test_enum_iteration(self): - eq = self.assertEqual - # Iteration sorts on the int value of the enum - values = [str(v) for v in MoreColors] - eq(values, ['red', 'green', 'blue', 'pink', 'cyan']) - values = [int(v) for v in MoreColors] - eq(values, [1, 2, 3, 4, 5]) - - - -def test_suite(): - suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TestEnum)) - return suite diff --git a/Mailman/testing/test_mlist_addresses.py b/Mailman/testing/test_mlist_addresses.py new file mode 100644 index 000000000..fe32c12b2 --- /dev/null +++ b/Mailman/testing/test_mlist_addresses.py @@ -0,0 +1,28 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Doctest harness for the IMailingListAddresses interface.""" + +import doctest +import unittest + + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(doctest.DocFileSuite('../docs/mlist-addresses.txt', + optionflags=doctest.ELLIPSIS)) + return suite diff --git a/Mailman/testing/test_mlist_rosters.py b/Mailman/testing/test_mlist_rosters.py new file mode 100644 index 000000000..e8713b828 --- /dev/null +++ b/Mailman/testing/test_mlist_rosters.py @@ -0,0 +1,30 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Doctest harness for the IMailingListRosters interface.""" + +import doctest +import unittest + +options = doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE + + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(doctest.DocFileSuite('../docs/mlist-rosters.txt', + optionflags=options)) + return suite diff --git a/Mailman/testing/test_use_listmanager.py b/Mailman/testing/test_use_listmanager.py new file mode 100644 index 000000000..f78b50a0f --- /dev/null +++ b/Mailman/testing/test_use_listmanager.py @@ -0,0 +1,28 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Doctest harness for testing mailing list creation and deletion.""" + +import doctest +import unittest + + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(doctest.DocFileSuite('../docs/use-listmanager.txt', + optionflags=doctest.ELLIPSIS)) + return suite diff --git a/Mailman/testing/test_use_usermanager.py b/Mailman/testing/test_use_usermanager.py new file mode 100644 index 000000000..0484e3e10 --- /dev/null +++ b/Mailman/testing/test_use_usermanager.py @@ -0,0 +1,28 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Doctest harness for testing mailing list creation and deletion.""" + +import doctest +import unittest + + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(doctest.DocFileSuite('../docs/use-usermanager.txt', + optionflags=doctest.ELLIPSIS)) + return suite diff --git a/Mailman/testing/test_user.py b/Mailman/testing/test_user.py new file mode 100644 index 000000000..1c075a164 --- /dev/null +++ b/Mailman/testing/test_user.py @@ -0,0 +1,30 @@ +# Copyright (C) 2007 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. + +"""Doctest harness for testing users.""" + +import doctest +import unittest + +options = doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE + + +def test_suite(): + suite = unittest.TestSuite() + suite.addTest(doctest.DocFileSuite('../docs/users.txt', + optionflags=options)) + return suite diff --git a/Mailman/testing/testing.cfg.in b/Mailman/testing/testing.cfg.in index 80e5e8bfc..2609ef5cf 100644 --- a/Mailman/testing/testing.cfg.in +++ b/Mailman/testing/testing.cfg.in @@ -4,7 +4,6 @@ # both the process running the tests and all sub-processes (e.g. qrunners) # must share the same configuration file. -MANAGERS_INIT_FUNCTION = 'Mailman.testing.inmemory.initialize' SMTPPORT = 10825 MAX_RESTARTS = 1 MTA = None diff --git a/Makefile.in b/Makefile.in index c9f1bb6e4..43c44326d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -45,12 +45,14 @@ OPT= @OPT@ CFLAGS= @CFLAGS@ $(OPT) $(DEFS) VAR_DIRS= \ - etc logs archives lists locks data spam qfiles \ + etc ext logs archives lists locks data spam qfiles \ archives/private archives/public ARCH_INDEP_DIRS= \ bin templates scripts cron pythonlib \ - Mailman Mailman/bin Mailman/database Mailman/Cgi Mailman/Archiver \ + Mailman Mailman/bin Mailman/interfaces \ + Mailman/database Mailman/database/tables Mailman/database/model \ + Mailman/docs Mailman/ext Mailman/Cgi Mailman/Archiver \ Mailman/Handlers Mailman/Queue Mailman/Queue/tests \ Mailman/Bouncers \ Mailman/MTA Mailman/Gui Mailman/Commands messages icons \ @@ -85,9 +87,9 @@ subdirs: $(SUBDIRS) (cd $$d; $(MAKE)); \ done -install: doinstall update +install: justinstall update -doinstall: $(SUBDIRS) +justinstall: $(SUBDIRS) @echo "Creating architecture independent directories..." @for d in $(VAR_DIRS); \ do \ @@ -1,26 +1,55 @@ #! /bin/sh -# From configure.in Revision: 8145 . +# From configure.in Revision: 8196 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for GNU Mailman 2.2.0a0. +# Generated by GNU Autoconf 2.61 for GNU Mailman 2.2.0a0. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -30,8 +59,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -45,18 +109,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -64,157 +129,388 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || + chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -223,7 +519,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -232,39 +549,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 </dev/null 6>&1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME='GNU Mailman' PACKAGE_TARNAME='mailman' @@ -276,42 +581,118 @@ ac_default_prefix=/usr/local/mailman # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include <stdlib.h> # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include <strings.h> #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include <inttypes.h> -#else -# if HAVE_STDINT_H -# include <stdint.h> -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_UNISTD_H # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_python PYTHON INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SET_MAKE TRUE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT OPT VAR_PREFIX MAILMAN_USER MAILMAN_GROUP MAIL_GROUP CGI_GROUP CGIEXT MAILHOST URLHOST LANGUAGES CPP EGREP SCRIPTS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +with_python +PYTHON +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +LN_S +SET_MAKE +TRUE +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +OPT +VAR_PREFIX +MAILMAN_USER +MAILMAN_GROUP +MAIL_GROUP +CGI_GROUP +CGIEXT +MAILHOST +URLHOST +LANGUAGES +CPP +GREP +EGREP +SCRIPTS +LIBOBJS +LTLIBOBJS' ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= @@ -338,34 +719,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -387,33 +782,45 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -440,6 +847,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -464,13 +877,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -535,6 +951,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -587,24 +1013,20 @@ do -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. @@ -635,8 +1057,7 @@ Try \`$0 --help' for more information." >&2 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) @@ -656,27 +1077,19 @@ if test -n "$ac_prev"; then { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -703,74 +1116,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -799,9 +1214,6 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -819,15 +1231,22 @@ Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/mailman] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -861,128 +1280,95 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> - CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have - headers in a nonstandard directory <include dir> + LIBS libraries to pass to the linker, e.g. -l<library> + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if + you have headers in a nonstandard directory <include dir> CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || continue ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF GNU Mailman configure 2.2.0a0 -generated by GNU Autoconf 2.59 +generated by GNU Autoconf 2.61 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU Mailman $as_me 2.2.0a0, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1001,7 +1387,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1015,6 +1401,7 @@ do test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1036,7 +1423,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1047,7 +1433,7 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in @@ -1069,9 +1455,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1082,8 +1466,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1096,20 +1480,34 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1120,22 +1518,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1147,26 +1551,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1197,14 +1599,17 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" fi -for ac_site_file in $CONFIG_SITE; do +shift +for ac_site_file +do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} @@ -1220,8 +1625,8 @@ if test -r "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else @@ -1233,12 +1638,11 @@ fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 @@ -1263,8 +1667,7 @@ echo "$as_me: current value: $ac_new_val" >&2;} # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1281,12 +1684,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1311,6 +1708,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu @@ -1319,27 +1721,27 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Check for Python! Better be found on $PATH -echo "$as_me:$LINENO: checking for --with-python" >&5 -echo $ECHO_N "checking for --with-python... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-python" >&5 +echo $ECHO_N "checking for --with-python... $ECHO_C" >&6; } -# Check whether --with-python or --without-python was given. +# Check whether --with-python was given. if test "${with_python+set}" = set; then - withval="$with_python" + withval=$with_python; +fi -fi; case "$with_python" in "") ans="no";; *) ans="$with_python" esac -echo "$as_me:$LINENO: result: $ans" >&5 -echo "${ECHO_T}$ans" >&6 +{ echo "$as_me:$LINENO: result: $ans" >&5 +echo "${ECHO_T}$ans" >&6; } if test -z "$with_python" then # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_with_python+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1354,32 +1756,33 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_with_python="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_with_python" && ac_cv_path_with_python="/usr/local/bin/python" ;; esac fi with_python=$ac_cv_path_with_python - if test -n "$with_python"; then - echo "$as_me:$LINENO: result: $with_python" >&5 -echo "${ECHO_T}$with_python" >&6 + { echo "$as_me:$LINENO: result: $with_python" >&5 +echo "${ECHO_T}$with_python" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi -echo "$as_me:$LINENO: checking Python interpreter" >&5 -echo $ECHO_N "checking Python interpreter... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking Python interpreter" >&5 +echo $ECHO_N "checking Python interpreter... $ECHO_C" >&6; } if test ! -x $with_python then { { echo "$as_me:$LINENO: error: @@ -1396,12 +1799,12 @@ echo "$as_me: error: fi PYTHON=$with_python -echo "$as_me:$LINENO: result: $PYTHON" >&5 -echo "${ECHO_T}$PYTHON" >&6 +{ echo "$as_me:$LINENO: result: $PYTHON" >&5 +echo "${ECHO_T}$PYTHON" >&6; } # See if Python is new enough. 2.5 or better is required. -echo "$as_me:$LINENO: checking Python version" >&5 -echo $ECHO_N "checking Python version... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking Python version" >&5 +echo $ECHO_N "checking Python version... $ECHO_C" >&6; } cat > conftest.py <<EOF import sys @@ -1433,13 +1836,13 @@ echo "$as_me: error: ***** Python 2.5 or newer is required" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $version" >&5 -echo "${ECHO_T}$version" >&6 +{ echo "$as_me:$LINENO: result: $version" >&5 +echo "${ECHO_T}$version" >&6; } # Make sure distutils is available. Some Linux Python packages split # distutils into the "-devel" package, so they need both. -echo "$as_me:$LINENO: checking that Python has a working distutils" >&5 -echo $ECHO_N "checking that Python has a working distutils... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking that Python has a working distutils" >&5 +echo $ECHO_N "checking that Python has a working distutils... $ECHO_C" >&6; } cat > conftest.py <<EOF try: @@ -1478,34 +1881,40 @@ echo "$as_me: error: ***** from source. See README.LINUX for details" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $havedistutils" >&5 -echo "${ECHO_T}$havedistutils" >&6 +{ echo "$as_me:$LINENO: result: $havedistutils" >&5 +echo "${ECHO_T}$havedistutils" >&6; } # Checks for programs. ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -1520,8 +1929,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -1543,7 +1952,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1562,21 +1971,22 @@ case $as_dir/ in ;; esac done +IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1586,50 +1996,51 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 + { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6; } fi -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Extract the first word of "true", so it can be a program name with args. set dummy true; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_TRUE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1645,37 +2056,37 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_TRUE="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_path_TRUE" && ac_cv_path_TRUE="true" ;; esac fi TRUE=$ac_cv_path_TRUE - if test -n "$TRUE"; then - echo "$as_me:$LINENO: result: $TRUE" >&5 -echo "${ECHO_T}$TRUE" >&6 + { echo "$as_me:$LINENO: result: $TRUE" >&5 +echo "${ECHO_T}$TRUE" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + # Find compiler, allow alternatives to gcc -echo "$as_me:$LINENO: checking for --without-gcc" >&5 -echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --without-gcc" >&5 +echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; } -# Check whether --with-gcc or --without-gcc was given. +# Check whether --with-gcc was given. if test "${with_gcc+set}" = set; then - withval="$with_gcc" - + withval=$with_gcc; case $withval in no) CC=cc without_gcc=yes;; @@ -1686,9 +2097,10 @@ if test "${with_gcc+set}" = set; then esac else without_gcc=no; -fi; -echo "$as_me:$LINENO: result: $without_gcc" >&5 -echo "${ECHO_T}$without_gcc" >&6 +fi + +{ echo "$as_me:$LINENO: result: $without_gcc" >&5 +echo "${ECHO_T}$without_gcc" >&6; } # If the user switches compilers, we can't believe the cache if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" @@ -1708,8 +2120,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1722,32 +2134,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1760,36 +2174,51 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1802,74 +2231,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1883,7 +2272,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -1894,6 +2283,7 @@ do fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1911,22 +2301,23 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1939,36 +2330,38 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -1981,29 +2374,45 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi @@ -2016,21 +2425,35 @@ See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 +echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 - (eval $ac_compiler --version </dev/null >&5) 2>&5 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 - (eval $ac_compiler -v </dev/null >&5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 - (eval $ac_compiler -V </dev/null >&5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } @@ -2055,47 +2478,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +# +# List of possible output files, starting from the most likely. +# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) +# only as a last resort. b.out is created by i960 compilers. +ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' +# +# The IRIX 6 linker writes into existing files which may not be +# executable, retaining their permissions. Remove them first so a +# subsequent execution test works. +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2107,19 +2560,21 @@ See \`config.log' for more details." >&2;} fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -2138,22 +2593,27 @@ See \`config.log' for more details." >&2;} fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 +{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6; } -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then @@ -2164,9 +2624,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac @@ -2180,14 +2639,14 @@ See \`config.log' for more details." >&2;} fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2207,14 +2666,20 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac @@ -2232,12 +2697,12 @@ fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2260,50 +2725,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2319,38 +2783,118 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2366,12 +2910,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then +{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2405,12 +2949,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2425,205 +2974,57 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6; } ;; + xno) + { echo "$as_me:$LINENO: result: unsupported" >&5 +echo "${ECHO_T}unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include <stdlib.h> -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2648,8 +3049,8 @@ then fi # We better be able to execute interpreters -echo "$as_me:$LINENO: checking whether #! works in shell scripts" >&5 -echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking whether #! works in shell scripts" >&5 +echo $ECHO_N "checking whether #! works in shell scripts... $ECHO_C" >&6; } if test "${ac_cv_sys_interpreter+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -2657,7 +3058,7 @@ else exit 69 ' >conftest chmod u+x conftest -(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null) +(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1) if test $? -ne 69; then ac_cv_sys_interpreter=yes else @@ -2665,8 +3066,8 @@ else fi rm -f conftest fi -echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5 -echo "${ECHO_T}$ac_cv_sys_interpreter" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5 +echo "${ECHO_T}$ac_cv_sys_interpreter" >&6; } interpval=$ac_cv_sys_interpreter if test "$ac_cv_sys_interpreter" != "yes" @@ -2686,36 +3087,36 @@ fi # Check for an alternate data directory, separate from installation dir. default_var_prefix="/var/mailman" -echo "$as_me:$LINENO: checking for --with-var-prefix" >&5 -echo $ECHO_N "checking for --with-var-prefix... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-var-prefix" >&5 +echo $ECHO_N "checking for --with-var-prefix... $ECHO_C" >&6; } -# Check whether --with-var-prefix or --without-var-prefix was given. +# Check whether --with-var-prefix was given. if test "${with_var_prefix+set}" = set; then - withval="$with_var_prefix" + withval=$with_var_prefix; +fi -fi; case "$with_var_prefix" in yes) VAR_PREFIX="$default_var_prefix"; ans=$VAR_PREFIX;; ""|no) VAR_PREFIX="$prefix"; ans="no";; *) VAR_PREFIX="$with_var_prefix"; ans=$VAR_PREFIX; esac -echo "$as_me:$LINENO: result: $ans" >&5 -echo "${ECHO_T}$ans" >&6 +{ echo "$as_me:$LINENO: result: $ans" >&5 +echo "${ECHO_T}$ans" >&6; } -echo "$as_me:$LINENO: checking for --with-permcheck" >&5 -echo $ECHO_N "checking for --with-permcheck... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-permcheck" >&5 +echo $ECHO_N "checking for --with-permcheck... $ECHO_C" >&6; } -# Check whether --with-permcheck or --without-permcheck was given. +# Check whether --with-permcheck was given. if test "${with_permcheck+set}" = set; then - withval="$with_permcheck" + withval=$with_permcheck; +fi -fi; if test -z "$with_permcheck" then with_permcheck="yes" fi -echo "$as_me:$LINENO: result: $with_permcheck" >&5 -echo "${ECHO_T}$with_permcheck" >&6 +{ echo "$as_me:$LINENO: result: $with_permcheck" >&5 +echo "${ECHO_T}$with_permcheck" >&6; } # Now make sure that $prefix is set up correctly. It must be group # owned by the target group, it must have the group sticky bit set, and # it must be a+rx @@ -2735,27 +3136,27 @@ fi # Check for some other uid to use than `mailman' -echo "$as_me:$LINENO: checking for --with-username" >&5 -echo $ECHO_N "checking for --with-username... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-username" >&5 +echo $ECHO_N "checking for --with-username... $ECHO_C" >&6; } -# Check whether --with-username or --without-username was given. +# Check whether --with-username was given. if test "${with_username+set}" = set; then - withval="$with_username" + withval=$with_username; +fi -fi; if test -z "$with_username" then with_username="mailman" fi USERNAME=$with_username -echo "$as_me:$LINENO: result: $USERNAME" >&5 -echo "${ECHO_T}$USERNAME" >&6 +{ echo "$as_me:$LINENO: result: $USERNAME" >&5 +echo "${ECHO_T}$USERNAME" >&6; } # User `mailman' must exist -echo "$as_me:$LINENO: checking for user name \"$USERNAME\"" >&5 -echo $ECHO_N "checking for user name \"$USERNAME\"... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for user name \"$USERNAME\"" >&5 +echo $ECHO_N "checking for user name \"$USERNAME\"... $ECHO_C" >&6; } # MAILMAN_USER == variable name # $USERNAME == user id to check for @@ -2802,33 +3203,33 @@ echo "$as_me: error: { (exit 1); exit 1; }; } fi fi -echo "$as_me:$LINENO: result: okay" >&5 -echo "${ECHO_T}okay" >&6 +{ echo "$as_me:$LINENO: result: okay" >&5 +echo "${ECHO_T}okay" >&6; } # Check for some other gid to use than `mailman' -echo "$as_me:$LINENO: checking for --with-groupname" >&5 -echo $ECHO_N "checking for --with-groupname... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-groupname" >&5 +echo $ECHO_N "checking for --with-groupname... $ECHO_C" >&6; } -# Check whether --with-groupname or --without-groupname was given. +# Check whether --with-groupname was given. if test "${with_groupname+set}" = set; then - withval="$with_groupname" + withval=$with_groupname; +fi -fi; if test -z "$with_groupname" then with_groupname="mailman" fi GROUPNAME=$with_groupname -echo "$as_me:$LINENO: result: $GROUPNAME" >&5 -echo "${ECHO_T}$GROUPNAME" >&6 +{ echo "$as_me:$LINENO: result: $GROUPNAME" >&5 +echo "${ECHO_T}$GROUPNAME" >&6; } # Target group must exist -echo "$as_me:$LINENO: checking for group name \"$GROUPNAME\"" >&5 -echo $ECHO_N "checking for group name \"$GROUPNAME\"... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for group name \"$GROUPNAME\"" >&5 +echo $ECHO_N "checking for group name \"$GROUPNAME\"... $ECHO_C" >&6; } # MAILMAN_GROUP == variable name # $GROUPNAME == user id to check for @@ -2875,12 +3276,12 @@ echo "$as_me: error: { (exit 1); exit 1; }; } fi fi -echo "$as_me:$LINENO: result: okay" >&5 -echo "${ECHO_T}okay" >&6 +{ echo "$as_me:$LINENO: result: okay" >&5 +echo "${ECHO_T}okay" >&6; } -echo "$as_me:$LINENO: checking permissions on $prefixcheck" >&5 -echo $ECHO_N "checking permissions on $prefixcheck... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking permissions on $prefixcheck" >&5 +echo $ECHO_N "checking permissions on $prefixcheck... $ECHO_C" >&6; } cat > conftest.py <<EOF import os, grp @@ -2934,20 +3335,20 @@ $status" >&2;} else status="skipped" fi -echo "$as_me:$LINENO: result: $status" >&5 -echo "${ECHO_T}$status" >&6 +{ echo "$as_me:$LINENO: result: $status" >&5 +echo "${ECHO_T}$status" >&6; } # Now find the UIDs and GIDs # Support --with-mail-gid and --with-cgi-gid -echo "$as_me:$LINENO: checking for mail wrapper group; i.e. --with-mail-gid" >&5 -echo $ECHO_N "checking for mail wrapper group; i.e. --with-mail-gid... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for mail wrapper group; i.e. --with-mail-gid" >&5 +echo $ECHO_N "checking for mail wrapper group; i.e. --with-mail-gid... $ECHO_C" >&6; } -# Check whether --with-mail-gid or --without-mail-gid was given. +# Check whether --with-mail-gid was given. if test "${with_mail_gid+set}" = set; then - withval="$with_mail_gid" + withval=$with_mail_gid; +fi -fi; if test -z "$with_mail_gid" then with_mail_gid="mailman other mail daemon" @@ -3004,18 +3405,18 @@ echo "$as_me: error: MAIL_GROUP=$with_mail_gid fi fi -echo "$as_me:$LINENO: result: $MAIL_GROUP" >&5 -echo "${ECHO_T}$MAIL_GROUP" >&6 +{ echo "$as_me:$LINENO: result: $MAIL_GROUP" >&5 +echo "${ECHO_T}$MAIL_GROUP" >&6; } -echo "$as_me:$LINENO: checking for CGI wrapper group; i.e. --with-cgi-gid" >&5 -echo $ECHO_N "checking for CGI wrapper group; i.e. --with-cgi-gid... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for CGI wrapper group; i.e. --with-cgi-gid" >&5 +echo $ECHO_N "checking for CGI wrapper group; i.e. --with-cgi-gid... $ECHO_C" >&6; } -# Check whether --with-cgi-gid or --without-cgi-gid was given. +# Check whether --with-cgi-gid was given. if test "${with_cgi_gid+set}" = set; then - withval="$with_cgi_gid" + withval=$with_cgi_gid; +fi -fi; if test -z "$with_cgi_gid" then with_cgi_gid="www www-data nobody" @@ -3073,20 +3474,20 @@ echo "$as_me: error: CGI_GROUP=$with_cgi_gid fi fi -echo "$as_me:$LINENO: result: $CGI_GROUP" >&5 -echo "${ECHO_T}$CGI_GROUP" >&6 +{ echo "$as_me:$LINENO: result: $CGI_GROUP" >&5 +echo "${ECHO_T}$CGI_GROUP" >&6; } # Check for CGI extensions, required by some Web servers -echo "$as_me:$LINENO: checking for CGI extensions" >&5 -echo $ECHO_N "checking for CGI extensions... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for CGI extensions" >&5 +echo $ECHO_N "checking for CGI extensions... $ECHO_C" >&6; } -# Check whether --with-cgi-ext or --without-cgi-ext was given. +# Check whether --with-cgi-ext was given. if test "${with_cgi_ext+set}" = set; then - withval="$with_cgi_ext" + withval=$with_cgi_ext; +fi -fi; if test -z "$with_cgi_ext" then CGIEXT='' @@ -3094,20 +3495,20 @@ then else CGIEXT=$with_cgi_ext fi -echo "$as_me:$LINENO: result: $with_cgi_ext" >&5 -echo "${ECHO_T}$with_cgi_ext" >&6 +{ echo "$as_me:$LINENO: result: $with_cgi_ext" >&5 +echo "${ECHO_T}$with_cgi_ext" >&6; } # figure out the default mail hostname and url host component -echo "$as_me:$LINENO: checking for --with-mailhost" >&5 -echo $ECHO_N "checking for --with-mailhost... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-mailhost" >&5 +echo $ECHO_N "checking for --with-mailhost... $ECHO_C" >&6; } -# Check whether --with-mailhost or --without-mailhost was given. +# Check whether --with-mailhost was given. if test "${with_mailhost+set}" = set; then - withval="$with_mailhost" + withval=$with_mailhost; +fi -fi; if test -z "$with_mailhost" then MAILHOST='' @@ -3115,18 +3516,18 @@ then else MAILHOST=$with_mailhost fi -echo "$as_me:$LINENO: result: $with_mailhost" >&5 -echo "${ECHO_T}$with_mailhost" >&6 +{ echo "$as_me:$LINENO: result: $with_mailhost" >&5 +echo "${ECHO_T}$with_mailhost" >&6; } -echo "$as_me:$LINENO: checking for --with-urlhost" >&5 -echo $ECHO_N "checking for --with-urlhost... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-urlhost" >&5 +echo $ECHO_N "checking for --with-urlhost... $ECHO_C" >&6; } -# Check whether --with-urlhost or --without-urlhost was given. +# Check whether --with-urlhost was given. if test "${with_urlhost+set}" = set; then - withval="$with_urlhost" + withval=$with_urlhost; +fi -fi; if test -z "$with_urlhost" then URLHOST='' @@ -3134,8 +3535,8 @@ then else URLHOST=$with_urlhost fi -echo "$as_me:$LINENO: result: $with_urlhost" >&5 -echo "${ECHO_T}$with_urlhost" >&6 +{ echo "$as_me:$LINENO: result: $with_urlhost" >&5 +echo "${ECHO_T}$with_urlhost" >&6; } cat > conftest.py <<EOF @@ -3149,35 +3550,35 @@ fp.close() EOF $PYTHON conftest.py -echo "$as_me:$LINENO: checking for default mail host name" >&5 -echo $ECHO_N "checking for default mail host name... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for default mail host name" >&5 +echo $ECHO_N "checking for default mail host name... $ECHO_C" >&6; } if test -z "$MAILHOST" then MAILHOST=`sed q conftest.out` fi -echo "$as_me:$LINENO: result: $MAILHOST" >&5 -echo "${ECHO_T}$MAILHOST" >&6 -echo "$as_me:$LINENO: checking for default URL host component" >&5 -echo $ECHO_N "checking for default URL host component... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: result: $MAILHOST" >&5 +echo "${ECHO_T}$MAILHOST" >&6; } +{ echo "$as_me:$LINENO: checking for default URL host component" >&5 +echo $ECHO_N "checking for default URL host component... $ECHO_C" >&6; } if test -z "$URLHOST" then URLHOST=`sed -n '$p' conftest.out` fi -echo "$as_me:$LINENO: result: $URLHOST" >&5 -echo "${ECHO_T}$URLHOST" >&6 +{ echo "$as_me:$LINENO: result: $URLHOST" >&5 +echo "${ECHO_T}$URLHOST" >&6; } rm -f conftest.out conftest.py # i18n --with-languages ALL_LINGUAS=`(cd ${srcdir}/messages && ls | grep '^..\(_..\)*$' | tr '\n' ' ')` -echo "$as_me:$LINENO: checking for --with-languages" >&5 -echo $ECHO_N "checking for --with-languages... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for --with-languages" >&5 +echo $ECHO_N "checking for --with-languages... $ECHO_C" >&6; } -# Check whether --with-languages or --without-languages was given. +# Check whether --with-languages was given. if test "${with_languages+set}" = set; then - withval="$with_languages" + withval=$with_languages; +fi -fi; if test -z "$with_languages" then LANGUAGES="$ALL_LINGUAS" @@ -3187,12 +3588,12 @@ then else LANGUAGES="$with_languages" fi -echo "$as_me:$LINENO: result: $with_languages" >&5 -echo "${ECHO_T}$with_languages" >&6 +{ echo "$as_me:$LINENO: result: $with_languages" >&5 +echo "${ECHO_T}$with_languages" >&6; } # check CJKCodecs -echo "$as_me:$LINENO: checking for CJK codecs" >&5 -echo $ECHO_N "checking for CJK codecs... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for CJK codecs" >&5 +echo $ECHO_N "checking for CJK codecs... $ECHO_C" >&6; } cat > conftest.py <<EOF langs = "$LANGUAGES".split() @@ -3230,8 +3631,8 @@ echo "$as_me: error: ***** or use Python 2.4 in which CJK languages are supported." >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $cjkok" >&5 -echo "${ECHO_T}$cjkok" >&6 +{ echo "$as_me:$LINENO: result: $cjkok" >&5 +echo "${ECHO_T}$cjkok" >&6; } # Checks for libraries. @@ -3241,9 +3642,9 @@ echo "${ECHO_T}$cjkok" >&6 for ac_func in strerror setregid syslog do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3269,68 +3670,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -3345,8 +3738,8 @@ if test $ac_cv_func_syslog = no; then # one of several _real_ functions in syslog.h, so we need to do the test # with the appropriate include. for lib in bsd socket inet; do - echo "$as_me:$LINENO: checking for syslog in -l$lib" >&5 -echo $ECHO_N "checking for syslog in -l$lib... $ECHO_C" >&6 + { echo "$as_me:$LINENO: checking for syslog in -l$lib" >&5 +echo $ECHO_N "checking for syslog in -l$lib... $ECHO_C" >&6; } Mailman_LIBS_save="$LIBS"; LIBS="$LIBS -l$lib" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3364,29 +3757,25 @@ syslog(LOG_DEBUG, "Just a test..."); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SYSLOG 1 _ACEOF @@ -3396,11 +3785,12 @@ else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } LIBS="$Mailman_LIBS_save" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext unset Mailman_LIBS_save done @@ -3412,8 +3802,8 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -3447,24 +3837,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3473,9 +3861,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3485,24 +3874,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3513,6 +3900,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3530,8 +3918,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3554,24 +3942,22 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3580,9 +3966,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3592,24 +3979,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3620,6 +4005,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -3642,23 +4028,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then +{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Extract the first word of "grep ggrep" to use in msg output +if test -z "$GREP"; then +set dummy grep ggrep; ac_prog_name=$2 +if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + ac_path_GREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + + $ac_path_GREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +GREP="$ac_cv_path_GREP" +if test -z "$GREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_GREP=$GREP +fi + + fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +echo "${ECHO_T}$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + +{ echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + # Extract the first word of "egrep" to use in msg output +if test -z "$EGREP"; then +set dummy egrep; ac_prog_name=$2 +if test "${ac_cv_path_EGREP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_path_EGREP_found=false +# Loop through the user's path and test for each of PROGNAME-LIST +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 + + $ac_path_EGREP_found && break 3 + done +done + +done +IFS=$as_save_IFS + + +fi + +EGREP="$ac_cv_path_EGREP" +if test -z "$EGREP"; then + { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } +fi + +else + ac_cv_path_EGREP=$EGREP +fi + + + fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -3682,35 +4215,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3766,6 +4295,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ctype.h> +#include <stdlib.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3785,18 +4315,27 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -3809,12 +4348,14 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3837,9 +4378,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -3853,38 +4394,35 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 @@ -3899,18 +4437,19 @@ done for ac_header in syslog.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3921,41 +4460,37 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3964,24 +4499,22 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -3989,9 +4522,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in @@ -4015,25 +4549,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## -------------------------------------- ## -## Report this to the GNU Mailman lists. ## -## -------------------------------------- ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then @@ -4047,8 +4575,8 @@ done # Checks for typedefs, structures, and compiler characteristics. -echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 -echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4070,8 +4598,8 @@ fi rm -f conftest* fi -echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 -echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF @@ -4085,8 +4613,8 @@ _ACEOF fi -echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 -echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6 +{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5 +echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; } if test "${ac_cv_type_getgroups+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -4100,7 +4628,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Mike Rendell for this test. */ -#include <sys/types.h> +$ac_includes_default #define NGID 256 #undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) @@ -4110,7 +4638,7 @@ main () { gid_t gidset[NGID]; int i, n; - union { gid_t gval; long lval; } val; + union { gid_t gval; long int lval; } val; val.lval = -1; for (i = 0; i < NGID; i++) @@ -4118,18 +4646,28 @@ main () n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, gidset); /* Exit non-zero if getgroups seems to require an array of ints. This - happens when gid_t is short but getgroups modifies an array of ints. */ - exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); + happens when gid_t is short int but getgroups modifies an array + of ints. */ + return n > 0 && gidset[n] != val.gval; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then @@ -4142,8 +4680,10 @@ sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_type_getgroups=int fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + if test $ac_cv_type_getgroups = cross; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4164,8 +4704,8 @@ rm -f conftest* fi fi -echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 -echo "${ECHO_T}$ac_cv_type_getgroups" >&6 +{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5 +echo "${ECHO_T}$ac_cv_type_getgroups" >&6; } cat >>confdefs.h <<_ACEOF #define GETGROUPS_T $ac_cv_type_getgroups @@ -4178,9 +4718,9 @@ _ACEOF for ac_func in vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then +{ echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -4206,68 +4746,60 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +ac_res=`eval echo '${'$as_ac_var'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 @@ -4309,8 +4841,10 @@ build/contrib/rotatelogs.py:contrib/rotatelogs.py \ # scripts. They're removed on a make distclean, so we make them here. mkdir -p build/bin build/contrib build/cron - ac_config_files="$ac_config_files misc/paths.py Mailman/Defaults.py Mailman/mm_cfg.py.dist src/Makefile misc/Makefile bin/Makefile Mailman/bin/Makefile Mailman/Makefile Mailman/database/Makefile Mailman/Cgi/Makefile Mailman/Archiver/Makefile Mailman/Commands/Makefile Mailman/Handlers/Makefile Mailman/Bouncers/Makefile Mailman/Queue/Makefile Mailman/Queue/tests/Makefile Mailman/MTA/Makefile Mailman/Gui/Makefile templates/Makefile cron/Makefile scripts/Makefile messages/Makefile cron/crontab.in misc/mailman Makefile Mailman/testing/Makefile Mailman/testing/bounces/Makefile tests/Makefile tests/msgs/Makefile $SCRIPTS" - ac_config_commands="$ac_config_commands default" +ac_config_files="$ac_config_files misc/paths.py Mailman/Defaults.py Mailman/mm_cfg.py.dist src/Makefile misc/Makefile bin/Makefile Mailman/bin/Makefile Mailman/Makefile Mailman/Cgi/Makefile Mailman/database/Makefile Mailman/database/tables/Makefile Mailman/database/model/Makefile Mailman/docs/Makefile Mailman/ext/Makefile Mailman/interfaces/Makefile Mailman/Archiver/Makefile Mailman/Commands/Makefile Mailman/Handlers/Makefile Mailman/Bouncers/Makefile Mailman/Queue/Makefile Mailman/Queue/tests/Makefile Mailman/MTA/Makefile Mailman/Gui/Makefile templates/Makefile cron/Makefile scripts/Makefile messages/Makefile cron/crontab.in misc/mailman Makefile Mailman/testing/Makefile Mailman/testing/bounces/Makefile tests/Makefile tests/msgs/Makefile $SCRIPTS" + +ac_config_commands="$ac_config_commands default" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -4329,39 +4863,58 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -4370,63 +4923,48 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, +# take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF +ac_script=' t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -4457,17 +4995,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -4477,8 +5043,43 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' @@ -4492,18 +5093,19 @@ do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else - $as_unset $as_var + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -4511,159 +5113,120 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || + X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -4672,7 +5235,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -4681,31 +5265,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by GNU Mailman $as_me 2.2.0a0, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -4713,30 +5280,19 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi +config_files="$ac_config_files" +config_commands="$ac_config_commands" -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF - ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -4744,7 +5300,7 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -4758,19 +5314,21 @@ Configuration commands: $config_commands Report bugs to <bug-autoconf@gnu.org>." -_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ GNU Mailman config.status 2.2.0a0 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF @@ -4781,60 +5339,42 @@ while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -4850,58 +5390,77 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 - - - +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "misc/paths.py" ) CONFIG_FILES="$CONFIG_FILES misc/paths.py" ;; - "Mailman/Defaults.py" ) CONFIG_FILES="$CONFIG_FILES Mailman/Defaults.py" ;; - "Mailman/mm_cfg.py.dist" ) CONFIG_FILES="$CONFIG_FILES Mailman/mm_cfg.py.dist" ;; - "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "misc/Makefile" ) CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;; - "bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; - "Mailman/bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/bin/Makefile" ;; - "Mailman/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/Makefile" ;; - "Mailman/database/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/database/Makefile" ;; - "Mailman/Cgi/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/Cgi/Makefile" ;; - "Mailman/Archiver/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/Archiver/Makefile" ;; - "Mailman/Commands/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/Commands/Makefile" ;; - "Mailman/Handlers/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/Handlers/Makefile" ;; - "Mailman/Bouncers/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/Bouncers/Makefile" ;; - "Mailman/Queue/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/Queue/Makefile" ;; - "Mailman/Queue/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/Queue/tests/Makefile" ;; - "Mailman/MTA/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/MTA/Makefile" ;; - "Mailman/Gui/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/Gui/Makefile" ;; - "templates/Makefile" ) CONFIG_FILES="$CONFIG_FILES templates/Makefile" ;; - "cron/Makefile" ) CONFIG_FILES="$CONFIG_FILES cron/Makefile" ;; - "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; - "messages/Makefile" ) CONFIG_FILES="$CONFIG_FILES messages/Makefile" ;; - "cron/crontab.in" ) CONFIG_FILES="$CONFIG_FILES cron/crontab.in" ;; - "misc/mailman" ) CONFIG_FILES="$CONFIG_FILES misc/mailman" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "Mailman/testing/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/testing/Makefile" ;; - "Mailman/testing/bounces/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mailman/testing/bounces/Makefile" ;; - "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "tests/msgs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/msgs/Makefile" ;; - "$SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SCRIPTS" ;; - "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + case $ac_config_target in + "misc/paths.py") CONFIG_FILES="$CONFIG_FILES misc/paths.py" ;; + "Mailman/Defaults.py") CONFIG_FILES="$CONFIG_FILES Mailman/Defaults.py" ;; + "Mailman/mm_cfg.py.dist") CONFIG_FILES="$CONFIG_FILES Mailman/mm_cfg.py.dist" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;; + "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; + "Mailman/bin/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/bin/Makefile" ;; + "Mailman/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/Makefile" ;; + "Mailman/Cgi/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/Cgi/Makefile" ;; + "Mailman/database/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/database/Makefile" ;; + "Mailman/database/tables/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/database/tables/Makefile" ;; + "Mailman/database/model/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/database/model/Makefile" ;; + "Mailman/docs/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/docs/Makefile" ;; + "Mailman/ext/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/ext/Makefile" ;; + "Mailman/interfaces/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/interfaces/Makefile" ;; + "Mailman/Archiver/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/Archiver/Makefile" ;; + "Mailman/Commands/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/Commands/Makefile" ;; + "Mailman/Handlers/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/Handlers/Makefile" ;; + "Mailman/Bouncers/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/Bouncers/Makefile" ;; + "Mailman/Queue/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/Queue/Makefile" ;; + "Mailman/Queue/tests/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/Queue/tests/Makefile" ;; + "Mailman/MTA/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/MTA/Makefile" ;; + "Mailman/Gui/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/Gui/Makefile" ;; + "templates/Makefile") CONFIG_FILES="$CONFIG_FILES templates/Makefile" ;; + "cron/Makefile") CONFIG_FILES="$CONFIG_FILES cron/Makefile" ;; + "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; + "messages/Makefile") CONFIG_FILES="$CONFIG_FILES messages/Makefile" ;; + "cron/crontab.in") CONFIG_FILES="$CONFIG_FILES cron/crontab.in" ;; + "misc/mailman") CONFIG_FILES="$CONFIG_FILES misc/mailman" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "Mailman/testing/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/testing/Makefile" ;; + "Mailman/testing/bounces/Makefile") CONFIG_FILES="$CONFIG_FILES Mailman/testing/bounces/Makefile" ;; + "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests/msgs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/msgs/Makefile" ;; + "$SCRIPTS") CONFIG_FILES="$CONFIG_FILES $SCRIPTS" ;; + "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -4912,462 +5471,430 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - # -# CONFIG_FILES section. +# Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@with_python@,$with_python,;t t -s,@PYTHON@,$PYTHON,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@LN_S@,$LN_S,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@TRUE@,$TRUE,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@OPT@,$OPT,;t t -s,@VAR_PREFIX@,$VAR_PREFIX,;t t -s,@MAILMAN_USER@,$MAILMAN_USER,;t t -s,@MAILMAN_GROUP@,$MAILMAN_GROUP,;t t -s,@MAIL_GROUP@,$MAIL_GROUP,;t t -s,@CGI_GROUP@,$CGI_GROUP,;t t -s,@CGIEXT@,$CGIEXT,;t t -s,@MAILHOST@,$MAILHOST,;t t -s,@URLHOST@,$URLHOST,;t t -s,@LANGUAGES@,$LANGUAGES,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@SCRIPTS@,$SCRIPTS,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF +if test -n "$CONFIG_FILES"; then _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +with_python!$with_python$ac_delim +PYTHON!$PYTHON$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +LN_S!$LN_S$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +TRUE!$TRUE$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$ac_delim +EXEEXT!$EXEEXT$ac_delim +OBJEXT!$OBJEXT$ac_delim +OPT!$OPT$ac_delim +VAR_PREFIX!$VAR_PREFIX$ac_delim +MAILMAN_USER!$MAILMAN_USER$ac_delim +MAILMAN_GROUP!$MAILMAN_GROUP$ac_delim +MAIL_GROUP!$MAIL_GROUP$ac_delim +CGI_GROUP!$CGI_GROUP$ac_delim +CGIEXT!$CGIEXT$ac_delim +MAILHOST!$MAILHOST$ac_delim +URLHOST!$URLHOST$ac_delim +LANGUAGES!$LANGUAGES$ac_delim +CPP!$CPP$ac_delim +GREP!$GREP$ac_delim +EGREP!$EGREP$ac_delim +SCRIPTS!$SCRIPTS$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 68; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi -fi # test -n "$CONFIG_FILES" +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS <conf$$subs.sed +rm -f conf$$subs.sed +cat >>$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES :C $CONFIG_COMMANDS +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac + :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 +echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_file$ac_mode in + "default":C) echo "configuration completed at" `date` ;; - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - default ) echo "configuration completed at" `date` ;; esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF @@ -5399,4 +5926,3 @@ fi # Make sure all the build scripts are executable. chmod -R +x build - diff --git a/configure.in b/configure.in index 12cf57f14..555cf96c1 100644 --- a/configure.in +++ b/configure.in @@ -16,7 +16,7 @@ # USA. dnl Process this file with autoconf to produce a configure script. -AC_REVISION($Revision: 8190 $) +AC_REVISION($Revision: 8224 $) AC_PREREQ(2.0) AC_INIT([GNU Mailman], [2.2.0a0]) @@ -634,7 +634,10 @@ mkdir -p build/bin build/contrib build/cron dnl Output everything AC_OUTPUT([misc/paths.py Mailman/Defaults.py Mailman/mm_cfg.py.dist src/Makefile misc/Makefile bin/Makefile Mailman/bin/Makefile - Mailman/Makefile Mailman/database/Makefile Mailman/Cgi/Makefile + Mailman/Makefile Mailman/Cgi/Makefile + Mailman/database/Makefile Mailman/database/tables/Makefile + Mailman/database/model/Makefile Mailman/docs/Makefile + Mailman/ext/Makefile Mailman/interfaces/Makefile Mailman/Archiver/Makefile Mailman/Commands/Makefile Mailman/Handlers/Makefile Mailman/Bouncers/Makefile Mailman/Queue/Makefile Mailman/Queue/tests/Makefile @@ -648,4 +651,3 @@ AC_OUTPUT([misc/paths.py Mailman/Defaults.py Mailman/mm_cfg.py.dist # Make sure all the build scripts are executable. chmod -R +x build - diff --git a/docs/NEWS.txt b/docs/NEWS.txt index 7be8955c9..15aab78c4 100644 --- a/docs/NEWS.txt +++ b/docs/NEWS.txt @@ -4,7 +4,7 @@ Copyright (C) 1998-2007 by the Free Software Foundation, Inc. Here is a history of user visible changes to Mailman. -2.2 alpha 1 (XX-XXX-200X) +3.0 alpha 1 (XX-XXX-200X) Configuration @@ -26,6 +26,14 @@ Here is a history of user visible changes to Mailman. Architecture + - SQLAlchemy/Elixir based storage for all list and user data, with default + storage in a SQLite database. + + - Zope interfaces are used to describe the major components. + + - Users are now stored in a unified database, and shared across all + mailing lists. + - Mailman's web interface is now WSGI compliant. WSGI is a Python standard (PEP 333) allowing web applications to be (more) easily integrated with any number of existing Python web application @@ -104,13 +112,21 @@ Here is a history of user visible changes to Mailman. Bug fixes and other patches + - Removal of DomainKey/DKIM signatures is now controlled by Defaults.py + mm_cfg.py variable REMOVE_DKIM_HEADERS (default = No). + + - Queue runner processing is improved to log and preserve for analysis in + the shunt queue certain bad queue entries that were previously logged + but lost. Also, entries are preserved when an attempt to shunt throws + an exception (1656289). + - The processing of Topics regular expressions has changed. Previously the Topics regexp was compiled in verbose mode but not documented as such - which caused some confusion. Also, the documentation indicated that topic - keywords could be entered one per line, but these entries were not handled - properly. Topics regexps are now compiled in non-verbose mode and multi- - line entries are 'ored'. Existing Topics regexps will be converted when - the list is updated so they will continue to work. + which caused some confusion. Also, the documentation indicated that + topic keywords could be entered one per line, but these entries were not + handled properly. Topics regexps are now compiled in non-verbose mode + and multi- line entries are 'ored'. Existing Topics regexps will be + converted when the list is updated so they will continue to work. - The List-Help, List-Subscribe, and List-Unsubscribe headers were incorrectly suppressed in messages that Mailman sends directly to diff --git a/messages/cs/LC_MESSAGES/mailman.po b/messages/cs/LC_MESSAGES/mailman.po index a04734e57..0b9fe96be 100644 --- a/messages/cs/LC_MESSAGES/mailman.po +++ b/messages/cs/LC_MESSAGES/mailman.po @@ -15,7 +15,8 @@ msgstr "" "Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #: Mailman/Archiver/HyperArch.py:122 msgid "size not available" @@ -451,7 +452,8 @@ msgid "" " using the <em>Submit Your Changes</em> button below." msgstr "" "Proveďte potřebné změny\n" -" a uložte je kliknutím na tlačítko <em>Provést změny</em>na konci stránky." +" a uložte je kliknutím na tlačítko <em>Provést změny</em>na konci " +"stránky." #: Mailman/Cgi/admin.py:503 msgid "Additional Member Tasks" @@ -754,7 +756,8 @@ msgstr "<b>potvrzení</b> -- Dostává přispěvatel potvrzení o přijetí příspěvku?" msgid "" "<b>not metoo</b> -- Does the member want to avoid copies of their\n" " own postings?" -msgstr "<b>not metoo</b> -- Účastník si nepřeje dostávat kopie vlastních příspěvků." +msgstr "" +"<b>not metoo</b> -- Účastník si nepřeje dostávat kopie vlastních příspěvků." #: Mailman/Cgi/admin.py:1080 msgid "" @@ -806,7 +809,8 @@ msgstr "od %(start)s do %(end)s" #: Mailman/Cgi/admin.py:1135 msgid "Subscribe these users now or invite them?" -msgstr "Mají být tito účastníci přihlášeni a nebo pozváni k účasti v konferenci?" +msgstr "" +"Mají být tito účastníci přihlášeni a nebo pozváni k účasti v konferenci?" #: Mailman/Cgi/admin.py:1137 msgid "Invite" @@ -1609,8 +1613,8 @@ msgid "" " please contact the list owners at %(owneraddr)s." msgstr "" "Emailová adresa %(newaddr)s má zakázáno přihlášení do konference\n" -" %(realname)s." -" Pokud máte pocit, že to není správně, můžete kontaktovat správce\n" +" %(realname)s. Pokud máte pocit, že to není správně, můžete " +"kontaktovat správce\n" " na adrese %(owneraddr)s. Typicky bývají zakázány adresy ze kterých\n" " dostáváme spam." @@ -2273,7 +2277,9 @@ msgstr "Poznámka " #: Mailman/Cgi/options.py:284 msgid "List subscriptions for %(safeuser)s on %(hostname)s" -msgstr "Seznam konferencí, ve kterých je přihlášen uživatel %(safeuser)s na serveru %(hostname)s" +msgstr "" +"Seznam konferencí, ve kterých je přihlášen uživatel %(safeuser)s na serveru %" +"(hostname)s" #: Mailman/Cgi/options.py:287 msgid "" @@ -2589,7 +2595,8 @@ msgstr "Připomínka hesla" msgid "" "By clicking on the <em>Remind</em> button, your\n" " password will be emailed to you." -msgstr "Kliknutím na tlačítko <em>Pošli heslo</em> Vám bude zaslána Vaše heslo." +msgstr "" +"Kliknutím na tlačítko <em>Pošli heslo</em> Vám bude zaslána Vaše heslo." #: Mailman/Cgi/options.py:906 msgid "Remind" @@ -2949,8 +2956,10 @@ msgid "" msgstr "" "\n" " echo [argumenty]\n" -" vrátí zpět řetězec zadaný za tímto příkazem. Do řetězce nebude nijak zasahováno\n" -" může se to hodit např. při ověřování funkčnosti a nebo pokud je potřeba dohledat,\n" +" vrátí zpět řetězec zadaný za tímto příkazem. Do řetězce nebude nijak " +"zasahováno\n" +" může se to hodit např. při ověřování funkčnosti a nebo pokud je " +"potřeba dohledat,\n" " jestli někdo po cestě nemění obsahy zpráv.\n" #: Mailman/Commands/cmd_end.py:17 @@ -3421,15 +3430,21 @@ msgstr "" " subscribe [heslo] [digest|nodigest] [address=<adresa>]\n" " Přihlásí Vás do konference. Heslo budete potřebovat pro odhlášení\n" " nebo změnu nastavení Vašeho uživatelského konta. Pokud si heslo\n" -" nezvolíte bude Vám nějaké vygenerováno. Heslo je periodicky zasíláno\n" -" všem účastníkům, zpravidla na začátku měsíce. Nastavení digestu může\n" -" být buď \"nodigest\" nebo \"digest\". (Bez těch uvozovek.) Pokud je digest\n" -" zapnut jsou Vám příspěvky z konference zasílány jen jednou denně (nebo\n" +" nezvolíte bude Vám nějaké vygenerováno. Heslo je periodicky " +"zasíláno\n" +" všem účastníkům, zpravidla na začátku měsíce. Nastavení digestu " +"může\n" +" být buď \"nodigest\" nebo \"digest\". (Bez těch uvozovek.) Pokud je " +"digest\n" +" zapnut jsou Vám příspěvky z konference zasílány jen jednou denně " +"(nebo\n" " dle nastavení správcem konference) v jednom mnohadílném dopise.\n" " Pokud tuto volbu neuvedete, použije se volba nastavená správcem\n" " konference jako standardní.\n" -" Pokud se chcete přihlásit z jiné adresy, než z které odchází požadavek,\n" -" tak využijete parametr adress=. Za něj napíšete adresu, kterou chcete\n" +" Pokud se chcete přihlásit z jiné adresy, než z které odchází " +"požadavek,\n" +" tak využijete parametr adress=. Za něj napíšete adresu, kterou " +"chcete\n" " přihlásit, bez uvozovek a závorek, např. takto:\n" " address=pepa@freemail.fr\n" @@ -3558,8 +3573,10 @@ msgid "" msgstr "" "\n" " who heslo [address=<adresa>]\n" -" Zašli seznam účastníků. Musíte zadat heslo a pokud požadavek zasíláte z jiné\n" -" adresy, než z které jste přihlášeni, musíte jako parametr zadat i adresu, ze\n" +" Zašli seznam účastníků. Musíte zadat heslo a pokud požadavek zasíláte " +"z jiné\n" +" adresy, než z které jste přihlášeni, musíte jako parametr zadat i " +"adresu, ze\n" " které jste přihlášeni.\n" #: Mailman/Commands/cmd_who.py:44 @@ -3902,7 +3919,8 @@ msgid "" " system as a normal mail command." msgstr "" "Má Mailman automaticky odpovídat na dopisy adresované na -request\n" -" adresu? Pokud vyberete ano, zvolte, zda má být originální dopis\n" +" adresu? Pokud vyberete ano, zvolte, zda má být originální " +"dopis\n" " zahozen, nebo přeposlán ke zpracování jako normální příkaz pro\n" " listserver." @@ -3917,8 +3935,10 @@ msgid "" " zero (or negative) for no grace period (i.e. auto-respond to\n" " every message)." msgstr "" -"Počet dní, po které nebude znovu zasílána automatická odpověď na stejnou adresu.\n" -" Nastavení na 0 znamená, že odpověď bude zasílána na každou zprávu.\n" +"Počet dní, po které nebude znovu zasílána automatická odpověď na stejnou " +"adresu.\n" +" Nastavení na 0 znamená, že odpověď bude zasílána na každou " +"zprávu.\n" " (Volba pro -admin a -owner adresy)." #: Mailman/Gui/Bounce.py:26 @@ -4061,7 +4081,8 @@ msgid "" msgstr "" "Pokud nastavíte tuto hodnotu na <em>Ne</em>, zakážete automatickou\n" " detekci neplatných adres účastníků. Nicméně zprávy obsahující\n" -" chyby doručení budou zahazovány a administrátor jimi nebude obtěžován." +" chyby doručení budou zahazovány a administrátor jimi nebude " +"obtěžován." #: Mailman/Gui/Bounce.py:85 msgid "" @@ -4090,12 +4111,16 @@ msgid "" " removed from the mailing list." msgstr "" "Každý účastník konference má přiřazené číslo, které se zvyšuje, pokud se\n" -" nedaří doručovat příspěvky na jeho adresu. Pokud je chyba doručení\n" -" trvalá, zvyšuje se skóre o 1, pokud dočasná o 0,5. Počítá se jen\n" -" jedna chyba doručení za den, bez ohledu na to, kolik se fakticky\n" +" nedaří doručovat příspěvky na jeho adresu. Pokud je chyba " +"doručení\n" +" trvalá, zvyšuje se skóre o 1, pokud dočasná o 0,5. Počítá se " +"jen\n" +" jedna chyba doručení za den, bez ohledu na to, kolik se " +"fakticky\n" " vrátí příspěvků.\n" " Pokud hodnota dosáhne maximálního skóre, které je zde nastaveno\n" -" je přerušeno další zasílání příspěvků na danou adresu, účastník ale\n" +" je přerušeno další zasílání příspěvků na danou adresu, účastník " +"ale\n" " není z konference odhlášen." #: Mailman/Gui/Bounce.py:102 @@ -4120,7 +4145,8 @@ msgid "" msgstr "" "Kolik upozornění typu <em>Vaše členství je pozastaveno</em> je zasláno\n" " účastníkovi před vyřazením ze seznamu členů. Pokud nastavíte 0\n" -" bude adresa odstraněna okamžitě jak bude dosaženo maximální skóre.\n" +" bude adresa odstraněna okamžitě jak bude dosaženo maximální " +"skóre.\n" " Musí to být celé číslo." #: Mailman/Gui/Bounce.py:114 @@ -4177,7 +4203,8 @@ msgid "" " message</a> for email to the -owner and -admin address." msgstr "" "Ačkoliv je detekce nedoručitelných příspěvků v Mailmanu poměrně dokonalá\n" -"není možné znát každý způsob, jakým někdo dává najevo, že adresa, kam je příspěvek\n" +"není možné znát každý způsob, jakým někdo dává najevo, že adresa, kam je " +"příspěvek\n" "zasílán, není platná. Tento parametr byste měli nastavit na <em>Ano</em> ze " "dvou důvodů:\n" "1)\n" @@ -4189,15 +4216,20 @@ msgstr "" "napříště i tento neznámý formát chybové zprávy správně rozpoznat a zařadit\n" "do příští verze. \n" "\n" -" <p>Pokud si skutečně nepřejete být provozem konference obtěžováni\n" -" nastavte hodnotu na <em>Ne</em> a všechna hlášení o nedoručitelnosti,\n" +" <p>Pokud si skutečně nepřejete být provozem konference " +"obtěžováni\n" +" nastavte hodnotu na <em>Ne</em> a všechna hlášení o " +"nedoručitelnosti,\n" " která nebudou systémem rozpoznána, budou zahozena.\n" "\n" -"<p><b>Pozor:</b> Toto nastavení ovlivní všechny zprávy, které budou zaslány na\n" +"<p><b>Pozor:</b> Toto nastavení ovlivní všechny zprávy, které budou zaslány " +"na\n" "admin adresu konference. Tato adresa by se již sice neměla používat, \n" -"ale stále se najdou lidé, kteří na ni zasílají různé dotazy a podobně. Při nastavení\n" +"ale stále se najdou lidé, kteří na ni zasílají různé dotazy a podobně. Při " +"nastavení\n" "<em>Ne</em> tyto zprávy budou také zahozeny a vy je neuvidíte.\n" -"Možná proto budete chtít nastavit <a href=\"?VARHELP=autoreply/autoresponse_admin_text\">\n" +"Možná proto budete chtít nastavit <a href=\"?VARHELP=autoreply/" +"autoresponse_admin_text\">\n" "automatickou odpověď</a> pro -owner a -admin adresy." #: Mailman/Gui/Bounce.py:147 @@ -4304,26 +4336,36 @@ msgstr "" "Pravidla pro filtrování obsahu příspěvků.\n" "\n" " <p>Filtrace obsahu funguje takto: Pokud máte filtraci povolenu,\n" -" jsou nejdříve všechny přílohy příspěvku porovnávány podle seznamu\n" -" <a href=\"?VARHELP=contentfilter/filter_mime_types\">Odstraň přílohy zpráv,\n" -" které mají tento MIME typ</a>. Pokud je příloha v tomto seznamu nalezena,\n" +" jsou nejdříve všechny přílohy příspěvku porovnávány podle " +"seznamu\n" +" <a href=\"?VARHELP=contentfilter/filter_mime_types\">Odstraň " +"přílohy zpráv,\n" +" které mají tento MIME typ</a>. Pokud je příloha v tomto seznamu " +"nalezena,\n" " je automaticky zahozena.\n" "\n" " <p>Potom, pokud je nastavena volba <a\n" -" href=\"?VARHELP=contentfilter/pass_mime_types\">Propusť tyto přílohy</a>,\n" -" jsou zahozeny všechny přílohy, jejichž MIME typ <em>není</em> v seznamu uveden.\n" +" href=\"?VARHELP=contentfilter/pass_mime_types\">Propusť tyto " +"přílohy</a>,\n" +" jsou zahozeny všechny přílohy, jejichž MIME typ <em>není</em> v " +"seznamu uveden.\n" " Pokud je tento seznam prázdný, je tato kontrola přeskočena. \n" "\n" " <p>Po tomto prvním přefiltrování jsou odstraněny všechny\n" -" <tt>multipart</tt> přílohy, které jsou nyní prázdné. Pokud zůstane\n" +" <tt>multipart</tt> přílohy, které jsou nyní prázdné. Pokud " +"zůstane\n" " po přefiltrování prázdný celý příspěvek, je zahozen celý.\n" -" Potom jsou prohledány všechny <tt>multipart/alternative</tt> sekce\n" +" Potom jsou prohledány všechny <tt>multipart/alternative</tt> " +"sekce\n" " a pokud obsahují jen jednu část, jsou nahrazeny touto částí.\n" "\n" -" <p>Nakonec jsou všechny <tt>text/html</tt> části, které v příspěvku\n" -" zůstaly konvertovány na části typu <tt>text/plain</tt> pokud je aktivní volba\n" +" <p>Nakonec jsou všechny <tt>text/html</tt> části, které v " +"příspěvku\n" +" zůstaly konvertovány na části typu <tt>text/plain</tt> pokud je " +"aktivní volba\n" " <a href=\"?VARHELP=contentfilter/convert_html_to_plaintext\"\n" -" >konvertovat html na čistý text</a> a server je nakonfigurován tak, \n" +" >konvertovat html na čistý text</a> a server je nakonfigurován " +"tak, \n" " že tuto konverzi dovoluje." #: Mailman/Gui/ContentFilter.py:75 @@ -4356,14 +4398,17 @@ msgid "" msgstr "" "Použitím této volby můžete odstranit ty části příspěvků, jejichž\n" " MIME typ vyhovuje jednomu ze zde uvedených.\n" -" Každý řádek musí obsahovat řetězec ve tvaru <tt>type/subtype</tt>,\n" -" např. <tt>image/gif</tt>. Pokud subtype neuvedete, budou odstraněny\n" +" Každý řádek musí obsahovat řetězec ve tvaru <tt>type/subtype</" +"tt>,\n" +" např. <tt>image/gif</tt>. Pokud subtype neuvedete, budou " +"odstraněny\n" " všechny části s typem odpovídajícím danému typu, např.\n" " <tt>image</tt>.\n" "\n" " <p>Prázdné řádky jsou ignorovány.\n" "\n" -" <p>Nahlédněte také do volby <a href=\"?VARHELP=contentfilter/pass_mime_types\"\n" +" <p>Nahlédněte také do volby <a href=\"?VARHELP=contentfilter/" +"pass_mime_types\"\n" " >pass_mime_types</a> pro seznam typů, které jsou povoleny." #: Mailman/Gui/ContentFilter.py:94 @@ -4371,7 +4416,8 @@ msgid "" "Remove message attachments that don't have a matching\n" " content type. Leave this field blank to skip this filter\n" " test." -msgstr "Propusť tyto přílohy. Nechte pole prázdné, pokud nechcete přílohy filtrovat." +msgstr "" +"Propusť tyto přílohy. Nechte pole prázdné, pokud nechcete přílohy filtrovat." #: Mailman/Gui/ContentFilter.py:98 msgid "" @@ -4387,12 +4433,15 @@ msgid "" " will be rejected by the pass filter." msgstr "" "Použitím této volby můžete odstranit všechny přílohy, kromě těch,\n" -" jejichž typ je uveden v tomto seznamu. Syntaxe je stejná s volbou\n" +" jejichž typ je uveden v tomto seznamu. Syntaxe je stejná s " +"volbou\n" " <a href=\"?VARHELP=contentfilter/filter_mime_types\"\n" " >filter_mime_types</a>.\n" "\n" -" <p><b>Pozor:</b> Pokud do tohoto seznamu uvedete nějaké položky\n" -" a neuvedete v něm položku <tt>multipart</tt> budou všechny příspěvky,\n" +" <p><b>Pozor:</b> Pokud do tohoto seznamu uvedete nějaké " +"položky\n" +" a neuvedete v něm položku <tt>multipart</tt> budou všechny " +"příspěvky,\n" " které obsahují přílohu, fitrem zamítnuty. " #: Mailman/Gui/ContentFilter.py:108 @@ -4407,7 +4456,9 @@ msgid "" " filename extension. Leave this field blank to skip this " "filter\n" " test." -msgstr "Propusť přílohy, které mají tuto příponu. Nechte pole prázdné, pokud nechcete přílohy filtrovat." +msgstr "" +"Propusť přílohy, které mají tuto příponu. Nechte pole prázdné, pokud " +"nechcete přílohy filtrovat." #: Mailman/Gui/ContentFilter.py:117 msgid "" @@ -4475,12 +4526,18 @@ msgstr "" " nějaká část zůstala, tato akce se na něj nevztahuje\n" " a příspěvek bude rozeslán.\n" "\n" -" <p>Pokud je zpráva zahozena, je do logovacích souborů zaznamenáno\n" -" její Message-ID. Pokud je zpráva odmítnuta a nebo přeposlána moderátorovi\n" -" je jejímu autorovi zasláno oznámení, které obsahuje důvod odmítnutí. \n" -" Pokud je zpráva zachována, je uložena do zvláštní fronty, kde čeká na\n" -" rozhodnutí administrátora. Ten zprávu může buď smazat a nebo povolit její \n" -" rozeslání. Poslední volba nemusí být dostupná, pokud ji správce serveru\n" +" <p>Pokud je zpráva zahozena, je do logovacích souborů " +"zaznamenáno\n" +" její Message-ID. Pokud je zpráva odmítnuta a nebo přeposlána " +"moderátorovi\n" +" je jejímu autorovi zasláno oznámení, které obsahuje důvod " +"odmítnutí. \n" +" Pokud je zpráva zachována, je uložena do zvláštní fronty, kde " +"čeká na\n" +" rozhodnutí administrátora. Ten zprávu může buď smazat a nebo " +"povolit její \n" +" rozeslání. Poslední volba nemusí být dostupná, pokud ji správce " +"serveru\n" " nepovolil. " #: Mailman/Gui/ContentFilter.py:171 @@ -4528,8 +4585,10 @@ msgid "How big in Kb should a digest be before it gets sent out?" msgstr "Jaká je maximální velikost digestu?" #: Mailman/Gui/Digest.py:63 -msgid "Should a digest be dispatched daily when the size threshold isn't reached?" -msgstr "Má být digest odeslán každý den i při nepřekročení maximální velikosti?" +msgid "" +"Should a digest be dispatched daily when the size threshold isn't reached?" +msgstr "" +"Má být digest odeslán každý den i při nepřekročení maximální velikosti?" #: Mailman/Gui/Digest.py:67 msgid "Header added to every digest" @@ -4660,7 +4719,8 @@ msgstr "Filtruj duplicitní příspěvky, pokud je to možné" msgid "" "Fundamental list characteristics, including descriptive\n" " info and basic behaviors." -msgstr "Základní charakteristika konference, včetně popisu a základních informací." +msgstr "" +"Základní charakteristika konference, včetně popisu a základních informací." #: Mailman/Gui/General.py:61 msgid "General list personality" @@ -4668,7 +4728,8 @@ msgstr "Informační stránka konference" #: Mailman/Gui/General.py:64 msgid "The public name of this list (make case-changes only)." -msgstr "Jméno konference. Je v něm možné provádět pouze změny velikosti písmen." +msgstr "" +"Jméno konference. Je v něm možné provádět pouze změny velikosti písmen." #: Mailman/Gui/General.py:65 msgid "" @@ -4727,8 +4788,10 @@ msgstr "" "Oproti tomu <em>moderátor</em> může jen povolovat nebo zamítat příspěvky.\n" "<em>Administrátor</em> může samozřejmě o příspěvcích rozhodovat také.\n" "\n" -"Pokud chcete založit moderátora, vyplňte do okénka jeho <a href=\"?VARHELP=general/moderator\">emailovou adresu</a> a\n" -"<a href=\"passwords\">zadejte heslo moderátora</a>. Moderátorů může být, stejně\n" +"Pokud chcete založit moderátora, vyplňte do okénka jeho <a href=\"?" +"VARHELP=general/moderator\">emailovou adresu</a> a\n" +"<a href=\"passwords\">zadejte heslo moderátora</a>. Moderátorů může být, " +"stejně\n" "jako administrátorů, více. Pozor, zde změníte adresu administrátora." #: Mailman/Gui/General.py:98 @@ -5212,7 +5275,8 @@ msgstr "" msgid "" "Should administrator get notices of subscribes and\n" " unsubscribes?" -msgstr "Má být administrátor informován o přihlašování a odhlašování účastníků?" +msgstr "" +"Má být administrátor informován o přihlašování a odhlašování účastníků?" #: Mailman/Gui/General.py:321 msgid "Send mail to poster when their posting is held for approval?" @@ -6414,7 +6478,8 @@ msgstr "" #: Mailman/Gui/Privacy.py:367 msgid "Ceiling on acceptable number of recipients for a posting." -msgstr "Maximální počet adresátů, pokud bude překročen příspěvek nebude rozeslán." +msgstr "" +"Maximální počet adresátů, pokud bude překročen příspěvek nebude rozeslán." #: Mailman/Gui/Privacy.py:369 msgid "" @@ -6476,7 +6541,8 @@ msgstr "" " Pravidel může být libovolné množství, ale pokud je nalezeno\n" " vyhovující pravidlo, zpracování je ukončeno a porovnání proti\n" " následujícím pravidlům se neprovádí.\n" -" Všimněte si, že při porovnání jsou porovnávány jak hlavičky zprávy,\n" +" Všimněte si, že při porovnání jsou porovnávány jak hlavičky " +"zprávy,\n" " tak hlavičky všech příloh a tak těmito pravidly můžete zamezit\n" " rozesílání příloh, které by mohly být pro příjemce nebezpečné." @@ -6486,7 +6552,8 @@ msgstr "Anti spam filtry" #: Mailman/Gui/Privacy.py:404 msgid "Hold posts with header value matching a specified regexp." -msgstr "Pozastav distribuci příspěvků, které obsahují v hlavičce takovéto řetězce." +msgstr "" +"Pozastav distribuci příspěvků, které obsahují v hlavičce takovéto řetězce." #: Mailman/Gui/Privacy.py:405 msgid "" @@ -6604,7 +6671,8 @@ msgstr "" #: Mailman/Gui/Topics.py:69 msgid "How many body lines should the topic matcher scan?" -msgstr "Kolik řádek z těla příspěvku má být prohlédnuto při hledání klíčových slov?" +msgstr "" +"Kolik řádek z těla příspěvku má být prohlédnuto při hledání klíčových slov?" #: Mailman/Gui/Topics.py:71 msgid "" @@ -6928,7 +6996,9 @@ msgstr "; bylo to zakázáno z neznámých důvodů" #: Mailman/HTMLFormatter.py:149 msgid "Note: your list delivery is currently disabled%(reason)s." -msgstr "POZOR - nedostáváte příspěvky, protože máte zakázanou adresu z důvodu: %(reason)s." +msgstr "" +"POZOR - nedostáváte příspěvky, protože máte zakázanou adresu z důvodu: %" +"(reason)s." #: Mailman/HTMLFormatter.py:152 msgid "Mail delivery" @@ -7200,7 +7270,8 @@ msgstr "Příspěvek do moderované konference" #: Mailman/Handlers/Hold.py:60 msgid "Post by non-member to a members-only list" -msgstr "Příspěvek od nečlena do konference s přispíváním omezeným pouze na členy." +msgstr "" +"Příspěvek od nečlena do konference s přispíváním omezeným pouze na členy." #: Mailman/Handlers/Hold.py:61 msgid "Non-members are not allowed to post messages to this list." @@ -7212,7 +7283,8 @@ msgstr "Do konference není možné přispívat bez souhlasu moderátora" #: Mailman/Handlers/Hold.py:65 msgid "This list is restricted; your message was not approved." -msgstr "Tato konference není veřejně přístupná, Vás příspěvek nebyl akceptován." +msgstr "" +"Tato konference není veřejně přístupná, Vás příspěvek nebyl akceptován." #: Mailman/Handlers/Hold.py:68 msgid "Too many recipients to the message" @@ -7269,7 +7341,8 @@ msgstr "Váš příspěvek má neplatnou hlavičku." msgid "" "Message body is too big: %(size)d bytes with a limit of\n" "%(limit)d KB" -msgstr "Tělo zprávy je příliš veliké: %(size)d bytů, kdežto limit je %(limit)d KB." +msgstr "" +"Tělo zprávy je příliš veliké: %(size)d bytů, kdežto limit je %(limit)d KB." #: Mailman/Handlers/Hold.py:105 msgid "" @@ -7619,7 +7692,8 @@ msgstr "Ověřuji práva souboru %(dbfile)s" #: Mailman/MTA/Postfix.py:342 msgid "%(dbfile)s owned by %(owner)s (must be owned by %(user)s" -msgstr "Soubor %(dbfile)s patří uživateli %(owner)s (musí být vlastněn %(user)s)" +msgstr "" +"Soubor %(dbfile)s patří uživateli %(owner)s (musí být vlastněn %(user)s)" #: Mailman/MTA/Postfix.py:354 msgid "%(dbfile)s permissions must be 066x (got %(octmode)s)" @@ -7720,7 +7794,8 @@ msgstr "" "V této zprávě jsem nenalezl žádné příkazy. \n" "Pokud potřebujete návod, jak se mnou komunikovat, zašlete ve zprávě\n" "na samostatném řádku slovo help. Prosím vezměte na vědomí, že zpráva\n" -"musí být zaslána v čistém textu, zprávě ve formátu html a nebo rtf nerozumím.\n" +"musí být zaslána v čistém textu, zprávě ve formátu html a nebo rtf " +"nerozumím.\n" #: Mailman/Queue/CommandRunner.py:168 msgid "" @@ -7833,8 +7908,10 @@ msgid "Server Local Time" msgstr "Místní čas serveru" #: Mailman/i18n.py:139 -msgid "%(wday)s %(mon)s %(day)2i %(hh)02i:%(mm)02i:%(ss)02i %(tzname)s %(year)04i" -msgstr "%(wday)s %(mon)s %(day)2i %(hh)02i:%(mm)02i:%(ss)02i %(tzname)s %(year)04i" +msgid "" +"%(wday)s %(mon)s %(day)2i %(hh)02i:%(mm)02i:%(ss)02i %(tzname)s %(year)04i" +msgstr "" +"%(wday)s %(mon)s %(day)2i %(hh)02i:%(mm)02i:%(ss)02i %(tzname)s %(year)04i" #: bin/add_members:26 msgid "" @@ -10865,7 +10942,8 @@ msgstr "" "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n" "<HTML>\n" " <HEAD>\n" -" <title>Konference %(listname)s %(archive)s Archiv po %(archtype)s</title>\n" +" <title>Konference %(listname)s %(archive)s Archiv po %(archtype)s</" +"title>\n" " <META NAME=\"robots\" CONTENT=\"noindex,follow\">\n" " %(encoding)s\n" " </HEAD>\n" @@ -11509,8 +11587,7 @@ msgstr "" "Vaše emailová adresa \"%(email)s\" byla pozvána do konference\n" "%(listname)s, která je provozována na serveru\n" "%(hostname)s. Správce konference %(listname)s\n" -"doufá, že pozvání přijmete." -"\n" +"doufá, že pozvání přijmete.\n" "Přijmout pozvání je jednoduché, stačí odpovědět na tuto\n" "zprávu a nechat pole předmět: (Subject:) beze změny\n" "(případné \"Re:\" doplněné automaticky poštovním klientem nevadí),\n" @@ -11531,8 +11608,9 @@ msgstr "" "problém, prosím, kontaktujte správce na adrese: %(listowner)s." #: templates/en/listinfo.html:1 +#, fuzzy msgid "" -"<!-- $Revision: 8165 $ -->\n" +"<!-- $Revision: 8224 $ -->\n" "<HTML>\n" " <HEAD>\n" " <TITLE><MM-List-Name> Info Page</TITLE>\n" @@ -11679,7 +11757,7 @@ msgid "" "</BODY>\n" "</HTML>" msgstr "" -"<!-- $Revision: 8165 $ -->\n" +"<!-- $Revision: 8224 $ -->\n" "<HTML>\n" " <HEAD>\n" " <TITLE>Informace o konferenci<MM-List-Name></TITLE>\n" @@ -12289,7 +12367,7 @@ msgid "" "</body>\n" "</html>" msgstr "" -"<!-- $Revision: 8165 $ -->\n" +"<!-- $Revision: 8224 $ -->\n" "<html>\n" "<head>\n" " <link rel=\"SHORTCUT ICON\" href=\"<mm-favicon>\">\n" @@ -12805,7 +12883,8 @@ msgstr "" "adresu, což ukazuje, že doručování na adresu %(address)s nefunguje\n" "správně.\n" "Přikládáme ukázku vrácené zprávy, ze které poznáte, proč se zprávy vracejí.\n" -"Je možné, že tato zpráva pro vás není srozumitelná a budete muset o spolupráci\n" +"Je možné, že tato zpráva pro vás není srozumitelná a budete muset o " +"spolupráci\n" "požádat správce svého poštovního systému. Ten by měl být schopen poznat,\n" "k jakému problému dochází.\n" "\n" @@ -12820,8 +12899,7 @@ msgstr "" " %(optionsurl)s\n" "\n" "Na této stránce si můžete nastavit jinou emailovou adresu a nebo \n" -"změnit parametry doručování." -"\n" +"změnit parametry doručování.\n" "Pokud máte k tomuto emailu dotaz, nebo si myslíte, že nebyl zaslán\n" "správně, kontaktujte, prosím, správce konference na adrese:\n" "\n" @@ -12857,8 +12935,9 @@ msgstr "" " %(adminaddr)s" #: templates/en/roster.html:1 +#, fuzzy msgid "" -"<!-- $Revision: 8165 $ -->\n" +"<!-- $Revision: 8224 $ -->\n" "<HTML>\n" " <HEAD>\n" " <TITLE><MM-List-Name> Subscribers</TITLE>\n" @@ -12913,7 +12992,7 @@ msgid "" "</BODY>\n" "</HTML>" msgstr "" -"<!-- $Revision: 8165 $ -->\n" +"<!-- $Revision: 8224 $ -->\n" "<HTML>\n" " <HEAD>\n" " <TITLE>Účastníci konference <MM-List-Name></TITLE>\n" @@ -12996,8 +13075,9 @@ msgstr "" "pro vyřízení požadavku." #: templates/en/subscribe.html:1 +#, fuzzy msgid "" -"<!-- $Revision: 8165 $ -->\n" +"<!-- $Revision: 8224 $ -->\n" "<html>\n" "<head><title><MM-List-Name> Subscription results</title></head>\n" "<body bgcolor=\"white\">\n" @@ -13007,7 +13087,7 @@ msgid "" "</body>\n" "</html>" msgstr "" -"<!-- $Revision: 8165 $ -->\n" +"<!-- $Revision: 8224 $ -->\n" "<html>\n" "<head><title><MM-List-Name> Výsledky přihlášení</title></head>\n" "<body bgcolor=\"white\">\n" @@ -13311,4 +13391,3 @@ msgstr "" "Adresa účastníka %(name)s v konferenci %(listname)s \n" "byla úspěšně změněna z %(oldaddr)s na %(newaddr)s.\n" "\n" - diff --git a/misc/Elixir-0.3.0.tar.gz b/misc/Elixir-0.3.0.tar.gz Binary files differnew file mode 100644 index 000000000..fd61be97e --- /dev/null +++ b/misc/Elixir-0.3.0.tar.gz diff --git a/misc/Makefile.in b/misc/Makefile.in index d4690275b..63ac8dcf3 100644 --- a/misc/Makefile.in +++ b/misc/Makefile.in @@ -48,25 +48,24 @@ SCRIPTSDIR= $(prefix)/scripts SHELL= /bin/sh PYTHONLIBDIR= $(prefix)/pythonlib +PYTHONPATHDIR= $(PYTHONLIBDIR)/lib/python # Traditional distutils packages -SETUPINSTOPTS= --install-lib $(DESTDIR)$(PYTHONLIBDIR) \ - --install-purelib $(DESTDIR)$(PYTHONLIBDIR) \ - --install-data $(DESTDIR)$(PYTHONLIBDIR) +SETUPINSTOPTS= --home $(DESTDIR)$(PYTHONLIBDIR) SETUPCMD= setup.py --quiet install $(SETUPINSTOPTS) -EMAIL= SETUPTOOLS= setuptools-0.6c3 -PYSQLITE= pysqlite-2.3.2 SQLALCHEMY= SQLAlchemy-0.3.3 -SETUPPKGS= $(EMAIL) $(SETUPTOOLS) $(PYSQLITE) $(SQLALCHEMY) +ZOPEIFACE= zope.interface-3.3.0.1 +ELIXIR= Elixir-0.3.0 +SETUPPKGS= $(SETUPTOOLS) $(SQLALCHEMY) $(ZOPEIFACE) $(ELIXIR) -EZINSTOPTS= --install-dir $(DESTDIR)$(PYTHONLIBDIR) -EZCMD= $(PYTHONLIBDIR)/$(SETUPTOOLS)-py2.4.egg/easy_install.py \ - $(EZINSTOPTS) +EZINSTOPTS= --install-dir $(DESTDIR)$(PYTHONPATHDIR) +EZCMD= $(PYTHONLIBDIR)/bin/easy_install $(EZINSTOPTS) WSGIREF= wsgiref-0.1.2-py2.4.egg -EZPKGS= $(WSGIREF) +MUNEPY= munepy-1.1-py2.5.egg +EZPKGS= $(WSGIREF) $(MUNEPY) # Modes for directories and executables created by the install # process. Default to group-writable directories but @@ -97,15 +96,16 @@ install-other: $(INSTALL) -m $(FILEMODE) mailman.cfg.sample $(DESTDIR)$(ETCDIR) install-packages: + mkdir -p $(PYTHONPATHDIR) for p in $(SETUPPKGS); \ do \ gunzip -c $(srcdir)/$$p.tar.gz | tar xf -; \ (cd $$p ; umask 02 ; \ - PYTHONPATH=$(PYTHONLIBDIR) $(PYTHON) $(SETUPCMD)); \ + PYTHONPATH=$(PYTHONPATHDIR) $(PYTHON) $(SETUPCMD)); \ done for p in $(EZPKGS); \ do \ - (umask 02 ; PYTHONPATH=$(PYTHONLIBDIR) $(PYTHON) $(EZCMD) $$p); \ + (umask 02 ; PYTHONPATH=$(PYTHONPATHDIR) $(EZCMD) $$p); \ done finish: diff --git a/misc/munepy-1.1-py2.5.egg b/misc/munepy-1.1-py2.5.egg Binary files differnew file mode 100644 index 000000000..00ed8ccfe --- /dev/null +++ b/misc/munepy-1.1-py2.5.egg diff --git a/misc/paths.py.in b/misc/paths.py.in index 50eaebf3e..a840e3f14 100644 --- a/misc/paths.py.in +++ b/misc/paths.py.in @@ -38,7 +38,7 @@ exec_prefix = '@exec_prefix@' if exec_prefix == '${prefix}': exec_prefix = prefix -pythonlib = os.path.join(prefix, 'pythonlib') +pythonlib = os.path.join(prefix, 'pythonlib', 'lib', 'python') # Hack the path to include the parent directory of $prefix/Mailman sys.path.insert(0, prefix) diff --git a/misc/zope.interface-3.3.0.1.tar.gz b/misc/zope.interface-3.3.0.1.tar.gz Binary files differnew file mode 100644 index 000000000..c95bf0698 --- /dev/null +++ b/misc/zope.interface-3.3.0.1.tar.gz |
