From: Sven M. H. <pe...@gm...> - 2001-07-02 23:15:23
|
On Mon, Jul 02, 2001 at 04:05:40PM +0200, Marcelo E. Magallon wrote: > AC_DEFUN(MESA_SYS_AS_FEATURE, [ > AC_CACHE_CHECK(whether the assembler supports $1, > mesa_cv_sys_as_$1, > MESA_TRY_ASSEMBLE([#include "src/X86/assyntax.h"], $2, > mesa_cv_sys_as_$1=yes, > mesa_cv_sys_as_$1=no)) > ]) I changed that to [#include "assyntax.h"]. > note the test program wants to include "src/X86/assyntax.h". For this > to work, the command line has to read: > > $ cc [...] -I../.. [...] > > In config.log I find: > > configure:7290: gcc -c -g -O2 -Wall -fomit-frame-pointer -ffast-math -fexpensive > -optimizations -fstrict-aliasing -malign-loops=2 -malign-jumps=2 -malign-functio > ns=2 -D_REENTRANT -DPTHREADS -I../../src/X86 conftest.S >&5 > conftest.S:1: src/X86/assyntax.h: No such file or directory > > Note it's using -I../../src/X86 > > MESA_TRY_ASSEMBLE looks like this: > > AC_DEFUN(MESA_TRY_ASSEMBLE, [ > cat > conftest.S <<EOF > $1 > > $2 > EOF > save_ac_ext="$ac_ext" > ac_ext=S > if AC_TRY_EVAL(ac_compile); then > $3; > else > $4; > fi > ac_ext="$save_ac_ext" > rm -f conftest.S > ]) > > In the top configure.in file it reads: > > dnl Necessary for assembler sources > save_ac_ext="$ac_ext" > save_CPPFLAGS="$CPPFLAGS" > ac_ext=S > CPPFLAGS="$CPPFLAGS -I$srcdir/src/X86" > > what I need there is an extra "-I$srcdir" like this: > > -CPPFLAGS="$CPPFLAGS -I$srcdir/src/X86" > +CPPFLAGS="$CPPFLAGS -I$srcdir/src/X86 -I$srcdir" That CPPFLAGS addition "-I$srcdir/src/X86" was originally there for exactly the purpose of enabling one to #include "assyntax.h". It just got under the wheels when I pulled the ASM checks out into assembler.m4 and was merely still lingering around. Now I've put it to use again by stripping the "src/X86/" from the include line. Therefore the cross-directory build should now work. -Sven -- "Would the All-Seeing Eye please look in my direction?" [ KeyID........: 0xC297FEAB ] [ Fingerprint..: FEA5 0F93 7320 3F39 66A5 AED3 073F 2D5F C297 FEAB ] |