~m-grant-prg/mget/buster

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Mark Grant
  • Date: 2019-09-04 12:54:13 UTC
  • mfrom: (1.1.11)
  • Revision ID: m.grant.prg@gmail.com-20190904125413-gtwug6b4bs5x8mss
Merge new upstream development release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#########################################################################
2
2
#                                                                       #
3
3
# Script ID: ./configure.ac                                             #
4
 
# Author: Copyright (C) 2013-2018  Mark Grant                           #
 
4
# Author: Copyright (C) 2013-2019  Mark Grant                           #
5
5
#                                                                       #
6
6
# Released under the GPLv3 only.                                        #
7
7
# SPDX-License-Identifier: GPL-3.0                                      #
10
10
# AutoConf script file to configure mget project.                       #
11
11
#                                                                       #
12
12
# configure cmd line syntax:-                                           #
13
 
#               ./configure                                             #
 
13
# ./configure                                                           #
 
14
#                                                                       #
 
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                                  #
14
32
#                                                                       #
15
33
#########################################################################
16
34
 
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   #
 
94
#                               string.                                 #
74
95
#                                                                       #
75
96
#########################################################################
76
97
 
77
 
AC_REVISION([$Revision: 1.0.16 $])
 
98
 
 
99
#########################################
 
100
#                                       #
 
101
# SECTION  1: Initialisation & Setup    #
 
102
#                                       #
 
103
#########################################
 
104
 
 
105
AC_REVISION([$Revision: 1.1.0 $])
78
106
 
79
107
AC_PREREQ([2.69])
80
108
 
81
 
 
82
 
########################
83
109
#
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.
87
113
#
88
 
########################
 
114
AC_INIT(Multiple File Download, 1.1.14+rc1, m.grant.prg@gmail.com, mget)
89
115
 
90
 
AC_INIT(Multiple File Download, v1.1.14, m.grant.prg@gmail.com, mget)
 
116
AC_MSG_NOTICE(initialisation and setup)
91
117
 
92
118
AC_SUBST(pkgversion, $PACKAGE_VERSION)
93
119
 
94
 
 
95
 
########################
 
120
#
 
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
 
124
#                       gawk
 
125
#
 
126
AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects tar-pax])
 
127
 
 
128
#
 
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
 
133
# e.g.
 
134
# ACLOCAL_AMFLAGS = -I m4 -I m4extra
 
135
#
 
136
AC_CONFIG_MACRO_DIR([m4])
 
137
 
 
138
 
 
139
#########################################
 
140
#                                       #
 
141
# SECTION  5: Check for programs        #
 
142
#                                       #
 
143
#########################################
 
144
 
 
145
AC_MSG_NOTICE(checking for basic programs that have AutoConf checks)
 
146
 
 
147
#
 
148
# The small set of tools you can expect to find on any machine.
 
149
#
 
150
# awk           date            grep            od
 
151
# basename      diff            join            rm
 
152
# cat           dirname         ln              rmdir
 
153
# cc            egrep           ls              sed
 
154
# chgrp         expr            mkdir           sleep
 
155
# chown         expr (‘|’)      mkfifo          sort
 
156
# chmod         expr (‘:’)      mknod           tar
 
157
# cmp           fgrep           mktemp          touch
 
158
# cp            find            mv              tr
 
159
#
 
160
# (For further information including limitations to the above, see Section 11.15
 
161
# in the GNU AutoConf Manual).
 
162
#
 
163
# If using am init automake, gl early or lt init the following programs are
 
164
# automatically checked:-
 
165
#
 
166
# am init automake
 
167
#       BSD install     mkdir -p        gawk
 
168
#
 
169
# gl early
 
170
#       ar      grep    egrep   ranlib
 
171
#
 
172
# lt init
 
173
#       fgrep   ranlib  sed
 
174
#
 
175
# Basic and AutoTools program checks.
 
176
#
 
177
AC_PROG_AWK
 
178
AC_PROG_EGREP
 
179
AC_PROG_FGREP
 
180
AC_PROG_GREP
 
181
AC_PROG_LN_S
 
182
AC_PROG_MKDIR_P
 
183
AC_PROG_SED
 
184
 
 
185
AC_MSG_NOTICE(checking for some standard AutoTools required programs)
 
186
AC_PROG_INSTALL
 
187
 
 
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])
 
192
fi
 
193
 
 
194
AC_CHECK_PROG([TXT2MAN], [txt2man], [yes], [no])
 
195
if test "x$TXT2MAN" = "xno" ; then
 
196
        AC_MSG_ERROR([txt2man not found])
 
197
fi
 
198
 
 
199
AC_CHECK_PROG([TXT2MANWRAP], [txt2manwrap], [yes], [no])
 
