X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=build%2Fautoconf%2Flustre-build-linux.m4;h=84a1272137cce4787a3679276c6960451ab25b5b;hp=ac337a9404100a4d62d13cdab58046b3b24ac090;hb=db12df62962cff0bf3bf788bac57bf66614bf349;hpb=09ef6990252b7958c3fce039eefdb88d93ab27f7;ds=sidebyside diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4 index ac337a9..84a1272 100644 --- a/build/autoconf/lustre-build-linux.m4 +++ b/build/autoconf/lustre-build-linux.m4 @@ -152,10 +152,19 @@ LB_CHECK_FILE([$LINUX_CONFIG],[], [AC_MSG_ERROR([Kernel config could not be found. If you are building from a kernel-source rpm consult build/README.kernel-source])]) # ----------- make dep run? ------------------ +# at 2.6.19 # $LINUX/include/linux/config.h is removed +# and at more old has only one line +# include LB_CHECK_FILES([$LINUX_OBJ/include/linux/autoconf.h $LINUX_OBJ/include/linux/version.h - $LINUX/include/linux/config.h],[], + ],[], [AC_MSG_ERROR([Run make config in $LINUX.])]) +# +LB_CHECK_FILE([$LINUX_OBJ/include/linux/config.h], + [ AC_DEFINE(HAVE_KERNEL_CONFIG_H, 1, + [kernel modules need to include config.h]) + ] +) # ------------ rhconfig.h includes runtime-generated bits -- # red hat kernel-source checks @@ -236,6 +245,21 @@ $1 _ACEOF ]) + +# LB_LANG_PROGRAM(C)([PROLOGUE], [BODY]) +# -------------------------------------- +m4_define([LB_LANG_PROGRAM], +[$1 +int +main (void) +{ +dnl Do *not* indent the following line: there may be CPP directives. +dnl Don't move the `;' right after for the same reason. +$2 + ; + return 0; +}]) + # # LB_LINUX_COMPILE_IFELSE # @@ -258,7 +282,7 @@ rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest. # AC_DEFUN([LB_LINUX_TRY_COMPILE], [LB_LINUX_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[$1]], [[$2]])], + [AC_LANG_SOURCE([LB_LANG_PROGRAM([[$1]], [[$2]])])], [modules], [test -s build/conftest.o], [$3], [$4])]) @@ -270,7 +294,11 @@ AC_DEFUN([LB_LINUX_TRY_COMPILE], # AC_DEFUN([LB_LINUX_CONFIG], [AC_MSG_CHECKING([if Linux was built with CONFIG_$1]) -LB_LINUX_TRY_COMPILE([#include ],[ +LB_LINUX_TRY_COMPILE([ +#ifdef HAVE_KERNEL_CONFIG_H +#include +#endif +],[ #ifndef CONFIG_$1 #error CONFIG_$1 not #defined #endif @@ -309,7 +337,7 @@ $3 # like LB_LINUX_TRY_COMPILE, but with different arguments # AC_DEFUN([LB_LINUX_TRY_MAKE], -[LB_LINUX_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4], [$5], [$6])]) +[LB_LINUX_COMPILE_IFELSE([AC_LANG_SOURCE([LB_LANG_PROGRAM([[$1]], [[$2]])])], [$3], [$4], [$5], [$6])]) # # LB_LINUX_CONFIG_BIG_STACK @@ -362,21 +390,6 @@ LB_LINUX_CONFIG([KMOD],[],[ AC_MSG_WARN([]) ]) -# -# following CRYPTO related are required by capability -# -LB_LINUX_CONFIG_IM([CRYPTO],[],[ - AC_MSG_ERROR([Lustre require that CONFIG_CRYPTO is enabled in your kernel.]) -]) - -LB_LINUX_CONFIG_IM([CRYPTO_HMAC],[],[ - AC_MSG_ERROR([Lustre require that CONFIG_CRYPTO_HMAC is enabled in your kernel.]) -]) - -LB_LINUX_CONFIG_IM([CRYPTO_SHA1],[],[ - AC_MSG_ERROR([Lustre require that CONFIG_CRYPTO_SHA1 is enabled in your kernel.]) -]) - #LB_LINUX_CONFIG_BIG_STACK # LNet tests @@ -385,10 +398,6 @@ LN_PROG_LINUX # Lustre tests LC_PROG_LINUX -# Portals tests -if test "$PORTALS" ; then - LP_PROG_LINUX -fi ]) # @@ -398,54 +407,5 @@ fi # AC_DEFUN([LB_LINUX_CONDITIONALS], [AM_CONDITIONAL(LINUX25, test x$linux25 = xyes) -AM_CONDITIONAL(GSS, test x$enable_gss = xyes) -]) - -# -# LC_LINUX_CONFIG_GSS -# -# Build gss and related tools of Lustre. Currently both kernel and user space -# parts are depend on linux platform. -# -AC_DEFUN([LC_LINUX_CONFIG_GSS], -[AC_MSG_CHECKING([whether to enable gss/krb5 support]) -AC_ARG_ENABLE([gss], - AC_HELP_STRING([--enable-gss], [enable gss/krb5 support]), - [],[enable_gss='no']) -AC_MSG_RESULT([$enable_gss]) - -if test x$enable_gss == xyes; then - LB_LINUX_CONFIG_IM([SUNRPC],[],[ - AC_MSG_ERROR([GSS require that CONFIG_SUNRPC is enabled in your kernel.]) - ]) - LB_LINUX_CONFIG_IM([CRYPTO_DES],[],[ - AC_MSG_WARN([DES support is recommended by using GSS.]) - ]) - LB_LINUX_CONFIG_IM([CRYPTO_MD5],[],[ - AC_MSG_WARN([MD5 support is recommended by using GSS.]) - ]) - LB_LINUX_CONFIG_IM([CRYPTO_SHA256],[],[ - AC_MSG_WARN([SHA256 support is recommended by using GSS.]) - ]) - LB_LINUX_CONFIG_IM([CRYPTO_SHA512],[],[ - AC_MSG_WARN([SHA512 support is recommended by using GSS.]) - ]) - LB_LINUX_CONFIG_IM([CRYPTO_ARC4],[],[ - AC_MSG_WARN([ARC4 support is recommended by using GSS.]) - ]) - # - # unfortunately AES symbol is depend (optimized) on arch - # - - AC_CHECK_LIB(gssapi, gss_init_sec_context, [ - GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi" - ], [ - AC_MSG_ERROR([libgssapi is not found, consider --disable-gss.]) - ], - ) - - AC_SUBST(GSSAPI_LIBS) - AC_KERBEROS_V5 -fi ])