-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
95 lines (79 loc) · 2.73 KB
/
Copy pathconfigure.ac
File metadata and controls
95 lines (79 loc) · 2.73 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Copyright 2018 Gary Greene
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
AC_INIT([motherd], [0.1], [https://github.com/AltimatOS/motherd/issues])
AC_PREREQ([2.59])
AC_CONFIG_AUX_DIR(configlib)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(1.9)
AC_PATH_PROG(PERL, perl, no)
AC_PATH_PROG(SED, sed, no)
AC_PATH_PROG(RM, rm, no)
AC_PATH_PROG(RMDIR, rmdir, no)
AC_PATH_PROG(FIND, find, no)
AC_PATH_PROG(TELNET, telnet, no)
AC_PATH_PROG(SSH, ssh, no)
AC_ARG_ENABLE(pkgonly, [AC_HELP_STRING([--enable-pkgonly], [Skip all checking])])
AC_SUBST(enable_pkgonly)
perllibdirs="\'\${perllibdir}\'"
PERLOPTS=
AC_ARG_VAR(PERLINC, [[] Additional space-separated Perl library paths])
if test ! -z "$PERLINC"; then
for d in $PERLINC; do
PERLOPTS="${PERLOPTS} -I${d}"
perllibdirs=${perllibdirs}"\,\'"${d}"\'"
done
fi
AC_SUBST(perllibdirs, [${perllibdirs}])
# Check the necessary Perl modules
if test "$enable_pkgonly" != yes; then
for module in 'Config::Tiny' 'Config::Any' 'Log::Handler' \
'Expect' 'Date::Format' 'XML::LibXML' 'JSON' 'DBI' \
'Net::SNMP' 'Digest::MD5'
do
AC_MSG_CHECKING([presence of $module])
if ${PERL} ${PERLOPTS} -e 'use '$module 2>/dev/null; then
AC_MSG_RESULT([Ok])
else
AC_MSG_ERROR([Perl cannot find $module]);
fi
done
fi
AC_ARG_VAR(mansec_usercmd, [[1] User commands man section])
if test -z "$mansec_usercmd"; then
mansec_usercmd='1'
fi
AC_ARG_VAR(mansec_misc, [[7] Miscellaneous man section])
if test -z "$mansec_misc"; then
mansec_misc='7'
fi
AC_ARG_VAR(perllibdir, [[LIBDIR/PACKAGE/perl] Gerty Perl libraries])
if test -z "$perllibdir"; then
perllibdir='${libdir}/${PACKAGE}/perl'
fi
AC_ARG_VAR(pkgdatadir, [[DATADIR/PACKAGE] Gerty data directory])
if test -z "$pkgdatadir"; then
pkgdatadir='${datadir}/${PACKAGE}'
fi
AC_ARG_VAR(plugconfdir, [[PKGDATADIR/plugconf] Plugin configuration directory])
if test -z "$plugconfdir"; then
plugconfdir='${pkgdatadir}/plugconf'
fi
AC_ARG_VAR(devclassdir, [[PKGDATADIR/devclasses] Device classes directory])
if test -z "$devclassdir"; then
devclassdir='${pkgdatadir}/devclasses'
fi
AC_CONFIG_FILES([Makefile sbin/Makefile])
AC_CONFIG_FILES([lib/Makefile share/Makefile])
AC_SUBST(VERSION)
AC_OUTPUT