Commit e1f1685ffa734404558ff9aab6375b352823ec8d
1 parent
2940143c
Do not link statically if profiling is enabled.
Static linking prevents the registries from working correctly. So don't link statically!
Showing
1 changed file
with
9 additions
and
14 deletions
configure.ac
| ... | ... | @@ -846,22 +846,17 @@ AM_CONDITIONAL(OPENMP,test "x$enable_openmp" = "xyes") |
| 846 | 846 | ############################################################################# |
| 847 | 847 | # Build static code? # |
| 848 | 848 | ############################################################################# |
| 849 | -if test "x$enable_profiling" = "xyes"; then | |
| 850 | - AC_MSG_NOTICE([Link executables statically.]) | |
| 849 | +AC_MSG_CHECKING(whether to link executables statically) | |
| 850 | +AC_ARG_ENABLE([static_link], | |
| 851 | + AS_HELP_STRING([--enable-static-link], | |
| 852 | + [link executables statically (default=no)]), | |
| 853 | + [static_link="$enableval"], | |
| 854 | + [static_link="no"]) | |
| 855 | +if test "x$static_link" = "xyes"; then | |
| 856 | + AC_MSG_RESULT(yes) | |
| 851 | 857 | LIB_LINK_OPTION="-all-static" |
| 852 | 858 | else |
| 853 | - AC_MSG_CHECKING(whether to link executables statically) | |
| 854 | - AC_ARG_ENABLE([static_link], | |
| 855 | - AS_HELP_STRING([--enable-static-link], | |
| 856 | - [link executables statically (default=no)]), | |
| 857 | - [static_link="$enableval"], | |
| 858 | - [static_link="no"]) | |
| 859 | - if test "x$static_link" = "xyes"; then | |
| 860 | - AC_MSG_RESULT(yes) | |
| 861 | - LIB_LINK_OPTION="-all-static" | |
| 862 | - else | |
| 863 | - AC_MSG_RESULT(no) | |
| 864 | - fi | |
| 859 | + AC_MSG_RESULT(no) | |
| 865 | 860 | fi |
| 866 | 861 | AC_SUBST(LIB_LINK_OPTION) |
| 867 | 862 | ... | ... |