summaryrefslogtreecommitdiff
blob: 38a1fc7f6a1adaf1e55b09522dc4a06a93722d6f (plain)
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
95
96
97
98
99
100
101
Index: apachetop-0.12.6/configure.ac
===================================================================
--- apachetop-0.12.6.orig/configure.ac
+++ apachetop-0.12.6/configure.ac
@@ -52,48 +52,60 @@ AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([inet_aton memset strchr strdup kqueue strerror strstr])
 
 # pcre {{{
-AC_ARG_WITH(pcre,
-	[  --with-pcre=<path>      prefix of pcre installation (eg /usr/local)],
-	[
-		CPPFLAGS="$CPPFLAGS -I $withval/include"
-		LDFLAGS="$LDFLAGS -L $withval/lib"
-	]
-)
-
-AC_CHECK_HEADERS(pcre.h,
-	AC_SEARCH_LIBS([pcre_compile], [pcre]) ,
-	AC_MSG_WARN([*** pcre.h not found -- consider using --with-pcre])
-)
+AC_ARG_WITH([pcre],
+			[  --with-pcre=<path>      prefix of pcre installation (eg /usr/local)],
+			[case "${withval}" in
+			  yes) with_pcre="/usr";;
+			  no)  with_pcre="no";;
+			  *)   with_pcre="/usr";;
+			 esac],
+			 [with_pcre="/usr"])
+
+if test x$with_pcre != xno; then
+	CPPFLAGS="$CPPFLAGS -I $withval/include"
+	LDFLAGS="$LDFLAGS -L $withval/lib"
+	AC_CHECK_HEADERS(pcre.h,
+					 AC_SEARCH_LIBS([pcre_compile], [pcre]),
+					 AC_MSG_WARN([*** pcre.h not found -- consider using --with-pcre]))
+fi
 # }}}
 
 # fam {{{
-AC_ARG_WITH(fam,
-	[  --with-fam=<path>      prefix of fam installation (eg /usr/local)],
-	[
-		CPPFLAGS="$CPPFLAGS -I $withval/include"
-		LDFLAGS="$LDFLAGS -L $withval/lib"
-	]
-)
-
-AC_CHECK_HEADERS(fam.h,
-	AC_SEARCH_LIBS([FAMOpen], [fam]) ,
-	AC_MSG_WARN([*** fam.h not found -- consider using --with-fam])
-)
+AC_ARG_WITH([fam],
+			[  --with-fam=<path>      prefix of fam installation (eg /usr/local)],
+			[case "${withval}" in
+			  yes) with_fam="/usr";;
+			  no)  with_fam="no";;
+			  *)   with_fam="/usr";;
+			 esac],
+			 [with_fam="/usr"])
+
+if test x$with_fam != xno; then
+	CPPFLAGS="$CPPFLAGS -I $with_fam/include"
+	LDFLAGS="$LDFLAGS -L $with_fam/lib"
+	AC_CHECK_HEADERS(fam.h,
+					 AC_SEARCH_LIBS([FAMOpen], [fam]),
+					 AC_MSG_WARN([*** fam.h not found -- consider using --with-fam]))
+fi
 # }}}
 
 # adns {{{
-AC_ARG_WITH(adns,
-	[  --with-adns=<path>     prefix of adns installation (eg /usr/local)],
-	[
-		CPPFLAGS="$CPPFLAGS -I $withval/include"
-		LDFLAGS="$LDFLAGS -L $withval/lib"
-	]
-)
-
-AC_CHECK_HEADERS(adns.h,
-	AC_SEARCH_LIBS([adns_submit], [adns]) ,
-	AC_MSG_WARN([*** adns.h not found -- consider using --with-adns])
-)
+AC_ARG_WITH([adns],
+			[  --with-adns=<path>     prefix of adns installation (eg /usr/local)],
+			[case "${withval}" in
+			  yes) with_adns="/usr";;
+			  no)  with_adns="no";;
+			  *)   with_adns="/usr";;
+			 esac],
+			 [with_adns="/usr"])
+
+if test x$with_adns != xno; then
+	CPPFLAGS="$CPPFLAGS -I $with_adns/include"
+	LDFLAGS="$LDFLAGS -L $with_adns/lib"
+	AC_CHECK_HEADERS(adns.h,
+					 AC_SEARCH_LIBS([adns_submit], [adns]),
+					 AC_MSG_WARN([*** adns.h not found -- consider using --with-adns]))
+fi
 # }}}
 
 # --with-logfile {{{