autoconf
[Top][All Lists]
Advanced

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

Re: Removing '--enable/disable-shared/static' options from configure scr


From: Ralf Wildenhues
Subject: Re: Removing '--enable/disable-shared/static' options from configure script
Date: Mon, 13 Feb 2006 17:05:15 +0100
User-agent: Mutt/1.5.11

Hi,

* Asfand Yar Qazi wrote on Mon, Feb 13, 2006 at 03:52:38PM CET:
> 
> I'm posting on behalf of the Ogre project (www.ogre3d.org) and they've 
> already got their dynamic module loading system in place, I don't think 
> they want to change. 

Oh, that's perfectly fine.  Just thought I'd mention it.  :)

> I can't agree with their 'load everything dynamically' setup, but I
> just want to stop people compiling their project statically (like the
> build system allows) and then not be useable (like it ends up.)

Sure.

> >>Another way: is there a macro that removes arguments given to 
> >>'configure', that can be used to not allow the enable-static or 
> >>disable-dynamic arguments through.
> >
> >Not that I know of.  The best I could think of off-hand would be to
> >check at configure time that it has not been used.
> 
> So should they run a script that patches their configure script after it is 
> generated, or can some shell programming be placed in their configure.in 
> script that will end up in the configure script in the right place?

Yes.  First, I'd advise you to use AC_ENABLE_SHARED and
AC_DISABLE_STATIC (before AC_PROG_LIBTOOL) to set the correct defaults.
They can still be overridden by the user, however.  I'd still regard
that as a good thing: the user should be in control, and the package
author often cannot foresee issues on every system.  If you however are
certain to take that choice away from the user, you could check the
environment variables $enable_shared and $enable_static (after
AC_PROG_LIBTOOL).  It would probably be the most useful to output a
warning instead of an error; for example with AC_MSG_WARN.

Feel free to ask if you need more help.

BTW, to get PACKAGE_NAME to be `OGRE' not `ogre', use the three-option
style of AC_INIT:
  AC_INIT([OGRE], [1.1.0], address@hidden)
  AM_INIT_AUTOMAKE([1.7.0 foreign no-installinfo no-installman subdir-objects])

Cheers,
Ralf




reply via email to

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