2020-05-08 15:45:43 +02:00
dnl tinmop: an humble mastodon client
dnl Copyright (C) 2020 cage
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation, either version 3 of the License, or
dnl (at your option) any later version.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl You should have received a copy of the GNU General Public License
dnl along with this program.
dnl If not, see [[http://www.gnu.org/licenses/][http://www.gnu.org/licenses/]].
2024-12-01 20:30:45 +01:00
AC_INIT([tinmop],[0.9.9.1414213562373-rc1],[https://codeberg.org/cage/tinmop/],[tinmop],[https://www.autistici.org/interzona/tinmop.html])
2020-05-08 15:45:43 +02:00
AM_INIT_AUTOMAKE([-Wall foreign])
2022-02-18 10:52:38 +01:00
dnl checks for programs
AC_PATH_PROG([MSGMERGE],[msgmerge],[no])
if test "$MSGMERGE" = "no" ; then
AC_MSG_ERROR([Can not find msgmerge, from the gettext package.])
fi
AC_PATH_PROG([XGETTEXT],[xgettext],[no])
if test "$XGETTEXT" = "no" ; then
AC_MSG_ERROR([Can not find xgettext, from the gettext package.])
fi
AC_PATH_PROG([MSGFMT],[msgfmt],[no])
if test "$MSGFMT" = "no" ; then
AC_MSG_ERROR([Can not find msgfmt, from the gettext package.])
fi
2020-12-12 14:47:22 +01:00
2022-02-18 11:28:28 +01:00
AM_GNU_GETTEXT([external])
2022-03-19 20:53:33 +01:00
AC_PATH_PROG([LISP_COMPILER],[sbcl],[no])
2022-03-19 17:38:51 +01:00
AC_PATH_PROG([LISP_COMPILER_ECL],[ecl],[no])
2020-05-08 15:45:43 +02:00
2022-03-26 11:14:47 +01:00
AC_ARG_WITH([ecl], [AS_HELP_STRING([--with-ecl], [Compile with Embedded Common Lisp compiler])], [LISP_COMPILER=$LISP_COMPILER_ECL], [])
2020-05-08 15:45:43 +02:00
if test "$LISP_COMPILER" = "no" ; then
2022-03-26 11:14:47 +01:00
if test "$LISP_COMPILER_ECL" != "no" ; then
AC_MSG_NOTICE([Unable to find SBCL but ECL seems installed on your system, try: "./reconfigure --with-ecl"])
fi
AC_MSG_ERROR([Unable to find a Common Lisp compiler.]);
2020-05-08 15:45:43 +02:00
fi
2022-03-19 20:53:33 +01:00
AC_MSG_NOTICE([Using $LISP_COMPILER as Common Lisp compiler])
2022-03-19 17:38:51 +01:00
2024-10-27 12:04:07 +01:00
AC_ARG_WITH([dynamic-memory-size], [AS_HELP_STRING([--with-dynamic-memory-size=size], [size, in megabytes, of the available memory to the software])], [DYNAMIC_MEMORY_SIZE=$withval], [DYNAMIC_MEMORY_SIZE=4096])
AC_SUBST(DYNAMIC_MEMORY_SIZE,[$DYNAMIC_MEMORY_SIZE])
2020-05-08 15:45:43 +02:00
AC_PATH_PROG([CURL],[curl],[no])
if test "$CURL" = "no" ; then
AC_MSG_ERROR([Can not find curl.])
exit 1;
fi
AC_PATH_PROG([GPG],[gpg],[no])
if test "$GPG" = "no" ; then
AC_MSG_ERROR([Can not find gpg, crypto software.])
exit 1;
fi
2021-08-20 14:23:21 +02:00
AC_PATH_PROG([UNZIP],[unzip],[no])
2021-08-22 11:37:34 +02:00
if test "$UNZIP" = "no" ; then
2021-08-20 14:23:21 +02:00
AC_MSG_WARN([Can not find unzip, genpub support will be disabled.])
fi
2024-09-18 17:03:00 +02:00
AC_PATH_PROG([ZIP],[zip],[no])
if test "$UNZIP" = "no" ; then
AC_MSG_WARN([Can not find zip, genpub generation support will be disabled.])
fi
2021-08-28 12:33:49 +02:00
AC_PATH_PROG([MAN],[man],[no])
if test "$MAN" = "no" ; then
AC_MSG_WARN([Can not find man.])
fi
2021-02-26 20:19:44 +01:00
dnl autoconf has an automatic test for AWK
if test -z "${AWK}"; then
AC_MSG_ERROR([Can not find AWK.])
exit 1
2020-05-08 15:45:43 +02:00
fi
2020-05-11 21:01:42 +02:00
AC_PATH_PROGS([XDG_OPEN],[xdg-open open],[no])
2020-05-08 15:45:43 +02:00
2020-05-11 21:01:42 +02:00
if test "$XDG_OPEN" = "no" ; then
2020-05-08 15:45:43 +02:00
AC_MSG_ERROR([Can not find xdg-open.])
exit 1;
fi
2020-10-11 18:22:07 +02:00
AC_PATH_PROGS([OPENSSL],[openssl],[no])
if test "$OPENSSL" = "no" ; then
AC_MSG_ERROR([Can not find openssl binary.])
exit 1;
fi
2021-07-05 18:12:45 +02:00
AC_PATH_PROGS([GIT],[git],[no])
if test "$GIT" = "no" ; then
AC_MSG_ERROR([Can not find git executable.])
exit 1;
fi
2022-02-18 19:06:09 +01:00
AC_PATH_PROGS([CHMOD],[chmod],[no])
if test "$CHMOD" = "no" ; then
AC_MSG_ERROR([Can not find chmod executable.])
exit 1;
fi
2022-02-20 12:21:33 +01:00
AC_PATH_PROGS([DIRNAME],[dirname],[no])
if test "$DIRNAME" = "no" ; then
AC_MSG_ERROR([Can not find dirname executable.])
exit 1;
fi
2024-04-14 19:20:38 +02:00
AC_PATH_PROGS([MONTAGE],[montage montage-im6.q16 montage-im6],[no])
2022-12-10 14:11:13 +01:00
if test "$MONTAGE" = "no" ; then
AC_MSG_WARN([Can not find imagemagick 'montage' executable.])
fi
2024-04-14 19:20:38 +02:00
AC_PATH_PROGS([FILE],[file],[no])
2023-07-07 14:45:05 +02:00
if test "$FILE" = "no" ; then
2024-04-14 19:20:38 +02:00
AC_MSG_ERROR([Can not find 'file' executable.])
2023-07-07 14:45:05 +02:00
exit 1;
fi
2024-03-19 21:05:02 +01:00
AC_PATH_PROGS([PKG_CONFIG],[pkg-config],[no])
COMPLETION_DIR=""
if test "$PKG_CONFIG" != "no" ; then
COMPLETION_DIR=`pkg-config --variable=completionsdir bash-completion`
AC_SUBST([COMPLETION_DIR])
fi
2024-04-13 12:30:07 +02:00
AC_PATH_PROGS([WISH],[wish],[no])
if test "$WISH" = "no" ; then
AC_MSG_ERROR([Can not find TK interpreter executable.])
exit 1;
fi
2024-09-29 17:12:52 +02:00
AC_PATH_PROGS([SDL2_CONFIG],[sdl2-config],[no])
if test "$SDL2_CONFIG" = "no" ; then
AC_MSG_ERROR([Can not find libsdl2 development library.])
exit 1;
fi
2024-03-19 21:05:02 +01:00
AM_CONDITIONAL([ENABLE_COMPLETION],[test "$COMPLETION_DIR" != ""])
2020-05-08 15:45:43 +02:00
AC_PROG_MKDIR_P
2022-02-18 10:52:38 +01:00
dnl checks for libraries
AC_CHECK_LIB([ssl], [SSL_get_version], [], AC_MSG_ERROR([Can not find libssl.]))
AC_CHECK_LIB([ncurses], [initscr], [], AC_MSG_ERROR([Can not find ncurses.]))
AC_CHECK_LIB([sqlite3], [sqlite3_libversion], [], AC_MSG_ERROR([Can not find libsqlite3.]))
2024-04-13 12:46:19 +02:00
AC_CHECK_LIB([turbojpeg], [tjInitDecompress], [], AC_MSG_ERROR([Can not find libturbojpeg0.]))
2024-09-29 17:12:52 +02:00
AC_CHECK_LIB([SDL2_ttf], [TTF_Init], [], AC_MSG_ERROR([Can not find libsdl ttf.]))
2024-04-13 12:52:18 +02:00
dnl check headers
2024-09-29 19:37:09 +02:00
AC_CHECK_HEADER([turbojpeg.h], [], AC_MSG_ERROR([Can not find libturbojpeg0 headers file.]), [])
AC_SUBST([CFLAGS], [`sdl2-config --cflags`])
AC_CHECK_HEADER([SDL.h], [], AC_MSG_ERROR([Can not find SDL headers file.]), [])
AC_CHECK_HEADER([SDL_ttf.h], [], AC_MSG_ERROR([Can not find sdl ttf header file.]), [])
2024-04-13 12:52:18 +02:00
2020-10-11 18:22:07 +02:00
AC_CONFIG_FILES([Makefile quick_quicklisp.sh po/Makefile.in src/config.lisp.in])
2020-05-08 15:45:43 +02:00
AC_OUTPUT
2022-02-18 19:06:09 +01:00
${CHMOD} 750 quick_quicklisp.sh