summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 6bdc349c2f59cafaf40b025c187c2eaf48f503e9 (plain)
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
dnl ============================================================
dnl  Process this file with autoconf to produce
dnl  a configure script.
dnl ============================================================

AC_PREREQ(2.71)dnl           dnl Minimum Autoconf version required.

AC_INIT([jsmin],[0.0.1],
  [support@radix.pro],[jsmin],[http://radix.pro])

AC_JSMIN_HEADLINE([jsmin], [JSmin], [Copyright (c) 2015-2023 Andrey V.Kosteltsev])


dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl $$                                                        $$
dnl $$ PART: Init Automake environment                        $$
dnl $$                                                        $$
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
AC_MSG_CFG_PART(Init Automake environment)

AC_CANONICAL_TARGET

AM_INIT_AUTOMAKE([subdir-objects foreign no-dist-gzip dist-xz tar-pax])

AC_CONFIG_HEADERS([config.h])

AC_PREFIX_DEFAULT(/usr/local)


dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl $$                                                        $$
dnl $$ PART: Test for Build Tools                             $$
dnl $$                                                        $$
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
AC_MSG_CFG_PART(Test for Build Tools)
AC_CHECK_TOOL([GCC], [gcc], [:])


dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl $$                                                        $$
dnl $$ PART: Test for Auxiliary (my be version sensitive)     $$
dnl $$       programs                                         $$
dnl $$                                                        $$
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
AC_MSG_CFG_PART(Test for Auxiliary (my be version sensitive) programs)

dnl ============================================================
dnl  Locate tools( on build machine! ) .
dnl                =================
dnl ============================================================
AC_PATH_PROG_LN_S
AC_SUBST(LN)
AC_SUBST(LN_S)

dnl  Нам нужен исполняемый файл pwd. Встроенный "pwd -P" нас
dnl  не устраивает( из соображений переносимости ) .
AC_PATH_PROG(PWD_P, pwd, no)
if test "$PWD_P" = no; then
   AC_MSG_ERROR(********   A pwd binary could not be found.)
fi

test -n "$aux_missing" && AC_MSG_WARN([
********   These auxiliary programs are missing or too old: $aux_missing
********   some features will be disabled.
********   Check the INSTALL file for required versions.])


dnl 
dnl Remove TAR option '-o' for allow long file names in DIST archive.
dnl Standard tar.m4 from aclocal-1.9 package probvides following
dnl 'am__tar' command:
dnl    ${AMTAR} chof - "$$tardir"
dnl and uses '-chof' options for backward compatibility.
dnl 
am__tar='${AMTAR} chf - "$$tardir"'
AC_SUBST(am__tar)

AC_PATH_PROGS(TAR, tar gtar, no, /usr/local/bin:/usr/bin:/bin:$PATH)



dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl $$                                                        $$
dnl $$ PART: Build Parameters                                 $$
dnl $$                                                        $$
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
AC_MSG_CFG_PART(Build Parameters)

dnl
dnl  Check for system header files.
dnl  =============================
dnl  /* GetText это проверил. А мы делаем для себя. */
AC_HEADER_STAT
AC_CHECK_HEADERS(fcntl.h unistd.h stdlib.h stdio.h errno.h string.h getopt.h)


dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl $$                                                        $$
dnl $$ PART: OUTPUT Substitution                              $$
dnl $$                                                        $$
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
dnl ============================================================
AC_MSG_CFG_PART(OUTPUT)


AC_CONFIG_FILES([
Makefile
perl/Makefile
perl/jsmin.pl
src/Makefile
])
AC_OUTPUT

chmod 0755 perl/jsmin.pl

if test -f "Makefile"; then
    echo ""
    echo "Now please type:"
    echo "   \`${TB}make${TN}'           to compile,"
    echo "   \`${TB}make install${TN}'   to make and install ${TB}jsmin${TN},"
    echo "   \`${TB}make dist${TN}'      to create distributable tarball, or"
    echo "   \`${TB}make distclean${TN}' to clean befor configure for another target."
    echo "Enjoy."
    echo ""
fi