diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index caf6731f..e4b4dda4 100644 --- a/configure.ac +++ b/configure.ac @@ -26,18 +26,26 @@ if test "x$GXX" = "xyes"; then # Use -Wall if we have gcc. This gives better warnings AC_SUBST([CXXFLAGS_STRICT], ['-Wall -Wundef']) - # Check whether gcc supports -rdynamic, thanks to Steve Ellcey - # [http://readlist.com/lists/gcc.gnu.org/gcc/6/31502.html] - # This is needed to get symbols in backtraces. - # Note that this apparently fails on HP-UX - LDFLAGS="$LDFLAGS -rdynamic" - AC_MSG_CHECKING([whether gcc accepts -rdynamic]) - AC_TRY_LINK([], [return 0;], - [AC_MSG_RESULT([yes]); have_rdynamic=yes], - [AC_MSG_RESULT([no])]) - if test x"$have_rdynamic" = x"yes" ; then - AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic']) - fi + # Don't check for gcc -rdynamic on Solaris as it's broken, but returns 0. + case $build_os in + solaris*) + AC_MSG_NOTICE([skipping check for -rdynamic check on Solaris]) + ;; + *) + # Check whether gcc supports -rdynamic, thanks to Steve Ellcey + # [http://readlist.com/lists/gcc.gnu.org/gcc/6/31502.html] + # This is needed to get symbols in backtraces. + # Note that this apparently fails on HP-UX and Solaris + LDFLAGS="$LDFLAGS -rdynamic" + AC_MSG_CHECKING([whether gcc accepts -rdynamic]) + AC_TRY_LINK([], [return 0;], + [AC_MSG_RESULT([yes]); have_rdynamic=yes], + [AC_MSG_RESULT([no])]) + if test x"$have_rdynamic" = x"yes" ; then + AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic']) + fi + ;; + esac fi AC_PATH_PROG([PERL], [perl], [AC_MSG_ERROR([[perl executable was not found]])]) |