diff options
author | Bryan Hundven <bryanhundven@gmail.com> | 2016-02-28 20:16:10 (GMT) |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2016-02-28 20:16:10 (GMT) |
commit | c1c03aa27c27e4e96be6486d90093babc6f1b638 (patch) | |
tree | 4af8062b016b77d0db330ffea00b3c8dfd27ddea /configure.ac | |
parent | 01bc77f5f1704407061b80048950eb824748997e (diff) | |
parent | b3869e933b29286fe362e68fbda3184acf655de8 (diff) |
Merge pull request #356 from bhundven/check_static_link
configure: Check to see if gcc can static link
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 4f0b428..4fd5776 100644 --- a/configure.ac +++ b/configure.ac @@ -133,6 +133,19 @@ AS_IF([test -z "$CC"], [AC_MSG_ERROR([no suitable compiler found])]) AC_PROG_CPP +#--------------------------------------------------------------------- +# Check to see if gcc can static link +AC_MSG_CHECKING([if gcc can static link]) +echo "int main() {}" | gcc -static -xc - > /dev/null 2>&1 +static_test=$? +AS_IF([test $static_test -eq 0], + [static_link=y + AC_MSG_RESULT([yes])], + [test $static_test -ne 0], + [static_link= + AC_MSG_RESULT([no])]) +ACX_SET_KCONFIG_OPTION([static_link]) + # But we still need a way to specify the PATH to GNU versions (Damn MacOS) AC_ARG_WITH([objcopy], AS_HELP_STRING([--with-objcopy=PATH], |