libX11 configure.ac patch
Dan Nicholson
dbn.lists at gmail.com
Fri Nov 5 05:29:06 PDT 2010
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
> solution.
>
> Best regards & keep up the good work!
> Frans
>
> 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
> WCHAR32="1"
> case $target_alias in
> + nios2*) os2="false" ;;
> *os2*) os2="true" ; WCHAR32="0" ;;
> *) ;;
> esac
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
WCHAR32="1"
-case $target_alias in
- *os2*) os2="true" ; WCHAR32="0" ;;
+case $target_os in
+ os2*) os2="true" ; WCHAR32="0" ;;
*) ;;
esac
AC_SUBST(WCHAR32)
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.
--
Dan
More information about the xorg
mailing list