Working version of M4 macro config

This commit is contained in:
Brian Behlendorf 2008-11-26 15:32:39 -08:00
parent f0e648ca02
commit 62b749c8c8
5 changed files with 53 additions and 48 deletions

View File

@ -1,10 +1,10 @@
dnl #
dnl # Default ZFS kernel mode configuration
dnl # Default ZFS kernel configuration
dnl #
AC_DEFUN([ZFS_AC_KERNEL_CONFIG], [
AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
dnl # Kernel build make options
KERNELMAKE_PARAMS=
dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build
KERNELMAKE_PARAMS=
dnl # Kernel build cpp flags
KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL "
@ -45,7 +45,7 @@ AC_DEFUN([ZFS_AC_KERNEL_CONFIG], [
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 make targets"
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
@ -59,5 +59,4 @@ AC_DEFUN([ZFS_AC_KERNEL_CONFIG], [
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
]
)
])

View File

@ -1 +1,4 @@
# Default ZFS lustre mode configuration
dnl #
dnl # Default ZFS lustre configuration
dnl #
AC_DEFUN([ZFS_AC_CONFIG_LUSTRE], [])

View File

@ -1 +1,4 @@
# Default ZFS user mode configuration
dnl #
dnl # Default ZFS user configuration
dnl #
AC_DEFUN([ZFS_AC_CONFIG_USER], [])

View File

@ -1,40 +1,3 @@
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 file])
[ case "$zfsconfig" in
kernel) ZFS_AC_KERNEL_CONFIG ;;
user) ZFS_AC_USER_CONFIG ;;
lustre) ZFS_AC_LUSTRE_CONFIG ;;
*)
AC_MSG_RESULT([Error!])
AC_MSG_ERROR([Bad value "$zfsconfig" for --with-config,
user kernel|user|lustre]) ;;
esac ]
AC_MSG_RESULT([$zfsconfig]);
])
AC_DEFUN([ZFS_AC_KERNEL], [
ver=`uname -r`
@ -236,7 +199,7 @@ AC_DEFUN([ZFS_AC_DEBUG], [
fi
])
AC_DEFUN([ZFS_AC_SCRIPT_CONFIG], [
AC_DEFUN([ZFS_AC_CONFIG_SCRIPT], [
SCRIPT_CONFIG=.script-config
rm -f ${SCRIPT_CONFIG}
echo "KERNELSRC=${LINUX}" >>${SCRIPT_CONFIG}
@ -256,6 +219,44 @@ AC_DEFUN([ZFS_AC_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 #

View File

@ -49,10 +49,9 @@ kernelbuild=
splsrc=
splbuild=
ZFS_AC_CONFIG
ZFS_AC_KERNEL
ZFS_AC_SPL
ZFS_AC_SCRIPT_CONFIG
ZFS_AC_CONFIG
ZFS_AC_LICENSE
ZFS_AC_DEBUG
ZFS_AC_2ARGS_BIO_END_IO_T