Skip to content

Commit

Permalink
Working version of M4 macro config
Browse files Browse the repository at this point in the history
  • Loading branch information
behlendorf committed Nov 26, 2008
1 parent f0e648c commit 62b749c
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 48 deletions.
11 changes: 5 additions & 6 deletions config/kernel.m4
Original file line number Diff line number Diff line change
@@ -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
dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build
KERNELMAKE_PARAMS=
dnl #KERNELMAKE_PARAMS="V=1" # Enable verbose module build
dnl # Kernel build cpp flags
KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL "
Expand Down Expand Up @@ -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
Expand All @@ -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
]
)
])
5 changes: 4 additions & 1 deletion config/lustre.m4
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Default ZFS lustre mode configuration
dnl #
dnl # Default ZFS lustre configuration
dnl #
AC_DEFUN([ZFS_AC_CONFIG_LUSTRE], [])
5 changes: 4 additions & 1 deletion config/user.m4
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Default ZFS user mode configuration
dnl #
dnl # Default ZFS user configuration
dnl #
AC_DEFUN([ZFS_AC_CONFIG_USER], [])
77 changes: 39 additions & 38 deletions config/zfs-build.m4
Original file line number Diff line number Diff line change
@@ -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`
Expand Down Expand Up @@ -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}
Expand All @@ -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 #
Expand Down
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62b749c

Please sign in to comment.