Allow spl_config.h to be included by dependant packages (updated)

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.
This commit is contained in:
Brian Behlendorf 2010-03-22 14:45:33 -07:00
parent aa600d8a38
commit 16b719f006
14 changed files with 97 additions and 99 deletions

View File

@ -9,8 +9,8 @@ endif
SUBDIRS = $(USER_DIR) $(KERNEL_DIR)
AUTOMAKE_OPTIONS = foreign dist-zip
EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER
noinst_HEADERS = spl_config.h spl_unconfig.h
EXTRA_DIST = autogen.sh spl.spec.in config/config.awk META DISCLAIMER
noinst_HEADERS = spl_config.h
distclean-local::
-$(RM) -R autom4te*.cache

View File

@ -211,8 +211,8 @@ target_vendor = @target_vendor@
@CONFIG_KERNEL_TRUE@KERNEL_DIR = module include
SUBDIRS = $(USER_DIR) $(KERNEL_DIR)
AUTOMAKE_OPTIONS = foreign dist-zip
EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER
noinst_HEADERS = spl_config.h spl_unconfig.h
EXTRA_DIST = autogen.sh spl.spec.in config/config.awk META DISCLAIMER
noinst_HEADERS = spl_config.h
all: spl_config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

View File

@ -198,7 +198,8 @@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
DEFAULT_INCLUDES = -I${top_srcdir} -I${top_srcdir}/lib
DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h \
-I${top_srcdir}/lib
AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \
-D__USE_LARGEFILE64
spl_SOURCES = spl.c

View File

@ -1,4 +1,4 @@
DEFAULT_INCLUDES = -I${top_srcdir}
DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h
AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow
AM_CFLAGS += -D__USE_LARGEFILE64

15
config/config.awk Normal file
View File

@ -0,0 +1,15 @@
# Remove default preprocessor define's from config.h
# PACKAGE
# PACKAGE_BUGREPORT
# PACKAGE_NAME
# PACKAGE_STRING
# PACKAGE_TARNAME
# PACKAGE_VERSION
# STDC_HEADERS
# VERSION
BEGIN { RS = "" ; FS = "\n" } \
!/.#define PACKAGE./ && \
!/.#define VERSION./ && \
!/.#define STDC_HEADERS./ \
{ print $0"\n" }

View File

@ -4,15 +4,12 @@ dnl #
AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_KERNEL
dnl # Kernel build make options
dnl # KERNELMAKE_PARAMS="V=1" # Enable verbose module build
KERNELMAKE_PARAMS="V=1"
dnl # -Wall -fno-strict-aliasing -Wstrict-prototypes and other
dnl # compiler options are added by the kernel build system.
abs_srcdir=`readlink -f ${srcdir}`
KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror"
KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include"
KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include"
KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h"
if test "${LINUX_OBJ}" != "${LINUX}"; then
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"

131
configure vendored
View File