200
if test "x$TXT2MANWRAP" = "xno" ; then
 
201
        AC_MSG_ERROR([txt2manwrap not found])
 
202
fi
 
203
 
 
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])
 
208
fi
 
209
 
 
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)
 
214
fi
 
215
 
 
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)
 
219
fi
 
220
 
 
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)
 
224
fi
 
225
 
 
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])
 
229
fi
 
230
 
 
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])
 
234
fi
 
235
 
 
236
 
 
237
#################################################
 
238
#                                               #
 
239
# SECTION 14: Additional checks & variables     #
 
240
#                                               #
 
241
#################################################
 
242
 
 
243
AC_MSG_NOTICE(processing additional checks and variables)
 
244
 
96
245
#
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
128
277
#       pkglibdir       ${libdir}/${PACKAGE}
129
278
#       pkglibexecdir   ${libexecdir}/${PACKAGE}
130
279
#
131
 
########################
132
 
 
133
280
AC_SUBST([edit], ["sed \
 
281
                -e 's|@bashlocation[@]|\$(BASH)|g' \
134
282
                -e 's|@pkgversion[@]|\$(pkgversion)|g' \
135
283
                -e 's|@prefix[@]|\$(prefix)|g' \
136
284
                -e 's|@exec_prefix[@]|\$(exec_prefix)|g' \
161
309
                -e 's|@pkglibexecdir[@]|\$(pkglibexecdir)|g'"])
162
310
 
163
311
 
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
167
 
#                       gawk
168
 
AM_INIT_AUTOMAKE([-Wall -Werror subdir-objects tar-pax])
169
 
 
170
 
 
171
 
########################
172
 
#
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
177
 
# e.g.
178
 
# ACLOCAL_AMFLAGS = -I m4 -I m4extra
179
 
#
180
 
########################
181
 
 
182
 
AC_CONFIG_MACRO_DIR([m4])
183
 
 
184
 
 
185
 
########################
186
 
#
187
 
# Checks for programs.
188
 
# If using am init automake, gl early or lt init the following programs are
189
 
# automatically checked:-
190
 
#
191
 
# am init automake
192
 
#       BSD install     mkdir -p        gawk
193
 
#
194
 
# gl early
195
 
#       ar      grep    egrep   ranlib
196
 
#
197
 
# lt init
198
 
#       fgrep   ranlib  sed
199
 
#
200
 
# Particular and generic program checks follow:
201
 
#
202
 
########################
203
 
 
204
 
AC_MSG_NOTICE([checking for particular programs required by this application])
205
 
AC_PROG_SED
206
 
 
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])
211
 
fi
212
 
 
213
 
AC_CHECK_PROG([BASH], [bash], [yes], [no])
214
 
if test "x$BASH" = "xno" ; then
215
 
        AC_MSG_ERROR([bash not found])
216
 
fi
217
 
 
218
 
AC_CHECK_PROG(WGET, wget, yes, no)
219
 
if test "x$WGET" = "xno" ; then
220
 
        AC_MSG_ERROR([wget not found])
221
 
fi
222
 
 
223
 
AC_CHECK_PROG(WUTCONV, wutconv, yes, no)
224
 
if test "x$WUTCONV" = "xno" ; then
225
 
        AC_MSG_ERROR([wutconv not found])
226
 
fi
227
 
 
228
 
AC_CHECK_PROG([TXT2MAN], [txt2man], [yes], [no])
229
 
if test "x$TXT2MAN" = "xno" ; then
230
 
        AC_MSG_ERROR([txt2man not found])
231
 
fi
232
 
 
233
 
AC_CHECK_PROG([TXT2MANWRAP], [txt2manwrap], [yes], [no])
234
 
if test "x$TXT2MANWRAP" = "xno" ; then
235
 
        AC_MSG_ERROR([txt2manwrap not found])
236
 
fi
237
 
 
238
 
 
239
 
# Checks for libraries.
240
 
 
241
 
# Checks for C header files.
242
 
 
243
 
# Checks for C++ header files.
244
 
 
245
 
# Checks for typedefs, structures, and compiler characteristics.
246
 
 
247
 
# Checks for library functions.
248
 
 
249
 
# Checks for pkg-config files.
 
312
#########################################
 
313
#                                       #
 
314
# SECTION 15: Specify the output files  #
 
315
#                                       #
 
316
#########################################
 
317
 
 
318
AC_MSG_NOTICE(processing output files)
 
319
 
 
320
#
 
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.
 
325
#
250
326
 
251
327
# Project Makefiles to create.
252
328
AC_CONFIG_FILES([Makefile
255
331
                 src/man/5/Makefile])
256
332
 
257
333
AC_OUTPUT
 
334