-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
55 lines (46 loc) · 1.94 KB
/
configure.ac
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
# -*- autoconf -*-
# Process this file with autoconf to produce a configure script.
# TODO: Autotoolize the udev rule to specify configurable crypt name
m4_define([misc-utils-VERSION], [0.1.3])
AC_PREREQ([2.69])
AC_INIT([xxc3nsoredxx Miscellaneous Utilities],
m4_defn([misc-utils-VERSION]),
[https://github.com/xxc3nsoredxx/misc-utils/issues],
[misc-utils])
AC_CONFIG_SRCDIR([snapshots/snapshots.sh.in])
# use --program-transform-name='<sed program>'
# eg. --program-transform-name='s/.sh$//' to remove .sh suffix
AC_ARG_PROGRAM
AC_ARG_WITH([udevdir],
[AS_HELP_STRING([--with-udevdir=DIR],
[udev rules directory [SYSCONFDIR/udev/rules.d]])],
[udevdir="$withval"],
[udevdir='$(sysconfdir)/udev/rules.d'])
AS_CASE(["x$udevdir"],
# Use default if udevdir is "yes" (ie, called with --with-udevdir)
[xyes], [AC_MSG_WARN([no udev rules directory given in --with-udevdir, using default])]
[udevdir='$(sysconfdir)/udev/rules.d'],
# Use default if udevdir is empty (ie, called with --with-udevdir=)
[x], [AC_MSG_WARN([empty udev rules directory given in --with-udevdir, using default])]
[udevdir='$(sysconfdir)/udev/rules.d'],
# Otherwise assume a good path is given
[])
AC_SUBST([udevdir], [$udevdir])
AC_ARG_ENABLE([snapshots],
[AS_HELP_STRING([--enable-snapshots],
[Enables the BTRFS snapshot management scripts])],
[want_snapshots="$enableval"],
[want_snapshots="yes"])
AM_CONDITIONAL([WANT_SNAPSHOTS],
[test "x$want_snapshots" = "xyes"])
AC_SUBST([configdir], ['$(sysconfdir)/misc-utils'])
AC_SUBST([crondir], ['$(sysconfdir)/cron.d'])
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([snapshots/Makefile])
AC_CONFIG_FILES([snapshots/gen_cron.sh], [chmod +x snapshots/gen_cron.sh])
# Warn if nothing is enabled
AS_CASE(["x$want_snapshots"],
[x*yes*], [],
[AC_MSG_WARN([nothing selected for build/install])])
AC_OUTPUT