10
10
# AutoConf script file to configure mget project. #
12
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
#########################################################################
71
89
# Because of this, other packaging should #
72
90
# probably use the source tarball rather #
73
91
# than a dist tarball. #
92
# 02/09/2019 MG 1.1.0 Revamp to new standard format. #
93
# Remove leading v from package version #
75
96
#########################################################################
77
AC_REVISION([$Revision: 1.0.16 $])
99
#########################################
101
# SECTION 1: Initialisation & Setup #
103
#########################################
105
AC_REVISION([$Revision: 1.1.0 $])
82
########################
84
110
# The package version in ac init will be used to create an output variable which
85
111
# can be used by ac output and / or the sed setup below to substitute bookmarks
86
112
# in source files.
88
########################
114
AC_INIT(Multiple File Download, 1.1.14+rc1, m.grant.prg@gmail.com, mget)
90
AC_INIT(Multiple File Download, v1.1.14, m.grant.prg@gmail.com, mget)
116
AC_MSG_NOTICE(initialisation and setup)
92
118
AC_SUBST(pkgversion, $PACKAGE_VERSION)
95
########################
121
# Passes the options to all am files. Puts objects in the sub-directory
122
# containing the source. Forces tar to use --format=posix in make dist.
123
# This also checks :- BSD install make variable set mkdir -p
126
AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects tar-pax])
129
# Standard macros will be automatically placed in m4.
130
# Programmer defined macros should be placed in, say, m4extra which allows us
131
# to exclude the standard macros from being git tracked. This other directory
132
# must be specified as an include option in the Makefile.am ACLOCAL_AMFLAGS
134
# ACLOCAL_AMFLAGS = -I m4 -I m4extra
136
AC_CONFIG_MACRO_DIR([m4])
139
#########################################
141
# SECTION 5: Check for programs #
143
#########################################
145
AC_MSG_NOTICE(checking for basic programs that have AutoConf checks)
148
# The small set of tools you can expect to find on any machine.
151
# basename diff join rm
152
# cat dirname ln rmdir
154
# chgrp expr mkdir sleep
155
# chown expr (‘|’) mkfifo sort
156
# chmod expr (‘:’) mknod tar
157
# cmp fgrep mktemp touch
160
# (For further information including limitations to the above, see Section 11.15
161
# in the GNU AutoConf Manual).
163
# If using am init automake, gl early or lt init the following programs are
164
# automatically checked:-
167
# BSD install mkdir -p gawk
170
# ar grep egrep ranlib
175
# Basic and AutoTools program checks.
185
AC_MSG_NOTICE(checking for some standard AutoTools required programs)
188
AC_MSG_NOTICE(checking for particular programs required by this build)
189
AC_CHECK_PROG([TAR], [tar], [yes], [no])
190
if test "x$TAR" = "xno" ; then
191
AC_MSG_ERROR([tar not found])
194
AC_CHECK_PROG([TXT2MAN], [txt2man], [yes], [no])
195
if test "x$TXT2MAN" = "xno" ; then
196
AC_MSG_ERROR([txt2man not found])
199
AC_CHECK_PROG([TXT2MANWRAP], [txt2manwrap], [yes], [no])
200
if test "x$TXT2MANWRAP" = "xno" ; then
201
AC_MSG_ERROR([txt2manwrap not found])
204
AC_MSG_NOTICE(checking for particular programs required at build and run time)
205
AC_PATH_PROG([BASH], [bash], [no])
206
if test "x$BASH" = "xno" ; then
207
AC_MSG_ERROR([bash not found])
210
AC_MSG_NOTICE(checking for particular programs required at run time)
211
AC_CHECK_PROG(ECHO, echo, yes, no)
212
if test "x$ECHO" = "xno" ; then
213
AC_MSG_WARN(echo not found - needed at run time)
216
AC_CHECK_PROG(PRINTF, printf, yes, no)
217
if test "x$PRINTF" = "xno" ; then
218
AC_MSG_WARN(printf not found - needed at run time)
221
AC_CHECK_PROG([GETOPT], [getopt], [yes], [no])
222
if test "x$GETOPT" = "xno" ; then
223
AC_MSG_WARN(getopt not found - needed at run time)
226
AC_CHECK_PROG(WGET, wget, yes, no)
227
if test "x$WGET" = "xno" ; then
228
AC_MSG_WARN([wget not found - needed at run time])
231
AC_CHECK_PROG(WUTCONV, wutconv, yes, no)
232
if test "x$WUTCONV" = "xno" ; then
233
AC_MSG_WARN([wutconv not found - needed at run time])
237
#################################################
239
# SECTION 14: Additional checks & variables #
241
#################################################
243
AC_MSG_NOTICE(processing additional checks and variables)
97
246
# Now set up a sed sequence to substitute bookmarks in script files with either
98
247
# standard GNU Directory Variables, or with programmer-defined variables set up
161
309
-e 's|@pkglibexecdir[@]|\$(pkglibexecdir)|g'"])
164
# Passes the options to all am files. Puts objects in the sub-directory
165
# containing the source. Forces tar to use --format=posix in make dist.
166
# This also checks :- BSD install make variable set mkdir -p
168
AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects tar-pax])
171
########################
173
# Standard macros will be automatically placed in m4.
174
# Programmer defined macros should be placed in, say, m4extra which allows us
175
# to exclude the standard macros from being git tracked. This other directory
176
# must be specified as an include option in the Makefile.am ACLOCAL_AMFLAGS
178
# ACLOCAL_AMFLAGS = -I m4 -I m4extra
180
########################
182
AC_CONFIG_MACRO_DIR([m4])
185
########################
187
# Checks for programs.
188
# If using am init automake, gl early or lt init the following programs are
189
# automatically checked:-
192
# BSD install mkdir -p gawk
195
# ar grep egrep ranlib
200
# Particular and generic program checks follow:
202
########################
204
AC_MSG_NOTICE([checking for particular programs required by this application])
207
AC_MSG_NOTICE([checking for generic programs required by this application])
208
AC_CHECK_PROG([GETOPT], [getopt], [yes], [no])
209
if test "x$GETOPT" = "xno" ; then
210
AC_MSG_ERROR([getopt not found])
213
AC_CHECK_PROG([BASH], [bash], [yes], [no])
214
if test "x$BASH" = "xno" ; then
215
AC_MSG_ERROR([bash not found])
218
AC_CHECK_PROG(WGET, wget, yes, no)
219
if test "x$WGET" = "xno" ; then
220
AC_MSG_ERROR([wget not found])
223
AC_CHECK_PROG(WUTCONV, wutconv, yes, no)
224
if test "x$WUTCONV" = "xno" ; then
225
AC_MSG_ERROR([wutconv not found])
228
AC_CHECK_PROG([TXT2MAN], [txt2man], [yes], [no])
229
if test "x$TXT2MAN" = "xno" ; then
230
AC_MSG_ERROR([txt2man not found])
233
AC_CHECK_PROG([TXT2MANWRAP], [txt2manwrap], [yes], [no])
234
if test "x$TXT2MANWRAP" = "xno" ; then
235
AC_MSG_ERROR([txt2manwrap not found])
239
# Checks for libraries.
241
# Checks for C header files.
243
# Checks for C++ header files.
245
# Checks for typedefs, structures, and compiler characteristics.
247
# Checks for library functions.
249
# Checks for pkg-config files.
312
#########################################
314
# SECTION 15: Specify the output files #
316
#########################################
318
AC_MSG_NOTICE(processing output files)
321
# Non-Makefile files to generate.
322
# AC_CONFIG_FILES should not be used to substitute AutoConf Installation
323
# Directory Variables, (bindir and friends), except in Makefiles and pkg-config
324
# files. See GNU AutoConf manual section 4.8.2 Installation Directory Variables.
251
327
# Project Makefiles to create.
252
328
AC_CONFIG_FILES([Makefile