diff -Naur varnish-3.0.4.orig/configure.ac varnish-3.0.4/configure.ac --- varnish-3.0.4.orig/configure.ac 2013-06-14 04:39:32.000000000 -0400 +++ varnish-3.0.4/configure.ac 2013-06-15 23:51:51.000000000 -0400 @@ -87,15 +87,20 @@ save_LIBS="${LIBS}" LIBS="" -AC_SEARCH_LIBS(initscr, [curses ncurses], - [have_curses=yes], [have_curses=no]) -CURSES_LIBS="${LIBS}" -LIBS="${save_LIBS}" -AC_SUBST(CURSES_LIBS) -if test "$have_curses" = no; then - AC_MSG_WARN([curses not found; some tools will not be built]) -fi -AC_CHECK_HEADERS([ncurses/curses.h curses.h]) +AC_ARG_WITH([tools], AS_HELP_STRING([--without-tools], + [Don't build additional tools: varnishhist, varnishstat, varnishtop, varnishsizes (default: test)])) + +AS_IF([test "x$with_tools" != "xno"], [ + AC_SEARCH_LIBS(initscr, [curses ncurses], + [have_curses=yes], [have_curses=no]) + CURSES_LIBS="${LIBS}" + LIBS="${save_LIBS}" + AC_SUBST(CURSES_LIBS) + if test "$have_curses" = no; then + AC_MSG_ERROR([curses not found, required to build additional tools]) + fi + AC_CHECK_HEADERS([ncurses/curses.h curses.h]) +]) AM_CONDITIONAL([HAVE_CURSES], [test x$have_curses = xyes]) save_LIBS="${LIBS}" @@ -266,7 +271,6 @@ CFLAGS="${save_CFLAGS}" # Use jemalloc on Linux -JEMALLOC_SUBDIR= JEMALLOC_LDADD= AC_ARG_WITH([jemalloc], [AS_HELP_STRING([--with-jemalloc], @@ -274,18 +278,13 @@ [], [with_jemalloc=check]) -case $target in - *-*-linux*) - if test "x$with_jemalloc" != xno; then - AC_CHECK_LIB([jemalloc], [malloc_conf], +if test "x$with_jemalloc" != xno; then + AC_CHECK_LIB([jemalloc], [malloc_conf], + [JEMALLOC_LDADD="-ljemalloc"], + [AC_CHECK_LIB([jemalloc], [jmalloc_conf], [JEMALLOC_LDADD="-ljemalloc"], - [AC_MSG_NOTICE([No system jemalloc found, using bundled version]) - JEMALLOC_SUBDIR=libjemalloc - JEMALLOC_LDADD='$(top_builddir)/lib/libjemalloc/libjemalloc_mt.la']) - fi - ;; -esac -AC_SUBST(JEMALLOC_SUBDIR) + [AC_MSG_ERROR([No system jemalloc found])])]) +fi AC_SUBST(JEMALLOC_LDADD) # Userland slab allocator, available only on Solaris @@ -588,7 +587,6 @@ lib/libvcl/Makefile lib/libvgz/Makefile lib/libvmod_std/Makefile - lib/libjemalloc/Makefile man/Makefile redhat/Makefile varnishapi.pc --- varnish-3.0.4.orig/lib/Makefile.am 2013-06-14 04:39:32.000000000 -0400 +++ varnish-3.0.4/lib/Makefile.am 2013-06-15 23:51:08.000000000 -0400 @@ -6,14 +6,12 @@ libvarnishapi \ libvcl \ libvgz \ - libvmod_std \ - @JEMALLOC_SUBDIR@ + libvmod_std -DIST_SUBDIRS = \ +DIST_SUBDIRS = \ libvarnishcompat \ libvarnish \ libvarnishapi \ libvcl \ libvgz \ - libvmod_std \ - libjemalloc + libvmod_std