-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
executable file
·320 lines (243 loc) · 10.1 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
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
dnl Process this file with autoconf to produce a configure script.
AC_REVISION(Nicolas Macherey)
dnl
AC_PREREQ(2.58)
dnl ---------------------------------------------------------------------------
dnl Top-level configure.in for Rheia by Nicolas Macherey
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl initialization
dnl ---------------------------------------------------------------------------
AC_INIT([Rheia Framework], [2.0.0], [[email protected]])
dnl the file passed to AC_CONFIG_SRCDIR should be specific to our package
dnl AC_CONFIG_SRCDIR([rheia-config.in])
dnl the file passed to AC_CONFIG_SRCDIR should be specific to our package
AC_CONFIG_SRCDIR([rheia-config.in])
AC_CANONICAL_HOST
dnl notice that if --host was given but --build was not, cross_compiling is
dnl only set to "maybe" and not "yes" and will be either set to "yes" later or
dnl configure will exit with error in AC_PROG_CC so don't test for = "yes" here
if test "$cross_compiling" != "no"; then
HOST_PREFIX="${host_alias}-"
HOST_SUFFIX="-$host_alias"
else
HOST_PREFIX=
HOST_SUFFIX=
fi
AC_SUBST(HOST_SUFFIX)
dnl When making releases do:
dnl
dnl rheia_release_number += 1
rheia_major_version_number=2
rheia_minor_version_number=0
rheia_release_number=0
rheia_subrelease_number=0
RHEIA_RELEASE=$rheia_major_version_number.$rheia_minor_version_number
RHEIA_VERSION=$RHEIA_RELEASE.$rheia_release_number
RHEIA_SUBVERSION=$RHEIA_VERSION.$rheia_subrelease_number
RHEIA_MSW_VERSION=$rheia_major_version_number$rheia_minor_version_number$rheia_release_number
AC_SUBST(RHEIA_RELEASE)
AC_SUBST(RHEIA_VERSION)
AC_SUBST(RHEIA_SUBVERSION)
AC_SUBST(RHEIA_MSW_VERSION)
dnl Autoconf-2.60 changed the meaning of top_builddir variable, so we have
dnl to use our own replacement that will work with both 2.5x and 2.60+:
rheia_top_builddir="`pwd`"
AC_SUBST(rheia_top_builddir)
mkdir -p $rheia_top_builddir/lib
mkdir -p $rheia_top_builddir/bin
dnl Enable the debug information
DEBUG_INFO=0
DEBUG_FLAG=0
BUILD=release
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [Enable feature debug]))
AS_IF([test "x$enable_debug" = "xyes"], [
DEBUG_INFO=1
DEBUG_FLAG=1
BUILD=debug
])
AC_SUBST(DEBUG_INFO)
AC_SUBST(DEBUG_FLAG)
AC_SUBST(BUILD)
SHARED=1
AC_SUBST(SHARED)
RHEIA_UNIV=0
AC_SUBST(RHEIA_UNIV)
dnl Enable or no unicode build
UNICODE=0
RHEIA_CHARTYPE="ansi"
lib_unicode_suffix=
AC_ARG_ENABLE([unicode],
AS_HELP_STRING([--enable-unicode], [Enable feature unicode]))
AS_IF([test "x$enable_unicode" = "xyes"], [
UNICODE=1
RHEIA_CHARTYPE="unicode"
lib_unicode_suffix=u
])
AC_SUBST(UNICODE)
AC_SUBST(RHEIA_CHARTYPE)
dnl check if we are using wx29 libraries or not
USE_WX29=0
AC_ARG_ENABLE([wx29],
AS_HELP_STRING([--enable-wx29], [Link against wx29 libraries]))
AS_IF([test "x$enable_wx29" = "xyes"], [
USE_WX29=1
])
AC_SUBST(USE_WX29)
dnl Enable monolithic buil
MONOLITHIC=0
AC_ARG_ENABLE(monolithic,
AS_HELP_STRING([--enable-monolithic], [Build all rheia libraries in the same one]))
AS_IF([test "x$enable_monolithic" = "xyes"], [
MONOLITHIC=1
])
AC_SUBST(MONOLITHIC)
dnl Enable wx monolithic build
WXMONOLITHIC=0
AC_ARG_ENABLE(wxmonolithic,
AS_HELP_STRING([--enable-wxmonolithic], [Link against wxWidgets monolithic library]))
AS_IF([test "x$enable_wxmonolithic" = "xyes"], [
WXMONOLITHIC=1
])
AC_SUBST(WXMONOLITHIC)
dnl Disable exceptions
USE_EXCEPTIONS=1
AC_SUBST(USE_EXCEPTIONS)
dnl Disbale threading
USE_THREADS=1
AC_SUBST(USE_THREADS)
dnl vendor name
AC_ARG_ENABLE(vendor, [ --enable-vendor=VENDOR vendor name (win32 DLL only)], [VENDOR="$enableval"])
if test "x$VENDOR" = "x"; then
VENDOR="custom"
fi
AC_SUBST(VENDOR)
dnl Rheia flavour
AC_ARG_WITH(flavour, [ --with-flavour=NAME specify a name to identify this build], [RHEIA_FLAVOUR="$withval"])
RHEIA_FLAVOUR=${RHEIA_FLAVOUR:+-$RHEIA_FLAVOUR}
RHEIA_LIB_FLAVOUR=`echo $RHEIA_FLAVOUR | tr '-' '_'`
AC_SUBST(RHEIA_FLAVOUR)
AC_SUBST(RHEIA_LIB_FLAVOUR)
dnl Specify the wx-config
AC_ARG_WITH(wx-config, [ --with-wx-config=PATH specify the path of your wx-config script], [WXCONFIG_PATH="$withval"])
if test "$WXCONFIG_PATH" == "" ; then
WXCONFIG_PATH=/usr/bin
fi
if test "$WXCONFIG_PATH" == "yes" ; then
WXCONFIG_PATH=/usr/bin
fi
AC_MSG_NOTICE($WXCONFIG_PATH)
AC_SUBST(WXCONFIG_PATH)
dnl specify if we are using irrlicht and plplot
WX_ARG_WITHOUT(irrlicht, [ --without-irrlicht ], rheiaUSE_IRRLICHT)
WX_ARG_WITHOUT(plplot, [ --without-plplot ], rheiaUSE_PLPLOT)
USE_IRRLICHT=0
if test "$rheiaUSE_IRRLICHT" != "no" ; then
USE_IRRLICHT=1
fi
AC_SUBST(USE_IRRLICHT)
USE_PLPLOT=0
if test "$rheiaUSE_PLPLOT" != "no" ; then
USE_PLPLOT=1
fi
AC_SUBST(USE_PLPLOT)
dnl information for toolkit
dnl the list of all available toolkits
dnl
dnl update NUM_TOOLKITS calculation below when adding a new toolkit here!
ALL_TOOLKITS="COCOA GTK OSX_CARBON OSX_COCOA OSX_IPHONE MGL MICROWIN MOTIF MSW PM X11 DFB"
TOOLKIT=GTK
AC_ARG_WITH(gtk, [[ --with-gtk[=VERSION] use GTK+, VERSION can be 2 (default), 1 or "any"]], [rheiaUSE_GTK="$withval" CACHE_GTK=1 TOOLKIT=GTK])
AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], [rheiaUSE_MOTIF="$withval" CACHE_MOTIF=1 TOOLKIT=MOTIF])
AC_ARG_WITH(osx_carbon, [ --with-osx_carbon use Mac OS X (Carbon)], [rheiaUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT=OSX_CARBON rheiaUSE_MAC=1])
AC_ARG_WITH(osx_cocoa, [ --with-osx_cocoa use Mac OS X (Cocoa)], [rheiaUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT=OSX_COCOA rheiaUSE_MAC=1])
AC_ARG_WITH(osx_iphone, [ --with-osx_iphone use iPhone OS X port], [rheiaUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT=OSX_IPHONE])
AC_ARG_WITH(osx, [ --with-osx use Mac OS X (default port, currently Carbon)], [rheiaUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT=OSX rheiaUSE_MAC=1])
AC_ARG_WITH(carbon, [ --with-carbon same as --with-osx_carbon], [rheiaUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT=CARBON rheiaUSE_MAC=1])
AC_ARG_WITH(cocoa, [ --with-cocoa same as --with-osx_cocoa], [rheiaUSE_OSX_COCOA="$withval" CACHE_OSX_COCOA=1 TOOLKIT=COCOA rheiaUSE_MAC=1])
AC_ARG_WITH(iphone, [ --with-iphone same as --with-osx_iphone], [rheiaUSE_OSX_IPHONE="$withval" CACHE_OSX_IPHONE=1 TOOLKIT=IPHONE])
AC_ARG_WITH(mac, [ --with-mac same as --with-osx], [rheiaUSE_OSX_CARBON="$withval" CACHE_OSX_CARBON=1 TOOLKIT=MAC rheiaUSE_MAC=1])
AC_ARG_WITH(old_cocoa, [ --with-old_cocoa use old, deprecated, Cocoa port], [rheiaUSE_OLD_COCOA="$withval" CACHE_OLD_COCOA=1 TOOLKIT=OLD_COCOA rheiaUSE_MAC=1])
AC_ARG_WITH(wine, [ --with-wine use Wine], [rheiaUSE_WINE="$withval" CACHE_WINE=1 TOOLKIT=WINE])
AC_ARG_WITH(msw, [ --with-msw use MS-Windows], [rheiaUSE_MSW="$withval" CACHE_MSW=1 TOOLKIT=MSW])
AC_ARG_WITH(pm, [ --with-pm use OS/2 Presentation Manager], [rheiaUSE_PM="$withval" CACHE_PM=1 TOOLKIT=PM])
AC_ARG_WITH(mgl, [ --with-mgl use SciTech MGL], [rheiaUSE_MGL="$withval" rheiaUSE_UNIVERSAL="yes" CACHE_MGL=1 TOOLKIT=MGL])
AC_ARG_WITH(directfb, [ --with-directfb use DirectFB], [rheiaUSE_DFB="$withval" rheiaUSE_UNIVERSAL="yes" CACHE_DFB=1 TOOLKIT=DIRECTFB])
AC_ARG_WITH(microwin, [ --with-microwin use MicroWindows], [rheiaUSE_MICROWIN="$withval" CACHE_MICROWIN=1 TOOLKIT=MICROWIN])
AC_ARG_WITH(x11, [ --with-x11 use X11], [rheiaUSE_X11="$withval" rheiaUSE_UNIVERSAL="yes" CACHE_X11=1 TOOLKIT=X11])
if test "$TOOLKIT" = "GTK" ; then
TOOLKIT_VERSION=2
fi
TOOLKIT_LOWERCASE=`echo $TOOLKIT | tr '[[A-Z]]' '[[a-z]]'`
TOOLKIT_DIR="$TOOLKIT_LOWERCASE"
AC_SUBST(TOOLKIT)
AC_SUBST(TOOLKIT_LOWERCASE)
AC_SUBST(TOOLKIT_VERSION)
AC_SUBST(TOOLKI_DIR)
dnl cxx warnings
dnl CXXWARNINGS="-Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy"
CXXWARNINGS=
dnl when building under Mac we currently get hundreds of deprecation
dnl warnings for Carbon symbols from the standard headers -- disable them
dnl as we already know that they're deprecated and nothing else can be seen
dnl with these warnings on
if test "$rheiaUSE_MAC" = 1 ; then
CXXWARNINGS="$CXXWARNINGS -Wno-deprecated-declarations"
USE_MACOS=1
AC_SUBST(USE_MACOS)
fi
AC_SUBST(CXXWARNINGS)
AC_SUBST(EXTRALIBS)
dnl dylib path
DYLIB_RPATH_INSTALL=
DYLIB_RPATH_POSTLINK=
AC_SUBST(DYLIB_RPATH_INSTALL)
AC_SUBST(DYLIB_RPATH_POSTLINK)
dnl variables relaated to rheia-config script
STD_BASE_LIBS="utils base loggers workspacemgt packagemgt editor python webconnect"
BUILT_RHEIA_LIBS="$STD_BASE_LIBS"
ALL_RHEIA_LIBS="$BUILT_RHEIA_LIBS"
if test "$rheiaUSE_IRRLICHT" = "yes" ; then
STD_BASE_LIBS="irrlicht $STD_BASE_LIBS"
BUILT_RHEIA_LIBS="irrlicht $BUILT_RHEIA_LIBS"
fi
if test "$rheiaUSE_PLPLOT" = "yes" ; then
STD_BASE_LIBS="plplot wxplplot $STD_BASE_LIBS"
BUILT_RHEIA_LIBS="plplot wxplplot $BUILT_RHEIA_LIBS"
fi
MONO_LIB="mono"
AC_SUBST(ALL_RHEIA_LIBS)
AC_SUBST(BUILT_RHEIA_LIBS)
AC_SUBST(STD_BASE_LIBS)
AC_SUBST(MONO_LIB)
dnl bind egrep
EGREP=egrep
AC_SUBST(EGREP)
dnl base library name
WIDGET_SET=
if test "${TOOLKIT_DIR}" = "os2"; then
RHEIA_LIBRARY_BASENAME_GUI="rheia_pm${WIDGET_SET}${lib_unicode_suffix}${RHEIA_LIB_FLAVOUR}"
else
RHEIA_LIBRARY_BASENAME_GUI="rheia_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${RHEIA_LIB_FLAVOUR}"
fi
RHEIA_LIBRARY_BASENAME_NOGUI=$RHEIA_LIBRARY_BASENAME_GUI
AC_SUBST(RHEIA_LIBRARY_BASENAME_GUI)
AC_SUBST(RHEIA_LIBRARY_BASENAME_NOGUI)
dnl RHIEACONFIG_LDFLAGS
RHEIACONFIG_LDFLAGS=
RHEIACONFIG_LDFLAGS_GUI=
AC_SUBST(RHEIACONFIG_LDFLAGS)
AC_SUBST(RHEIACONFIG_LDFLAGS_GUI)
RHEIACONFIG_CPPFLAGS=
RHEIACONFIG_CFLAGS=
AC_SUBST(RHEIACONFIG_CFLAGS)
AC_SUBST(RHEIACONFIG_CPPFLAGS)
dnl TOOLCHAIN_FULLNAME
TOOLCHAIN_FULLNAME=rheia-config
AC_SUBST(TOOLCHAIN_FULLNAME)
AC_BAKEFILE([m4_include(autoconf_inc.m4)])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([ lib/rheia/config/rheia-config:rheia-config.in ],
[ chmod +x lib/rheia/config/rheia-config ])
AC_OUTPUT