Squid-2.2.STABLE2: Configure fix for Solaris/X86 Configure claimed that it enabled dlmalloc on Solaris/X86, but it didn't actually succeed in doing so. Index: squid/configure.in diff -u squid/configure.in:1.1.1.32.2.5 squid/configure.in:1.1.1.32.2.8 --- squid/configure.in:1.1.1.32.2.5 Tue May 11 00:59:06 1999 +++ squid/configure.in Tue May 11 20:53:22 1999 @@ -124,72 +124,58 @@ fi fi -if test "x$ac_cv_enabled_dlmalloc" = "x"; then - case "$host" in - i386-*-solaris2.*) - echo "Enabling dlmalloc for $host" - ac_cv_enabled_dlmalloc="yes" - ;; - esac -fi dnl Enable optional modules AC_ARG_ENABLE(dlmalloc, [ --enable-dlmalloc[=LIB] Compile & use the malloc package by Doug Lea], [ - if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then - # Ok. dlmalloc was enabled before, but state may be changed. - # we have to test these again - unset ac_cv_func_mallinfo - unset ac_cv_func_mallocblksize - unset ac_cv_func_free - unset ac_cv_func_realloc - unset ac_cv_func_memalign - unset ac_cv_func_valloc - unset ac_cv_func_pvalloc - unset ac_cv_func_calloc - unset ac_cv_func_cfree - unset ac_cv_func_malloc_trim - unset ac_cv_func_malloc_usable_size - unset ac_cv_func_malloc_stats - unset ac_cv_func_mallinfo - unset ac_cv_func_mallopt - unset ac_cv_lib_gnumalloc - unset ac_cv_header_gnumalloc_h - unset ac_cv_lib_malloc - unset ac_cv_enabled_dlmalloc - fi case "$enableval" in 'yes') + use_dlmalloc="yes" LIBDLMALLOC="libdlmalloc.a" LIB_MALLOC="-L../lib -ldlmalloc" - ac_cv_func_mallinfo="yes" - ac_cv_func_mallocblksize="no" - ac_cv_func_free="yes" - ac_cv_func_realloc="yes" - ac_cv_func_memalign="yes" - ac_cv_func_valloc="yes" - ac_cv_func_pvalloc="yes" - ac_cv_func_calloc="yes" - ac_cv_func_cfree="yes" - ac_cv_func_malloc_trim="yes" - ac_cv_func_malloc_usable_size="yes" - ac_cv_func_malloc_stats="yes" - ac_cv_func_mallinfo="yes" - ac_cv_func_mallopt="yes" - ac_cv_lib_gnumalloc="no" - ac_cv_header_gnumalloc_h="no" - ac_cv_lib_malloc="no" - ac_cv_enabled_dlmalloc="yes" - echo "dlmalloc build enabled" + echo "dlmalloc enabled" ;; 'no') - # Disabled explicitly. - echo "dlmalloc disabled." + use_dlmalloc="no" + echo "dlmalloc disabled" ;; - *) - # Use already installed dlmalloc library. - LIB_MALLOC="${enableval}" + *) use_dlmalloc="yes" + LIB_MALLOC="$enableval" + echo "dlmalloc enabled with $LIB_MALLOC" + esac +]) +if test "${use_dlmalloc-unset}" = unset; then + case "$host" in + i386-*-solaris2.*) + echo "Enabling dlmalloc for $host" + use_dlmalloc="yes" + ;; + esac +fi +if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then + # Ok. dlmalloc was enabled before, but state may be changed. + # we have to test these again + unset ac_cv_func_mallinfo + unset ac_cv_func_mallocblksize + unset ac_cv_func_free + unset ac_cv_func_realloc + unset ac_cv_func_memalign + unset ac_cv_func_valloc + unset ac_cv_func_pvalloc + unset ac_cv_func_calloc + unset ac_cv_func_cfree + unset ac_cv_func_malloc_trim + unset ac_cv_func_malloc_usable_size + unset ac_cv_func_malloc_stats + unset ac_cv_func_mallinfo + unset ac_cv_func_mallopt + unset ac_cv_lib_gnumalloc + unset ac_cv_header_gnumalloc_h + unset ac_cv_lib_malloc + unset ac_cv_enabled_dlmalloc +fi +if test "$use_dlmalloc" = yes; then ac_cv_func_mallinfo="yes" ac_cv_func_mallocblksize="no" ac_cv_func_free="yes" @@ -208,33 +194,8 @@ ac_cv_header_gnumalloc_h="no" ac_cv_lib_malloc="no" ac_cv_enabled_dlmalloc="yes" - echo "Use installed dlmalloc." - ;; - esac - ],[ - if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then - # Ok. dlmalloc was enabled before, but now disabled. - # we have to test these again - unset ac_cv_func_mallinfo - unset ac_cv_func_mallocblksize - unset ac_cv_func_free - unset ac_cv_func_realloc - unset ac_cv_func_memalign - unset ac_cv_func_valloc - unset ac_cv_func_pvalloc - unset ac_cv_func_calloc - unset ac_cv_func_cfree - unset ac_cv_func_malloc_trim - unset ac_cv_func_malloc_usable_size - unset ac_cv_func_malloc_stats - unset ac_cv_func_mallinfo - unset ac_cv_func_mallopt - unset ac_cv_lib_gnumalloc - unset ac_cv_header_gnumalloc_h - unset ac_cv_lib_malloc - unset ac_cv_enabled_dlmalloc - fi - ]) +fi + AC_SUBST(LIBDLMALLOC) AC_SUBST(LIB_MALLOC) Index: squid/configure diff -u squid/configure:1.1.1.30.2.5 squid/configure:1.1.1.30.2.8 --- squid/configure:1.1.1.30.2.5 Tue May 11 00:59:02 1999 +++ squid/configure Tue May 11 20:53:17 1999 @@ -913,72 +913,60 @@ fi fi -if test "x$ac_cv_enabled_dlmalloc" = "x"; then - case "$host" in - i386-*-solaris2.*) - echo "Enabling dlmalloc for $host" - ac_cv_enabled_dlmalloc="yes" - ;; - esac -fi # Check whether --enable-dlmalloc or --disable-dlmalloc was given. if test "${enable_dlmalloc+set}" = set; then enableval="$enable_dlmalloc" - if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then - # Ok. dlmalloc was enabled before, but state may be changed. - # we have to test these again - unset ac_cv_func_mallinfo - unset ac_cv_func_mallocblksize - unset ac_cv_func_free - unset ac_cv_func_realloc - unset ac_cv_func_memalign - unset ac_cv_func_valloc - unset ac_cv_func_pvalloc - unset ac_cv_func_calloc - unset ac_cv_func_cfree - unset ac_cv_func_malloc_trim - unset ac_cv_func_malloc_usable_size - unset ac_cv_func_malloc_stats - unset ac_cv_func_mallinfo - unset ac_cv_func_mallopt - unset ac_cv_lib_gnumalloc - unset ac_cv_header_gnumalloc_h - unset ac_cv_lib_malloc - unset ac_cv_enabled_dlmalloc - fi case "$enableval" in 'yes') + use_dlmalloc="yes" LIBDLMALLOC="libdlmalloc.a" LIB_MALLOC="-L../lib -ldlmalloc" - ac_cv_func_mallinfo="yes" - ac_cv_func_mallocblksize="no" - ac_cv_func_free="yes" - ac_cv_func_realloc="yes" - ac_cv_func_memalign="yes" - ac_cv_func_valloc="yes" - ac_cv_func_pvalloc="yes" - ac_cv_func_calloc="yes" - ac_cv_func_cfree="yes" - ac_cv_func_malloc_trim="yes" - ac_cv_func_malloc_usable_size="yes" - ac_cv_func_malloc_stats="yes" - ac_cv_func_mallinfo="yes" - ac_cv_func_mallopt="yes" - ac_cv_lib_gnumalloc="no" - ac_cv_header_gnumalloc_h="no" - ac_cv_lib_malloc="no" - ac_cv_enabled_dlmalloc="yes" - echo "dlmalloc build enabled" + echo "dlmalloc enabled" ;; 'no') - # Disabled explicitly. - echo "dlmalloc disabled." + use_dlmalloc="no" + echo "dlmalloc disabled" ;; - *) - # Use already installed dlmalloc library. - LIB_MALLOC="${enableval}" + *) use_dlmalloc="yes" + LIB_MALLOC="$enableval" + echo "dlmalloc enabled with $LIB_MALLOC" + esac + +fi + +if test "${use_dlmalloc-unset}" = unset; then + case "$host" in + i386-*-solaris2.*) + echo "Enabling dlmalloc for $host" + use_dlmalloc="yes" + ;; + esac +fi +if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then + # Ok. dlmalloc was enabled before, but state may be changed. + # we have to test these again + unset ac_cv_func_mallinfo + unset ac_cv_func_mallocblksize + unset ac_cv_func_free + unset ac_cv_func_realloc + unset ac_cv_func_memalign + unset ac_cv_func_valloc + unset ac_cv_func_pvalloc + unset ac_cv_func_calloc + unset ac_cv_func_cfree + unset ac_cv_func_malloc_trim + unset ac_cv_func_malloc_usable_size + unset ac_cv_func_malloc_stats + unset ac_cv_func_mallinfo + unset ac_cv_func_mallopt + unset ac_cv_lib_gnumalloc + unset ac_cv_header_gnumalloc_h + unset ac_cv_lib_malloc + unset ac_cv_enabled_dlmalloc +fi +if test "$use_dlmalloc" = yes; then ac_cv_func_mallinfo="yes" ac_cv_func_mallocblksize="no" ac_cv_func_free="yes" @@ -997,35 +985,6 @@ ac_cv_header_gnumalloc_h="no" ac_cv_lib_malloc="no" ac_cv_enabled_dlmalloc="yes" - echo "Use installed dlmalloc." - ;; - esac - -else - - if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then - # Ok. dlmalloc was enabled before, but now disabled. - # we have to test these again - unset ac_cv_func_mallinfo - unset ac_cv_func_mallocblksize - unset ac_cv_func_free - unset ac_cv_func_realloc - unset ac_cv_func_memalign - unset ac_cv_func_valloc - unset ac_cv_func_pvalloc - unset ac_cv_func_calloc - unset ac_cv_func_cfree - unset ac_cv_func_malloc_trim - unset ac_cv_func_malloc_usable_size - unset ac_cv_func_malloc_stats - unset ac_cv_func_mallinfo - unset ac_cv_func_mallopt - unset ac_cv_lib_gnumalloc - unset ac_cv_header_gnumalloc_h - unset ac_cv_lib_malloc - unset ac_cv_enabled_dlmalloc - fi - fi