Hi all,
Sorry if this is already in the archive. I looked through it and was
not lucky. You must also know that I am quite new to autoconf but... I
need to learn fast!
I want to implement the --with-package=DIR option to my project's
configure script. The --with-package[=yes|no] thing is straightforward
using AC_ARG_WITH(). I have however some questions regarding others'
experience wth the =DIR part.
1. What should I do if the user is so dumb to actually give a DIR which
does not exist? IMHO, I should issue an AC_MSG_ERROR and terminate the
configuration: we cannot configure taking into account the user's input.
What do you think of that and is there a consensus on how to handle such
a situation.
2. How can I detect that /path/to/foo helps in any way for accessing
foo.h and libfoo.a? Specifically, if library foo is available in the
system directories (e.g. /usr/include and /usr/lib), then providing
--with-foo=yes and --with-foo=/wrong/path/to/foo will have the same
effect. For foo is accessible to the compiler and linker even if the
options -I and -L point to 'wrong' directories, i.e directories not
containing foo.h and libfoo.a. Is there a (portable) way of detecting
that? In my case, the user might have a custom-made version of foo (with
the same file names) and want to use it. I agree he should not have
given a wrong path to foo in the first place but users are users and I
want to avoid that the software is configured and compiled with the
'system-version' of the library when the user (thought he) especially
demanded to use another version.
Any (portable or not) idea?
Thanks in advance.
Thomas
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf