This repository has been archived by the owner on Apr 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 299
/
configure.ac
107 lines (91 loc) · 2.41 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
AC_INIT([xbmc-pvr-addons], 1:0:0)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION, [http://www.xbmc.org])
AC_PREFIX_DEFAULT(/usr/lib/xbmc/addons)
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_LIBTOOL
AC_SEARCH_LIBS([pthread_create],[pthread],, AC_MSG_ERROR("required library 'pthread' is missing"))
AC_ARG_ENABLE([release],
[AS_HELP_STRING([--enable-release],
[build release binaries (default is no)])],
[use_release=$enableval],
[use_release=no])
BUILD_TYPE="debug"
if test "$use_release" = "yes"; then
BUILD_TYPE="release"
fi
OS="unknown"
ARCHITECTURE="unknown"
HOST_INCLUDES=""
HOST_CXXFLAGS=""
ARCH_DEFINES="-DTARGET_POSIX -DTARGET_LINUX -D_LINUX"
case "${host}" in
arm*-*-linux*)
OS="linux"
ARCHITECTURE="arm"
;;
powerpc-*-linux*)
OS="linux"
ARCHITECTURE="powerpc"
;;
powerpc64-*-linux*)
OS="linux"
ARCHITECTURE="powerpc64"
;;
mipsel-*-linux*)
OS="linux"
ARCHITECTURE="mipsel"
;;
x86_64-*-linux*)
OS="linux"
ARCHITECTURE="x86_64"
;;
*-*-linux*)
OS="linux"
ARCHITECTURE="i486"
;;
*-apple-darwin*)
OS="darwin"
HOST_INCLUDES="-I/opt/local/include"
HOST_CXXFLAGS="-dynamiclib -single_module -undefined dynamic_lookup"
host_os_osx="yes"
ARCH_DEFINES="-DTARGET_POSIX -DTARGET_DARWIN"
;;
*-freebsd*)
OS="freebsd"
ARCH_DEFINES="-DTARGET_POSIX -DTARGET_FREEBSD"
;;
esac
use_libcurl="no"
PKG_CHECK_MODULES([CURL],[libcurl],use_libcurl="yes",AC_MSG_WARN("CURL was not found, N7 add-on will not be available"))
HOST_CXXFLAGS="-Wall -Wextra -Wno-missing-field-initializers -Woverloaded-virtual -Wno-parentheses -fPIC $HOST_CXXFLAGS"
AC_SUBST(ARCHITECTURE)
AC_SUBST(BUILD_TYPE)
AC_SUBST(HOST_CXXFLAGS)
AC_SUBST(HOST_INCLUDES)
AC_SUBST(OS)
AC_SUBST(ARCH_DEFINES)
if test "x$host_os_osx" = "xyes"; then
AM_CONDITIONAL(HOST_IS_OSX, true)
else
AM_CONDITIONAL(HOST_IS_OSX, false)
fi
if test "x$use_libcurl" = "xyes"; then
INCLUDES="$INCLUDES $CURL_CFLAGS"
LIBS="$LIBS $CURL_LIBS"
AM_CONDITIONAL(USE_CURL, true)
else
AM_CONDITIONAL(USE_CURL, false)
fi
AC_OUTPUT([Makefile
lib/Makefile
lib/libhts/Makefile
lib/tinyxml/Makefile
addons/Makefile
addons/pvr.demo/Makefile
addons/pvr.hts/Makefile
addons/pvr.mediaportal.tvserver/Makefile
addons/pvr.njoy/Makefile
addons/pvr.vdr.vnsi/Makefile])