diff options
author | Brian Behlendorf <[email protected]> | 2008-11-26 14:29:45 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2008-11-26 14:29:45 -0800 |
commit | f0e648ca02f55bb2c4bc328656769a0c529f683a (patch) | |
tree | abda4b3932c2bd62fb663f9c9241bc6e26547fa9 /config/zfs-build.m4 | |
parent | e833fd4a5c1fc22077c36782070837553f60b258 (diff) |
Make everything a M4 macro, it's just cleaner that way
Diffstat (limited to 'config/zfs-build.m4')
-rw-r--r-- | config/zfs-build.m4 | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index badb8b69e..61b0c2953 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -1,18 +1,5 @@ AC_DEFUN([ZFS_AC_CONFIG], [ - AC_ARG_WITH([zfs-config], - AS_HELP_STRING([--with-config=CONFIG], - [Config file 'kernel|user|lustre']), - [zfsconfig="$withval"]) - - AC_MSG_CHECKING([zfs config file]) - if test -z "$zfsconfig" || test ! -r config/$zfsconfig; then - AC_MSG_RESULT([no]) - AC_MSG_ERROR([ - *** Please specify one of the valid config files located - *** in ./config/ with the '--with-zfs-config=CONFIG' option]) - fi - TOPDIR=`/bin/pwd` BUILDDIR=$ZFS_META_NAME #+$zfsconfig ZFSDIR=$TOPDIR/$BUILDDIR @@ -28,12 +15,24 @@ AC_DEFUN([ZFS_AC_CONFIG], [ AC_SUBST(CMDDIR) AC_SUBST(UNAME) - AC_MSG_RESULT([$zfsconfig]); - . ./config/$zfsconfig + AC_ARG_WITH([zfs-config], + AS_HELP_STRING([--with-config=CONFIG], + [Config file 'kernel|user|lustre']), + [zfsconfig="$withval"]) - AC_SUBST(KERNELMAKE_PARAMS) - AC_SUBST(KERNELCPPFLAGS) - AC_SUBST(HOSTCFLAGS) + 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], [ |