X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=build%2Fautoconf%2Flustre-build.m4;h=51780bc2f2b21bdb4622506e3a44afe0e7e39e25;hb=b67a8ce988d626f2aa3de5690e266503285c4cfc;hp=6120ef5a34a1ae7ce6d695fd65017921949ecf09;hpb=b4e009fdece5000f3414ce442c782bd50d558089;p=fs%2Flustre-release.git diff --git a/build/autoconf/lustre-build.m4 b/build/autoconf/lustre-build.m4 index 6120ef5..51780bc 100644 --- a/build/autoconf/lustre-build.m4 +++ b/build/autoconf/lustre-build.m4 @@ -244,6 +244,23 @@ AM_CONDITIONAL(LDISKFS_ENABLED, test x$with_ldiskfs != xno) AC_CONFIG_SUBDIRS(ldiskfs) ]) +# Define no libcfs by default. +AC_DEFUN([LB_LIBCFS_DIR], +[ +case x$libcfs_is_module in + xyes) + LIBCFS_INCLUDE_DIR="libcfs/include" + LIBCFS_SUBDIR="libcfs" + ;; + x*) + LIBCFS_INCLUDE_DIR="lnet/include" + LIBCFS_SUBDIR="" + ;; +esac +AC_SUBST(LIBCFS_SUBDIR) +AC_SUBST(LIBCFS_INCLUDE_DIR) +]) + # # LB_DEFINE_LDISKFS_OPTIONS # @@ -340,26 +357,17 @@ AM_CONDITIONAL(POSIX_OSD_ENABLED, test x$posix_osd = xyes) # # LB_PATH_DMU -# Support for --with-dmu # AC_DEFUN([LB_PATH_DMU], [AC_MSG_CHECKING([whether to enable DMU]) -AC_ARG_WITH([dmu], - AC_HELP_STRING([--with-dmu=path], - [set path to a DMU tree (default is included zfs-lustre)]), - [ - DMU_SRC=$with_dmu - ], - [ - DMU_SRC="$PWD/zfs-lustre" - ]) if test x$enable_uoss = xyes -a x$enable_posix_osd != xyes; then + DMU_SRC="$PWD/lustre/zfs-lustre" AC_DEFINE(DMU_OSD, 1, Enable DMU OSD) AC_MSG_RESULT([yes]) LB_CHECK_FILE([$DMU_SRC/src/.patched],[],[ AC_MSG_ERROR([A complete (patched) DMU tree was not found.]) ]) - AC_CONFIG_SUBDIRS(zfs-lustre) + AC_CONFIG_SUBDIRS(lustre/zfs-lustre) dmu_osd='yes' else AC_MSG_RESULT([no]) @@ -585,16 +593,23 @@ if test $ac_cv_sizeof_unsigned_long_long != 8 ; then AC_MSG_ERROR([** we assume that sizeof(long long) == 8. Tell phil@clusterfs.com]) fi -CPPFLAGS="-I\$(top_builddir)/libcfs/include -I\$(top_srcdir)/libcfs/include -I\$(top_builddir)/lnet/include -I\$(top_srcdir)/lnet/include -I\$(top_builddir)/lustre/include -I\$(top_srcdir)/lustre/include $CPPFLAGS" +if test $target_cpu == "powerpc64"; then + AC_MSG_WARN([set compiler with -m64]) + CFLAGS="$CFLAGS -m64" + CC="$CC -m64" +fi + +CPPFLAGS="-I\$(top_builddir)/$LIBCFS_INCLUDE_DIR -I\$(top_srcdir)/$LIBCFS_INCLUDE_DIR-I\$(top_builddir)/lnet/include -I\$(top_srcdir)/lnet/include -I\$(top_builddir)/lustre/include -I\$(top_srcdir)/lustre/include $CPPFLAGS" LLCPPFLAGS="-D__arch_lib__ -D_LARGEFILE64_SOURCE=1" AC_SUBST(LLCPPFLAGS) -LLCFLAGS="-g -Wall -fPIC" +# Add _GNU_SOURCE for strnlen on linux +LLCFLAGS="-g -Wall -fPIC -D_GNU_SOURCE" AC_SUBST(LLCFLAGS) # everyone builds against lnet and lustre -EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/libcfs/include -I$PWD/lnet/include -I$PWD/lustre/include" +EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/$LIBCFS_INCLUDE_DIR -I$PWD/lnet/include -I$PWD/lustre/include" AC_SUBST(EXTRA_KCFLAGS) ]) @@ -657,6 +672,8 @@ AC_PACKAGE_TARNAME[.spec] AC_DEFUN([LB_CONFIGURE], [LB_CANONICAL_SYSTEM +LB_LIBCFS_DIR + LB_INCLUDE_RULES LB_CONFIG_CRAY_XT3 @@ -677,7 +694,7 @@ LC_CONFIG_CLIENT_SERVER # three macros for cmd3 LC_CONFIG_SPLIT LC_CONFIG_LDISKFS -LIBCFS_CONFIG_CDEBUG +LN_CONFIG_CDEBUG LB_CONFIG_MODULES @@ -696,6 +713,7 @@ if test "$SNMP_DIST_SUBDIR" ; then LS_CONFIGURE fi + LB_CONDITIONALS LB_CONFIG_HEADERS