mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Removed build system from master branch, will relocate to linux-zfs-branch
This commit is contained in:
parent
fe441a9050
commit
42baae9615
@ -1,3 +0,0 @@
|
||||
EXTRA_DIST = zfs-build.m4
|
||||
EXTRA_DIST = kernel user lustre
|
||||
|
@ -1,62 +0,0 @@
|
||||
dnl #
|
||||
dnl # Default ZFS kernel configuration
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
|
||||
dnl # Kernel build make options
|
||||
dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build
|
||||
KERNELMAKE_PARAMS=
|
||||
|
||||
dnl # Kernel build cpp flags
|
||||
KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL "
|
||||
KERNELCPPFLAGS="$KERNELCPPFLAGS -I$splsrc -I$splsrc/include -I$TOPDIR"
|
||||
|
||||
dnl # Required for pread() functionality an other GNU goodness
|
||||
HOSTCFLAGS="$HOSTCFLAGS -ggdb -O2 -std=c99 "
|
||||
HOSTCFLAGS="$HOSTCFLAGS -D_GNU_SOURCE -D__EXTENSIONS__ "
|
||||
|
||||
dnl # XXX: Quiet warnings not covered by the gcc-* patches
|
||||
dnl # XXX: Remove once all the warnings are resolved
|
||||
HOSTCFLAGS="$HOSTCFLAGS -Wno-switch -Wno-unused -Wno-missing-braces "
|
||||
HOSTCFLAGS="$HOSTCFLAGS -Wno-parentheses "
|
||||
HOSTCFLAGS="$HOSTCFLAGS -Wno-uninitialized -fno-strict-aliasing "
|
||||
|
||||
dnl # Expected defines not covered by zfs_config.h or spl_config.h
|
||||
HOSTCFLAGS="$HOSTCFLAGS -DHAVE_SPL -D_POSIX_PTHREAD_SEMANTICS "
|
||||
HOSTCFLAGS="$HOSTCFLAGS -D_FILE_OFFSET_BITS=64 "
|
||||
HOSTCFLAGS="$HOSTCFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT "
|
||||
HOSTCFLAGS="$HOSTCFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\" "
|
||||
|
||||
dnl # Expected default include path
|
||||
HOSTCFLAGS="$HOSTCFLAGS -I$TOPDIR "
|
||||
|
||||
if test "$kernelbuild" != "$kernelsrc"; then
|
||||
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$kernelbuild"
|
||||
fi
|
||||
|
||||
AC_SUBST(KERNELMAKE_PARAMS)
|
||||
AC_SUBST(KERNELCPPFLAGS)
|
||||
AC_SUBST(HOSTCFLAGS)
|
||||
|
||||
dnl # XXX: I really, really hate this... but to ensure the kernel
|
||||
dnl # build system compiles C files shared between a library and a
|
||||
dnl # kernel module, we need to ensure each file has a unique make
|
||||
dnl # target. To do that I'm creating symlinks for each shared
|
||||
dnl # file at configure time. It may be possible something better
|
||||
dnl # can be done in the Makefile but it will take some serious
|
||||
dnl # investigation and I don't have the time now.
|
||||
|
||||
echo "creating symlinks for additional kernel make targets"
|
||||
ln -f -s $LIBDIR/libport/u8_textprep.c $LIBDIR/libport/ku8_textprep.c
|
||||
ln -f -s $LIBDIR/libavl/avl.c $LIBDIR/libavl/kavl.c
|
||||
ln -f -s $LIBDIR/libavl/avl.c $LIBDIR/libavl/uavl.c
|
||||
ln -f -s $LIBDIR/libnvpair/nvpair.c $LIBDIR/libnvpair/knvpair.c
|
||||
ln -f -s $LIBDIR/libnvpair/nvpair.c $LIBDIR/libnvpair/unvpair.c
|
||||
ln -f -s $LIBDIR/libzcommon/zfs_deleg.c $LIBDIR/libzcommon/kzfs_deleg.c
|
||||
ln -f -s $LIBDIR/libzcommon/zfs_prop.c $LIBDIR/libzcommon/kzfs_prop.c
|
||||
ln -f -s $LIBDIR/libzcommon/zprop_common.c $LIBDIR/libzcommon/kzprop_common.c
|
||||
ln -f -s $LIBDIR/libzcommon/compress.c $LIBDIR/libzcommon/kcompress.c
|
||||
ln -f -s $LIBDIR/libzcommon/list.c $LIBDIR/libzcommon/klist.c
|
||||
ln -f -s $LIBDIR/libzcommon/zfs_namecheck.c $LIBDIR/libzcommon/kzfs_namecheck.c
|
||||
ln -f -s $LIBDIR/libzcommon/zfs_comutil.c $LIBDIR/libzcommon/kzfs_comutil.c
|
||||
ln -f -s $LIBDIR/libzcommon/zpool_prop.c $LIBDIR/libzcommon/kzpool_prop.c
|
||||
])
|
@ -1,4 +0,0 @@
|
||||
dnl #
|
||||
dnl # Default ZFS lustre configuration
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_LUSTRE], [])
|
@ -1,4 +0,0 @@
|
||||
dnl #
|
||||
dnl # Default ZFS user configuration
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_USER], [])
|
@ -1,387 +0,0 @@
|
||||
AC_DEFUN([ZFS_AC_KERNEL], [
|
||||
ver=`uname -r`
|
||||
|
||||
AC_ARG_WITH([linux],
|
||||
AS_HELP_STRING([--with-linux=PATH],
|
||||
[Path to kernel source]),
|
||||
[kernelsrc="$withval"; kernelbuild="$withval"])
|
||||
|
||||
AC_ARG_WITH(linux-obj,
|
||||
AS_HELP_STRING([--with-linux-obj=PATH],
|
||||
[Path to kernel build objects]),
|
||||
[kernelbuild="$withval"])
|
||||
|
||||
AC_MSG_CHECKING([kernel source directory])
|
||||
if test -z "$kernelsrc"; then
|
||||
kernelbuild=
|
||||
sourcelink=/lib/modules/${ver}/source
|
||||
buildlink=/lib/modules/${ver}/build
|
||||
|
||||
if test -e $sourcelink; then
|
||||
kernelsrc=`(cd $sourcelink; /bin/pwd)`
|
||||
fi
|
||||
if test -e $buildlink; then
|
||||
kernelbuild=`(cd $buildlink; /bin/pwd)`
|
||||
fi
|
||||
if test -z "$kernelsrc"; then
|
||||
kernelsrc=$kernelbuild
|
||||
fi
|
||||
if test -z "$kernelsrc" -o -z "$kernelbuild"; then
|
||||
AC_MSG_RESULT([Not found])
|
||||
AC_MSG_ERROR([
|
||||
*** Please specify the location of the kernel source
|
||||
*** with the '--with-linux=PATH' option])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$kernelsrc])
|
||||
AC_MSG_CHECKING([kernel build directory])
|
||||
AC_MSG_RESULT([$kernelbuild])
|
||||
|
||||
AC_MSG_CHECKING([kernel source version])
|
||||
if test -r $kernelbuild/include/linux/version.h &&
|
||||
fgrep -q UTS_RELEASE $kernelbuild/include/linux/version.h; then
|
||||
|
||||
kernsrcver=`(echo "#include <linux/version.h>";
|
||||
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 <linux/utsrelease.h>";
|
||||
echo "kernsrcver=UTS_RELEASE") |
|
||||
cpp -I $kernelbuild/include |
|
||||
grep "^kernsrcver=" | cut -d \" -f 2`
|
||||
fi
|
||||
|
||||
if test -z "$kernsrcver"; then
|
||||
AC_MSG_RESULT([Not found])
|
||||
AC_MSG_ERROR([
|
||||
*** Cannot determine the version of the linux kernel source.
|
||||
*** Please prepare the kernel before running this script])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$kernsrcver])
|
||||
|
||||
kmoduledir=${INSTALL_MOD_PATH}/lib/modules/$kernsrcver
|
||||
LINUX=${kernelsrc}
|
||||
LINUX_OBJ=${kernelbuild}
|
||||
|
||||
AC_SUBST(LINUX)
|
||||
AC_SUBST(LINUX_OBJ)
|
||||
AC_SUBST(kmoduledir)
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_SPL], [
|
||||
|
||||
AC_ARG_WITH([spl],
|
||||
AS_HELP_STRING([--with-spl=PATH],
|
||||
[Path to spl source]),
|
||||
[splsrc="$withval"; splbuild="$withval"])
|
||||
|
||||
AC_ARG_WITH([spl-obj],
|
||||
AS_HELP_STRING([--with-spl-obj=PATH],
|
||||
[Path to spl build objects]),
|
||||
[splbuild="$withval"])
|
||||
|
||||
|
||||
AC_MSG_CHECKING([spl source directory])
|
||||
if test -z "$splsrc"; then
|
||||
splbuild=
|
||||
sourcelink=/tmp/`whoami`/spl
|
||||
buildlink=/tmp/`whoami`/spl
|
||||
|
||||
if test -e $sourcelink; then
|
||||
splsrc=`(cd $sourcelink; /bin/pwd)`
|
||||
fi
|
||||
if test -e $buildlink; then
|
||||
splbuild=`(cd $buildlink; /bin/pwd)`
|
||||
fi
|
||||
if test -z "$splsrc"; then
|
||||
splsrc=$splbuild
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$splsrc" -o -z "$splbuild"; then
|
||||
sourcelink=/lib/modules/${ver}/source
|
||||
buildlink=/lib/modules/${ver}/build
|
||||
|
||||
if test -e $sourcelink; then
|
||||
splsrc=`(cd $sourcelink; /bin/pwd)`
|
||||
fi
|
||||
if test -e $buildlink; then
|
||||
splbuild=`(cd $buildlink; /bin/pwd)`
|
||||
fi
|
||||
if test -z "$splsrc"; then
|
||||
splsrc=$splbuild
|
||||
fi
|
||||
if test -z "$splsrc" -o -z "$splbuild"; then
|
||||
AC_MSG_RESULT([Not found])
|
||||
AC_MSG_ERROR([
|
||||
*** Please specify the location of the spl source
|
||||
*** with the '--with-spl=PATH' option])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$splsrc])
|
||||
AC_MSG_CHECKING([spl build directory])
|
||||
AC_MSG_RESULT([$splbuild])
|
||||
|
||||
AC_MSG_CHECKING([spl source version])
|
||||
if test -r $splbuild/spl_config.h &&
|
||||
fgrep -q VERSION $splbuild/spl_config.h; then
|
||||
|
||||
splsrcver=`(echo "#include <spl_config.h>";
|
||||
echo "splsrcver=VERSION") |
|
||||
cpp -I $splbuild |
|
||||
grep "^splsrcver=" | cut -d \" -f 2`
|
||||
fi
|
||||
|
||||
if test -z "$splsrcver"; then
|
||||
AC_MSG_RESULT([Not found])
|
||||
AC_MSG_ERROR([
|
||||
*** Cannot determine the version of the spl source.
|
||||
*** Please prepare the spl source before running this script])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$splsrcver])
|
||||
|
||||
AC_MSG_CHECKING([spl Module.symvers])
|
||||
if test -r $splbuild/modules/Module.symvers; then
|
||||
splsymvers=$splbuild/modules/Module.symvers
|
||||
elif test -r $kernelbuild/Module.symvers; then
|
||||
splsymvers=$kernelbuild/Module.symvers
|
||||
fi
|
||||
|
||||
if test -z "$splsymvers"; then
|
||||
AC_MSG_RESULT([Not found])
|
||||
AC_MSG_ERROR([
|
||||
*** Cannot find extra Module.symvers in the spl source.
|
||||
*** Please prepare the spl source before running this script])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$splsymvers])
|
||||
AC_SUBST(splsrc)
|
||||
AC_SUBST(splsymvers)
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_LICENSE], [
|
||||
AC_MSG_CHECKING([license])
|
||||
AC_MSG_RESULT([CDDL])
|
||||
dnl # AC_DEFINE([HAVE_GPL_ONLY_SYMBOLS], [1],
|
||||
dnl # [Define to 1 if module is licensed under the GPL])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_DEBUG], [
|
||||
AC_MSG_CHECKING([whether debugging is enabled])
|
||||
AC_ARG_ENABLE( [debug],
|
||||
AS_HELP_STRING([--enable-debug],
|
||||
[Enable generic debug support (default off)]),
|
||||
[ case "$enableval" in
|
||||
yes) zfs_ac_debug=yes ;;
|
||||
no) zfs_ac_debug=no ;;
|
||||
*) AC_MSG_RESULT([Error!])
|
||||
AC_MSG_ERROR([Bad value "$enableval" for --enable-debug]) ;;
|
||||
esac ]
|
||||
)
|
||||
if test "$zfs_ac_debug" = yes; then
|
||||
AC_MSG_RESULT([yes])
|
||||
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG "
|
||||
HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG "
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_DEFINE([NDEBUG], [1],
|
||||
[Define to 1 to disable debug tracing])
|
||||
KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG "
|
||||
HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG "
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_CONFIG_SCRIPT], [
|
||||
SCRIPT_CONFIG=.script-config
|
||||
rm -f ${SCRIPT_CONFIG}
|
||||
echo "KERNELSRC=${LINUX}" >>${SCRIPT_CONFIG}
|
||||
echo "KERNELBUILD=${LINUX_OBJ}" >>${SCRIPT_CONFIG}
|
||||
echo "KERNELSRCVER=$kernsrcver" >>${SCRIPT_CONFIG}
|
||||
echo >>${SCRIPT_CONFIG}
|
||||
echo "SPLSRC=$splsrc" >>${SCRIPT_CONFIG}
|
||||
echo "SPLBUILD=$splbuild" >>${SCRIPT_CONFIG}
|
||||
echo "SPLSRCVER=$splsrcver" >>${SCRIPT_CONFIG}
|
||||
echo "SPLSYMVERS=$splsymvers" >>${SCRIPT_CONFIG}
|
||||
echo >>${SCRIPT_CONFIG}
|
||||
echo "ZFSSRC=${TOPDIR}/src" >>${SCRIPT_CONFIG}
|
||||
echo "ZFSBUILD=${ZFSDIR}" >>${SCRIPT_CONFIG}
|
||||
echo >>${SCRIPT_CONFIG}
|
||||
echo "TOPDIR=${TOPDIR}" >>${SCRIPT_CONFIG}
|
||||
echo "LIBDIR=${LIBDIR}" >>${SCRIPT_CONFIG}
|
||||
echo "CMDDIR=${CMDDIR}" >>${SCRIPT_CONFIG}
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_CONFIG], [
|
||||
|
||||
TOPDIR=`/bin/pwd`
|
||||
BUILDDIR=$ZFS_META_NAME #+$zfsconfig
|
||||
ZFSDIR=$TOPDIR/$BUILDDIR
|
||||
LIBDIR=$ZFSDIR/lib
|
||||
CMDDIR=$ZFSDIR/zcmd
|
||||
UNAME=`uname -r | cut -d- -f1`
|
||||
|
||||
AC_SUBST(UNAME)
|
||||
AC_SUBST(TOPDIR)
|
||||
AC_SUBST(BUILDDIR)
|
||||
AC_SUBST(ZFSDIR)
|
||||
AC_SUBST(LIBDIR)
|
||||
AC_SUBST(CMDDIR)
|
||||
AC_SUBST(UNAME)
|
||||
|
||||
AC_ARG_WITH([zfs-config],
|
||||
AS_HELP_STRING([--with-config=CONFIG],
|
||||
[Config file 'kernel|user|lustre']),
|
||||
[zfsconfig="$withval"])
|
||||
|
||||
AC_MSG_CHECKING([zfs config])
|
||||
AC_MSG_RESULT([$zfsconfig]);
|
||||
|
||||
case "$zfsconfig" in
|
||||
kernel) ZFS_AC_CONFIG_KERNEL ;;
|
||||
user) ZFS_AC_CONFIG_USER ;;
|
||||
lustre) ZFS_AC_CONFIG_LUSTRE ;;
|
||||
*)
|
||||
AC_MSG_RESULT([Error!])
|
||||
AC_MSG_ERROR([Bad value "$zfsconfig" for --with-config,
|
||||
user kernel|user|lustre]) ;;
|
||||
esac
|
||||
|
||||
ZFS_AC_CONFIG_SCRIPT
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # ZFS_LINUX_CONFTEST
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_LINUX_CONFTEST], [
|
||||
cat >conftest.c <<_ACEOF
|
||||
$1
|
||||
_ACEOF
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # ZFS_LANG_PROGRAM(C)([PROLOGUE], [BODY])
|
||||
dnl #
|
||||
m4_define([ZFS_LANG_PROGRAM], [
|
||||
$1
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
dnl Do *not* indent the following line: there may be CPP directives.
|
||||
dnl Don't move the `;' right after for the same reason.
|
||||
$2
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # ZFS_LINUX_COMPILE_IFELSE / like AC_COMPILE_IFELSE
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_LINUX_COMPILE_IFELSE], [
|
||||
m4_ifvaln([$1], [ZFS_LINUX_CONFTEST([$1])])dnl
|
||||
rm -f build/conftest.o build/conftest.mod.c build/conftest.ko build/Makefile
|
||||
echo "obj-m := conftest.o" >build/Makefile
|
||||
dnl AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" -f $PWD/build/Makefile LINUXINCLUDE="-Iinclude -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 SUBDIRS=$PWD/build) >/dev/null && AC_TRY_COMMAND([$3])],
|
||||
AS_IF([AC_TRY_COMMAND(cp conftest.c build && make [$2] CC="$CC" LINUXINCLUDE="-Iinclude -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) >/dev/null && AC_TRY_COMMAND([$3])],
|
||||
[$4],
|
||||
[_AC_MSG_LOG_CONFTEST
|
||||
m4_ifvaln([$5],[$5])dnl])dnl
|
||||
rm -f build/conftest.o build/conftest.mod.c build/conftest.mod.o build/conftest.ko m4_ifval([$1], [build/conftest.c conftest.c])[]dnl
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # ZFS_LINUX_TRY_COMPILE like AC_TRY_COMPILE
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_LINUX_TRY_COMPILE],
|
||||
[ZFS_LINUX_COMPILE_IFELSE(
|
||||
[AC_LANG_SOURCE([ZFS_LANG_PROGRAM([[$1]], [[$2]])])],
|
||||
[modules],
|
||||
[test -s build/conftest.o],
|
||||
[$3], [$4])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # ZFS_LINUX_CONFIG
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_LINUX_CONFIG],
|
||||
[AC_MSG_CHECKING([whether Linux was built with CONFIG_$1])
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#ifndef AUTOCONF_INCLUDED
|
||||
#include <linux/config.h>
|
||||
#endif
|
||||
],[
|
||||
#ifndef CONFIG_$1
|
||||
#error CONFIG_$1 not #defined
|
||||
#endif
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
$2
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
$3
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # ZFS_CHECK_SYMBOL_EXPORT
|
||||
dnl # check symbol exported or not
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_CHECK_SYMBOL_EXPORT],
|
||||
[AC_MSG_CHECKING([whether symbol $1 is exported])
|
||||
grep -q -E '[[[:space:]]]$1[[[:space:]]]' $LINUX/Module.symvers 2>/dev/null
|
||||
rc=$?
|
||||
if test $rc -ne 0; then
|
||||
export=0
|
||||
for file in $2; do
|
||||
grep -q -E "EXPORT_SYMBOL.*($1)" "$LINUX/$file" 2>/dev/null
|
||||
rc=$?
|
||||
if test $rc -eq 0; then
|
||||
export=1
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test $export -eq 0; then
|
||||
AC_MSG_RESULT([no])
|
||||
$4
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.x API change
|
||||
dnl # bio_end_io_t uses 2 args (size was dropped from prototype)
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_2ARGS_BIO_END_IO_T],
|
||||
[AC_MSG_CHECKING([whether bio_end_io_t wants 2 args])
|
||||
tmp_flags="$EXTRA_KCFLAGS"
|
||||
EXTRA_KCFLAGS="-Werror"
|
||||
ZFS_LINUX_TRY_COMPILE([
|
||||
#include <linux/bio.h>
|
||||
],[
|
||||
void (*wanted_end_io)(struct bio *, int) = NULL;
|
||||
bio_end_io_t *local_end_io;
|
||||
|
||||
local_end_io = wanted_end_io;
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_2ARGS_BIO_END_IO_T, 1,
|
||||
[bio_end_io_t wants 2 args])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
EXTRA_KCFLAGS="$tmp_flags"
|
||||
])
|
@ -1,112 +0,0 @@
|
||||
dnl #
|
||||
dnl # ZFS_AC_META
|
||||
dnl # Read metadata from the META file.
|
||||
dnl #
|
||||
dnl # AUTHOR:
|
||||
dnl # Chris Dunlap <cdunlap@llnl.gov>
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_META], [
|
||||
AC_MSG_CHECKING([metadata])
|
||||
|
||||
META="$srcdir/META"
|
||||
_zfs_ac_meta_got_file=no
|
||||
if test -f "$META"; then
|
||||
_zfs_ac_meta_got_file=yes
|
||||
|
||||
ZFS_META_NAME=_ZFS_AC_META_GETVAL([(?:NAME|PROJECT|PACKAGE)]);
|
||||
if test -n "$ZFS_META_NAME"; then
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_NAME], ["$ZFS_META_NAME"],
|
||||
[Define the project name.]
|
||||
)
|
||||
AC_SUBST([ZFS_META_NAME])
|
||||
fi
|
||||
|
||||
ZFS_META_VERSION=_ZFS_AC_META_GETVAL([VERSION]);
|
||||
if test -n "$ZFS_META_VERSION"; then
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_VERSION], ["$ZFS_META_VERSION"],
|
||||
[Define the project version.]
|
||||
)
|
||||
AC_SUBST([ZFS_META_VERSION])
|
||||
fi
|
||||
|
||||
ZFS_META_RELEASE=_ZFS_AC_META_GETVAL([RELEASE]);
|
||||
if test -n "$ZFS_META_RELEASE"; then
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_RELEASE], ["$ZFS_META_RELEASE"],
|
||||
[Define the project release.]
|
||||
)
|
||||
AC_SUBST([ZFS_META_RELEASE])
|
||||
fi
|
||||
|
||||
if test -n "$ZFS_META_NAME" -a -n "$ZFS_META_VERSION"; then
|
||||
ZFS_META_ALIAS="$ZFS_META_NAME-$ZFS_META_VERSION"
|
||||
test -n "$ZFS_META_RELEASE" &&
|
||||
ZFS_META_ALIAS="$ZFS_META_ALIAS-$ZFS_META_RELEASE"
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_ALIAS],
|
||||
["$ZFS_META_ALIAS"],
|
||||
[Define the project alias string.]
|
||||
)
|
||||
AC_SUBST([ZFS_META_ALIAS])
|
||||
fi
|
||||
|
||||
ZFS_META_DATA=_ZFS_AC_META_GETVAL([DATE]);
|
||||
if test -n "$ZFS_META_DATA"; then
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_DATA], ["$ZFS_META_DATA"],
|
||||
[Define the project release date.]
|
||||
)
|
||||
AC_SUBST([ZFS_META_DATA])
|
||||
fi
|
||||
|
||||
ZFS_META_AUTHOR=_ZFS_AC_META_GETVAL([AUTHOR]);
|
||||
if test -n "$ZFS_META_AUTHOR"; then
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_AUTHOR], ["$ZFS_META_AUTHOR"],
|
||||
[Define the project author.]
|
||||
)
|
||||
AC_SUBST([ZFS_META_AUTHOR])
|
||||
fi
|
||||
|
||||
m4_pattern_allow([^LT_(CURRENT|REVISION|AGE)$])
|
||||
ZFS_META_LT_CURRENT=_ZFS_AC_META_GETVAL([LT_CURRENT]);
|
||||
ZFS_META_LT_REVISION=_ZFS_AC_META_GETVAL([LT_REVISION]);
|
||||
ZFS_META_LT_AGE=_ZFS_AC_META_GETVAL([LT_AGE]);
|
||||
if test -n "$ZFS_META_LT_CURRENT" \
|
||||
-o -n "$ZFS_META_LT_REVISION" \
|
||||
-o -n "$ZFS_META_LT_AGE"; then
|
||||
test -n "$ZFS_META_LT_CURRENT" || ZFS_META_LT_CURRENT="0"
|
||||
test -n "$ZFS_META_LT_REVISION" || ZFS_META_LT_REVISION="0"
|
||||
test -n "$ZFS_META_LT_AGE" || ZFS_META_LT_AGE="0"
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_LT_CURRENT],
|
||||
["$ZFS_META_LT_CURRENT"],
|
||||
[Define the libtool library 'current'
|
||||
version information.]
|
||||
)
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_LT_REVISION],
|
||||
["$ZFS_META_LT_REVISION"],
|
||||
[Define the libtool library 'revision'
|
||||
version information.]
|
||||
)
|
||||
AC_DEFINE_UNQUOTED([ZFS_META_LT_AGE], ["$ZFS_META_LT_AGE"],
|
||||
[Define the libtool library 'age'
|
||||
version information.]
|
||||
)
|
||||
AC_SUBST([ZFS_META_LT_CURRENT])
|
||||
AC_SUBST([ZFS_META_LT_REVISION])
|
||||
AC_SUBST([ZFS_META_LT_AGE])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$_zfs_ac_meta_got_file])
|
||||
]
|
||||
)
|
||||
|
||||
AC_DEFUN([_ZFS_AC_META_GETVAL],
|
||||
[`perl -n\
|
||||
-e "BEGIN { \\$key=shift @ARGV; }"\
|
||||
-e "next unless s/^\s*\\$key@<:@:=@:>@//i;"\
|
||||
-e "s/^((?:@<:@^'\"#@:>@*(?:(@<:@'\"@:>@)@<:@^\2@:>@*\2)*)*)#.*/\\@S|@1/;"\
|
||||
-e "s/^\s+//;"\
|
||||
-e "s/\s+$//;"\
|
||||
-e "s/^(@<:@'\"@:>@)(.*)\1/\\@S|@2/;"\
|
||||
-e "\\$val=\\$_;"\
|
||||
-e "END { print \\$val if defined \\$val; }"\
|
||||
'$1' $META`]dnl
|
||||
)
|
Loading…
Reference in New Issue
Block a user