configure.ac 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. dnl tinmop: an humble mastodon client
  2. dnl Copyright (C) 2020 cage
  3. dnl This program is free software: you can redistribute it and/or modify
  4. dnl it under the terms of the GNU General Public License as published by
  5. dnl the Free Software Foundation, either version 3 of the License, or
  6. dnl (at your option) any later version.
  7. dnl This program is distributed in the hope that it will be useful,
  8. dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. dnl GNU General Public License for more details.
  11. dnl You should have received a copy of the GNU General Public License
  12. dnl along with this program.
  13. dnl If not, see [[http://www.gnu.org/licenses/][http://www.gnu.org/licenses/]].
  14. AC_INIT([tinmop],[0.8.1],[https://notabug.org/cage/tinmop/],[tinmop])
  15. AM_INIT_AUTOMAKE([-Wall foreign])
  16. AM_GNU_GETTEXT([external])
  17. AC_CHECK_LIB([ssl], [SSL_get_version], [], AC_MSG_ERROR([Can not find libssl.]))
  18. AC_PATH_PROG([LISP_COMPILER],[sbcl],[no])
  19. if test "$LISP_COMPILER" = "no" ; then
  20. AC_MSG_ERROR([Can not find SBCL, Common Lisp compiler.])
  21. fi
  22. AC_PATH_PROG([CURL],[curl],[no])
  23. if test "$CURL" = "no" ; then
  24. AC_MSG_ERROR([Can not find curl.])
  25. exit 1;
  26. fi
  27. AC_PATH_PROG([GPG],[gpg],[no])
  28. if test "$GPG" = "no" ; then
  29. AC_MSG_ERROR([Can not find gpg, crypto software.])
  30. exit 1;
  31. fi
  32. AC_PATH_PROG([BASH],[bash],[no])
  33. if test "$BASH" = "no" ; then
  34. AC_MSG_ERROR([Can not find bash shell.])
  35. exit 1;
  36. fi
  37. dnl autoconf has an automatic test for AWK
  38. if test -z "${AWK}"; then
  39. AC_MSG_ERROR([Can not find AWK.])
  40. exit 1
  41. fi
  42. AC_PATH_PROGS([XDG_OPEN],[xdg-open open],[no])
  43. if test "$XDG_OPEN" = "no" ; then
  44. AC_MSG_ERROR([Can not find xdg-open.])
  45. exit 1;
  46. fi
  47. AC_PATH_PROGS([OPENSSL],[openssl],[no])
  48. if test "$OPENSSL" = "no" ; then
  49. AC_MSG_ERROR([Can not find openssl binary.])
  50. exit 1;
  51. fi
  52. AC_PROG_MKDIR_P
  53. dnl check sbcl version
  54. SBCL_MIN_VERSION="1.4.16";
  55. SBCL_VERSION=`${LISP_COMPILER} --version | ${AWK} -- '// {print $2}'`
  56. CHECK_COMPILER_VERSION_P="yes"
  57. AC_ARG_ENABLE([check-sbcl-version], [AS_HELP_STRING([--disable-check-sbcl-version], [Disable checks for minimum supported SBCL version])], [], [])
  58. if test "$enable_check_sbcl_version" = "yes" || test "$enable_check_sbcl_version" = "" ; then
  59. SBCL_VERSION_OK=`echo "$SBCL_VERSION $SBCL_MIN_VERSION" | ${AWK} -f compare_version.awk`
  60. AC_MSG_CHECKING([if the compiler is too old])
  61. AC_MSG_NOTICE([To Disable this tests use type './configure --disable-check-sbcl-version.])
  62. if test "$SBCL_VERSION_OK" = "1" ; then
  63. AC_MSG_ERROR([Lisp compiler too old, $SBCL_MIN_VERSION is the oldest supported.])
  64. exit 1;
  65. else
  66. AC_MSG_RESULT([version is not too old])
  67. fi
  68. fi
  69. AC_CONFIG_FILES([Makefile quick_quicklisp.sh po/Makefile.in src/config.lisp.in])
  70. AC_OUTPUT