On Mon, 8 Sep 2014, Daniel Schepler wrote: > On Mon, Sep 8, 2014 at 3:28 PM, Sage Weil <sw...@redhat.com> wrote: > >> if test x"$cpu" = x"x86_64" || test x"$cpu" = x"i386"; then > >> cat >conftest.c <<-'EOF' > >> #if defined(__x86_64__) && defined(__ILP32__) > >> #error x32 > >> #endif > >> EOF > >> $CC -c conftest.c || cpu=x32 > >> fi > > > > Grr, my attempts to add this to our configure.ac are failing when $CC is > > called.. any ideas? It doesn't make much sense to me... it starts to > > complain about jni.h, which isn't mentioned until much later in > > configure.ac. I think $CC isn't defined or something? My autotools-fu is > > weak... :( > > I'd expect the configure.ac code to look more like (off the top of my > head, completely untested): > > if text x"$cpu" = x"x86_64" || test x"$cpu" = "xi386"; then > ac_try_compile([ > #if defined(__x86_64__) && defined(__ILP32__) > #error x32 > #endif], [], [cpu=x32]) > fi
Ah, I got it to work with AC_COMPILE_IFELSE nad AC_LANG_PROGRAM. Can you take a look? https://github.com/ceph/ceph/pull/2428 Thanks! sage -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org