libX11 configure.ac patch
fransmeulenbroeks at gmail.com
Fri Nov 5 06:16:27 PDT 2010
2010/11/5 Dan Nicholson <dbn.lists at gmail.com>:
> On Fri, Nov 5, 2010 at 3:35 AM, Frans Meulenbroeks
> <fransmeulenbroeks at gmail.com> wrote:
>> Dear all,
>> While trying to compile libX11 for nios2, I discovered that configure
>> accidently thinks it is an os2 system (which is not the case).
>> The failing code is a match on target_alias for *os2*. As my
>> target_alias is nios2_linux, this also matches.
>> I found this on 1.3.2 but verified that the same code is still present
>> in git head.
>> The patch below fixes this for me, but I can imagine people prefer to
>> strengthen the match for os2 (not sure if changing *os2* to os2* will
>> work, can't really verify that).
>> In case further info is needed feel free to contact me directly. I am
>> not on the list, just someone passing by to report a problem and
>> Best regards & keep up the good work!
>> Index: libX11-1.3.2/configure.ac
>> --- libX11-1.3.2.orig/configure.ac 2010-11-05 10:30:33.825536983 +0100
>> +++ libX11-1.3.2/configure.ac 2010-11-05 10:31:25.913899269 +0100
>> @@ -202,6 +202,7 @@
>> # arch specific things
>> case $target_alias in
>> + nios2*) os2="false" ;;
>> *os2*) os2="true" ; WCHAR32="0" ;;
>> *) ;;
> I think the reason that *os2* was used is because the test is against
> $target_alias, and the os2 may be buried in the middle like
> i386-pc-os2-emx. I see three possible solutions:
> 1. Change to $target_os, in which case you can just test os2*.
> 2. Leave it as $target_alias, but change the test to *-os2*.
> 3. Special case nios2* as you've done here since it will catch the cpu
> type at the beginning.
> I think 1 is the most correct since really what we're trying to do is
> match the OS/2 operating system. Does the following work for you?
> diff --git a/configure.ac b/configure.ac
> index 5b79b43..6ec8bda 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -246,8 +246,8 @@ dnl AC_PATH_XTRA
> # arch specific things
> -case $target_alias in
> - *os2*) os2="true" ; WCHAR32="0" ;;
> +case $target_os in
> + os2*) os2="true" ; WCHAR32="0" ;;
> *) ;;
Thanks for your quick reply!
This works for me. Actually I did expect this, as my target_os is not
os2* so I should get the default case.
The key question is: does this work for os2 systems (and I cannot test that)
> Noticing now that this should really be testing $host_alias or
> $host_os since that's what you're building the package for. The
> $target* variables are really only applicable when you're building a
> cross compiler or something like that. That's orthogonal, but should
> be fixed.
That's ok. Didn't mention this, but actually this happens when cross
compiling so I should be using the target_* vars as I am cross
compiling a lib for the target.
(nios2 is not that fast, you do not want to compile big packages like X on it).
Best regards, Frans
More information about the xorg