1
##########################################################################
3
## Script ID: ./configure.ac ##
4
## Author: Mark Grant ##
7
## Autoconfigure script file to configure mget project. ##
9
##########################################################################
11
##########################################################################
15
## Date Author Version Description ##
17
## 16/06/2014 MG 1.0.1 Started versioning of this script. ##
18
## 19/06/2014 MG 1.0.2 Introduce man1 and man5 sub-directories ##
20
## 26/06/2014 MG 1.0.3 Use 'git describe --always' for AC_INIT ##
21
## version as it returns a value as long ##
22
## as there is at least 1 commit, even ##
23
## with no tags. If no commits then ##
24
## 'Pre-Release' is used. ##
25
## 27/08/2014 MG 1.0.4 Change name to mget to avoid package ##
26
## name duplication in Ubuntu. ##
27
## 03/09/2014 MG 1.0.5 Changed to CHECK_PROGS (from PROG) to ##
28
## check for either wget or fetch. Add ##
30
## 28/11/2014 MG 1.0.6 Add getopt processing to allowing for ##
31
## FreeBSD quirk of 2 different getopt ##
32
## programs on PATH. See comments in ##
33
## script at the start of "Main". ##
34
## Structure OS specific requirements to ##
35
## test for generic *BSD OSs and use ##
36
## Linux as the default. ##
37
## 28/11/2014 MG 1.0.7 Add support for passing overall package ##
38
## version to Makefiles. ##
39
## 29/11/2014 MG 1.0.8 Remove redundant hashpling. ##
40
## 01/12/2014 MG 1.0.9 Add check for the wutconv line ending ##
42
## 01/12/2014 MG 1.0.10 Remove awk check following use of ##
44
## 26/06/2015 MG 1.0.11 Remove BSD support. ##
46
##########################################################################
49
AC_INIT([Multiple File Download], m4_esyscmd([git describe --always 1>/dev/null 2>/dev/null && git describe --always | tr -d '\n' || echo 'Pre-Release' | tr -d '\n']), [m.grant.prg@gmail.com], [mget])
51
AC_SUBST(pkgversion, m4_esyscmd([git describe --always 1>/dev/null 2>/dev/null && git describe --always | tr -d '\n' || echo 'Pre-Release' | tr -d '\n']))
55
AC_CONFIG_FILES([Makefile
57
src/manpages/man1/Makefile
58
src/manpages/man5/Makefile])
60
# Checks for programs.
62
AC_MSG_NOTICE([checking for required generic programs])
63
AC_CHECK_PROG(BASH, bash, yes, no)
64
if test "x$BASH" = "xno" ; then
65
AC_MSG_ERROR([bash not found])
68
AC_CHECK_PROG(WGET, wget, yes, no)
69
if test "x$WGET" = "xno" ; then
70
AC_MSG_ERROR([wget not found])
73
AC_CHECK_PROG(TXT2MAN, txt2man, yes, no)
74
if test "x$TXT2MAN" = "xno" ; then
75
AC_MSG_ERROR([txt2man not found])
78
AC_CHECK_PROG(WUTCONV, wutconv, yes, no)
79
if test "x$WUTCONV" = "xno" ; then
80
AC_MSG_ERROR([wutconv not found])
83
AC_CHECK_PROG(GETOPT, getopt, yes, no)
84
if test "x$GETOPT" = "xno" ; then
85
AC_MSG_ERROR([getopt not found])
88
# Checks for libraries.
90
# Checks for header files.
92
# Checks for typedefs, structures, and compiler characteristics.
94
# Checks for library functions.