diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2017-05-03 09:01:12 +0930 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2017-05-03 10:47:39 +0930 |
commit | fd09c852ff65b5b28d38a9bfbd5ae911c6bf3b44 (patch) | |
tree | 6c6b728ad619d59e0a468109fb6c197a6dfb8391 /configure.ac | |
parent | cbbc13c35db80ffbd23bddad9f1e2dac5c4b08c2 (diff) | |
download | phosphor-mboxd-fd09c852ff65b5b28d38a9bfbd5ae911c6bf3b44.tar.gz phosphor-mboxd-fd09c852ff65b5b28d38a9bfbd5ae911c6bf3b44.zip |
configure: Download aspeed-lpc-ctrl.h if not present
However, don't download it if the file is already present in the local
directory. The AC_CHECK_HEADER macro can't test this case, so the
condition will always trigger if the header isn't installed on the
system.
Change-Id: I7de8ff24823fe2ce54add9a33125cee5ad0b53f0
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index c4f778f..68148a7 100644 --- a/configure.ac +++ b/configure.ac @@ -14,8 +14,9 @@ AC_PROG_MAKE_SET # Checks for header files. AC_CHECK_HEADER(linux/aspeed-lpc-ctrl.h,[HAVE_UAPI_LINUX_LPC_CTRL_H=""],[HAVE_UAPI_LINUX_LPC_CTRL_H="-I linux/aspeed-lpc-ctrl.h"]) -AS_IF([test "$HAVE_UAPI_LINUX_LPC_CTRL_H" = ""], - AC_MSG_WARN([Could not find linux/aspeed-lpc-ctrl.h]) +AS_IF([test "$HAVE_UAPI_LINUX_LPC_CTRL_H" != ""], + AC_MSG_WARN([Could not find linux/aspeed-lpc-ctrl.h: Attempting to download locally for building from https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/plain/include/uapi/linux/aspeed-lpc-ctrl.h?h=char-misc-next]) + AC_SUBST([BT_BMC_DL],[`test ! -f linux/aspeed-lpc-ctrl.h && mkdir -p linux && wget --quiet https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/plain/include/uapi/linux/aspeed-lpc-ctrl.h?h=char-misc-next -O linux/aspeed-lpc-ctrl.h`]) ) # Checks for typedefs, structures, and compiler characteristics. |