diff --git a/Makefile.am b/Makefile.am index e6dc5a181..53d4876fc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,12 @@ -SUBDIRS = lib cmd module include scripts +include $(top_srcdir)/config/rpm.am + +if CONFIG_USER +USER_DIR = lib cmd scripts +endif +if CONFIG_KERNEL +KERNEL_DIR = module include +endif +SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign dist-zip EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER @@ -15,6 +23,7 @@ distclean-local:: -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \ -type f -print | xargs $(RM) +if CONFIG_KERNEL install-data-local: destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ instdest=$(DESTDIR)/${prefix}/src/$$destname; \ @@ -22,6 +31,7 @@ install-data-local: for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ done +endif ctags: $(RM) $(top_srcdir)/tags @@ -33,27 +43,22 @@ etags: tags: ctags etags -rpm-local: - mkdir -p $(rpmbuild)/TMP && \ - mkdir -p $(rpmbuild)/BUILD && \ - mkdir -p $(rpmbuild)/RPMS && \ - mkdir -p $(rpmbuild)/SRPMS && \ - mkdir -p $(rpmbuild)/SPECS && cp $(PACKAGE).spec $(rpmbuild)/SPECS && \ - mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES +srpm-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common -srpm: dist - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "build_src_rpm 1" --define "dist %{nil}" --nodeps -bs $$rpmbuild/SPECS/$(PACKAGE).spec || exit 1; \ - cp $$rpmbuild/SRPMS/$(distdir)-$(SPL_META_RELEASE).src.rpm . || exit 1;\ - $(RM) -R $$rpmbuild +srpm-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common -# Use 'make rpm LINUX_VERSION=2.x.y-z' to rebuild the source RPM -# against any installed kernel-devel-2.x.y-z package. This will -# override the LINUX_VERSION detected at configure time. -rpm: srpm - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kdir $(LINUX)" --define "require_kobj $(LINUX_OBJ)" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ - cp $$rpmbuild/RPMS/*/* . || exit 1; \ - $(RM) -R $$rpmbuild +srpm: srpm-modules srpm-utils + +rpm-modules: srpm-modules + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common + +rpm-utils: srpm-utils + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common + +rpm-modules: srpm-modules + +rpm-utils: srpm-utils + +rpm: rpm-modules rpm-utils diff --git a/Makefile.in b/Makefile.in index 91a89db7d..ea8c98e37 100644 --- a/Makefile.in +++ b/Makefile.in @@ -39,7 +39,8 @@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/spl.spec.in $(srcdir)/spl_config.h.in \ + $(srcdir)/spl-modules.spec.in $(srcdir)/spl.spec.in \ + $(srcdir)/spl_config.h.in $(top_srcdir)/config/rpm.am \ $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \ $(top_srcdir)/module/spl/Makefile.in \ $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ @@ -57,7 +58,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = spl_config.h CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ - module/splat/Makefile spl.spec + module/splat/Makefile spl.spec spl-modules.spec SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -69,7 +70,7 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = lib cmd scripts module include DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -93,6 +94,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -114,13 +119,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -143,6 +148,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ @@ -201,7 +207,9 @@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -SUBDIRS = lib cmd module include scripts +@CONFIG_USER_TRUE@USER_DIR = lib cmd scripts +@CONFIG_KERNEL_TRUE@KERNEL_DIR = module include +SUBDIRS = $(USER_DIR) $(KERNEL_DIR) AUTOMAKE_OPTIONS = foreign dist-zip EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER noinst_HEADERS = spl_config.h spl_unconfig.h @@ -211,7 +219,7 @@ all: spl_config.h .SUFFIXES: am--refresh: @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/rpm.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -267,6 +275,8 @@ module/splat/Makefile: $(top_builddir)/config.status $(top_srcdir)/module/splat/ cd $(top_builddir) && $(SHELL) ./config.status $@ spl.spec: $(top_builddir)/config.status $(srcdir)/spl.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ +spl-modules.spec: $(top_builddir)/config.status $(srcdir)/spl-modules.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -580,6 +590,7 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +@CONFIG_KERNEL_FALSE@install-data-local: clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am @@ -648,6 +659,49 @@ uninstall-info: uninstall-info-recursive mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am +rpm-local: + mkdir -p $(rpmbuild)/TMP && \ + mkdir -p $(rpmbuild)/BUILD && \ + mkdir -p $(rpmbuild)/RPMS && \ + mkdir -p $(rpmbuild)/SRPMS && \ + mkdir -p $(rpmbuild)/SPECS && cp $(rpmspec) $(rpmbuild)/SPECS && \ + mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES + +srpm-common: dist + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + /usr/bin/rpmbuild \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "build_src_rpm 1" \ + --define "dist %{nil}" \ + --nodeps -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ + cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \ + $(RM) -R $$rpmbuild + +rpm-common: + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + /usr/bin/rpmbuild \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "dist %{nil}" \ + --define "require_kdir $(LINUX)" \ + --define "require_kobj $(LINUX_OBJ)" \ + --define "require_kver $(LINUX_VERSION)" \ + --nodeps --rebuild $$rpmpkg || exit 1; \ + cp $$rpmbuild/RPMS/*/* . || exit 1; \ + $(RM) -R $$rpmbuild distclean-local:: -$(RM) -R autom4te*.cache @@ -660,13 +714,13 @@ distclean-local:: -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \ -type f -print | xargs $(RM) -install-data-local: - destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ - instdest=$(DESTDIR)/${prefix}/src/$$destname; \ - echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ - for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ - $(INSTALL) -D $$instfile $$instdest/$$instfile; \ - done +@CONFIG_KERNEL_TRUE@install-data-local: +@CONFIG_KERNEL_TRUE@ destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \ +@CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/${prefix}/src/$$destname; \ +@CONFIG_KERNEL_TRUE@ echo "${SPL_META_VERSION}" >$$instdest/spl.release; \ +@CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ +@CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ +@CONFIG_KERNEL_TRUE@ done ctags: $(RM) $(top_srcdir)/tags @@ -678,30 +732,25 @@ etags: tags: ctags etags -rpm-local: - mkdir -p $(rpmbuild)/TMP && \ - mkdir -p $(rpmbuild)/BUILD && \ - mkdir -p $(rpmbuild)/RPMS && \ - mkdir -p $(rpmbuild)/SRPMS && \ - mkdir -p $(rpmbuild)/SPECS && cp $(PACKAGE).spec $(rpmbuild)/SPECS && \ - mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES +srpm-modules: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" srpm-common -srpm: dist - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "build_src_rpm 1" --define "dist %{nil}" --nodeps -bs $$rpmbuild/SPECS/$(PACKAGE).spec || exit 1; \ - cp $$rpmbuild/SRPMS/$(distdir)-$(SPL_META_RELEASE).src.rpm . || exit 1;\ - $(RM) -R $$rpmbuild +srpm-utils: + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" srpm-common -# Use 'make rpm LINUX_VERSION=2.x.y-z' to rebuild the source RPM -# against any installed kernel-devel-2.x.y-z package. This will -# override the LINUX_VERSION detected at configure time. -rpm: srpm - rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ - $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ - /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kdir $(LINUX)" --define "require_kobj $(LINUX_OBJ)" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \ - cp $$rpmbuild/RPMS/*/* . || exit 1; \ - $(RM) -R $$rpmbuild +srpm: srpm-modules srpm-utils + +rpm-modules: srpm-modules + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-modules" rpm-common + +rpm-utils: srpm-utils + $(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}" rpm-common + +rpm-modules: srpm-modules + +rpm-utils: srpm-utils + +rpm: rpm-modules rpm-utils # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 753c44fca..9ae0f0d51 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -85,6 +85,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -106,13 +110,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -135,6 +139,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ diff --git a/config/rpm.am b/config/rpm.am new file mode 100644 index 000000000..b1c832674 --- /dev/null +++ b/config/rpm.am @@ -0,0 +1,43 @@ +rpm-local: + mkdir -p $(rpmbuild)/TMP && \ + mkdir -p $(rpmbuild)/BUILD && \ + mkdir -p $(rpmbuild)/RPMS && \ + mkdir -p $(rpmbuild)/SRPMS && \ + mkdir -p $(rpmbuild)/SPECS && cp $(rpmspec) $(rpmbuild)/SPECS && \ + mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES + +srpm-common: dist + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + /usr/bin/rpmbuild \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "build_src_rpm 1" \ + --define "dist %{nil}" \ + --nodeps -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ + cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \ + $(RM) -R $$rpmbuild + +rpm-common: + rpmpkg=$(pkg)-$(SPL_META_VERSION)-$(SPL_META_RELEASE).src.rpm; \ + rpmspec=$(pkg).spec; \ + rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ + $(MAKE) $(AM_MAKEFLAGS) \ + rpmbuild="$$rpmbuild" \ + rpmspec="$$rpmspec" \ + rpm-local || exit 1; \ + /usr/bin/rpmbuild \ + --define "_tmppath $$rpmbuild/TMP" \ + --define "_topdir $$rpmbuild" \ + --define "dist %{nil}" \ + --define "require_kdir $(LINUX)" \ + --define "require_kobj $(LINUX_OBJ)" \ + --define "require_kver $(LINUX_VERSION)" \ + --nodeps --rebuild $$rpmpkg || exit 1; \ + cp $$rpmbuild/RPMS/*/* . || exit 1; \ + $(RM) -R $$rpmbuild diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 2f277a3b3..134831978 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -1,3 +1,82 @@ +dnl # +dnl # Default SPL kernel configuration +dnl # +AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ + SPL_AC_KERNEL + + dnl # Kernel build make options + dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build + KERNELMAKE_PARAMS="V=1" + + dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other + dnl # compiler options are added by the kernel build system. + abs_srcdir=`readlink -f ${srcdir}` + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" + KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include" + + if test "${LINUX_OBJ}" != "${LINUX}"; then + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" + fi + + AC_SUBST(KERNELMAKE_PARAMS) + AC_SUBST(KERNELCPPFLAGS) + + SPL_AC_DEBUG + SPL_AC_DEBUG_KMEM + SPL_AC_DEBUG_MUTEX + SPL_AC_DEBUG_KSTAT + SPL_AC_DEBUG_CALLB + SPL_AC_TYPE_UINTPTR_T + SPL_AC_TYPE_ATOMIC64_T + SPL_AC_3ARGS_INIT_WORK + SPL_AC_2ARGS_REGISTER_SYSCTL + SPL_AC_SET_SHRINKER + SPL_AC_PATH_IN_NAMEIDATA + SPL_AC_TASK_CURR + SPL_AC_CTL_UNNUMBERED + SPL_AC_FLS64 + SPL_AC_DEVICE_CREATE + SPL_AC_5ARGS_DEVICE_CREATE + SPL_AC_CLASS_DEVICE_CREATE + SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT + SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE + SPL_AC_TIMESPEC_SUB + SPL_AC_INIT_UTSNAME + SPL_AC_FDTABLE_HEADER + SPL_AC_FILES_FDTABLE + SPL_AC_UACCESS_HEADER + SPL_AC_KMALLOC_NODE + SPL_AC_MONOTONIC_CLOCK + SPL_AC_INODE_I_MUTEX + SPL_AC_MUTEX_LOCK_NESTED + SPL_AC_DIV64_64 + SPL_AC_DIV64_U64 + SPL_AC_3ARGS_ON_EACH_CPU + SPL_AC_KALLSYMS_LOOKUP_NAME + SPL_AC_GET_VMALLOC_INFO + SPL_AC_PGDAT_HELPERS + SPL_AC_FIRST_ONLINE_PGDAT + SPL_AC_NEXT_ONLINE_PGDAT + SPL_AC_NEXT_ZONE + SPL_AC_PGDAT_LIST + SPL_AC_GET_ZONE_COUNTS + SPL_AC_GLOBAL_PAGE_STATE + SPL_AC_ZONE_STAT_ITEM_FIA + SPL_AC_2ARGS_VFS_UNLINK + SPL_AC_4ARGS_VFS_RENAME +]) + +AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ + AC_MSG_CHECKING([kernel file name for module symbols]) + if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi + AC_MSG_RESULT($LINUX_SYMBOLS) + AC_SUBST(LINUX_SYMBOLS) +]) + AC_DEFUN([SPL_AC_KERNEL], [ AC_ARG_WITH([linux], AS_HELP_STRING([--with-linux=PATH], @@ -72,41 +151,54 @@ AC_DEFUN([SPL_AC_KERNEL], [ LINUX_OBJ=${kernelbuild} LINUX_VERSION=${kernsrcver} - abs_srcdir=`readlink -f ${srcdir}` - kerninclude="-I${abs_srcdir} -I${abs_srcdir}/include" - kernwarn="-Wstrict-prototypes -Werror" - - if test "${LINUX_OBJ}" != "${LINUX}"; then - kernobjs="O=$kernelbuild" - fi - - KERNELCFLAGS= - KERNELCPPFLAGS="${kerninclude} ${kernwarn}" - KERNELMAKE_PARAMS="${kernobjs}" - AC_SUBST(LINUX) AC_SUBST(LINUX_OBJ) AC_SUBST(LINUX_VERSION) - AC_SUBST(KERNELMAKE_PARAMS) - AC_SUBST(KERNELCPPFLAGS) - AC_SUBST(KERNELCFLAGS) + + SPL_AC_MODULE_SYMVERS ]) -AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ - AC_MSG_CHECKING([kernel file name for module symbols]) - if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then - LINUX_SYMBOLS=Modules.symvers - else - LINUX_SYMBOLS=Module.symvers - fi - AC_MSG_RESULT($LINUX_SYMBOLS) - AC_SUBST(LINUX_SYMBOLS) -]) +dnl # +dnl # Default SPL user configuration +dnl # +AC_DEFUN([SPL_AC_CONFIG_USER], []) AC_DEFUN([SPL_AC_LICENSE], [ - AC_MSG_CHECKING([license]) - AC_MSG_RESULT([GPL]) + AC_MSG_CHECKING([spl license]) + LICENSE=GPL + AC_MSG_RESULT([$LICENSE]) KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" + AC_SUBST(LICENSE) +]) + +AC_DEFUN([SPL_AC_CONFIG], [ + SPL_CONFIG=all + AC_ARG_WITH([config], + AS_HELP_STRING([--with-config=CONFIG], + [Config file 'kernel|user|all']), + [SPL_CONFIG="$withval"]) + + AC_MSG_CHECKING([spl config]) + AC_MSG_RESULT([$SPL_CONFIG]); + AC_SUBST(SPL_CONFIG) + + case "$SPL_CONFIG" in + kernel) SPL_AC_CONFIG_KERNEL ;; + user) SPL_AC_CONFIG_USER ;; + all) SPL_AC_CONFIG_KERNEL + SPL_AC_CONFIG_USER ;; + *) + AC_MSG_RESULT([Error!]) + AC_MSG_ERROR([Bad value "$SPL_CONFIG" for --with-config, + user kernel|user|all]) ;; + esac + + AM_CONDITIONAL([CONFIG_USER], + [test "$SPL_CONFIG" = user] || + [test "$SPL_CONFIG" = all]) + AM_CONDITIONAL([CONFIG_KERNEL], + [test "$SPL_CONFIG" = kernel] || + [test "$SPL_CONFIG" = all]) ]) AC_DEFUN([SPL_AC_DEBUG], [ diff --git a/configure b/configure index f3f6b1303..3c75a96ad 100755 --- a/configure +++ b/configure @@ -462,7 +462,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LINUX LINUX_OBJ LINUX_VERSION KERNELMAKE_PARAMS KERNELCPPFLAGS KERNELCFLAGS LINUX_SYMBOLS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LICENSE SPL_CONFIG LINUX LINUX_OBJ LINUX_VERSION LINUX_SYMBOLS KERNELMAKE_PARAMS KERNELCPPFLAGS CONFIG_USER_TRUE CONFIG_USER_FALSE CONFIG_KERNEL_TRUE CONFIG_KERNEL_FALSE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1048,6 +1048,7 @@ Optional Packages: both] --with-tags[=TAGS] include additional configurations [automatic] + --with-config=CONFIG Config file 'kernel|user|all' --with-linux=PATH Path to kernel source --with-linux-obj=PATH Path to kernel build objects @@ -3986,7 +3987,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 3989 "configure"' > conftest.$ac_ext + echo '#line 3990 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5585,7 +5586,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5588:" \ +echo "$as_me:5589:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6648,11 +6649,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6651: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6652: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6655: \$? = $ac_status" >&5 + echo "$as_me:6656: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6916,11 +6917,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6919: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6920: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6923: \$? = $ac_status" >&5 + echo "$as_me:6924: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7020,11 +7021,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7023: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7024: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7027: \$? = $ac_status" >&5 + echo "$as_me:7028: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8489,7 +8490,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8492 "configure"' > conftest.$ac_ext + echo '#line 8493 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9386,7 +9387,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11833: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11836: \$? = $ac_status" >&5 + echo "$as_me:11837: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11933,11 +11934,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11936: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11937: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11940: \$? = $ac_status" >&5 + echo "$as_me:11941: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12469,7 +12470,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12472 "configure"' > conftest.$ac_ext + echo '#line 12473 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13527,11 +13528,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13530: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13531: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13534: \$? = $ac_status" >&5 + echo "$as_me:13535: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13631,11 +13632,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13634: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13635: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13638: \$? = $ac_status" >&5 + echo "$as_me:13639: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15080,7 +15081,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 15083 "configure"' > conftest.$ac_ext + echo '#line 15084 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15858,11 +15859,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15861: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15862: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15865: \$? = $ac_status" >&5 + echo "$as_me:15866: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16126,11 +16127,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16129: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16130: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16133: \$? = $ac_status" >&5 + echo "$as_me:16134: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16230,11 +16231,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16233: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16234: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16237: \$? = $ac_status" >&5 + echo "$as_me:16238: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17699,7 +17700,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17702 "configure"' > conftest.$ac_ext + echo '#line 17703 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -18925,6 +18926,32 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + echo "$as_me:$LINENO: checking spl license" >&5 +echo $ECHO_N "checking spl license... $ECHO_C" >&6 + LICENSE=GPL + echo "$as_me:$LINENO: result: $LICENSE" >&5 +echo "${ECHO_T}$LICENSE" >&6 + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" + + + + SPL_CONFIG=all + +# Check whether --with-config or --without-config was given. +if test "${with_config+set}" = set; then + withval="$with_config" + SPL_CONFIG="$withval" +fi; + + echo "$as_me:$LINENO: checking spl config" >&5 +echo $ECHO_N "checking spl config... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $SPL_CONFIG" >&5 +echo "${ECHO_T}$SPL_CONFIG" >&6; + + + case "$SPL_CONFIG" in + kernel) # Check whether --with-linux or --without-linux was given. @@ -19019,21 +19046,6 @@ echo "${ECHO_T}$kernsrcver" >&6 LINUX_OBJ=${kernelbuild} LINUX_VERSION=${kernsrcver} - abs_srcdir=`readlink -f ${srcdir}` - kerninclude="-I${abs_srcdir} -I${abs_srcdir}/include" - kernwarn="-Wstrict-prototypes -Werror" - - if test "${LINUX_OBJ}" != "${LINUX}"; then - kernobjs="O=$kernelbuild" - fi - - KERNELCFLAGS= - KERNELCPPFLAGS="${kerninclude} ${kernwarn}" - KERNELMAKE_PARAMS="${kernobjs}" - - - - @@ -19051,11 +19063,19 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6 - echo "$as_me:$LINENO: checking license" >&5 -echo $ECHO_N "checking license... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: GPL" >&5 -echo "${ECHO_T}GPL" >&6 - KERNELCPPFLAGS="${KERNELCPPFLAGS} -DHAVE_GPL_ONLY_SYMBOLS" + + KERNELMAKE_PARAMS="V=1" + + abs_srcdir=`readlink -f ${srcdir}` + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" + KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include" + + if test "${LINUX_OBJ}" != "${LINUX}"; then + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" + fi + + + echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 @@ -19208,7 +19228,7 @@ _ACEOF echo "${ECHO_T}no" >&6 fi -echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 + echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 @@ -19272,7 +19292,7 @@ fi -echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 + echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 @@ -19336,7 +19356,7 @@ fi -echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 + echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 echo $ECHO_N "checking whether INIT_WORK wants 3 args... $ECHO_C" >&6 @@ -19401,7 +19421,7 @@ fi -echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 + echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 echo $ECHO_N "checking whether register_sysctl_table() wants 2 args... $ECHO_C" >&6 @@ -19530,7 +19550,7 @@ fi -echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 + echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 echo $ECHO_N "checking whether struct path used in struct nameidata... $ECHO_C" >&6 @@ -19638,7 +19658,7 @@ _ACEOF fi -echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 + echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 echo $ECHO_N "checking whether unnumbered sysctl support exists... $ECHO_C" >&6 @@ -19704,7 +19724,7 @@ fi -echo "$as_me:$LINENO: checking whether fls64() is available" >&5 + echo "$as_me:$LINENO: checking whether fls64() is available" >&5 echo $ECHO_N "checking whether fls64() is available... $ECHO_C" >&6 @@ -21187,7 +21207,7 @@ fi -echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 + echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 echo $ECHO_N "checking whether vfs_unlink() wants 2 args... $ECHO_C" >&6 @@ -21251,7 +21271,2393 @@ fi -echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 + echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 +echo $ECHO_N "checking whether vfs_rename() wants 4 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + vfs_rename(NULL, NULL, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_4ARGS_VFS_RENAME 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + ;; + user) ;; + all) + + +# Check whether --with-linux or --without-linux was given. +if test "${with_linux+set}" = set; then + withval="$with_linux" + kernelsrc="$withval" +fi; + + +# Check whether --with-linux-obj or --without-linux-obj was given. +if test "${with_linux_obj+set}" = set; then + withval="$with_linux_obj" + kernelbuild="$withval" +fi; + + echo "$as_me:$LINENO: checking kernel source directory" >&5 +echo $ECHO_N "checking kernel source directory... $ECHO_C" >&6 + if test -z "$kernelsrc"; then + sourcelink=`ls -1d /usr/src/kernels/* /usr/src/linux-* \ + 2>/dev/null | grep -v obj | tail -1` + + if test -e ${sourcelink}; then + kernelsrc=`readlink -f ${sourcelink}` + else + echo "$as_me:$LINENO: result: Not found" >&5 +echo "${ECHO_T}Not found" >&6 + { { echo "$as_me:$LINENO: error: + *** Please specify the location of the kernel source + *** with the '--with-linux=PATH' option" >&5 +echo "$as_me: error: + *** Please specify the location of the kernel source + *** with the '--with-linux=PATH' option" >&2;} + { (exit 1); exit 1; }; } + fi + else + if test "$kernelsrc" = "NONE"; then + kernsrcver=NONE + fi + fi + + echo "$as_me:$LINENO: result: $kernelsrc" >&5 +echo "${ECHO_T}$kernelsrc" >&6 + echo "$as_me:$LINENO: checking kernel build directory" >&5 +echo $ECHO_N "checking kernel build directory... $ECHO_C" >&6 + if test -z "$kernelbuild"; then + if test -d ${kernelsrc}-obj; then + kernelbuild=${kernelsrc}-obj/`arch`/`arch` + elif test -d `dirname ${kernelsrc}`/build-`arch`; then + kernelbuild=`dirname ${kernelsrc}`/build-`arch` + else + kernelbuild=${kernelsrc} + fi + fi + echo "$as_me:$LINENO: result: $kernelbuild" >&5 +echo "${ECHO_T}$kernelbuild" >&6 + + echo "$as_me:$LINENO: checking kernel source version" >&5 +echo $ECHO_N "checking kernel source version... $ECHO_C" >&6 + if test -r $kernelbuild/include/linux/version.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + + elif test -r $kernelbuild/include/linux/utsrelease.h && + fgrep -q UTS_RELEASE $kernelbuild/include/linux/utsrelease.h; then + + kernsrcver=`(echo "#include "; + echo "kernsrcver=UTS_RELEASE") | + cpp -I $kernelbuild/include | + grep "^kernsrcver=" | cut -d \" -f 2` + fi + + if test -z "$kernsrcver"; then + echo "$as_me:$LINENO: result: Not found" >&5 +echo "${ECHO_T}Not found" >&6 + { { echo "$as_me:$LINENO: error: + *** Cannot determine the version of the linux kernel source. + *** Please prepare the kernel before running this script" >&5 +echo "$as_me: error: + *** Cannot determine the version of the linux kernel source. + *** Please prepare the kernel before running this script" >&2;} + { (exit 1); exit 1; }; } + fi + + echo "$as_me:$LINENO: result: $kernsrcver" >&5 +echo "${ECHO_T}$kernsrcver" >&6 + + LINUX=${kernelsrc} + LINUX_OBJ=${kernelbuild} + LINUX_VERSION=${kernsrcver} + + + + + + + echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 +echo $ECHO_N "checking kernel file name for module symbols... $ECHO_C" >&6 + if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost; then + LINUX_SYMBOLS=Modules.symvers + else + LINUX_SYMBOLS=Module.symvers + fi + echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5 +echo "${ECHO_T}$LINUX_SYMBOLS" >&6 + + + + + KERNELMAKE_PARAMS="V=1" + + abs_srcdir=`readlink -f ${srcdir}` + KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror" + KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include" + + if test "${LINUX_OBJ}" != "${LINUX}"; then + KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ" + fi + + + + + + echo "$as_me:$LINENO: checking whether debugging is enabled" >&5 +echo $ECHO_N "checking whether debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + case "$enableval" in + yes) spl_ac_debug=yes ;; + no) spl_ac_debug=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG" + fi + + + echo "$as_me:$LINENO: checking whether kmem debugging is enabled" >&5 +echo $ECHO_N "checking whether kmem debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-kmem or --disable-debug-kmem was given. +if test "${enable_debug_kmem+set}" = set; then + enableval="$enable_debug_kmem" + case "$enableval" in + yes) spl_ac_debug_kmem=yes ;; + no) spl_ac_debug_kmem=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kmem" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kmem" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_kmem" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_KMEM 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KMEM" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether mutex debugging is enabled" >&5 +echo $ECHO_N "checking whether mutex debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-mutex or --disable-debug-mutex was given. +if test "${enable_debug_mutex+set}" = set; then + enableval="$enable_debug_mutex" + case "$enableval" in + yes) spl_ac_debug_mutex=yes ;; + no) spl_ac_debug_mutex=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-mutex" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-mutex" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_mutex" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_MUTEX 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_MUTEX" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether kstat debugging is enabled" >&5 +echo $ECHO_N "checking whether kstat debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-kstat or --disable-debug-kstat was given. +if test "${enable_debug_kstat+set}" = set; then + enableval="$enable_debug_kstat" + case "$enableval" in + yes) spl_ac_debug_kstat=yes ;; + no) spl_ac_debug_kstat=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-kstat" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-kstat" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_kstat" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_KSTAT 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_KSTAT" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether callb debugging is enabled" >&5 +echo $ECHO_N "checking whether callb debugging is enabled... $ECHO_C" >&6 + # Check whether --enable-debug-callb or --disable-debug-callb was given. +if test "${enable_debug_callb+set}" = set; then + enableval="$enable_debug_callb" + case "$enableval" in + yes) spl_ac_debug_callb=yes ;; + no) spl_ac_debug_callb=no ;; + *) echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$enableval\" for --enable-debug-callb" >&5 +echo "$as_me: error: Bad value \"$enableval\" for --enable-debug-callb" >&2;} + { (exit 1); exit 1; }; } ;; + esac + +fi; + if test "$spl_ac_debug_callb" = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_CALLB 1 +_ACEOF + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_CALLB" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + echo "$as_me:$LINENO: checking whether kernel defines uintptr_t" >&5 +echo $ECHO_N "checking whether kernel defines uintptr_t... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + uintptr_t *ptr; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether kernel defines atomic64_t" >&5 +echo $ECHO_N "checking whether kernel defines atomic64_t... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + atomic64_t *ptr; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATOMIC64_T 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether INIT_WORK wants 3 args" >&5 +echo $ECHO_N "checking whether INIT_WORK wants 3 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct work_struct work; + INIT_WORK(&work, NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_INIT_WORK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether register_sysctl_table() wants 2 args" >&5 +echo $ECHO_N "checking whether register_sysctl_table() wants 2 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return register_sysctl_table(NULL,0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_REGISTER_SYSCTL 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether set_shrinker() available" >&5 +echo $ECHO_N "checking whether set_shrinker() available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return set_shrinker(DEFAULT_SEEKS, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_SHRINKER 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether struct path used in struct nameidata" >&5 +echo $ECHO_N "checking whether struct path used in struct nameidata... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct nameidata nd; + + nd.path.mnt = NULL; + nd.path.dentry = NULL; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PATH_IN_NAMEIDATA 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol task_curr is exported" >&5 +echo $ECHO_N "checking whether symbol task_curr is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]task_curr[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in kernel/sched.c; do + grep -q -E "EXPORT_SYMBOL.*(task_curr)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TASK_CURR 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TASK_CURR 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking whether unnumbered sysctl support exists" >&5 +echo $ECHO_N "checking whether unnumbered sysctl support exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + #ifndef CTL_UNNUMBERED + #error CTL_UNNUMBERED undefined + #endif + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CTL_UNNUMBERED 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether fls64() is available" >&5 +echo $ECHO_N "checking whether fls64() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return fls64(0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FLS64 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol device_create is exported" >&5 +echo $ECHO_N "checking whether symbol device_create is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]device_create[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in drivers/base/core.c; do + grep -q -E "EXPORT_SYMBOL.*(device_create)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEVICE_CREATE 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DEVICE_CREATE 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether device_create() wants 5 args" >&5 +echo $ECHO_N "checking whether device_create() wants 5 args... $ECHO_C" >&6 + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + device_create(NULL, NULL, 0, NULL, "%d", 1); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_5ARGS_DEVICE_CREATE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + + echo "$as_me:$LINENO: checking whether symbol class_device_create is exported" >&5 +echo $ECHO_N "checking whether symbol class_device_create is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]class_device_create[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in drivers/base/class.c; do + grep -q -E "EXPORT_SYMBOL.*(class_device_create)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLASS_DEVICE_CREATE 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLASS_DEVICE_CREATE 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol set_normalized_timespec is exported" >&5 +echo $ECHO_N "checking whether symbol set_normalized_timespec is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]set_normalized_timespec[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in kernel/time.c; do + grep -q -E "EXPORT_SYMBOL.*(set_normalized_timespec)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NORMALIZED_TIMESPEC_EXPORT 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether set_normalized_timespec() is an inline" >&5 +echo $ECHO_N "checking whether set_normalized_timespec() is an inline... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + void set_normalized_timespec(struct timespec *ts, + time_t sec, long nsec) { } + +int +main (void) +{ + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SET_NORMALIZED_TIMESPEC_INLINE 1 +_ACEOF + + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether timespec_sub() is available" >&5 +echo $ECHO_N "checking whether timespec_sub() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct timespec a, b, c = { 0 }; + c = timespec_sub(a, b); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TIMESPEC_SUB 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether init_utsname() is available" >&5 +echo $ECHO_N "checking whether init_utsname() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct new_utsname *a = init_utsname(); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INIT_UTSNAME 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether header linux/fdtable.h exists" >&5 +echo $ECHO_N "checking whether header linux/fdtable.h exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return 0; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FDTABLE_HEADER 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + + +fi + + rm -Rf build + + + + + + echo "$as_me:$LINENO: checking whether files_fdtable() is available" >&5 +echo $ECHO_N "checking whether files_fdtable() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + #ifdef HAVE_FDTABLE_HEADER + #include + #endif + +int +main (void) +{ + + struct files_struct *files = current->files; + struct fdtable *fdt = files_fdtable(files); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FILES_FDTABLE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether header linux/uaccess.h exists" >&5 +echo $ECHO_N "checking whether header linux/uaccess.h exists... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + return 0; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UACCESS_HEADER 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + + +fi + + rm -Rf build + + + + + + echo "$as_me:$LINENO: checking whether kmalloc_node() is available" >&5 +echo $ECHO_N "checking whether kmalloc_node() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + void *a = kmalloc_node(1, GFP_KERNEL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KMALLOC_NODE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol monotonic_clock is exported" >&5 +echo $ECHO_N "checking whether symbol monotonic_clock is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]monotonic_clock[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(monotonic_clock)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MONOTONIC_CLOCK 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MONOTONIC_CLOCK 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether struct inode has i_mutex" >&5 +echo $ECHO_N "checking whether struct inode has i_mutex... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + #include + +int +main (void) +{ + + struct inode i; + mutex_init(&i.i_mutex); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INODE_I_MUTEX 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether mutex_lock_nested() is available" >&5 +echo $ECHO_N "checking whether mutex_lock_nested() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct mutex mutex; + mutex_init(&mutex); + mutex_lock_nested(&mutex, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MUTEX_LOCK_NESTED 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol div64_64 is exported" >&5 +echo $ECHO_N "checking whether symbol div64_64 is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]div64_64[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(div64_64)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_64 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_64 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol div64_u64 is exported" >&5 +echo $ECHO_N "checking whether symbol div64_u64 is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]div64_u64[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(div64_u64)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_U64 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DIV64_U64 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether on_each_cpu() wants 3 args" >&5 +echo $ECHO_N "checking whether on_each_cpu() wants 3 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + on_each_cpu(NULL, NULL, 0); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_3ARGS_ON_EACH_CPU 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether symbol kallsyms_lookup_name is exported" >&5 +echo $ECHO_N "checking whether symbol kallsyms_lookup_name is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]kallsyms_lookup_name[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(kallsyms_lookup_name)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KALLSYMS_LOOKUP_NAME 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KALLSYMS_LOOKUP_NAME 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol get_vmalloc_info is exported" >&5 +echo $ECHO_N "checking whether symbol get_vmalloc_info is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]get_vmalloc_info[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(get_vmalloc_info)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_VMALLOC_INFO 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_VMALLOC_INFO 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol *_pgdat exist" >&5 +echo $ECHO_N "checking whether symbol *_pgdat exist... $ECHO_C" >&6 + grep -q -E 'first_online_pgdat' $LINUX/include/linux/mmzone.h 2>/dev/null + rc=$? + if test $rc -eq 0; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PGDAT_HELPERS 1 +_ACEOF + + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + + + echo "$as_me:$LINENO: checking whether symbol first_online_pgdat is exported" >&5 +echo $ECHO_N "checking whether symbol first_online_pgdat is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]first_online_pgdat[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(first_online_pgdat)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FIRST_ONLINE_PGDAT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FIRST_ONLINE_PGDAT 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol next_online_pgdat is exported" >&5 +echo $ECHO_N "checking whether symbol next_online_pgdat is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]next_online_pgdat[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(next_online_pgdat)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ONLINE_PGDAT 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ONLINE_PGDAT 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol next_zone is exported" >&5 +echo $ECHO_N "checking whether symbol next_zone is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]next_zone[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(next_zone)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ZONE 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NEXT_ZONE 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol pgdat_list is exported" >&5 +echo $ECHO_N "checking whether symbol pgdat_list is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]pgdat_list[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(pgdat_list)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PGDAT_LIST 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PGDAT_LIST 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether symbol get_zone_counts is exported" >&5 +echo $ECHO_N "checking whether symbol get_zone_counts is exported... $ECHO_C" >&6 + grep -q -E '[[:space:]]get_zone_counts[[:space:]]' \ + $LINUX_OBJ/Module*.symvers 2>/dev/null + rc=$? + if test $rc -ne 0; then + export=0 + for file in ; do + grep -q -E "EXPORT_SYMBOL.*(get_zone_counts)" \ + "$LINUX_OBJ/$file" 2>/dev/null + rc=$? + if test $rc -eq 0; then + export=1 + break; + fi + done + if test $export -eq 0; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_ZONE_COUNTS 1 +_ACEOF + + fi + + + + echo "$as_me:$LINENO: checking whether global_page_state() is available" >&5 +echo $ECHO_N "checking whether global_page_state() is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + unsigned long state; + state = global_page_state(NR_FREE_PAGES); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GLOBAL_PAGE_STATE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + + echo "$as_me:$LINENO: checking whether free/inactive/active page state is available" >&5 +echo $ECHO_N "checking whether free/inactive/active page state is available... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + enum zone_stat_item i1, i2, i3; + i1 = NR_FREE_PAGES; + i2 = NR_INACTIVE; + i3 = NR_ACTIVE; + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZONE_STAT_ITEM_FIA 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether vfs_unlink() wants 2 args" >&5 +echo $ECHO_N "checking whether vfs_unlink() wants 2 args... $ECHO_C" >&6 + + +cat >conftest.c <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + vfs_unlink(NULL, NULL); + + ; + return 0; +} + +_ACEOF + + + rm -Rf build && mkdir -p build + echo "obj-m := conftest.o" >build/Makefile + if { ac_try='cp conftest.c build && make modules LINUXINCLUDE="-Iinclude -Iinclude2 -I$LINUX/include -include include/linux/autoconf.h" -o tmp_include_depends -o scripts -o include/config/MARKER -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_2ARGS_VFS_UNLINK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + + + +fi + + rm -Rf build + + + + echo "$as_me:$LINENO: checking whether vfs_rename() wants 4 args" >&5 echo $ECHO_N "checking whether vfs_rename() wants 4 args... $ECHO_C" >&6 @@ -21316,7 +23722,42 @@ fi - ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec" + ;; + *) + echo "$as_me:$LINENO: result: Error!" >&5 +echo "${ECHO_T}Error!" >&6 + { { echo "$as_me:$LINENO: error: Bad value \"$SPL_CONFIG\" for --with-config, + user kernel|user|all" >&5 +echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config, + user kernel|user|all" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + + +if test "$SPL_CONFIG" = user || + test "$SPL_CONFIG" = all; then + CONFIG_USER_TRUE= + CONFIG_USER_FALSE='#' +else + CONFIG_USER_TRUE='#' + CONFIG_USER_FALSE= +fi + + + +if test "$SPL_CONFIG" = kernel || + test "$SPL_CONFIG" = all; then + CONFIG_KERNEL_TRUE= + CONFIG_KERNEL_FALSE='#' +else + CONFIG_KERNEL_TRUE='#' + CONFIG_KERNEL_FALSE= +fi + + + + ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec" cat >confcache <<\_ACEOF @@ -21438,6 +23879,20 @@ echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${CONFIG_USER_TRUE}" && test -z "${CONFIG_USER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONFIG_USER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONFIG_USER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CONFIG_KERNEL_TRUE}" && test -z "${CONFIG_KERNEL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CONFIG_KERNEL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CONFIG_KERNEL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -21891,6 +24346,7 @@ do "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "scripts/Makefile" ) CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "spl.spec" ) CONFIG_FILES="$CONFIG_FILES spl.spec" ;; + "spl-modules.spec" ) CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "spl_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS spl_config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 @@ -22060,13 +24516,18 @@ s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t +s,@LICENSE@,$LICENSE,;t t +s,@SPL_CONFIG@,$SPL_CONFIG,;t t s,@LINUX@,$LINUX,;t t s,@LINUX_OBJ@,$LINUX_OBJ,;t t s,@LINUX_VERSION@,$LINUX_VERSION,;t t +s,@LINUX_SYMBOLS@,$LINUX_SYMBOLS,;t t s,@KERNELMAKE_PARAMS@,$KERNELMAKE_PARAMS,;t t s,@KERNELCPPFLAGS@,$KERNELCPPFLAGS,;t t -s,@KERNELCFLAGS@,$KERNELCFLAGS,;t t -s,@LINUX_SYMBOLS@,$LINUX_SYMBOLS,;t t +s,@CONFIG_USER_TRUE@,$CONFIG_USER_TRUE,;t t +s,@CONFIG_USER_FALSE@,$CONFIG_USER_FALSE,;t t +s,@CONFIG_KERNEL_TRUE@,$CONFIG_KERNEL_TRUE,;t t +s,@CONFIG_KERNEL_FALSE@,$CONFIG_KERNEL_FALSE,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF diff --git a/configure.ac b/configure.ac index 19109ae26..ee6866509 100644 --- a/configure.ac +++ b/configure.ac @@ -38,52 +38,8 @@ AC_PROG_INSTALL AC_PROG_CC AC_PROG_LIBTOOL -SPL_AC_KERNEL -SPL_AC_MODULE_SYMVERS SPL_AC_LICENSE -SPL_AC_DEBUG -SPL_AC_DEBUG_KMEM -SPL_AC_DEBUG_MUTEX -SPL_AC_DEBUG_KSTAT -SPL_AC_DEBUG_CALLB -SPL_AC_TYPE_UINTPTR_T -SPL_AC_TYPE_ATOMIC64_T -SPL_AC_3ARGS_INIT_WORK -SPL_AC_2ARGS_REGISTER_SYSCTL -SPL_AC_SET_SHRINKER -SPL_AC_PATH_IN_NAMEIDATA -SPL_AC_TASK_CURR -SPL_AC_CTL_UNNUMBERED -SPL_AC_FLS64 -SPL_AC_DEVICE_CREATE -SPL_AC_5ARGS_DEVICE_CREATE -SPL_AC_CLASS_DEVICE_CREATE -SPL_AC_SET_NORMALIZED_TIMESPEC_EXPORT -SPL_AC_SET_NORMALIZED_TIMESPEC_INLINE -SPL_AC_TIMESPEC_SUB -SPL_AC_INIT_UTSNAME -SPL_AC_FDTABLE_HEADER -SPL_AC_FILES_FDTABLE -SPL_AC_UACCESS_HEADER -SPL_AC_KMALLOC_NODE -SPL_AC_MONOTONIC_CLOCK -SPL_AC_INODE_I_MUTEX -SPL_AC_MUTEX_LOCK_NESTED -SPL_AC_DIV64_64 -SPL_AC_DIV64_U64 -SPL_AC_3ARGS_ON_EACH_CPU -SPL_AC_KALLSYMS_LOOKUP_NAME -SPL_AC_GET_VMALLOC_INFO -SPL_AC_PGDAT_HELPERS -SPL_AC_FIRST_ONLINE_PGDAT -SPL_AC_NEXT_ONLINE_PGDAT -SPL_AC_NEXT_ZONE -SPL_AC_PGDAT_LIST -SPL_AC_GET_ZONE_COUNTS -SPL_AC_GLOBAL_PAGE_STATE -SPL_AC_ZONE_STAT_ITEM_FIA -SPL_AC_2ARGS_VFS_UNLINK -SPL_AC_4ARGS_VFS_RENAME +SPL_AC_CONFIG AC_CONFIG_FILES([ Makefile @@ -95,6 +51,7 @@ AC_CONFIG_FILES([ include/Makefile scripts/Makefile spl.spec + spl-modules.spec ]) AC_OUTPUT diff --git a/include/Makefile.in b/include/Makefile.in index db1587d47..50785f69f 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -66,6 +66,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -87,13 +91,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -116,6 +120,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ diff --git a/lib/Makefile.in b/lib/Makefile.in index b8b573ef7..992319d02 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -79,6 +79,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -100,13 +104,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -129,6 +133,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index bbf7ea47e..73f31008d 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -61,6 +61,10 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CONFIG_KERNEL_FALSE = @CONFIG_KERNEL_FALSE@ +CONFIG_KERNEL_TRUE = @CONFIG_KERNEL_TRUE@ +CONFIG_USER_FALSE = @CONFIG_USER_FALSE@ +CONFIG_USER_TRUE = @CONFIG_USER_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ @@ -82,13 +86,13 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -KERNELCFLAGS = @KERNELCFLAGS@ KERNELCPPFLAGS = @KERNELCPPFLAGS@ KERNELMAKE_PARAMS = @KERNELMAKE_PARAMS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LICENSE = @LICENSE@ LINUX = @LINUX@ LINUX_OBJ = @LINUX_OBJ@ LINUX_SYMBOLS = @LINUX_SYMBOLS@ @@ -111,6 +115,7 @@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ +SPL_CONFIG = @SPL_CONFIG@ SPL_META_ALIAS = @SPL_META_ALIAS@ SPL_META_AUTHOR = @SPL_META_AUTHOR@ SPL_META_DATA = @SPL_META_DATA@ diff --git a/spl-modules.spec.in b/spl-modules.spec.in new file mode 100644 index 000000000..61ad41ba3 --- /dev/null +++ b/spl-modules.spec.in @@ -0,0 +1,171 @@ +# The following block is used to allow the source RPM to be rebuilt +# against specific kernels. It is preferable that rpmbuild define the +# require_kver, require_kdir, require_obj constants for us, but if it does not +# not we attempt to determine the correct values based on your distro. + +%{?require_kver: %define kver %{require_kver}} +%{?require_kdir: %define kdir %{require_kdir}} +%{?require_kobj: %define kobj %{require_kobj}} + +# kdir: Full path to the kernel source headers +# kobj: Full path to the kernel build objects +# kver: Kernel version +# kpkg: Kernel package name +# kdevpkg: Kernel devel package name +# kverpkg: Kernel package version + +# SLES*: +%if %{defined sles_version} + %if %{undefined kver} + %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} + %define kver %((echo X; %{__cat} %{klnk}/.kernelrelease + 2>/dev/null) | tail -1) + %endif + %define kpkg kernel-%{_target_cpu} + %define kdevpkg kernel-source kernel-syms + %define kverpkg %(echo %{kver} | cut -d'-' -f1-2) + %if %{undefined kdir} + %define kdir %{_usrsrc}/linux-%{kverpkg} + %endif + %if %{undefined kobj} + %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu} + %endif + +# CHAOS4: +%else +%if %{defined ch4} + %if %{undefined kver} + %define klnk %{_usrsrc}/kernels/*/include/config + %define kver %((echo X; %{__cat} %{klnk}/kernel.release + 2>/dev/null) | tail -1) + %endif + %define kpkg chaos-kernel + %define kdevpkg chaos-kernel-devel + %define kverpkg %{kver} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif + +# RHEL*/Fedora: +%else +%if %{defined fedora} || %{defined rhel} + %if %{undefined kver} + %define klnk %{_usrsrc}/kernels/*/include/config + %define kver %((echo X; %{__cat} %{klnk}/kernel.release + 2>/dev/null) | tail -1) + %endif + %define kpkg kernel + %define kdevpkg kernel-devel + %define kverpkg %(echo %{kver} | cut -d'.' -f1-7) + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif + +%else + +# Unsupported distro: + %if %{undefined kver} + %define kver X + %endif + %define kpkg kernel + %define kdevpkg kernel-devel + %define kverpkg %{kver} + %if %{undefined kdir} + %define kdir %{_usrsrc}/kernels/%{kver} + %endif + %if %{undefined kobj} + %define kobj %{kdir} + %endif + +%endif +%endif +%endif + +# Distro agnostic: +%define name @PACKAGE@-modules +%define version @VERSION@ +%define debug_package %{nil} + + +# The kernel version should only be appended to a binary RPM. When +# building a source RPM it must be kernel version agnostic. This means +# the source RPM must never specify a required kernel version, but the +# final RPM should be keyed to the kernel version it was built against. +%if %{defined build_src_rpm} +%define release @SPL_META_RELEASE@ +%define requires %{kpkg} +%else +%define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') +%define release @SPL_META_RELEASE@_%{relext} +%define requires %{kpkg} = %{kverpkg} +%endif + +Summary: Solaris Porting Layer Modules +Group: Utilities/System +Name: %{name} +Version: %{version} +Release: %{release} +License: @LICENSE@ +URL: git://eris.llnl.gov/spl.git +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) +Source: @PACKAGE@-%{version}.tar.gz +Requires: %{requires} +BuildRequires: %{kdevpkg} + +%description +The %{name} package contains kernel modules for emulating Solaris style +primatives in the linux kernel. These include, but are not limited to: +atomic, condvar, debug, error, memory, kobject, kstat, mutex, rwlock, +taskq, thread, time, and vnode APIs. + +%package devel +Summary: Solaris Porting Layer Headers and Symbols +Group: Development/Libraries +Requires: %{requires} +BuildRequires: %{kdevpkg} + +%description devel +The %{name}-devel package contains the header files and Module{s}.symvers +symbols needed for building additional modules which use %{name}. + +%prep +%setup -n @PACKAGE@-%{version} +%build +%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} \ + --with-config=kernel +make + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-, root, root) +/lib/modules/* + +%files devel +%defattr(-,root,root) +%{_prefix}/src/* + +%post +if [ -f /boot/System.map-%{kver} ]; then + depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 +else + depmod -ae %{kver} || exit 0 +fi + +%postun +if [ -f /boot/System.map-%{kver} ]; then + depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 +else + depmod -ae %{kver} || exit 0 +fi diff --git a/spl.spec.in b/spl.spec.in index caba00dfc..34207f626 100644 --- a/spl.spec.in +++ b/spl.spec.in @@ -1,143 +1,25 @@ -# The following block is used to allow the source RPM to be rebuilt -# against specific kernels. It is preferable that rpmbuild define the -# require_kver, require_kdir, require_obj constants for us, but if it does not -# not we attempt to determine the correct values based on your distro. - -%{?require_kver: %define kver %{require_kver}} -%{?require_kdir: %define kdir %{require_kdir}} -%{?require_kobj: %define kobj %{require_kobj}} - -# kdir: Full path to the kernel source headers -# kobj: Full path to the kernel build objects -# kver: Kernel version -# kpkg: Kernel package name -# kdevpkg: Kernel devel package name -# kverpkg: Kernel package version - -# SLES*: -%if %{defined sles_version} - %if %{undefined kver} - %define klnk %{_usrsrc}/linux-obj/%{_target_cpu}/%{_target_cpu} - %define kver %((echo X; %{__cat} %{klnk}/.kernelrelease - 2>/dev/null) | tail -1) - %endif - %define kpkg kernel-%{_target_cpu} - %define kdevpkg kernel-source kernel-syms - %define kverpkg %(echo %{kver} | cut -d'-' -f1-2) - %if %{undefined kdir} - %define kdir %{_usrsrc}/linux-%{kverpkg} - %endif - %if %{undefined kobj} - %define kobj %{kdir}-obj/%{_target_cpu}/%{_target_cpu} - %endif - -# CHAOS4: -%else -%if %{defined ch4} - %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo X; %{__cat} %{klnk}/kernel.release - 2>/dev/null) | tail -1) - %endif - %define kpkg chaos-kernel - %define kdevpkg chaos-kernel-devel - %define kverpkg %{kver} - %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} - %endif - %if %{undefined kobj} - %define kobj %{kdir} - %endif - -# RHEL*/Fedora: -%else -%if %{defined fedora} || %{defined rhel} - %if %{undefined kver} - %define klnk %{_usrsrc}/kernels/*/include/config - %define kver %((echo X; %{__cat} %{klnk}/kernel.release - 2>/dev/null) | tail -1) - %endif - %define kpkg kernel - %define kdevpkg kernel-devel - %define kverpkg %(echo %{kver} | cut -d'.' -f1-7) - %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} - %endif - %if %{undefined kobj} - %define kobj %{kdir} - %endif - -%else - -# Unsupported distro: - %if %{undefined kver} - %define kver X - %endif - %define kpkg kernel - %define kdevpkg kernel-devel - %define kverpkg %{kver} - %if %{undefined kdir} - %define kdir %{_usrsrc}/kernels/%{kver} - %endif - %if %{undefined kobj} - %define kobj %{kdir} - %endif - -%endif -%endif -%endif - -# Distro agnostic: %define name @PACKAGE@ %define version @VERSION@ +%define release @SPL_META_RELEASE@ %define debug_package %{nil} - -# The kernel version should only be appended to a binary RPM. When -# building a source RPM it must be kernel version agnostic. This means -# the source RPM must never specify a required kernel version, but the -# final RPM should be keyed to the kernel version it was built against. -%if %{defined build_src_rpm} -%define release @SPL_META_RELEASE@ -%define requires %{kpkg} -%else -%define relext %(echo %{kverpkg} | %{__sed} -e 's/-/_/g') -%define release @SPL_META_RELEASE@_%{relext} -%define requires %{kpkg} = %{kverpkg} -%endif - -Summary: Solaris Porting Layer +Summary: SPL Utils Group: Utilities/System Name: %{name} Version: %{version} Release: %{release} -License: GPL +License: @LICENSE@ URL: git://eris.llnl.gov/spl.git BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) Source: %{name}-%{version}.tar.gz -Requires: %{requires} -BuildRequires: %{kdevpkg} %description -The %{name} package contains kernel modules and support utilities for -emulating Solaris style primatives in the linux kernel. These include, -but are not limited too, atomic, condvar, debug, error, memory, kobject, -kstat, mutex, rwlock, taskq, thread, time, and vnode APIs. - -%package devel -Summary: Solaris Porting Layer Headers and Symbols -Group: Development/Libraries -Requires: %{requires} -BuildRequires: %{kdevpkg} - -%description devel -The %{name}-devel package contains the header files and Module{s}.symvers -symbols needed for building additional modules which use %{name}. +The %{name} package contains the support utilities for the spl. %prep %setup %build -%configure --with-linux=%{kdir} --with-linux-obj=%{kobj} +%configure --with-config=user make %install @@ -151,22 +33,6 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %doc AUTHORS ChangeLog COPYING DISCLAIMER INSTALL %{_sbindir}/* -/lib/modules/* - -%files devel -%defattr(-,root,root) -%{_prefix}/src/* %post -if [ -f /boot/System.map-%{kver} ]; then - depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 -else - depmod -ae %{kver} || exit 0 -fi - %postun -if [ -f /boot/System.map-%{kver} ]; then - depmod -ae -F /boot/System.map-%{kver} %{kver} || exit 0 -else - depmod -ae %{kver} || exit 0 -fi