mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 18:11:00 +03:00
16b719f006
We need dependent packages to be able to include spl_config.h to
build properly. This was partially solved in commit 0cbaeb1
by using
AH_BOTTOM to #undef common #defines (PACKAGE, VERSION, etc) which
autoconf always adds and cannot be easily removed. This solution
works as long as the spl_config.h is included before your projects
config.h. That turns out to be easier said than done. In particular,
this is a problem when your package includes its config.h using the
-include gcc option which ensures the first thing included is your
config.h.
To handle all cases cleanly I have removed the AH_BOTTOM hack and
replaced it with an AC_CONFIG_HEADERS command. This command runs
immediately after spl_config.h is written and with a little awk-foo
it strips the offending #defines from the file. This eliminates
the problem entirely and makes header safe for inclusion.
Also in this change I have removed the few places in the code where
spl_config.h is included. It is now added to the gcc compile line
to ensure the config results are always available.
Finally, I have also disabled the verbose kernel builds. If you
want them back you can always build with 'make V=1'. Since things
are working now they don't need to be on by default.
60 lines
1.6 KiB
Plaintext
60 lines
1.6 KiB
Plaintext
/*
|
|
* This file is part of the SPL: Solaris Porting Layer.
|
|
*
|
|
* Copyright (c) 2008 Lawrence Livermore National Security, LLC.
|
|
* Produced at Lawrence Livermore National Laboratory
|
|
* Written by:
|
|
* Brian Behlendorf <behlendorf1@llnl.gov>,
|
|
* Herb Wartens <wartens2@llnl.gov>,
|
|
* Jim Garlick <garlick@llnl.gov>
|
|
* UCRL-CODE-235197
|
|
*
|
|
* This is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*/
|
|
|
|
AC_INIT
|
|
AC_LANG(C)
|
|
SPL_AC_META
|
|
AC_CONFIG_AUX_DIR([config])
|
|
AC_CANONICAL_SYSTEM
|
|
AM_MAINTAINER_MODE
|
|
AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION])
|
|
AC_CONFIG_HEADERS([spl_config.h], [
|
|
(mv spl_config.h spl_config.h.tmp &&
|
|
awk -f config/config.awk spl_config.h.tmp >spl_config.h &&
|
|
rm spl_config.h.tmp) || exit 1])
|
|
|
|
AC_PROG_INSTALL
|
|
AC_PROG_CC
|
|
AC_PROG_LIBTOOL
|
|
|
|
SPL_AC_LICENSE
|
|
SPL_AC_CONFIG
|
|
|
|
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
|
|
])
|
|
|
|
AC_OUTPUT
|