summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 79ae46c8cd4be6eac6e11be881b22d38a6b140c9 (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
AC_INIT([initd-tools],[0.1.1],[dbn.lists@gmail.com])
AC_CONFIG_AUX_DIR([auto])
AM_INIT_AUTOMAKE

dnl Substituted in manpages
RELDATE='31 Aug 2008'
AC_SUBST([RELDATE])

AC_CONFIG_HEADERS([config.h])
AC_GNU_SOURCE

AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [:])
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [:])
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])
AC_PROG_LIBTOOL
AC_PROG_LN_S

if test "x$GCC" = xyes; then
	CFLAGS="$CFLAGS -Wall"
fi

AC_ARG_ENABLE([werror],
	[AS_HELP_STRING([--enable-werror],
	[Error on compiler warnings @<:@default=no@:>@])],,
	[enable_werror=no]
)

if test "x$enable_werror" != xno; then
	if test "x$GCC" = xyes; then
		CFLAGS="$CFLAGS -Werror"
	fi
fi

# want programs in /usr/lib/lsb by default
AC_PREFIX_DEFAULT([/usr])

AC_ARG_WITH([initddir],
	[AS_HELP_STRING([--with-initddir=DIR],
	[Set the default initd directory @<:@/etc/init.d@:>@])],
	[initddir="$withval"],
	[initddir=/etc/init.d]
)
AC_DEFINE_UNQUOTED([DEF_INITD_DIR], ["$initddir"],
	[Default init.d directory])
AC_SUBST([DEF_INITD_DIR], ["$initddir"])

AC_ARG_WITH([initdlibdir],
	[AS_HELP_STRING([--with-initdlibdir=DIR],
	[Set the default initd libdir @<:@${exec_prefix}/lib/lsb@:>@])],
	[libinitddir="$withval"],
	[libinitddir='${exec_prefix}/lib/lsb']
)
AC_SUBST([libinitddir])

AC_CONFIG_FILES([
Makefile
lib/Makefile
src/Makefile
src/install_initd.8
src/remove_initd.8
test/Makefile
])

AC_CONFIG_COMMANDS([mode],[
chmod +x $srcdir/test/tparse.sh $srcdir/test/tparse-dir.sh
])

AC_OUTPUT