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

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/initd by default
AC_PREFIX_DEFAULT([/usr])

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

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

dnl Substituted in manpages
RELDATE=`${DATE-date} -u +'%d %b %Y' 2>/dev/null`
AC_SUBST([RELDATE])

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