JavaScript, Json minimizator

jsmin – is a JavaScript, Json minimizator which removes comments and unnecessary whitespace from JS, JSON files

2 Commits   0 Branches   0 Tags

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