X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libsysio%2Fconfigure.in;h=890b7ee4a981fb54fe0eddbcc1b508944f984161;hb=a77210dbbf241e5827b763b1648be649fc6f1269;hp=23e90381f89c05a8fbdff12f37385b47e290c375;hpb=4bf971af0731937c30259cbc866feaff98e648ad;p=fs%2Flustre-release.git diff --git a/libsysio/configure.in b/libsysio/configure.in index 23e9038..890b7ee 100644 --- a/libsysio/configure.in +++ b/libsysio/configure.in @@ -3,26 +3,46 @@ AC_INIT(libsysio, 1.2) AC_CANONICAL_SYSTEM case "$host_os" in - aix*) - ;; - linux*) - ;; - *) - AC_MSG_WARN('***' ${host_os}: Unsupported OS target) - ;; + aix*) + ;; + linux*) + ;; + *) + AC_MSG_WARN('***' ${host_os}: Unsupported OS target) + ;; esac AM_INIT_AUTOMAKE([subdir-objects 1.9 tar-ustar]) AM_MAINTAINER_MODE([enable]) AC_PROG_CC AM_PROG_CC_C_O - AC_PROG_RANLIB +AC_CHECK_TOOL(CC, gcc, [no]) +AC_CHECK_TOOL(LD, ld, [no]) +AC_CHECK_TOOL(AR, ar, [no]) +AC_CHECK_TOOL(OBJDUMP, objdump, [no]) +AC_CHECK_TOOL(STRIP, strip, [no]) AC_PROG_MAKE_SET AC_HEADER_STDC AC_HEADER_STAT AC_HEADER_TIME +AS_IF([test "x$cross_compiling" = xyes], + [case $host_vendor in + # The K1OM architecture is an extension of the x86 architecture. + # So, the $host_arch is x86_64. + k1om) + CC_TARGET_ARCH=`$CC -v 2>&1 | grep Target: | sed -e 's/Target: //'` + if test $CC_TARGET_ARCH != x86_64-$host_vendor-linux ; then + AC_MSG_ERROR([Cross compiler not found in PATH.]) + fi + CCAS=$CC + ;; + *) + ;; + esac] +) + if test ${target_cpu} == "powerpc64"; then AC_MSG_WARN([set compiler with -m64]) CC="$CC -m64" @@ -557,4 +577,3 @@ fi AC_OUTPUT( Makefile tests/Makefile) -