[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf-2.59b fails to include correct X11R6 paths in configure scr
From: |
Pavel Roskin |
Subject: |
Re: autoconf-2.59b fails to include correct X11R6 paths in configure scripts on AMD64 systems |
Date: |
Tue, 06 Sep 2005 16:47:01 -0400 |
Hello!
On Tue, 2005-09-06 at 12:29 -0700, Paul Eggert wrote:
> In <http://lists.gnu.org/archive/html/bug-autoconf/2005-07/msg00052.html>
> "Nelson H. F. Beebe" <address@hidden> writes:
>
> > The latest release of autoconf-2.59b, dated 28-Dec-2005, fails to
> > include correct X11R6 paths in configure scripts on AMD64 systems
> > running GNU/Linux.
>
> Thanks for reporting this. I have installed the XMKMF patch suggested
> by Pavel Roskin in
> <http://lists.gnu.org/archive/html/autoconf-patches/2005-08/msg00078.html>.
> Does this fix the problem? (Sorry, I'm not an expert on these systems
> yet, so I have to ask dumb questions like this. :-)
The patch would help only is imake is also changed so that it doesn't
hardcode the architecture specific flags at the compile time.
In case if anyone cares, here's the script my $IMAKECPP points to. It's
a hack, but it gives an idea what it takes to override the flags
supplied by imake.
#!/bin/sh
# cpp wrapper to fix flags passed by imake to cpp.
# If compilation is targeted for i386, replace all references to x86_64
# with i386 to help Autoconf generated configure find correct path to
# X11 libraries.
# Set IMAKECPP to the full patch to this script.
# Written and placed in public domain by Pavel Roskin, 2005.
# Heuristics to check if i386 is targeted
env32=
case $CC in
*-m32*) env32=1;;
esac
case $CFLAGS in
*-m32*) env32=1;;
esac
case `uname -i` in
i386) env32=1;;
esac
# i386 not targeted - no flag replacement
if [ -z "$env32" ]; then
exec ${CC-cc} -E "$@"
fi
# This could be greatly simplified with bash arrays, but the only
# portable array is the shell arguments.
first=1
for i in x ${1+"$@"}; do
if [ "$first" ]; then
set x
first=
continue
fi
shift
set x ${1+"$@"} "`echo $i | sed 's/x86_64/i386/;s/amd64/i386/'`"
done
shift
exec ${CC-cc} -m32 -E ${1+"$@"}
--
Regards,
Pavel Roskin