monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] library build


From: Zack Weinberg
Subject: Re: [Monotone-devel] library build
Date: Tue, 30 Sep 2008 11:35:58 -0700

On Mon, Sep 29, 2008 at 9:27 AM, Jack Lloyd <address@hidden> wrote:
>> I know it's overkill sometimes but making > configuration script
>> names "configure" and supporting --prefix option > would be very
>> convienient for some ad-hoc builders.
>
> Just it being named configure instead of configure.pl is a major
> factor? :(

Supporting the same command line interface as GNU configure is a major
factor, because that means higher level scripts don't have to know
that botan is different. I'd recommend you do two things:

1) Create a shell script named "configure" and a DOS batch file named
"configure.bat" that wrap the existing configure.pl; they can be as
simple as

#! /bin/sh
exec perl -- "${0%/*}/configure.pl" "$@"

(I don't know the equivalent in dos batch language.)

2) Make the command line options supported by configure.pl match the
command line options supported by autoconf-generated configure scripts
as closely as possible, and make the generated Makefile use the same
targets and user-settable variables as automake-generated Makefiles.
Looking at configure.pl --help I would suggest:

  --no-foo -> --disable-foo, for all foo; also, accept --enable-foo
for all foo, even if this has no effect
  --debug -> --enable-debug (and accept --disable-debug)
  --modules, --module-set=, --noauto   -> collapse into
--(enable,disable)-modules
  --build-dir=  -> --with-build-dir; also, if it doesn't already, this
should default to the current working directory
                       *even if* that's not the same as the directory
containing configure.pl; also, support --srcdir=
  DESTDIR= support for "make install", if not already present

  --cc= -> CC environment variable and/or "CC=compiler" on the command line
  --os, --cpu -> --host=<GNU configuration triplet>
  --endian=, --unaligned-mem=   should be spelled --with-endian,
--with-unaligned-mem
  --local-config= -> --with-local-config=
  also, it would be nice (but is not very important) to support
--exec-prefix and as many of the --foodir installation options as
  possible (accept them even if you don't have anything to put in that
directory).

in roughly descending order of importance, with everything up to the
gap much more important than everything below.  Note that you can
include config.sub and config.guess in your project even if it doesn't
use autoconf, and with no impact on licensing of anything else.  I
don't know offhand what changes might be needed for the makefiles.

zw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]