[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: specifying multiple with arguments
From: |
Dan Manthey |
Subject: |
Re: specifying multiple with arguments |
Date: |
Tue, 15 Mar 2005 14:09:32 -0500 |
On Tue, 15 Mar 2005, Patrick West wrote:
> I am interested in doing something like this:
>
> ./configure --with-package=package1 --with-package=package2
>
> But I am not sure how to do this. I try to use AC_ARG_WITH, but that
> only takes package2 and ignores package1.
>
> Any help would be greatly appreciated.
>
> pwest
>
Depends exactly what you mean:
./configure --with-pkg1=foo1 --with-pkg2=bar2
or
./configure --with-pkg=foo1,bar2
In the former case, call AC_ARG_WITH twice with differnt first arguments.
In the later, call it once and use it's third (and possibly fourth)
arguments to examine $withval and parse it into foo1 and bar2, such as via
ac_save_IFS=$IFS
for p in $withval; do
IFS=$ac_save_IFS
# add $p to list of packages to use as pkg.
done
-Dan