2003-10-13 15:03:14 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2009-04-01 14:33:00 +02:00
|
|
|
|
2017-01-06 00:44:18 -08:00
|
|
|
AC_PREREQ([2.60])
|
2025-01-26 11:21:13 +01:00
|
|
|
AC_INIT([owntone], [28.11])
|
2016-12-27 15:57:41 -08:00
|
|
|
|
2014-04-14 22:44:05 +02:00
|
|
|
AC_CONFIG_SRCDIR([config.h.in])
|
2010-06-21 17:50:09 +02:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2016-12-27 14:51:37 -08:00
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
2014-04-14 22:44:05 +02:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
2017-02-16 10:44:00 -08:00
|
|
|
AM_INIT_AUTOMAKE([foreign subdir-objects 1.11])
|
2022-12-26 10:04:07 +01:00
|
|
|
AM_SILENT_RULES([yes])
|
2017-02-16 10:44:00 -08:00
|
|
|
|
2017-01-06 00:44:18 -08:00
|
|
|
dnl Requires autoconf 2.60
|
2007-01-17 01:06:16 +00:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
|
2003-10-13 15:03:14 +00:00
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_CC
|
2017-01-06 00:44:18 -08:00
|
|
|
AC_PROG_CC_C_O
|
|
|
|
AC_PROG_SED
|
|
|
|
AC_PROG_MKDIR_P
|
2009-04-05 18:22:48 +02:00
|
|
|
LT_INIT([disable-static])
|
2006-10-19 03:08:13 +00:00
|
|
|
|
2017-01-06 12:49:57 -08:00
|
|
|
AC_PATH_PROG([GPERF], [[gperf]])
|
2017-01-06 00:44:18 -08:00
|
|
|
AS_IF([[test -z "$GPERF"]],
|
|
|
|
[AS_IF([[test -f "$srcdir/src/dmap_fields_hash.h"]],
|
2017-01-06 12:49:57 -08:00
|
|
|
[AM_MISSING_PROG([GPERF], [[gperf]])
|
2017-01-06 00:44:18 -08:00
|
|
|
AC_MSG_NOTICE([[
|
2016-12-27 15:32:08 -08:00
|
|
|
|
|
|
|
GNU gperf not found, but it's output appears to be present.
|
2022-01-10 20:00:29 +01:00
|
|
|
If you modify any .gperf files, you will need to install it.]])],
|
2017-01-06 00:44:18 -08:00
|
|
|
[AC_MSG_ERROR([[GNU gperf required, please install it.]])])
|
|
|
|
])
|
2011-03-31 17:33:12 +02:00
|
|
|
|
2022-01-10 21:05:51 +01:00
|
|
|
AX_PROG_FLEX([AC_DEFINE([LEX], [flex], [flex found])],
|
2022-01-11 18:54:47 +01:00
|
|
|
[AS_IF([test ! -f "$srcdir/src/parsers/smartpl_lexer.c"],
|
2022-01-10 21:05:51 +01:00
|
|
|
[AC_MSG_ERROR([flex required, please install it])])
|
|
|
|
])
|
|
|
|
AX_PROG_BISON([AC_DEFINE([YACC], [bison], [GNU bison found])],
|
2022-01-11 18:54:47 +01:00
|
|
|
[AS_IF([test ! -f "$srcdir/src/parsers/smartpl_parser.c"],
|
2022-01-10 21:05:51 +01:00
|
|
|
[AC_MSG_ERROR([GNU bison required, please install it])])
|
|
|
|
])
|
|
|
|
|
2017-01-06 00:44:18 -08:00
|
|
|
dnl Enable all warnings by default.
|
|
|
|
AM_CPPFLAGS="-Wall"
|
2016-12-27 14:51:37 -08:00
|
|
|
AC_SUBST([AM_CPPFLAGS])
|
2009-04-05 18:31:00 +02:00
|
|
|
|
2016-12-29 16:14:22 -08:00
|
|
|
dnl Checks for header files.
|
|
|
|
AC_CHECK_HEADERS_ONCE([regex.h pthread_np.h])
|
|
|
|
AC_CHECK_HEADERS([sys/wait.h sys/param.h dirent.h getopt.h stdint.h], [],
|
2021-04-09 19:43:43 +02:00
|
|
|
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
|
2017-01-06 00:44:18 -08:00
|
|
|
AC_CHECK_HEADERS([time.h], [],
|
2021-04-09 19:43:43 +02:00
|
|
|
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
|
2023-12-19 22:56:58 +01:00
|
|
|
AC_CHECK_FUNCS_ONCE([posix_fadvise pipe2 gettid])
|
2016-12-29 16:14:22 -08:00
|
|
|
AC_CHECK_FUNCS([strptime strtok_r], [],
|
2021-04-09 19:43:43 +02:00
|
|
|
[AC_MSG_ERROR([[Missing function required to build OwnTone]])])
|
2017-01-06 00:44:18 -08:00
|
|
|
|
2017-01-14 00:56:43 -05:00
|
|
|
dnl check for clock_gettime or replace it
|
|
|
|
AC_SEARCH_LIBS([clock_gettime], [rt],
|
|
|
|
[AC_DEFINE([HAVE_CLOCK_GETTIME], 1,
|
|
|
|
[Define to 1 if have clock_gettime function])],
|
|
|
|
[AC_CHECK_HEADER([mach/mach_time.h],
|
|
|
|
[AC_DEFINE([HAVE_MACH_CLOCK], 1,
|
|
|
|
[Define to 1 if mach kernel clock replacement available])],
|
|
|
|
[AC_MSG_ERROR([[Missing clock_gettime and any replacement]])])])
|
|
|
|
|
|
|
|
dnl check for timer_settime or replace it
|
|
|
|
AC_SEARCH_LIBS([timer_settime], [rt],
|
|
|
|
[AC_DEFINE([HAVE_TIMER_SETTIME], 1,
|
|
|
|
[Define to 1 if have timer_settime function])],
|
|
|
|
[AC_CHECK_HEADER([mach/mach_time.h],
|
|
|
|
[AC_DEFINE([HAVE_MACH_TIMER], 1,
|
|
|
|
[Define to 1 if mach kernel clock replacement available])],
|
|
|
|
[AC_MSG_ERROR([[Missing timer_settime and any replacement]])])])
|
2017-01-06 00:44:18 -08:00
|
|
|
|
|
|
|
AC_SEARCH_LIBS([pthread_exit], [pthread], [],
|
|
|
|
[AC_MSG_ERROR([[pthreads library is required]])])
|
2017-01-06 13:58:02 -08:00
|
|
|
AC_SEARCH_LIBS([pthread_setname_np], [pthread],
|
|
|
|
[dnl Validate pthread_setname_np with 2 args (some have 1)
|
|
|
|
AC_MSG_CHECKING([[for two-parameter pthread_setname_np]])
|
2025-01-19 17:00:58 +01:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <pthread.h>]],
|
|
|
|
[[pthread_setname_np(pthread_self(), "name");]])],
|
2017-01-06 13:58:02 -08:00
|
|
|
[AC_MSG_RESULT([yes])
|
|
|
|
AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], 1,
|
|
|
|
[Define to 1 if you have pthread_setname_np])],
|
|
|
|
[AC_MSG_RESULT([[no]])])],
|
|
|
|
[AC_SEARCH_LIBS([pthread_set_name_np], [pthread],
|
|
|
|
[AC_CHECK_FUNCS([pthread_set_name_np])])])
|
2016-04-12 22:11:56 +02:00
|
|
|
|
2021-01-04 00:05:04 +01:00
|
|
|
AC_SEARCH_LIBS([uuid_generate_random], [uuid],
|
|
|
|
[AC_DEFINE([HAVE_UUID], 1,
|
|
|
|
[Define to 1 if you have uuid_generate_random function])])
|
|
|
|
|
2020-08-17 14:34:20 +01:00
|
|
|
AC_SEARCH_LIBS([log10], [m])
|
|
|
|
AC_SEARCH_LIBS([lrint], [m])
|
|
|
|
AC_SEARCH_LIBS([fabs], [m])
|
|
|
|
|
2010-02-02 21:00:06 +01:00
|
|
|
dnl Large File Support (LFS)
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
|
2003-10-13 15:03:14 +00:00
|
|
|
dnl Checks for libraries.
|
2010-06-21 17:50:09 +02:00
|
|
|
|
2017-01-06 00:44:18 -08:00
|
|
|
AC_SUBST([COMMON_LIBS])
|
|
|
|
AC_SUBST([COMMON_CPPFLAGS])
|
2021-04-09 20:39:49 +02:00
|
|
|
AC_SUBST([OWNTONE_LIBS])
|
|
|
|
AC_SUBST([OWNTONE_CPPFLAGS])
|
|
|
|
AC_SUBST([OWNTONE_OPTS_LIBS])
|
|
|
|
AC_SUBST([OWNTONE_OPTS_CPPFLAGS])
|
2017-01-06 00:44:18 -08:00
|
|
|
|
|
|
|
AM_ICONV
|
2021-04-09 20:39:49 +02:00
|
|
|
dnl All OWNTONE_ macros defined in m4/owntone_checks.m4
|
|
|
|
OWNTONE_FUNC_REQUIRE([COMMON], [GNU libunistring], [LIBUNISTRING], [unistring],
|
2017-01-14 00:56:43 -05:00
|
|
|
[u8_strconv_from_locale], [uniconv.h], [],
|
|
|
|
[dnl Retry test with iconv library
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_VARS_PREPEND([COMMON], [LIBICONV], [INCICONV])
|
|
|
|
OWNTONE_FUNC_REQUIRE([COMMON], [GNU libunistring], [LIBUNISTRING],
|
2017-01-14 00:56:43 -05:00
|
|
|
[unistring], [u8_strconv_from_locale], [uniconv.h])])
|
2017-01-06 00:44:18 -08:00
|
|
|
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE], [ZLIB], [zlib], [deflate], [zlib.h])
|
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE], [CONFUSE], [libconfuse >= 3.0], [cfg_init], [confuse.h])
|
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE], [LIBCURL], [libcurl], [curl_global_init], [curl/curl.h])
|
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE], [LIBSODIUM], [libsodium], [sodium_init], [sodium.h])
|
2024-05-29 16:37:30 +02:00
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE], [LIBXML2], [libxml-2.0], [xmlInitParser], [libxml/parser.h])
|
2020-03-27 23:04:18 +01:00
|
|
|
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_MODULES_CHECK([COMMON], [SQLITE3], [sqlite3 >= 3.5.0],
|
2017-01-06 00:44:18 -08:00
|
|
|
[sqlite3_initialize], [sqlite3.h],
|
|
|
|
[dnl Check that SQLite3 has the unlock notify API built-in
|
|
|
|
AC_CHECK_FUNC([[sqlite3_unlock_notify]], [],
|
|
|
|
[AC_MSG_ERROR([[SQLite3 was built without unlock notify support]])])
|
2018-09-23 22:24:24 +02:00
|
|
|
dnl Check for sqlite3_expanded_sql (optional)
|
|
|
|
AC_CHECK_FUNCS([sqlite3_expanded_sql])
|
2017-01-06 00:44:18 -08:00
|
|
|
dnl Check that SQLite3 has been built with threadsafe operations
|
|
|
|
AC_MSG_CHECKING([[if SQLite3 was built with threadsafe operations support]])
|
|
|
|
AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <sqlite3.h>
|
|
|
|
]], [[
|
|
|
|
int ret = sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
|
|
|
|
if (ret != SQLITE_OK)
|
|
|
|
return 1;]])],
|
|
|
|
[AC_MSG_RESULT([[yes]])],
|
|
|
|
[AC_MSG_RESULT([[no]])
|
|
|
|
AC_MSG_ERROR([[SQLite3 was not built with threadsafe operations support]])],
|
|
|
|
[AC_MSG_RESULT([[runtime will tell]])])
|
|
|
|
])
|
2015-07-21 23:00:55 +02:00
|
|
|
|
2023-01-19 23:58:21 +01:00
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE], [LIBEVENT], [libevent >= 2.1.4],
|
2024-10-03 07:47:34 +02:00
|
|
|
[event_base_new], [event2/event.h],
|
|
|
|
[dnl check for version 2.2 (with websocket server support)
|
|
|
|
PKG_CHECK_EXISTS([libevent >= 2.2.1],
|
|
|
|
[AC_DEFINE([HAVE_LIBEVENT22], 1,
|
|
|
|
[Define to 1 if you have libevent > 2.2])],
|
|
|
|
[])
|
|
|
|
])
|
2023-01-19 23:58:21 +01:00
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE], [LIBEVENT_PTHREADS], [libevent_pthreads],
|
|
|
|
[evthread_use_pthreads], [event2/thread.h])
|
2015-07-21 23:00:55 +02:00
|
|
|
|
2022-12-25 20:09:38 +01:00
|
|
|
dnl Check for evhttp_connection_get_peer() signature
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
|
|
#include <event2/http.h>
|
|
|
|
void evhttp_connection_get_peer(struct evhttp_connection *, const char **, ev_uint16_t *);
|
|
|
|
]], [[ ]]
|
|
|
|
)],
|
|
|
|
[AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_EVHTTP_CONNECTION_GET_PEER_CONST_CHAR], 1,
|
|
|
|
[Define to 1 if evhttp_connection_get_peer expects const char**])]
|
|
|
|
)
|
|
|
|
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE], [JSON_C], [json-c],
|
2018-02-22 21:49:11 +01:00
|
|
|
[json_tokener_parse], [json.h],
|
|
|
|
[dnl check for old version
|
|
|
|
PKG_CHECK_EXISTS([json-c >= 0.11], [],
|
|
|
|
[AC_DEFINE([HAVE_JSON_C_OLD], 1,
|
|
|
|
[Define to 1 if you have json-c < 0.11])])
|
|
|
|
])
|
|
|
|
|
2020-12-16 08:16:47 +01:00
|
|
|
dnl Build with libplist (2.2.0 does not ship libplist.pc, only libplist-2.0.pc)
|
|
|
|
PKG_CHECK_EXISTS([libplist],
|
2021-04-09 20:39:49 +02:00
|
|
|
[OWNTONE_MODULES_CHECK([OWNTONE], [LIBPLIST], [libplist >= 0.16],
|
2020-12-16 08:16:47 +01:00
|
|
|
[plist_dict_get_item], [plist/plist.h])],
|
2021-04-09 20:39:49 +02:00
|
|
|
[OWNTONE_MODULES_CHECK([OWNTONE], [LIBPLIST], [libplist-2.0],
|
2020-12-16 08:16:47 +01:00
|
|
|
[plist_dict_get_item], [plist/plist.h])])
|
|
|
|
|
2022-05-07 10:08:54 +02:00
|
|
|
AM_PATH_LIBGCRYPT([1:1.7.0])
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_FUNC_REQUIRE([OWNTONE], [GNU Crypt Library], [LIBGCRYPT], [gcrypt],
|
2017-01-06 00:44:18 -08:00
|
|
|
[gcry_control], [gcrypt.h])
|
|
|
|
AM_PATH_GPG_ERROR([1.6])
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_FUNC_REQUIRE([OWNTONE], [GNUPG Error Values], [GPG_ERROR_MT], [gpg-error],
|
2017-01-06 00:44:18 -08:00
|
|
|
[gpg_err_init], [gpg-error.h])
|
|
|
|
|
2021-01-03 23:30:09 +01:00
|
|
|
|
2017-01-06 00:44:18 -08:00
|
|
|
AC_CHECK_HEADER([sys/eventfd.h], [AC_CHECK_FUNCS([eventfd])])
|
|
|
|
|
|
|
|
AC_CHECK_HEADER([sys/timerfd.h], [AC_CHECK_FUNC([timerfd_create],
|
|
|
|
[AC_DEFINE([HAVE_TIMERFD], 1, [Define to 1 if you have timerfd])])])
|
|
|
|
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_FUNC_REQUIRE([OWNTONE], [inotify], [INOTIFY], [inotify],
|
2017-01-06 00:44:18 -08:00
|
|
|
[inotify_add_watch], [sys/inotify.h])
|
|
|
|
|
|
|
|
have_signal=no
|
|
|
|
AC_CHECK_HEADER([sys/signalfd.h], [AC_CHECK_FUNCS([signalfd], [have_signal=yes])])
|
|
|
|
AC_CHECK_HEADER([sys/event.h], [AC_CHECK_FUNCS([kqueue], [have_signal=yes])])
|
|
|
|
AS_IF([[test "$have_signal" = "no"]],
|
|
|
|
[AC_MSG_ERROR([[Either signalfd or kqueue are required]])])
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS_ONCE([endian.h sys/endian.h])
|
|
|
|
AC_CHECK_DECL([htobe16], [],
|
2017-01-14 00:56:43 -05:00
|
|
|
[AC_CHECK_HEADERS([libkern/OSByteOrder.h], [],
|
|
|
|
[AC_MSG_ERROR([[Missing functions to swap byte order]])])],
|
2017-01-06 00:44:18 -08:00
|
|
|
[AC_INCLUDES_DEFAULT[
|
|
|
|
#ifdef HAVE_ENDIAN_H
|
|
|
|
# include <endian.h>
|
|
|
|
#elif defined(HAVE_SYS_ENDIAN_H)
|
|
|
|
# include <sys/endian.h>
|
|
|
|
#endif
|
|
|
|
]])
|
|
|
|
|
2017-02-19 06:21:00 -08:00
|
|
|
dnl libav checks should be last, as they are sometimes both installed
|
|
|
|
dnl and the CPPFLAGS/LIBS needs to be at the front of the search list.
|
|
|
|
dnl Handle alternative package names for libav
|
|
|
|
PKG_CHECK_EXISTS([libavcodec-libav], [LIBAV=-libav], [LIBAV=])
|
|
|
|
dnl Preference for ffmpeg if we have both (this could be an option...)
|
|
|
|
PKG_CHECK_EXISTS([libavcodec], [LIBAV=])
|
|
|
|
dnl Option to choose libav even if ffmpeg is detected first
|
|
|
|
AC_ARG_WITH([libav], [AS_HELP_STRING([--with-libav],
|
|
|
|
[choose libav even if ffmpeg present (default=no)])],
|
|
|
|
[[LIBAV=-libav]], [[LIBAV=]])
|
|
|
|
dnl libav/ffmpeg requires many feature checks
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE], [LIBAV],
|
2019-04-08 22:06:56 +02:00
|
|
|
[libavformat$LIBAV libavcodec$LIBAV libavutil$LIBAV libavfilter$LIBAV],
|
2017-02-19 06:21:00 -08:00
|
|
|
[av_init_packet], [libavcodec/avcodec.h],
|
|
|
|
[dnl Checks for misc libav and ffmpeg API differences
|
|
|
|
AC_MSG_CHECKING([whether libav libraries are ffmpeg])
|
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <libavcodec/avcodec.h>
|
|
|
|
]], [[
|
|
|
|
#if LIBAVCODEC_VERSION_MICRO >= 100
|
|
|
|
/* ffmpeg uses 100+ as its micro version */
|
|
|
|
#else
|
|
|
|
#error libav provider is not ffmpeg
|
|
|
|
#endif
|
|
|
|
]])], [
|
|
|
|
[is_ffmpeg=yes]
|
|
|
|
AC_DEFINE([HAVE_FFMPEG], 1,
|
|
|
|
[Define to 1 if you have ffmpeg (not libav)])],
|
|
|
|
[[is_ffmpeg=no]])
|
|
|
|
AC_MSG_RESULT([$is_ffmpeg])
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_CHECK_DECLS([av_version_info],
|
2017-09-17 00:34:20 +02:00
|
|
|
[libavutil/avutil.h])
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_CHECK_DECLS([avformat_network_init],
|
2017-09-17 00:34:20 +02:00
|
|
|
[libavformat/avformat.h])
|
2023-10-12 23:44:01 +02:00
|
|
|
OWNTONE_CHECK_DECLS([av_dict_iterate],
|
|
|
|
[libavutil/dict.h])
|
2017-02-19 06:21:00 -08:00
|
|
|
])
|
2017-03-04 11:10:43 +01:00
|
|
|
|
2017-01-06 00:44:18 -08:00
|
|
|
AC_CHECK_SIZEOF([void *])
|
2015-07-21 23:00:55 +02:00
|
|
|
|
|
|
|
dnl --- Begin configuring the options ---
|
2016-11-05 13:33:30 +01:00
|
|
|
dnl ALSA
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_ARG_WITH_CHECK([OWNTONE_OPTS], [ALSA support], [alsa], [ALSA],
|
2019-06-11 20:10:04 -07:00
|
|
|
[alsa], [snd_mixer_open], [alsa/asoundlib.h])
|
2017-01-06 00:44:18 -08:00
|
|
|
AM_CONDITIONAL([COND_ALSA], [[test "x$with_alsa" = "xyes"]])
|
2016-11-05 13:33:30 +01:00
|
|
|
|
|
|
|
dnl PULSEAUDIO
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_ARG_WITH_CHECK([OWNTONE_OPTS], [Pulseaudio support], [pulseaudio], [LIBPULSE],
|
2017-01-06 00:44:18 -08:00
|
|
|
[libpulse], [pa_stream_get_state], [pulse/pulseaudio.h],
|
|
|
|
[AC_CHECK_FUNCS([pa_threaded_mainloop_set_name])])
|
|
|
|
AM_CONDITIONAL([COND_PULSEAUDIO], [[test "x$with_pulseaudio" = "xyes"]])
|
2016-11-05 13:33:30 +01:00
|
|
|
|
2017-08-12 20:01:57 +02:00
|
|
|
dnl Build with libwebsockets
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_ARG_WITH_CHECK([OWNTONE_OPTS], [libwebsockets support], [libwebsockets], [LIBWEBSOCKETS],
|
2017-08-12 20:01:57 +02:00
|
|
|
[libwebsockets >= 2.0.2])
|
2017-09-16 00:05:50 +02:00
|
|
|
AM_CONDITIONAL([COND_LIBWEBSOCKETS], [[test "x$with_libwebsockets" = "xyes"]])
|
2017-08-12 20:01:57 +02:00
|
|
|
|
2017-01-14 00:56:43 -05:00
|
|
|
dnl Build with Avahi (or Bonjour if not)
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_ARG_WITH_CHECK([OWNTONE_OPTS], [Avahi mDNS], [avahi], [AVAHI],
|
2017-01-14 00:56:43 -05:00
|
|
|
[avahi-client >= 0.6.24], [avahi_client_new], [avahi-client/client.h])
|
|
|
|
AS_IF([[test "x$with_avahi" = "xno"]],
|
2021-04-09 20:39:49 +02:00
|
|
|
[OWNTONE_FUNC_REQUIRE([OWNTONE_OPTS], [Bonjour DNS_SD], [DNSSD], [dns_sd],
|
2017-01-14 00:56:43 -05:00
|
|
|
[DNSServiceGetAddrInfo], [dns_sd.h], [],
|
|
|
|
[AC_MSG_ERROR([[Avahi client or Bonjour DNS_SD required, please install one.]])])])
|
|
|
|
AM_CONDITIONAL([COND_AVAHI], [[test "x$with_avahi" = "xyes"]])
|
|
|
|
|
2021-03-28 20:00:15 +02:00
|
|
|
dnl Spotify support
|
2021-04-08 22:53:19 +02:00
|
|
|
OWNTONE_ARG_DISABLE([Spotify support], [spotify], [SPOTIFY_LIBRESPOTC],
|
|
|
|
[OWNTONE_MODULES_CHECK([OWNTONE_OPTS], [LIBPROTOBUF_C],
|
2021-03-28 20:00:15 +02:00
|
|
|
[libprotobuf-c >= 1.0.0], [protobuf_c_message_pack],
|
2021-04-08 22:53:19 +02:00
|
|
|
[protobuf-c/protobuf-c.h])
|
|
|
|
OWNTONE_VAR_PREPEND([OWNTONE_OPTS_LIBS], [inputs/librespot-c/librespot-c.a])
|
|
|
|
AC_DEFINE([SPOTIFY], 1,
|
|
|
|
[Define to 1 to enable Spotify])
|
|
|
|
])
|
2022-05-25 22:49:35 +02:00
|
|
|
AM_CONDITIONAL([COND_SPOTIFY], [[test "x$enable_spotify" = "xyes"]])
|
2014-03-11 23:20:29 +01:00
|
|
|
|
2020-07-04 14:15:59 +02:00
|
|
|
dnl LastFM support
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_ARG_DISABLE([LastFM support], [lastfm], [LASTFM])
|
2017-01-06 00:44:18 -08:00
|
|
|
AM_CONDITIONAL([COND_LASTFM], [[test "x$enable_lastfm" = "xyes"]])
|
2015-07-21 23:00:55 +02:00
|
|
|
|
2016-01-17 20:59:16 +01:00
|
|
|
dnl ChromeCast support with libprotobuf-c
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_ARG_ENABLE([Chromecast support], [chromecast], [CHROMECAST],
|
|
|
|
[OWNTONE_MODULES_CHECK([OWNTONE_OPTS], [LIBPROTOBUF_C],
|
2017-01-06 00:44:18 -08:00
|
|
|
[libprotobuf-c >= 1.0.0], [protobuf_c_message_pack],
|
|
|
|
[protobuf-c/protobuf-c.h], [],
|
2021-04-09 20:39:49 +02:00
|
|
|
[OWNTONE_FUNC_REQUIRE([OWNTONE_OPTS], [v0 libprotobuf-c],
|
2017-01-06 00:44:18 -08:00
|
|
|
[LIBPROTOBUF_OLD], [protobuf-c],
|
|
|
|
[protobuf_c_message_pack],
|
|
|
|
[google/protobuf-c/protobuf-c.h],
|
|
|
|
[AC_DEFINE([HAVE_PROTOBUF_OLD], 1,
|
|
|
|
[Define to 1 if you have libprotobuf < 1.0.0])
|
|
|
|
[protobuf_old=yes]],
|
|
|
|
[AC_MSG_ERROR([[Chromecast support requires protobuf-c]])])
|
|
|
|
])
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_MODULES_CHECK([OWNTONE_OPTS], [GNUTLS], [gnutls], [gnutls_init],
|
2017-01-06 00:44:18 -08:00
|
|
|
[gnutls/gnutls.h])
|
2016-12-27 15:15:04 -08:00
|
|
|
])
|
2017-01-06 00:44:18 -08:00
|
|
|
AM_CONDITIONAL([COND_CHROMECAST], [[test "x$enable_chromecast" = "xyes"]])
|
|
|
|
AM_CONDITIONAL([COND_PROTOBUF_OLD], [[test "x$protobuf_old" = "xyes"]])
|
2016-01-17 20:59:16 +01:00
|
|
|
|
2021-01-03 23:51:35 +01:00
|
|
|
dnl Prefer AirPlay 2
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_ARG_ENABLE([preference for AirPlay 2 for devices that support both 1 and 2], [preferairplay2], [PREFER_AIRPLAY2])
|
2021-01-03 23:51:35 +01:00
|
|
|
|
2018-01-13 09:07:33 +01:00
|
|
|
dnl DB profiling support
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_ARG_ENABLE([DB profiling support], [dbprofile], [DB_PROFILE])
|
2018-01-13 09:07:33 +01:00
|
|
|
|
2015-07-21 23:00:55 +02:00
|
|
|
dnl MPD support
|
2021-04-09 20:39:49 +02:00
|
|
|
OWNTONE_ARG_DISABLE([MPD client protocol support], [mpd], [MPD])
|
2017-01-06 00:44:18 -08:00
|
|
|
AM_CONDITIONAL([COND_MPD], [[test "x$enable_mpd" = "xyes"]])
|
2016-12-27 15:47:00 -08:00
|
|
|
|
2025-01-18 08:30:18 +00:00
|
|
|
AC_PATH_PROG([NPM], [[npm]])
|
|
|
|
|
2018-05-26 08:52:45 +02:00
|
|
|
dnl Include default webinterface
|
2021-06-14 22:39:14 +02:00
|
|
|
OWNTONE_ARG_DISABLE([include default web interface], [webinterface], [WEBINTERFACE],
|
2025-01-18 08:30:18 +00:00
|
|
|
[AS_IF(
|
|
|
|
[[test "x$with_libwebsockets" = "xno"]],
|
|
|
|
[AC_MSG_ERROR([[Web interface requires libwebsockets >= 2.0.2 (or use --disable-webinterface)]])],
|
|
|
|
[[test -z "$NPM"]],
|
|
|
|
[AS_IF([[test -f "$srcdir/web-src/htdocs/index.html"]],
|
|
|
|
[AM_MISSING_PROG([NPM], [[npm]])
|
|
|
|
AC_MSG_NOTICE([[
|
2025-01-28 19:21:08 +00:00
|
|
|
npm not found, but a prebuilt web interface is present.
|
|
|
|
If you modify any web interface source files, you will need to install npm.
|
2025-01-18 08:30:18 +00:00
|
|
|
]])],
|
|
|
|
[AC_MSG_ERROR([[npm required, please install it.]])])
|
|
|
|
]
|
|
|
|
)])
|
2018-05-26 08:52:45 +02:00
|
|
|
AM_CONDITIONAL([COND_WEBINTERFACE], [[test "x$enable_webinterface" = "xyes"]])
|
|
|
|
|
2025-01-28 19:21:08 +00:00
|
|
|
dnl Use prebuilt webinterface even if npm is available
|
|
|
|
AC_ARG_WITH([prebuilt-webinterface],
|
|
|
|
[AS_HELP_STRING([--with-prebuilt-webinterface],
|
|
|
|
[Use prebuilt webinterface even if npm is available (default=no)]
|
|
|
|
)],
|
|
|
|
[AS_IF([[test -f "$srcdir/web-src/htdocs/index.html"]],
|
|
|
|
[[with_prebuilt_webinterface=yes]],
|
|
|
|
[AC_MSG_ERROR([[No prebuilt web interface found.]])]
|
|
|
|
)],
|
|
|
|
[[with_prebuilt_webinterface=]])
|
|
|
|
if test "x$with_prebuilt_webinterface" = "xyes"; then
|
2025-02-02 09:33:52 +00:00
|
|
|
BUILD_WEBINTERFACE=
|
2025-01-28 19:21:08 +00:00
|
|
|
else
|
2025-02-02 09:33:52 +00:00
|
|
|
BUILD_WEBINTERFACE=true
|
2025-01-28 19:21:08 +00:00
|
|
|
fi
|
|
|
|
AC_SUBST([BUILD_WEBINTERFACE])
|
|
|
|
|
2021-06-14 22:39:14 +02:00
|
|
|
dnl Creating and defining users and groups
|
|
|
|
OWNTONE_ARG_ENABLE([having 'make install' add user/group and 'make uninstall' delete], [install_user], [INSTALL_USER],
|
|
|
|
[AC_PATH_PROG([GETENT], [[getent]], [], [$PATH$PATH_SEPARATOR/usr/sbin])
|
|
|
|
AC_PATH_PROG([USERADD], [[useradd]], [], [$PATH$PATH_SEPARATOR/usr/sbin])
|
|
|
|
AC_PATH_PROG([USERDEL], [[userdel]], [], [$PATH$PATH_SEPARATOR/usr/sbin])
|
|
|
|
AC_PATH_PROG([USERMOD], [[usermod]], [], [$PATH$PATH_SEPARATOR/usr/sbin])
|
|
|
|
AC_PATH_PROG([GROUPADD], [[groupadd]], [], [$PATH$PATH_SEPARATOR/usr/sbin])
|
|
|
|
AC_PATH_PROG([CHOWN], [[chown]], [], [$PATH$PATH_SEPARATOR/usr/sbin])
|
|
|
|
AS_IF([[test -z "$GETENT" -o -z "$USERADD" -o -z "$USERDEL" -o -z "$USERMOD" -o -z "$GROUPADD" -o -z "$CHOWN"]],
|
|
|
|
[AC_MSG_ERROR([[Required program for --enable-install-user not found]])])
|
|
|
|
])
|
|
|
|
AM_CONDITIONAL([COND_INSTALL_USER], [[test "x$enable_install_user" = "xyes"]])
|
|
|
|
|
2021-04-09 19:43:43 +02:00
|
|
|
AC_ARG_WITH([owntone_user],
|
2021-06-14 22:39:14 +02:00
|
|
|
[AS_HELP_STRING([--with-user=USER], [User for running OwnTone (default=owntone)])],
|
2017-01-06 00:44:18 -08:00
|
|
|
[[test x"$withval" = xyes && withval=]], [[withval=]])
|
2021-04-09 19:43:43 +02:00
|
|
|
OWNTONE_USER=${withval:-owntone}
|
|
|
|
AC_SUBST([OWNTONE_USER])
|
2016-12-27 15:47:00 -08:00
|
|
|
|
2021-04-09 19:43:43 +02:00
|
|
|
AC_ARG_WITH([owntone_group],
|
2021-06-14 22:39:14 +02:00
|
|
|
[AS_HELP_STRING([--with-group=GROUP], [Group for owntone user (default=USER)])],
|
2017-01-06 00:44:18 -08:00
|
|
|
[[test x"$withval" = xyes && withval=]], [[withval=]])
|
2021-04-09 19:43:43 +02:00
|
|
|
OWNTONE_GROUP=${withval:-$OWNTONE_USER}
|
|
|
|
AC_SUBST([OWNTONE_GROUP])
|
2021-06-14 22:39:14 +02:00
|
|
|
|
|
|
|
dnl Install config file
|
|
|
|
OWNTONE_ARG_DISABLE([install configuration file], [install_conf_file], [INSTALL_CONF_FILE])
|
|
|
|
AM_CONDITIONAL([COND_INSTALL_CONF_FILE], [[test "x$enable_install_conf_file" = "xyes"]])
|
|
|
|
|
|
|
|
# Service files are not installed like https://www.freedesktop.org/software/systemd/man/daemon.html
|
|
|
|
# instructs, because that means they go to /lib/systemd/system (the destination
|
|
|
|
# for package service files!) instead of /usr/local/etc/systemd/system with a
|
|
|
|
# default ./configure, and I don't want that on my machine. Also, the suggested
|
|
|
|
# approach is incredibly ugly.
|
|
|
|
OWNTONE_ARG_DISABLE([install systemd service file], [install_systemd], [INSTALL_SYSTEMD])
|
|
|
|
AM_CONDITIONAL([COND_INSTALL_SYSTEMD], [[test "x$enable_install_systemd" = "xyes"]])
|
|
|
|
AC_ARG_WITH([systemddir],
|
|
|
|
[AS_HELP_STRING([--with-systemddir=DIR], [Directory for systemd service files (default=SYSCONFDIR/systemd/system)])],
|
|
|
|
[[test x"$withval" = xyes && withval=]], [[withval=]])
|
|
|
|
SYSTEMD_DIR=${withval:-$sysconfdir/systemd/system}
|
|
|
|
AC_SUBST([SYSTEMD_DIR])
|
|
|
|
|
2016-07-21 22:13:32 +02:00
|
|
|
dnl --- End options ---
|
|
|
|
|
2021-04-08 22:53:19 +02:00
|
|
|
dnl Unconditional since we always want to produce Makefiles for dist targets
|
|
|
|
AC_CONFIG_SUBDIRS([
|
|
|
|
src/inputs/librespot-c
|
|
|
|
])
|
|
|
|
|
2016-12-27 14:51:37 -08:00
|
|
|
AC_CONFIG_FILES([
|
2025-01-18 08:30:18 +00:00
|
|
|
web-src/Makefile
|
2016-12-27 14:51:37 -08:00
|
|
|
src/Makefile
|
|
|
|
sqlext/Makefile
|
|
|
|
Makefile
|
2021-04-09 19:43:43 +02:00
|
|
|
owntone.spec
|
2016-12-27 14:51:37 -08:00
|
|
|
])
|
2025-02-02 09:33:52 +00:00
|
|
|
|
|
|
|
WEBSRC_SUBDIRS="\
|
|
|
|
public \
|
|
|
|
src \
|
|
|
|
src/components \
|
|
|
|
src/filter \
|
|
|
|
src/i18n \
|
|
|
|
src/lib \
|
|
|
|
src/pages \
|
|
|
|
src/router \
|
|
|
|
src/stores \
|
|
|
|
src/templates \
|
|
|
|
src/webapi"
|
|
|
|
AC_SUBST([WEBSRC_SUBDIRS])
|
|
|
|
|
|
|
|
WEBSRC_SOURCE_FILES="\
|
|
|
|
public/android-chrome-512x512.png \
|
|
|
|
public/mstile-150x150.png \
|
|
|
|
public/browserconfig.xml \
|
|
|
|
public/site.webmanifest \
|
|
|
|
public/favicon.ico \
|
|
|
|
public/android-chrome-192x192.png \
|
|
|
|
public/safari-pinned-tab.svg \
|
|
|
|
public/apple-touch-icon.png \
|
|
|
|
public/favicon-16x16.png \
|
|
|
|
public/logo.svg \
|
|
|
|
public/favicon-32x32.png \
|
|
|
|
src/components/ModalDialogAddRss.vue \
|
|
|
|
src/components/ModalDialogPlaylistSpotify.vue \
|
|
|
|
src/components/ListPlaylistsSpotify.vue \
|
|
|
|
src/components/ListArtistsSpotify.vue \
|
|
|
|
src/components/ModalDialogComposer.vue \
|
|
|
|
src/components/ListArtists.vue \
|
|
|
|
src/components/ControlSlider.vue \
|
|
|
|
src/components/ModalDialogArtist.vue \
|
|
|
|
src/components/ListPlaylists.vue \
|
|
|
|
src/components/ModalDialogArtistSpotify.vue \
|
|
|
|
src/components/ModalDialogPlaylistSave.vue \
|
|
|
|
src/components/ModalDialogGenre.vue \
|
|
|
|
src/components/ModalDialogTrackSpotify.vue \
|
|
|
|
src/components/ListTracks.vue \
|
|
|
|
src/components/ListGenres.vue \
|
|
|
|
src/components/ModalDialogAlbumSpotify.vue \
|
|
|
|
src/components/TabsAudiobooks.vue \
|
|
|
|
src/components/IndexButtonList.vue \
|
|
|
|
src/components/TabsSettings.vue \
|
|
|
|
src/components/ModalDialogAddUrlStream.vue \
|
|
|
|
src/components/ModalDialogDirectory.vue \
|
|
|
|
src/components/ListComposers.vue \
|
|
|
|
src/components/CoverArtwork.vue \
|
|
|
|
src/components/NavbarItemOutput.vue \
|
|
|
|
src/components/ModalDialogAlbum.vue \
|
|
|
|
src/components/ControlDropdown.vue \
|
|
|
|
src/components/ModalDialogPlaylist.vue \
|
|
|
|
src/components/ListDirectories.vue \
|
|
|
|
src/components/ModalDialog.vue \
|
|
|
|
src/components/ListAlbums.vue \
|
|
|
|
src/components/ListAlbumsSpotify.vue \
|
|
|
|
src/components/ListItemQueueItem.vue \
|
|
|
|
src/components/ListTracksSpotify.vue \
|
|
|
|
src/components/LyricsPane.vue \
|
|
|
|
src/components/ModalDialogQueueItem.vue \
|
|
|
|
src/components/ModalDialogRemotePairing.vue \
|
|
|
|
src/components/ModalDialogTrack.vue \
|
|
|
|
src/components/ModalDialogUpdate.vue \
|
|
|
|
src/components/NavbarBottom.vue \
|
|
|
|
src/components/NavbarItemLink.vue \
|
|
|
|
src/components/NavbarTop.vue \
|
|
|
|
src/components/NotificationList.vue \
|
|
|
|
src/components/PlayerButtonConsume.vue \
|
|
|
|
src/components/PlayerButtonLyrics.vue \
|
|
|
|
src/components/PlayerButtonNext.vue \
|
|
|
|
src/components/PlayerButtonPlayPause.vue \
|
|
|
|
src/components/PlayerButtonPrevious.vue \
|
|
|
|
src/components/PlayerButtonRepeat.vue \
|
|
|
|
src/components/PlayerButtonSeekBack.vue \
|
|
|
|
src/components/PlayerButtonSeekForward.vue \
|
|
|
|
src/components/PlayerButtonShuffle.vue \
|
|
|
|
src/components/SettingsCheckbox.vue \
|
|
|
|
src/components/SettingsIntfield.vue \
|
|
|
|
src/components/SettingsTextfield.vue \
|
|
|
|
src/components/TabsMusic.vue \
|
|
|
|
src/components/TabsSearch.vue \
|
|
|
|
src/filter/index.js \
|
|
|
|
src/i18n/index.js \
|
|
|
|
src/i18n/de.json \
|
|
|
|
src/i18n/en.json \
|
|
|
|
src/i18n/fr.json \
|
|
|
|
src/i18n/zh-CN.json \
|
|
|
|
src/i18n/zh-TW.json \
|
|
|
|
src/lib/Audio.js \
|
|
|
|
src/lib/SVGRenderer.js \
|
|
|
|
src/lib/GroupedList.js \
|
|
|
|
src/pages/PageMusicRecentlyPlayed.vue \
|
|
|
|
src/pages/PageMusicSpotifyFeaturedPlaylists.vue \
|
|
|
|
src/pages/PageAudiobooksArtists.vue \
|
|
|
|
src/pages/PageAudiobooksGenres.vue \
|
|
|
|
src/pages/PageAlbum.vue \
|
|
|
|
src/pages/PageComposerAlbums.vue \
|
|
|
|
src/pages/PageMusicSpotify.vue \
|
|
|
|
src/pages/PagePlaylistTracks.vue \
|
|
|
|
src/pages/PagePodcast.vue \
|
|
|
|
src/pages/PageMusicSpotifyNewReleases.vue \
|
|
|
|
src/pages/PageRadioStreams.vue \
|
|
|
|
src/pages/PageAudiobooksAlbums.vue \
|
|
|
|
src/pages/PageComposers.vue \
|
|
|
|
src/pages/PageAudiobooksArtist.vue \
|
|
|
|
src/pages/PageGenres.vue \
|
|
|
|
src/pages/PageMusic.vue \
|
|
|
|
src/pages/PageGenreAlbums.vue \
|
|
|
|
src/pages/PageAbout.vue \
|
|
|
|
src/pages/PageAlbumSpotify.vue \
|
|
|
|
src/pages/PageAlbums.vue \
|
|
|
|
src/pages/PageArtist.vue \
|
|
|
|
src/pages/PageArtistSpotify.vue \
|
|
|
|
src/pages/PageArtistTracks.vue \
|
|
|
|
src/pages/PageArtists.vue \
|
|
|
|
src/pages/PageComposerTracks.vue \
|
|
|
|
src/pages/PageFiles.vue \
|
|
|
|
src/pages/PageGenreTracks.vue \
|
|
|
|
src/pages/PageMusicRecentlyAdded.vue \
|
|
|
|
src/pages/PagePlaylistFolder.vue \
|
|
|
|
src/pages/PagePlaylistTracksSpotify.vue \
|
|
|
|
src/pages/PagePodcasts.vue \
|
|
|
|
src/pages/PageQueue.vue \
|
|
|
|
src/pages/PageSearchLibrary.vue \
|
|
|
|
src/pages/PageSearchSpotify.vue \
|
|
|
|
src/pages/PageSettingsOnlineServices.vue \
|
|
|
|
src/pages/PageSettingsRemotesOutputs.vue \
|
|
|
|
src/pages/PageAudiobooksAlbum.vue \
|
|
|
|
src/pages/PageNowPlaying.vue \
|
|
|
|
src/pages/PageSettingsArtwork.vue \
|
|
|
|
src/pages/PageSettingsWebinterface.vue \
|
|
|
|
src/router/index.js \
|
|
|
|
src/stores/configuration.js \
|
|
|
|
src/stores/library.js \
|
|
|
|
src/stores/lyrics.js \
|
|
|
|
src/stores/notifications.js \
|
|
|
|
src/stores/outputs.js \
|
|
|
|
src/stores/player.js \
|
|
|
|
src/stores/queue.js \
|
|
|
|
src/stores/remotes.js \
|
|
|
|
src/stores/search.js \
|
|
|
|
src/stores/services.js \
|
|
|
|
src/stores/settings.js \
|
|
|
|
src/stores/ui.js \
|
|
|
|
src/templates/ContentWithHeading.vue \
|
|
|
|
src/templates/ContentWithHero.vue \
|
|
|
|
src/webapi/index.js \
|
|
|
|
src/App.vue \
|
|
|
|
src/icons.js \
|
|
|
|
src/main.js \
|
|
|
|
src/mystyles.scss \
|
|
|
|
.prettierrc.json \
|
|
|
|
eslint.config.js \
|
|
|
|
index.html \
|
|
|
|
jsconfig.json \
|
|
|
|
package-lock.json \
|
|
|
|
package.json \
|
|
|
|
vite.config.js"
|
|
|
|
AC_SUBST([WEBSRC_SOURCE_FILES])
|
|
|
|
|
|
|
|
AC_CONFIG_COMMANDS([web-src],
|
|
|
|
[
|
|
|
|
if test "x$enable_webinterface" = "xyes"; then
|
|
|
|
websrc_builddir="$ac_abs_builddir/web-src"
|
|
|
|
websrc_srcdir="$ac_abs_srcdir/web-src"
|
|
|
|
if test "$websrc_srcdir" != "$websrc_builddir"; then
|
|
|
|
echo "web-src: out-of-tree build, copy web-src to build dir ($websrc_srcdir = $websrc_builddir)"
|
|
|
|
for dir in $dirs; do
|
|
|
|
mkdir -p "$websrc_builddir/$dir"
|
|
|
|
echo "web-src: created dir $websrc_builddir/$dir"
|
|
|
|
done
|
|
|
|
for file in $files; do
|
|
|
|
cp "$websrc_srcdir/$file" "$websrc_builddir/$file"
|
|
|
|
echo "web-src: copied $file from '$websrc_srcdir' to '$websrc_builddir'"
|
|
|
|
done
|
|
|
|
else
|
|
|
|
echo "web-src: in-tree build, nothing to prepare ($websrc_srcdir = $websrc_builddir)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
], [
|
|
|
|
dirs="$WEBSRC_SUBDIRS"
|
|
|
|
files="$WEBSRC_SOURCE_FILES"
|
|
|
|
enable_webinterface="$enable_webinterface"
|
|
|
|
])
|
|
|
|
|
|
|
|
HTDOCS_FILES="\
|
|
|
|
index.html \
|
|
|
|
android-chrome-192x192.png \
|
|
|
|
android-chrome-512x512.png \
|
|
|
|
apple-touch-icon.png \
|
|
|
|
browserconfig.xml \
|
|
|
|
favicon.ico \
|
|
|
|
favicon-16x16.png \
|
|
|
|
favicon-32x32.png \
|
|
|
|
mstile-150x150.png \
|
|
|
|
safari-pinned-tab.svg \
|
|
|
|
site.webmanifest \
|
|
|
|
assets/index.css \
|
|
|
|
assets/index.js"
|
|
|
|
AC_SUBST([WEBSRC_BUILD_FILES])
|
|
|
|
|
|
|
|
AC_CONFIG_COMMANDS([htdocs],
|
|
|
|
[
|
|
|
|
if test "x$enable_webinterface" = "xyes"; then
|
|
|
|
websrc_builddir="$ac_abs_builddir/web-src/htdocs"
|
|
|
|
websrc_srcdir="$ac_abs_srcdir/web-src/htdocs"
|
|
|
|
if test "$websrc_srcdir" != "$websrc_builddir"; then
|
|
|
|
echo "htdocs: out-of-tree build, copy prebuilt htdocs to build dir ($websrc_srcdir = $websrc_builddir)"
|
|
|
|
if test -d "$websrc_srcdir/htdocs"; then
|
|
|
|
mkdir -p "$websrc_builddir"
|
|
|
|
mkdir -p "$websrc_builddir/assets"
|
|
|
|
for file in $files; do
|
|
|
|
cp "$websrc_srcdir/$file" "$websrc_builddir/$file"
|
|
|
|
echo "htdocs: copied $file from '$websrc_srcdir' to '$websrc_builddir'"
|
|
|
|
done
|
|
|
|
echo "htdocs: copied prebuilt htdocs from '$websrc_srcdir' to '$websrc_builddir'"
|
|
|
|
else
|
|
|
|
echo "htdocs: no prebuilt htdocs found, nothing to prepare"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "htdocs: in-tree build, nothing to prepare ($websrc_srcdir = $websrc_builddir)"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
], [
|
|
|
|
files="$HTDOCS_FILES"
|
|
|
|
enable_webinterface="$enable_webinterface"
|
|
|
|
])
|
|
|
|
|
2016-12-27 14:51:37 -08:00
|
|
|
AC_OUTPUT
|