-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
executable file
·184 lines (166 loc) · 4.8 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#
# autoheader
# libtoolize
# automake –add-missing –foreign
# autoconf
# ./configure
# make
# make install
#
AC_INIT([MoldeoNet], [1.4.0.2], [[email protected]], [moldeonet])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
AC_LIBTOOL_CONFIG
AC_PROG_CC
AC_PROG_CC_STDC
AC_C_CONST
AC_PROG_LIBTOOL
AM_PROG_LIBTOOL
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_CXX_C_O
dnl Set install paths.
if test "x$prefix" = "xNONE" ; then
prefix="/usr/local"
fi
if test "x$exec_prefix" = "xNONE" ; then
exec_prefix=$prefix
fi
case "$host" in
*-*-mingw*|*-*-cygwin*)
AC_DEFINE(PLATFORM_WIN32, 1, [Platform is Win32])
PLATFORM_STRING="Win32"
;;
*-*-linux*)
AC_DEFINE(PLATFORM_LINUX, 1, [Platform is Linux])
PLATFORM_STRING="Linux"
;;
*-*-darwin*)
AC_MSG_WARN([Hello])
AC_DEFINE(PLATFORM_APPLE, 1, [Platform is Apple])
PLATFORM_STRING="Apple"
;;
*)
AC_MSG_WARN([*** Please add $host to configure.ac checks!])
;;
esac
case "$host" in
i?86-* | k?-* | athlon-* | pentium*-)
AC_DEFINE(ARCH_X86, 1, [Architecture is x86])
ARCH_SPECIFIC_CFLAGS=""
ARCH_STRING="X86"
;;
x86_64-*)
AC_DEFINE(ARCH_X86_64, 1, [Architecture is x86-64])
ARCH_SPECIFIC_CFLAGS="-DUSE_ADDR64"
ARCH_STRING="X86-64"
with_boost_libdir="/usr/lib/x86_64-linux-gnu"
libdir=$prefix"/lib"
;;
ppc-* | powerpc-*)
AC_MSG_WARN([HI THERE!])
AC_DEFINE(ARCH_PPC, 1, [Architecture is PowerPC])
ARCH_SPECIFIC_CFLAGS=""
ARCH_STRING="PowerPC"
;;
*)
AC_MSG_ERROR([Unknown Architecture])
;;
esac
nwjsfiles="nwjs/nw nwjs/credits.html nwjs/nw_100_percent.pak nwjs/nw_200_percent.pak nwjs/resources.pak nwjs/icudtl.dat nwjs/v8_context_snapshot.bin"
#nwjsfiles="nwjs/nw nwjs/nwjc nwjs/nw.pak nwjs/credits.html nwjs/libffmpegsumo.so nwjs/icudtl.dat"
nwjslocalesfiles=nwjs/locales/*.*
nwjslibfiles=nwjs/lib/*.*
nwjsswiftshaderfiles=nwjs/swiftshader/*.*
moldeonetdir=${prefix}/share/moldeonet
moldeocontroldir=${moldeonetdir}/moldeocontrol
moldeocontrolapp=${moldeonetdir}/MoldeoControl.nw
nwjsdir=${prefix}/bin/nwjs
nwjsexe=${nwjsdir}/nw
nwjslocalesdir=${nwjsdir}/locales
nwjslibdir=${nwjsdir}/lib
nwjsswiftshaderdir=${nwjsdir}/swiftshader
nwjsfileszip=
nwjsfilesunzip=
nwjspermissions=
# && cd ${DESTDIR}${moldeocontroldir} && npm install"
AC_ARG_ENABLE(host,
[--enable-host[=host name] Specify the host os name:
64: 64 bit linux os [default]
86: 32 bits linux os
raspbian: RASPBIAN/debian 8 32 bits
xosx: Mac OSX with mac ports],
[ if test "x$enableval" = "x86" ; then
host_name="86"
elif test "x$enableval" = "x64" ; then
host_name="64"
elif test "x$enableval" = "xraspbian" ; then
host_name="raspbian"
elif test "x$enableval" = "xosx" ; then
host_name="osx"
nwjsexe="${nwjsdir}/nwjs.app/Contents/MacOS/nwjs"
nwjsfiles="nwjs/nwjs.app.zip nwjs/nwjc nwjs/credits.html"
nwjsfileszip="${nwjsdir}/nwjs.app.zip"
nwjsfilesunzip="unzip ${nwjsfileszip} -d ${nwjsdir} && "
nwjslocalesfiles=
nwjspermissions="chmod -R +rx ${nwjsdir}/nwjs.app && chown -R root:wheel ${nwjsdir}/nwjs.app"
else
echo
echo "Error!"
echo "Unknown host name"
exit -1
fi
])
AC_SUBST([nwjsfilesunzip],$nwjsfilesunzip)
AC_SUBST([moldeonetdir],$moldeonetdir)
AC_SUBST([moldeocontroldir],$moldeocontroldir)
AC_SUBST([moldeocontrolapp],$moldeocontrolapp)
AC_SUBST([nwjsdir],$nwjsdir)
AC_SUBST([nwjsexe],$nwjsexe)
AC_SUBST([nwjslocalesdir],$nwjslocalesdir)
AC_SUBST([nwjslibdir],$nwjslibdir)
AC_SUBST([nwjsswiftshaderdir],$nwjsswiftshaderdir)
AC_SUBST([nwjsfiles],$nwjsfiles)
AC_SUBST([nwjslocalesfiles],$nwjslocalesfiles)
AC_SUBST([nwjslibfiles],$nwjslibfiles)
AC_SUBST([nwjsswiftshaderfiles],$nwjsswiftshaderfiles)
AC_SUBST([nwjspermissions],$nwjspermissions)
AC_CONFIG_FILES([moldeo], [chmod +x moldeo])
AC_CONFIG_SUBDIRS()
dnl autoscan results
AC_CHECK_FUNCS([floor])
AC_CHECK_FUNCS([getcwd])
AC_CHECK_FUNCS([memmove])
AC_CHECK_FUNCS([memset])
AC_CHECK_FUNCS([pow])
AC_CHECK_FUNCS([rint])
AC_CHECK_FUNCS([sqrt])
AC_CHECK_FUNCS([strchr])
AC_CHECK_FUNCS([strstr])
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([float.h])
AC_CHECK_HEADERS([limits.h])
AC_CHECK_HEADERS([stddef.h])
AC_CHECK_HEADERS([stdlib.h])
AC_CHECK_HEADERS([string.h])
AC_CHECK_TYPES([ptrdiff_t])
AC_C_INLINE
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_VPRINTF
AC_HEADER_STDBOOL
AC_HEADER_STDC
AC_PREREQ
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
LT_INIT
AC_STRUCT_TM
AC_TYPE_SIZE_T
AC_OUTPUT([
Makefile
MoldeoControl/Makefile
moldeo.desktop
])