[Dovecot] issues/workarounds to build dovecot on OSX

OpenMacNews OpenMacNews at speakeasy.net
Sun Jul 17 19:50:17 EEST 2005


hi all,

a few notes/issues re: building dovecot on OSX.


first, after DL of cvs-head,

	% autogen.sh

reports:

	autogen.sh: line 2: libtoolize: command not found

o OSX, 'libtoolize' has been sed'd to glibtoolize.

couple of ways to deal with this:

(a) edit in autogen.sh

		aclocal
	---	libtoolize --force
	+++	glibtoolize --force
	automake --add-missing
		autoheader
		autoconf

(b) run

	% autoreconf -i -f

instead

(c) i suppose yout can link:

	% ln -s /usr/bin/glibtoolize /usr/bin/libtoolize

imho, too 'kludgy' ... never tried it.

(d) put some sort of conditional in autogen.sh ... many options of course

e.g.:

	HOSTTYPE=`uname`
	if [ "$HOSTTYPE" == "Darwin" ]; then
	        LIBTOOLIZE=glibtoolize
	else
	        LIBTOOLIZE=libtoolize
	fi


fwiw, i'm using (b) -->

	% autoreconf -i -f

successfully.



next, dovecot's ./configure fails at the check for openssl:

	...
	checking whether va_lists can be copied by value... yes
	./configure: line 27241: syntax error near unexpected token `SSL,'
	./configure: line 27241: `    PKG_CHECK_MODULES(SSL, openssl)'
	%

within a pkg-config stanza ...

as pkg-config does not exist on OSX, a couple of hacks in 'configure.in':

	===================================================
	(EDITOR) configure.in
	@1032
		if test "$want_openssl" = "yes" && test "$have_ssl" = "no"; then
	---	  if pkg-config --exists openssl; then
	+++	if test -f openssl; then
	---	    PKG_CHECK_MODULES(SSL, openssl)
		    CFLAGS="$CFLAGS $SSL_CFLAGS"
	===================================================

, followed, of course, by another:

	% autoreconf -i -f

take care of the problem.


with changes as above, 'configure' with:


	./configure \
	--prefix=/usr/local/dovecot \
	--exec-prefix=/usr/local/dovecot \
	--bindir=/usr/local/dovecot/bin \
	--sbindir=/usr/local/dovecot/sbin \
	--libexecdir=/usr/local/dovecot/libexec \
	--libdir=/usr/local/dovecot/lib \
	--includedir=/usr/local/dovecot/include \
	--sysconfdir=/var/Settings/Dovecot \
	--localstatedir=/var/Process \
	--mandir=/var/Documentation/man \
	--datadir=/var/Data/Dovecot \
	--with-ssl=openssl --with-ssldir=/usr/local \
	--with-rundir=/var/Process/dovecot \
	--with-moduledir=/usr/local/dovecot-modules \
	--enable-shared \
	--enable-static \
	--enable-ipv6 \
	--with-pgsql \
	--disable-debug

completes sueccessfully, as do:

	make
	make check
	make install

resulting in:

	% ls -aR
		.:
		.  ..  libexec  sbin
		
		./libexec:
		.  ..  dovecot
		
		./libexec/dovecot:
		.   checkpassword-reply  dovecot-auth  imap-login  pop3-login
		..  deliver              imap          pop3        rawlog
		
		./sbin:
		.  ..  dovecot  dovecotpw

as, i believe, expected.

now, onward!

cheers,

richard



More information about the dovecot mailing list