@ -462,7 +462,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LICENSE SPL_CONFIG LINUX LINUX_OBJ LINUX_VERSION LINUX_SYMBOLS KERNELMAKE_PARAMS KERNELCPPFLAGS CONFIG_USER_TRUE CONFIG_USER_FALSE CONFIG_KERNEL_TRUE CONFIG_KERNEL_FALSE LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SPL_META_NAME SPL_META_VERSION SPL_META_RELEASE SPL_META_ALIAS SPL_META_DATA SPL_META_AUTHOR SPL_META_LT_CURRENT SPL_META_LT_REVISION SPL_META_LT_AGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LICENSE SPL_CONFIG LINUX LINUX_OBJ LINUX_VERSION LINUX_SYMBOLS KERNELMAKE_PARAMS KERNELCPPFLAGS CONFIG_USER_TRUE CONFIG_USER_FALSE CONFIG_KERNEL_TRUE CONFIG_KERNEL_FALSE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -1796,6 +1796,30 @@ test -n "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
program_prefix=${target_alias}-
echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
fi;
echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
MAINTAINER_MODE_FALSE='#'
else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
MAINT=$MAINTAINER_MODE_TRUE
am__api_version="1.9"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@ -2211,32 +2235,6 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
ac_config_headers="$ac_config_headers spl_config.h"
echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
fi;
echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
MAINTAINER_MODE_FALSE='#'
else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
MAINT=$MAINTAINER_MODE_TRUE
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@ -3988,7 +3986,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 3991 "configure"' > conftest.$ac_ext
echo '#line 3989 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -5587,7 +5585,7 @@ fi
# Provide some information about the compiler.
echo "$as_me:5590:" \
echo "$as_me:5588:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@ -6650,11 +6648,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6653: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6651: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6657: \$? = $ac_status" >&5
echo "$as_me:6655: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -6918,11 +6916,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6921: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6919: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6925: \$? = $ac_status" >&5
echo "$as_me:6923: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7022,11 +7020,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7025: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7023: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7029: \$? = $ac_status" >&5
echo "$as_me:7027: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -8491,7 +8489,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
echo '#line 8494 "configure"' > conftest.$ac_ext
echo '#line 8492 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -9388,7 +9386,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9391 "configure"
#line 9389 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -9488,7 +9486,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9491 "configure"
#line 9489 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11831,11 +11829,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11834: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11832: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:11838: \$? = $ac_status" >&5
echo "$as_me:11836: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -11935,11 +11933,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11938: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11936: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:11942: \$? = $ac_status" >&5
echo "$as_me:11940: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -12471,7 +12469,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
echo '#line 12474 "configure"' > conftest.$ac_ext
echo '#line 12472 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -13529,11 +13527,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13532: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13530: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13536: \$? = $ac_status" >&5
echo "$as_me:13534: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -13633,11 +13631,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13636: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13634: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13640: \$? = $ac_status" >&5
echo "$as_me:13638: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -15082,7 +15080,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
echo '#line 15085 "configure"' > conftest.$ac_ext
echo '#line 15083 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -15860,11 +15858,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15863: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15861: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15867: \$? = $ac_status" >&5
echo "$as_me:15865: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -16128,11 +16126,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16131: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16129: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:16135: \$? = $ac_status" >&5
echo "$as_me:16133: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -16232,11 +16230,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:16235: $lt_compile\"" >&5)
(eval echo "\"\$as_me:16233: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:16239: \$? = $ac_status" >&5
echo "$as_me:16237: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -17701,7 +17699,7 @@ linux*)
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
echo '#line 17704 "configure"' > conftest.$ac_ext
echo '#line 17702 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -19078,11 +19076,10 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6
KERNELMAKE_PARAMS="V=1"
abs_srcdir=`readlink -f ${srcdir}`
KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror"
KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include"
KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include"
KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h"
if test "${LINUX_OBJ}" != "${LINUX}"; then
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
@ -22430,11 +22427,10 @@ echo "${ECHO_T}$LINUX_SYMBOLS" >&6
KERNELMAKE_PARAMS="V=1"
abs_srcdir=`readlink -f ${srcdir}`
KERNELCPPFLAGS="$KERNELCPPFLAGS -Wstrict-prototypes -Werror"
KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir} -I${abs_srcdir}/include"
KERNELCPPFLAGS="$KERNELCPPFLAGS -I${abs_srcdir}/include"
KERNELCPPFLAGS="$KERNELCPPFLAGS -include ${abs_srcdir}/spl_config.h"
if test "${LINUX_OBJ}" != "${LINUX}"; then
KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
@ -26389,6 +26385,9 @@ s,@target@,$target,;t t
s,@target_cpu@,$target_cpu,;t t
s,@target_vendor@,$target_vendor,;t t
s,@target_os@,$target_os,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
@ -26411,9 +26410,6 @@ s,@am__leading_dot@,$am__leading_dot,;t t
s,@AMTAR@,$AMTAR,;t t
s,@am__tar@,$am__tar,;t t
s,@am__untar@,$am__untar,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
s,@LDFLAGS@,$LDFLAGS,;t t
@ -26945,6 +26941,13 @@ echo X$ac_file |
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`/stamp-h$_am_stamp_count
# Run the commands associated with the file.
case $ac_file in
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 ;;
esac
done
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF

View File

@ -29,10 +29,12 @@ AC_LANG(C)
SPL_AC_META
AC_CONFIG_AUX_DIR([config])
AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([$SPL_META_NAME], [$SPL_META_VERSION])
AC_CONFIG_HEADERS([spl_config.h])
AH_BOTTOM([#include <spl_unconfig.h>])
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

View File

@ -7,7 +7,6 @@ extern "C" {
#include <linux/types.h>
#include <sys/sysmacros.h>
#include <spl_config.h>
#include <linux/uaccess_compat.h>
#include <linux/file_compat.h>

View File

@ -192,7 +192,7 @@ target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
DEFAULT_INCLUDES = -I${top_srcdir}
DEFAULT_INCLUDES = -include ${top_srcdir}/spl_config.h
AM_CFLAGS = -Wall -Wstrict-prototypes -Werror -Wshadow \
-D__USE_LARGEFILE64
noinst_LTLIBRARIES = libcommon.la

View File

@ -25,10 +25,6 @@
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include <spl_config.h>
#endif /* HAVE_CONFIG_H */
#ifdef WITH_PTHREADS
# include <pthread.h>
#endif /* WITH_PTHREADS */

View File

@ -38,7 +38,6 @@
#include <sys/utsname.h>
#include <sys/file.h>
#include <linux/kmod.h>
#include "spl_config.h"
#ifdef DEBUG_SUBSYSTEM
#undef DEBUG_SUBSYSTEM

View File

@ -251,5 +251,3 @@
/* Version number of package */
#undef VERSION
#include <spl_unconfig.h>

View File

@ -1,12 +0,0 @@
/*
* Undefine these symbols to allow other autoheader enabled packages
* to leverage the SPL configure checks without a header conflict.
*/
#undef PACKAGE
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#undef VERSION
#undef STDC_HEADERS