Re-organize prof-libgcc configuration.

Re-organize code for --enable-prof-libgcc so that configure doesn't
report both libgcc and libunwind support as being configured in.  This
change has no impact on how jemalloc is actually configured/built.
This commit is contained in:
Jason Evans 2010-10-07 11:59:12 -07:00
parent 9f3b0a74fd
commit ac6f3c2bb5

View File

@ -437,13 +437,16 @@ AC_SUBST([roff_no_prof])
dnl If libunwind isn't enabled, try to use libgcc rather than gcc intrinsics
dnl for backtracing.
if test "x$enable_prof" = "x1" -a "x$enable_prof_libunwind" = "x0" \
-a "x$GCC" = "xyes" -a "x$enable_prof_libgcc" = "x1" ; then
enable_prof_libgcc="1"
AC_CHECK_HEADERS([unwind.h], , [enable_prof_libgcc="0"])
AC_CHECK_LIB([gcc], [_Unwind_Backtrace], [LIBS="$LIBS -lgcc"], [enable_prof_libgcc="0"])
if test "x${enable_prof_libgcc}" = "x1" ; then
AC_DEFINE([JEMALLOC_PROF_LIBGCC], [ ])
if test "x$enable_prof" = "x1" -a "x$enable_prof_libgcc" = "x1" ; then
if test "x$enable_prof_libunwind" = "x0" -a "x$GCC" = "xyes" ; then
enable_prof_libgcc="1"
AC_CHECK_HEADERS([unwind.h], , [enable_prof_libgcc="0"])
AC_CHECK_LIB([gcc], [_Unwind_Backtrace], [LIBS="$LIBS -lgcc"], [enable_prof_libgcc="0"])
if test "x${enable_prof_libgcc}" = "x1" ; then
AC_DEFINE([JEMALLOC_PROF_LIBGCC], [ ])
fi
else
enable_prof_libgcc="0"
fi
fi