-
Notifications
You must be signed in to change notification settings - Fork 8
/
configure.in
100 lines (86 loc) · 2.14 KB
/
configure.in
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
m4_define([MAJOR], 0)
m4_define([MINOR], 0)
m4_define([MICRO], 4)
dnl Process this file with autoconf to produce a configure script.
AC_INIT([xbmc-addon-p2pproxy], [MAJOR.MINOR.MICRO], [const86])
AC_CONFIG_AUX_DIR(autotools)
PREFIX_DEFAULT="/usr"
AC_PREFIX_DEFAULT($PREFIX_DEFAULT)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
dnl Setup for automake
AM_INIT_AUTOMAKE
dnl Check for tools
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_INSTALL
AC_EXEEXT
dnl Check for zlib
zlib_found=yes
ZLIB_LIBS=
AC_CHECK_HEADER(zlib.h,,[zlib_found="no"])
if test x$zlib_found = xyes; then
AC_SEARCH_LIBS(compress, z, [AC_DEFINE([HAVE_ZLIB], 1, [have zlib compression library installed])])
ZLIB_LIBS="-lz"
AC_SUBST(ZLIB_LIBS)
fi
AC_SUBST(VERSIONEXT)
ISMINGW32=false
ADDONNAME=p2pproxy.pvr
SOEXT=so
ISAPPLE=false
case $host in
*-*-cygwin* | *-*-mingw32*)
LDFLAGS+="-no-undefined -no-cygwin"
ISMINGW32=true
ADDONNAME=p2pproxy_win32.dll
SOEXT=dll
;;
arm*-*-linux-gnu*)
AC_SUBST(ARCH_DEFINES, "-D_ARMEL")
;;
powerpc-*-linux-gnu*)
AC_SUBST(ARCH_DEFINES, "-D_POWERPC")
;;
powerpc64-*-linux-gnu*)
AC_SUBST(ARCH_DEFINES, "-D_POWERPC64")
;;
*-apple-*)
SOEXT=dylib
ISAPPLE=true
;;
*-androideabi)
AC_SUBST(ARCH_DEFINES, "-DANDROID")
ADDONNAME=libp2pproxy.so
;;
esac
if test "x${libdir}" != 'x${exec_prefix}/lib'; then
LIBDIR=${libdir}
elif test "$prefix" = "NONE"; then
LIBDIR=$PREFIX_DEFAULT/lib/xbmc/addons
else
LIBDIR=$prefix/lib/xbmc/addons
fi
AC_SUBST(LIBDIR)
if test "x${datadir}" != 'x${datarootdir}' && test "x${datarootdir}" = 'x${prefix}/share'; then
DATADIR=${datadir}
elif test "$prefix" = "NONE"; then
DATADIR=$PREFIX_DEFAULT/share/xbmc/addons
else
DATADIR=$prefix/share/xbmc/addons
fi
AC_SUBST(DATADIR)
AM_CONDITIONAL([MINGW32], $ISMINGW32)
AM_CONDITIONAL([APPLE], $ISAPPLE)
AC_SUBST(ADDONNAME)
AC_SUBST(SOEXT)
# Finally create all the generated files
AC_OUTPUT([Makefile
addons/Makefile
addons/pvr.p2pproxy/Makefile
addons/pvr.p2pproxy/addon.xml
src/Makefile
src/p2pproxy/Makefile])