File: acinclude.m4

package info (click to toggle)
cryptsetup 2%3A1.0.6-7
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,644 kB
  • ctags: 500
  • sloc: sh: 10,578; ansic: 4,114; xml: 471; makefile: 356; python: 90; perl: 44; sed: 16
file content (53 lines) | stat: -rw-r--r-- 1,331 bytes parent folder | download | duplicates (4)
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
dnl MODULE_HELPER(NAME, HELP, DEFAULT, COMMANDS)
AC_DEFUN([MODULE_HELPER],[
	unset have_module
	AC_ARG_ENABLE([$1], [$2],,[
		if test "x${enable_all}" = "xdefault"; then
			enable_[$1]=[$3]
		else
			enable_[$1]="${enable_all}"
		fi
	])
	if test "x${enable_[$1]}" != "xno"; then
		$4
		AC_MSG_CHECKING([whether to build $1 module])
		if test -n "${have_module+set}"; then
			if test "x${enable_[$1]}" = "xauto"; then
				if test "x${enable_plugins}" != "xno"; then
					AC_MSG_RESULT([yes, as plugin]) 
					build_static=no
					build_shared=yes
				else
					AC_MSG_RESULT([yes]) 
					build_static=yes
					build_shared=no
				fi
			elif test "x${enable_[$1]}" = "xshared"; then
				if test "x${enable_plugins}" != "xno"; then
					AC_MSG_RESULT([yes, as plugin]) 
					build_static=no
					build_shared=yes
				else
					AC_MSG_RESULT([no]) 
					AC_MSG_ERROR([Can't build [$1] module, plugins are disabled])
				fi
			else
				AC_MSG_RESULT([yes]) 
				build_static=yes
				build_shared=no
			fi
		elif test "x${enable_[$1]}" != "xauto"; then
			AC_MSG_RESULT([no]) 
			AC_MSG_ERROR([Unable to build $1 plugin, see messages above])
		else	
			AC_MSG_RESULT([no]) 
			build_static=no
			build_shared=no
		fi
	else
		AC_MSG_CHECKING([whether to build $1 module])
		AC_MSG_RESULT([no]) 
		build_static=no
		build_shared=no
	fi
])