[Top][All Lists]

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

overriding autoconf macro defaults

From: Harlan Stenn
Subject: overriding autoconf macro defaults
Date: Tue, 19 Jul 2005 00:15:37 +0000

I'm using AutoGen/AutoOpts for a project.

AutoOpts provides LIBOPTS_CHECK as an autoconf macro, in order to
provide the neccesary bits of libopts information (which is
traditionally distributed in the libopts/ subdir) to the current/parent

As such, that macro calls AC_CONFIG_FILES([libopts/Makefile]) and
provides for LDADD stuff in $(top_builddir)/libopts/ and CFLAGS stuff in
$(top_srcdir)/libopts/ .

I have a project that contains a "tear off" package in a subdir, and
this tear-off package also wants to use libopts.

I do not want to bundle 2 copies of libopts in my distribution.

Therefore, I was thinking about providing an override to the
LIBOPTS_CHECK so both packages would look in the same place for the
libopts distribution.

I was thinking that if there is an argument to LIBOPTS_CHECK that string
would contain the "location" of the code.  In this case my layout would
look like this:

 pkg/ LIBOPTS_CHECK(subpkg/libopts)
 pkg/subpkg/ LIBOPTS_CHECK

is this a reasonable/good way to go, or should I set a variable instead?

I'm also assuming (hollow laugh) that the code will build OK, because I
suspect the AC_CONFIG_SUBDIRS stuff will be OK being run twice, once
from the main codebase and again from the subpkg codebase.

Yes, I'll be wrapping this up and sending it to Bruce so he can
incorporate it into autogen when I'm done.


reply via email to

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