From ac6f3c2bb510754a52642b2a3440d009164916da Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Thu, 7 Oct 2010 11:59:12 -0700 Subject: [PATCH] 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. --- jemalloc/configure.ac | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/jemalloc/configure.ac b/jemalloc/configure.ac index 687cafcb..b27955de 100644 --- a/jemalloc/configure.ac +++ b/jemalloc/configure.ac @@ -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