-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.ac
72 lines (59 loc) · 1.35 KB
/
configure.ac
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
AC_PREREQ([2.69])
AC_INIT([mpvnet], [1.0])
AM_INIT_AUTOMAKE([
1.12
subdir-objects
foreign
])
AC_CONFIG_SRCDIR([configure.ac])
AC_CHECK_PROGS([PYTHON], [python])
if test "x$PYTHON" = "x"; then
AC_MSG_ERROR([Python not found])
fi
AC_CHECK_PROGS([FFMPEG], [ffmpeg])
if test "x$FFMPEG" = "x"; then
AC_MSG_ERROR([FFmpeg not found])
fi
AC_CHECK_PROGS([YT_DLP], [yt-dlp])
if test "x$YT_DLP" = "x"; then
AC_MSG_ERROR([yt-dlp not found])
fi
AC_CHECK_PROGS([MPV], [mpv])
if test "x$MPV" = "x"; then
AC_MSG_ERROR([mpv not found])
fi
AC_CHECK_PROGS([FIREFOX], [ \
firefox-developer-edition \
firefox-nightly \
firefox-beta \
firefox-esr \
firefox \
])
if test "x$FIREFOX" = "x"; then
AC_MSG_ERROR([Firefox not found])
fi
AC_CHECK_PROGS([ZIP], [zip])
if test "x$ZIP" = "x"; then
AC_MSG_ERROR([zip not found])
fi
AC_MSG_CHECKING([for PyQt5 Python module])
PYQT5_FOUND="no"
if $PYTHON -c "import PyQt5"; then
PYQT5_FOUND="yes"
fi
AC_MSG_RESULT([$PYQT5_FOUND])
if test "$PYQT5_FOUND" = "no"; then
AC_MSG_ERROR([PyQt5 Python module not found])
fi
USER="$(whoami)"
LOADER="com.mpvnet.loader"
LOADER_PATH="/home/${USER}/.mozilla/native-messaging-hosts/"
EXTENSION="mpvnet.xpi"
AC_SUBST([FIREFOX])
AC_SUBST([ZIP])
AC_SUBST([USER])
AC_SUBST([LOADER])
AC_SUBST([LOADER_PATH])
AC_SUBST([EXTENSION])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT