[Gllug] configure.in question

salsaman salsaman at xs4all.nl
Sat Nov 11 17:02:45 UTC 2006


salsaman wrote:

> salsaman wrote:
>
>> - Tethys wrote:
>>
>>> On 11/10/06, salsaman <salsaman at xs4all.nl> wrote:
>>>
>>>> if [[ $AC_CANONICAL_TARGET = *darwin* ]]; then
>>>> ...
>>>> fi
>>>>
>>>> but the above is not correct. Any ideas ?
>>>
>>>
>>>
>>>
>>> You should be using a double equals, and for safety's sake,
>>> $AC_CANONICAL_TARGET should be quoted when you dereference it. If that
>>> still doesn't work, try:
>>>
>>> case "$AC_CANONICAL_TARGET" in
>>>    *darwin*)
>>>        ### Do something clever here
>>>        ;;
>>>    *)
>>>        ### Handle non-darwin cases here
>>>        ;;
>>> esac
>>>
>>> Tet
>>
>>
>>
>>
>>
>>
>>
>>
>> Hmmm...this is still not quite working.
>>
>> Now I have:
>>
>> case "$target_os" in
>> *darwin)
>>   IS_DARWIN = true
>>  ;;
>> *)
>>   IS_DARWIN = false
>>  ;;
>> esac
>>
>> AM_CONDITIONAL(IS_DARWIN,IS_DARWIN)
>>
>>
>> But configure throws errors:
>>
>> ./configure: line 22614: IS_DARWIN: command not found
>> ./configure: line 22620: IS_DARWIN: command not found
>>
>>
>>
>> Here is the generated code:
>>
>> case "$target_os" in
>> *darwin)
>>   IS_DARWIN = true
>>  ;;
>> *)
>>   IS_DARWIN = false            <--- 22614
>>  ;;
>> esac
>>
>>
>>
>> if IS_DARWIN; then               <--- 22620
>>  IS_DARWIN_TRUE=
>>  IS_DARWIN_FALSE='#'
>> else
>>  IS_DARWIN_TRUE='#'
>>  IS_DARWIN_FALSE=
>> fi
>>
>>
>>
>>
>> Any ideas ?
>>
>> Gabriel.
>>
>
>
> Ah, OK, I got rid of the first error** with:
>
> case "$target_os" in
> *darwin)
>   IS_DARWIN="true"
>  ;;
> *)
>   IS_DARWIN="false"
>  ;;
> esac
>
> AM_CONDITIONAL(IS_DARWIN,IS_DARWIN)
>
> The second error is still there.
>
>
>
> **why in hell is shell script white-space sensitive ? I've never quite 
> understood when it matters and when it doesn't.
>
>
>
> Gabriel.
>


Ah forget it, the other mistake was:
AM_CONDITIONAL(IS_DARWIN,IS_DARWIN)

->

AM_CONDITIONAL(IS_DARWIN,$IS_DARWIN)


Gabriel.

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list