1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
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
|