summaryrefslogtreecommitdiff
blob: 389831b46ff4f41144008ae57fbef40769e287c4 (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
diff -urN pm-utils-1.3.0.old//configure.ac pm-utils-1.3.0/configure.ac
--- pm-utils-1.3.0.old//configure.ac	2010-03-15 04:44:45.000000000 +0100
+++ pm-utils-1.3.0/configure.ac	2010-04-04 17:00:13.000000000 +0200
@@ -8,28 +8,28 @@
 AC_PROG_LN_S
 
 dnl ---------------------------------------------------------------------------
-dnl - Extra verbose warning switches
-dnl ---------------------------------------------------------------------------
-CPPFLAGS="$CPPFLAGS -Wall -Werror"
-
-dnl ---------------------------------------------------------------------------
-dnl - Debugging switches
-dnl ---------------------------------------------------------------------------
-CPPFLAGS="$CPPFLAGS -g"
-
-dnl ---------------------------------------------------------------------------
 dnl - Manual page build
 dnl ---------------------------------------------------------------------------
-AC_PATH_PROG(XMLTO, xmlto, no)
-AM_CONDITIONAL(HAVE_XMLTO, [test "x$XMLTO" != xno])
-
-dnl ---------------------------------------------------------------------------
-dnl - Make paths available for source files
-dnl ---------------------------------------------------------------------------
-AC_SUBST(SYSCONFDIR, $sysconfdir)
-AC_SUBST(DATADIR, $datadir)
-AC_SUBST(BINDIR, $bindir)
-AC_SUBST(SBINDIR, $sbindir)
+AC_ARG_ENABLE([doc],
+	AC_HELP_STRING([--disable-docs],
+		[Disable manpage generating via xmlto [[default=auto]]]),
+	[MAN="$enableval"],
+	[MAN=auto])
+	AC_PATH_PROG(XMLTO, xmlto, no)
+	AS_IF([test "x$MAN" = "xyes"],
+	[
+		AS_IF([test "x$XMLTO" != "xyes"],
+			[AC_MSG_ERROR([Manpage generating requested but xmlto not found.])
+		])
+	],
+	[test "x${MAN}" != "xno"],
+	[
+		AS_IF([test "x$XMLTO" = "xyes"],
+			[MAN="yes"],
+			[MAN="no"])
+	])
+AM_CONDITIONAL(HAVE_XMLTO, [test "x$MAN" != xno])
+AC_MSG_RESULT([checking whether to build manpages... $MAN])
 
 dnl ---------------------------------------------------------------------------
 dnl - Makefiles, etc.