10
10
# Autoconfigure script file to configure agmaint project. #
12
# configure cmd line syntax: ./configure #
12
# configure cmd line syntax:- #
15
# Layout: (Only relevant sections will exist). #
16
# ChangeLog : High level ChangeLog #
17
# SECTION 1: Initialisation & Setup #
18
# SECTION 2: Architecture, target and host checks #
19
# SECTION 3: Command line arguments #
20
# SECTION 4: Compiler setup #
21
# SECTION 5: Check for programs #
22
# SECTION 6: Check for libraries #
23
# SECTION 7: Check for header files #
24
# SECTION 8: Check for types #
25
# SECTION 9: Check for structures #
26
# SECTION 10: Check for compiler characteristics #
27
# SECTION 11: Check for library functions #
28
# SECTION 12: Check for pkg-config files #
29
# SECTION 13: Check for system services #
30
# SECTION 14: Additional checks & variables #
31
# SECTION 15: Specify the output files #
15
33
#########################################################################
54
72
# Because of this, other packaging should #
55
73
# probably use the source tarball rather #
56
74
# than a dist tarball. #
75
# 22/09/2019 MG 1.1.0 Re-vamp to new standard layout. #
76
# Remove v from package version string. #
58
78
#########################################################################
60
AC_REVISION([$Revision: 1.0.11 $])
81
#########################################
83
# SECTION 1: Initialisation & Setup #
85
#########################################
87
AC_REVISION([$Revision: 1.1.0 $])
65
########################
67
92
# The package version in ac init will be used to create an output variable which
68
93
# can be used by ac output and / or the sed setup below to substitute bookmarks
71
########################
73
AC_INIT(apt-get Maintenance Commands Script, v1.0.21,
96
AC_INIT(apt-get Maintenance Commands Script, 1.0.21+rc1,
74
97
m.grant.prg@gmail.com, agmaint)
99
AC_MSG_NOTICE(initialisation and setup)
76
101
AC_SUBST(pkgversion, $PACKAGE_VERSION)
79
########################
104
# Passes the options to all am files. Puts objects in the sub-directory
105
# containing the source. Forces tar to use --format=posix in make dist.
106
# This also checks :- BSD install make variable set mkdir -p
109
AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects tar-pax])
112
# Standard macros will be automatically placed in m4.
113
# Programmer defined macros should be placed in, say, m4extra which allows us
114
# to exclude the standard macros from being git tracked. This other directory
115
# must be specified as an include option in the Makefile.am ACLOCAL_AMFLAGS
117
# ACLOCAL_AMFLAGS = -I m4 -I m4extra
119
AC_CONFIG_MACRO_DIR([m4])
122
#########################################
124
# SECTION 5: Check for programs #
126
#########################################
128
AC_MSG_NOTICE(checking for basic programs that have AutoConf checks)
131
# The small set of tools you can expect to find on any machine.
134
# basename diff join rm
135
# cat dirname ln rmdir
137
# chgrp expr mkdir sleep
138
# chown expr (‘|’) mkfifo sort
139
# chmod expr (‘:’) mknod tar
140
# cmp fgrep mktemp touch
143
# (For further information including limitations to the above, see Section 11.15
144
# in the GNU AutoConf Manual).
146
# If using am init automake, gl early or lt init the following programs are
147
# automatically checked:-
150
# BSD install mkdir -p gawk
153
# ar grep egrep ranlib
158
# Basic and AutoTools program checks.
168
AC_MSG_NOTICE(checking for some standard AutoTools required programs)
171
AC_MSG_NOTICE(checking for particular programs required by this build)
172
AC_CHECK_PROG([TAR], [tar], [yes], [no])
173
if test "x$TAR" = "xno" ; then
174
AC_MSG_ERROR([tar not found])
177
AC_CHECK_PROG([TXT2MAN], [txt2man], [yes], [no])
178
if test "x$TXT2MAN" = "xno" ; then
179
AC_MSG_ERROR([txt2man not found])
182
AC_CHECK_PROG([TXT2MANWRAP], [txt2manwrap], [yes], [no])
183
if test "x$TXT2MANWRAP" = "xno" ; then
184
AC_MSG_ERROR([txt2manwrap not found])
187
AC_MSG_NOTICE(checking for particular programs required at build and run time)
188
AC_PATH_PROG([BASH], [bash], [no])
189
if test "x$BASH" = "xno" ; then
190
AC_MSG_ERROR([bash not found])
193
AC_MSG_NOTICE(checking for particular programs required at run time)
194
AC_CHECK_PROG(ECHO, echo, yes, no)
195
if test "x$ECHO" = "xno" ; then
196
AC_MSG_WARN(echo not found - needed at run time)
199
AC_CHECK_PROG(PRINTF, printf, yes, no)
200
if test "x$PRINTF" = "xno" ; then
201
AC_MSG_WARN(printf not found - needed at run time)
204
AC_CHECK_PROG([GETOPT], [getopt], [yes], [no])
205
if test "x$GETOPT" = "xno" ; then
206
AC_MSG_WARN(getopt not found - needed at run time)
209
AC_CHECK_PROG(APT_GET, apt-get, yes, no)
210
if test "x$APT_GET" = "xno" ; then
211
AC_MSG_WARN([apt-get not found])
215
#################################################
217
# SECTION 14: Additional checks & variables #
219
#################################################
221
AC_MSG_NOTICE(processing additional checks and variables)
81
224
# Now set up a sed sequence to substitute bookmarks in script files with either
82
225
# standard GNU Directory Variables, or with programmer-defined variables set up
145
287
-e 's|@pkglibexecdir[@]|\$(pkglibexecdir)|g'"])
148
# Passes the options to all am files. Puts objects in the sub-directory
149
# containing the source. Forces tar to use --format=posix in make dist.
150
# This also checks :- BSD install make variable set mkdir -p
152
AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects tar-pax])
155
########################
157
# Standard macros will be automatically placed in m4.
158
# Programmer defined macros should be placed in, say, m4extra which allows us
159
# to exclude the standard macros from being git tracked. This other directory
160
# must be specified as an include option in the Makefile.am ACLOCAL_AMFLAGS
162
# ACLOCAL_AMFLAGS = -I m4 -I m4extra
164
########################
166
AC_CONFIG_MACRO_DIR([m4])
169
########################
171
# Checks for programs.
172
# If using am init automake, gl early or lt init the following programs are
173
# automatically checked:-
176
# BSD install mkdir -p gawk
179
# ar grep egrep ranlib
184
# Particular and generic program checks follow:
186
########################
188
AC_MSG_NOTICE([checking for particular programs required by this application])
191
AC_MSG_NOTICE([checking for generic programs required by this application])
192
AC_CHECK_PROG([TAR], [tar], [yes], [no])
193
if test "x$TAR" = "xno" ; then
194
AC_MSG_ERROR([tar not found])
197
AC_CHECK_PROG(APT_GET, apt-get, yes, no)
198
if test "x$APT_GET" = "xno" ; then
199
AC_MSG_ERROR([apt-get not found])
202
AC_CHECK_PROG([GETOPT], [getopt], [yes], [no])
203
if test "x$GETOPT" = "xno" ; then
204
AC_MSG_ERROR([getopt not found])
207
AC_CHECK_PROG([BASH], [bash], [yes], [no])
208
if test "x$BASH" = "xno" ; then
209
AC_MSG_ERROR([bash not found])
212
AC_CHECK_PROG([TXT2MAN], [txt2man], [yes], [no])
213
if test "x$TXT2MAN" = "xno" ; then
214
AC_MSG_ERROR([txt2man not found])
217
AC_CHECK_PROG([TXT2MANWRAP], [txt2manwrap], [yes], [no])
218
if test "x$TXT2MANWRAP" = "xno" ; then
219
AC_MSG_ERROR([txt2manwrap not found])
222
# Checks for libraries.
224
# Checks for C header files.
226
# Checks for C++ header files.
228
# Checks for typedefs, structures, and compiler characteristics.
230
# Checks for library functions.
232
# Checks for pkg-config files.
290
#########################################
292
# SECTION 15: Specify the output files #
294
#########################################
296
AC_MSG_NOTICE(processing output files)
299
# Non-Makefile files to generate.
300
# AC_CONFIG_FILES should not be used to substitute AutoConf Installation
301
# Directory Variables, (bindir and friends), except in Makefiles and pkg-config
302
# files. See GNU AutoConf manual section 4.8.2 Installation Directory Variables.
234
305
# Project Makefiles to create.
235
306
AC_CONFIG_FILES([Makefile