[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

how the other guys do things



Thought someone might find this amusing.

----- Forwarded message from Tom Payne <ion@tompayne.org> -----

From: Tom Payne <ion@tompayne.org>
Date: Thu, 10 Apr 2003 11:27:03 +0100
To: Ion <ion@list.rt.fm>
Subject: Fw: Re: Cygwin and ion-devel-20030408
X-Spam-Status: No, hits=-17.8 required=5.0
	tests=BAYES_01,EMAIL_ATTRIBUTION,SUBJ_HAS_UNIQ_ID,
	      UPPERCASE_25_50,USER_AGENT_MUTT
	autolearn=ham version=2.53

[Tuomo: I meant to post this to the list too, sorry you get it twice]

On Thu, Apr 10, 2003 at 09:38:24AM +0300, Tuomo Valkonen wrote:
> PS. Is anyone else having trouble with libtool? If this seems to be common,
> I may still have to reconsider using it.

It's designed to work closely with autoconf. autoconf has a
AC_PROG_LIBTOOL macro that does all the work for you.

Plea: please use autoconf/automake for ion. I know this has been debated
a few times on my list, but now that you're using libtool it really makes
sense! Here's my reason:

The Gentoo ebuild for ion-devel-20030327 contains (full snip to demonstrate
just how much code is required):

-----8<-----

cp system.mk system.mk.orig
sed -e 's:^PREFIX=/usr/local/ion-devel:PREFIX=/usr:' \
	-e 's:^ETCDIR=$(PREFIX)/etc:ETCDIR=/etc/X11:' \
	-e 's:^MANDIR=$(PREFIX)/man:MANDIR=$(PREFIX)/share/man:' \
	-e 's:^DOCDIR=$(PREFIX)/doc:DOCDIR=$(PREFIX)/share/doc:' \
	-e 's:^#DEFINES += -DCF_UTF8 -DCF_ICONV_TARGET=\\"WCHAR_T\\" -DCF_ICONV_SOURCE=\\"UTF-8\\":DEFINES += -DCF_UTF8 -DCF_ICONV_TARGET=\\"WCHAR_T\\" -DCF_ICONV_SOURCE=\\"UTF-8\\":' \
	-e 's:^#HAS_SYSTEM_ASPRINTF=1:HAS_SYSTEM_ASPRINTF=1:' \
	-e 's:#XOPEN_SOURCE=-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED:XOPEN_SOURCE=-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED:' \
	-e "s:^CFLAGS=-g -O2 \$(WARN) \$(DEFINES) \$(INCLUDES) \$(EXTRA_INCLUDES):CFLAGS=${CFLAGS} \$(WARN) \$(DEFINES) \$(INCLUDES) \$(EXTRA_INCLUDES):" \
	system.mk.orig > system.mk

local ion_version=`cut -d\  -f3 version.h | tr -d \"`
cp Makefile Makefile.orig
sed -e "s:\$(DOCDIR)/ion:\$(DOCDIR)/ion-devel-${ion_version}:" \
	Makefile.orig > Makefile

if [ "`use truetype`" ]; then
	local xft_config=`which xft-config 2> /dev/null`
	if [ -n "${xft_config}" ] && [ -x "${xft_config}" ]; then
		local xft_cflags=`${xft_config} --cflags`
		local xft_libs=`${xft_config} --libs`
	else
		local xft_cflags=
		local xft_libs="-lXft"
	fi
	cp system.mk system.mk.orig
	sed -e 's:#DEFINES += -DCF_XFT:DEFINES += -DCF_XFT:' \
		-e "s:#X11_INCLUDES += \`xft-config --cflags\`:X11_INCLUDES += ${xft_cflags}:" \
		-e "s:#X11_LIBS += \`xft-config --libs\`:X11_LIBS += ${xft_libs}:" \
		system.mk.orig > system.mk
fi

-----8<-----

Now that a new version of ion is out, I have to write another script like
the one SPECIFIC to this version of Ion. I need to check all the sed scripts
still work, and add new ones to to support Lua and whatever else has
changed. Please can I just do:

	./configure --enable-utf8 --disable-xinerama --with-lua=/usr/local

instead?

I've got virtually fully functional autoconf scripts that I can email to
you.

Regards,

Tom


----- End forwarded message -----


The kicker is the rest of the conversation, with Per Olofsson, who
maintains ion for Debian.

Per Olofsson:
> Instead of using sed, why don't you just pass these variables to make?
> That works perfectly well, and you don't have to check for versions
> because variables that are not used are just silently ignored.

Tom Payne again:
> Good idea. I'll look into it.

-- 
see shy jo

Attachment: pgpLHab_Utr1S.pgp
Description: PGP signature


Reply to: