common idiom for user definable substitution variables and defaults

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

 



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
@XJS_LOAD_PATH@. 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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux