autoconf
[Top][All Lists]
Advanced

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

common idiom for user definable substitution variables and defaults


From: Peter Michaux
Subject: common idiom for user definable substitution variables and defaults
Date: Fri, 16 May 2008 10:02:15 -0700

Hi,

I'm just getting to know autoconf and it has already made my
development much better.

When the user runs the "./configure" step I want him to be able to
specify a variable XJS_LOAD_PATH that will be substituted with
@address@hidden The user would type

./configure XJS_LOAD_PATH="some/path:and:another"

To make this possible, I have the following in my configure.in file
just before AC_CONFIG_FILES.

AC_SUBST(XJS_LOAD_PATH)
if [[ -z "${XJS_LOAD_PATH}" ]]
then
  XJS_LOAD_PATH=".:~/lib/xjs:/usr/local/lib/xjs:/usr/lib/xjs:/lib/xjs"
fi

I have a feeling this might not be the normal way to do this.

For one thing, the double brackets are just single brackets in my
configure file. That is ok but how to quote brackets? Do I just want
four brackets on each side?

Is there a standard autoconf macro for a default substitution value?
Or a standard idiom? Or am I doing it right?

Thanks,
Peter




reply via email to

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