Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 34130 invoked from network); 16 Nov 2009 22:42:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Nov 2009 22:42:51 -0000 Received: (qmail 88565 invoked by uid 500); 16 Nov 2009 22:42:51 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 88518 invoked by uid 500); 16 Nov 2009 22:42:51 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 88508 invoked by uid 99); 16 Nov 2009 22:42:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2009 22:42:50 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dave@dmi.me.uk designates 77.68.52.130 as permitted sender) Received: from [77.68.52.130] (HELO scaramanga.siterage.net) (77.68.52.130) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2009 22:42:39 +0000 Received: from localhost (scaramanga.siterage.net [127.0.0.1]) by scanner.scaramanga.siterage.net (SiteRage Mail Server) with ESMTP id EAE4C6815C for ; Mon, 16 Nov 2009 22:42:18 +0000 (GMT) X-Spam-Score: -3.323 X-Spam-Level: Received: from scaramanga.siterage.net ([127.0.0.1]) by localhost (scaramanga.siterage.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DZlihVSTepoq for ; Mon, 16 Nov 2009 22:42:18 +0000 (GMT) Received: from [192.168.1.65] (host86-170-191-177.range86-170.btcentralplus.com [86.170.191.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by scaramanga.siterage.net (SiteRage Mail Server) with ESMTPSA id 5DB825F5DB for ; Mon, 16 Nov 2009 22:42:18 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dmi.me.uk; s=scara-dkim; t=1258411338; bh=r7vXpjQ8sAdnWSlPNkhSyiDbhv12RrgJ0WHX/SuvTzo=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; b=C7x1LIMiKAJodJw7uJFXJHKQnH2Hpd+9JFeL3WWv/baHQxLEkK/I7FVLgyD30vtNT 6sX12DbYhipo5lz3RTTSyA8BHRwvC5xke+DGoA4PIFFC+IgxFMID11U9wdXtdnqydy +ZtXSLLwG4QdKsVLQN+lp41nJ0x5RtiByaQ4yYhM= DomainKey-Signature: a=rsa-sha1; s=scara-dk; d=dmi.me.uk; c=simple; q=dns; h=message-id:date:from:user-agent:mime-version:to:subject:content-type; b=nf/I6IgyrPbX/xouqsw8WbVyQBQewn8d3N7wMg2BJG8Q4/bIgl4q2gnFhqj6r6V9p sAjxNd6iRIS7bDEVOBsrIBRyhsyvS+7S+3RMOnSiZn26KRFb0DMvfJRcFCxyQ3A35L7 iY88I9T17BJ+pw7O5pbT45pORXjLbiPErsXzOIs= Message-ID: <4B01D549.7060001@dmi.me.uk> Date: Mon, 16 Nov 2009 22:42:17 +0000 From: Dave Ingram User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Recommended way to use autotools Content-Type: multipart/alternative; boundary="------------010900020608060908060603" X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Flag: NO X-Old-Spam-Status: No, score=-3.323 required=5 tests=[ALL_TRUSTED=-1.8, AWL=0.075, BAYES_00=-2.599, HTML_MESSAGE=0.001, STOX_BOUND_090909_B=1] --------------010900020608060908060603 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi all, I've been wondering if there is a recommended way of using autotools when writing an Apache module? I've seen a tutorial on this, but it was last updated in 2005, so I'm not sure if there are any better ways or things to do. I've also looked at a couple of projects , and they seem to do things differently. I also found a couple of previous questions on this subject, but they're very old and don't answer my question. I essentially want to allow the module to be compiled against one or two different libraries, depending on availability and user choice. Non-essential background details: ----8<----------------------------------------------------------------- I'm building a module that accesses a database at configuration parse time, but I can't use APR DBD for a few reasons. Firstly, I need features from apr-util 1.3 which is not in many major distributions. Secondly, apr-util and mod_php can conflict by linking against libmysqlclient_r and libmysqlclient, respectively. Both libraries export the same symbols, which then causes all sorts of hell (generally manifesting as bizarre segfaults). I've also had issues with the distro-packaged versions of apr-util being compiled without database support (or DSO support, making it impossible to load the DB drivers). Then again, this could be due to me missing something. My DB driver-loading code was inspired from mod_dbd, so I'm fairly sure it's making the right calls. Basically, I want the user/package maintainer to be able to force selection of libmysqlclient/libmysqlclient_r as appropriate (as some distributions have fixed this issue), although it would be even better to autodetect this via "configure" rules. I then also plan to add support for other databases, such as Postgres. Of course, if anyone has any better suggestions on how to do this that don't involve me writing my own reduced-functionality DB abstraction layer, I would love to hear them. ---->8----------------------------------------------------------------- Thanks, Dave --------------010900020608060908060603--