forked from coin3d/sowin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
608 lines (483 loc) · 19.3 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
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
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
# **************************************************************************
# SoWin/configure.in
m4_define([SOWIN_MAJOR], [1])
m4_define([SOWIN_MINOR], [6])
m4_define([SOWIN_MICRO], [2])
m4_define([SOWIN_BETA], [])
m4_define([SOWIN_VERSION_STRING],
[SOWIN_MAJOR.SOWIN_MINOR.SOWIN_MICRO[]SOWIN_BETA])
m4_define([SOWIN_ABI_CURRENT], [m4_eval((SOWIN_MAJOR*20)+SOWIN_MINOR)])
m4_define([SOWIN_ABI_REVISION], [SOWIN_MICRO])
m4_define([SOWIN_ABI_AGE], [SOWIN_MINOR])
# **************************************************************************
AC_INIT([SoWin], [SOWIN_VERSION_STRING], [coin-support@coin3d.org])
AC_CONFIG_SRCDIR([src/Inventor/Win/SoWin.cpp])
AC_CONFIG_AUX_DIR([cfg])
# FIXME: using SoWin on top of SGI and / or TGS Inventor is simply an
# un-implemented feature yet. 20020103 mortene.
if test x"${with_inventor+set}" = x"set"; then
AC_MSG_ERROR([SoWin has not been tuned for linking against non-Coin Inventor implementations yet])
fi
# **************************************************************************
AC_CANONICAL_SYSTEM
SIM_AC_MSVC_DSP_ENABLE_OPTION
SIM_AC_SETUP_MSVCPP_IFELSE
# **************************************************************************
# Library versioning. For information about our versioning strategy, see the
# document ``HACKING'' in the Coin CVS module.
AC_SUBST([SOWIN_MAJOR_VERSION], [SOWIN_MAJOR])
AC_SUBST([SOWIN_MINOR_VERSION], [SOWIN_MINOR])
AC_SUBST([SOWIN_MICRO_VERSION], [SOWIN_MICRO])
AC_SUBST([SOWIN_VERSION], [$SOWIN_MAJOR_VERSION.$SOWIN_MINOR_VERSION.$SOWIN_MICRO_VERSION])
VERSION=$SOWIN_VERSION
# Libtool versioning
AC_SUBST([LT_CURRENT], [SOWIN_ABI_CURRENT])
AC_SUBST([LT_REVISION], [SOWIN_ABI_REVISION])
AC_SUBST([LT_AGE], [SOWIN_ABI_AGE])
AC_DEFINE_UNQUOTED(SOWIN_MAJOR_VERSION, $SOWIN_MAJOR_VERSION,
[Define to the major version of SoWin])
AC_DEFINE_UNQUOTED(SOWIN_MINOR_VERSION, $SOWIN_MINOR_VERSION,
[Define to the minor version of SoWin])
AC_DEFINE_UNQUOTED(SOWIN_MICRO_VERSION, $SOWIN_MICRO_VERSION,
[Define to the micro version of SoWin])
if test x"$SOWIN_BETA_VERSION" = x""; then :; else
AC_DEFINE_UNQUOTED([SOWIN_BETA_VERSION], [$SOWIN_BETA_VERSION],
[define this to the SoWin beta version letter])
fi
AC_DEFINE_UNQUOTED(SOWIN_VERSION, "$SOWIN_VERSION",
[Version string for SoWin])
# **************************************************************************
sowin_build_dir=`pwd`
sowin_src_dir=`cd "$srcdir"; pwd`
sowin_w32_build_dir=`cygpath -w "$sowin_build_dir" 2>/dev/null || echo "$sowin_build_dir"`
sowin_w32_src_dir=`cygpath -w "$sowin_src_dir" 2>/dev/null || echo "$sowin_src_dir"`
SIM_AC_RELATIVE_SRC_DIR
AC_SUBST([sowin_build_dir])
AC_SUBST([sowin_src_dir])
AC_SUBST([sowin_w32_build_dir])
AC_SUBST([sowin_w32_src_dir])
# **************************************************************************
AH_TOP([
#ifndef SOWIN_INTERNAL
#error this is a private header file
#endif /* !SOWIN_INTERNAL */
])
# **************************************************************************
# Locate C++ compiler and set C++ as the default language to use
# in tests. The configure script will automatically terminate if
# it doesn't find a C++ compiler.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CXXCPP
SIM_AC_STRIP_EXIT_DECLARATION
AC_OBJEXT
AC_EXEEXT
case ${enable_static-no} in
yes | true) SOWIN_STATIC=true
enable_shared=no ;;
*) SOWIN_STATIC=false ;;
esac
case ${enable_shared-default} in
default) ;;
yes | true) SOWIN_STATIC=false ;;
*) SOWIN_STATIC=true ;;
esac
# moved below AC_PROG_CC so -g is preserved in $C[XX]FLAGS - 20020521 mortene
if $BUILD_WITH_MSVC; then
SIM_AC_SETUP_MSVCRT([
CPPFLAGS="$CPPFLAGS $sim_ac_msvcrt_CPPFLAGS"
CFLAGS="$CFLAGS $sim_ac_msvcrt_CFLAGS"
CXXFLAGS="$CXXFLAGS $sim_ac_msvcrt_CXXFLAGS"
LDFLAGS="$LDFLAGS $sim_ac_msvcrt_LDFLAGS"
LIBS="$LIBS $sim_ac_msvcrt_LIBS"
# sim_ac_msvcrt_LIBLIBS is set up at the end
# sim_ac_msvcrt_LIBLDFLAGS is set up at the end
LDFLAGS="$LDFLAGS $sim_ac_msvcrt_LIBLDFLAGS"
LIBS="$LIBS $sim_ac_msvcrt_LIBLIBS"
AC_SUBST([SOGUI_MSVC_LIBC], [$sim_ac_msvcrt])
])
fi
# **************************************************************************
AM_INIT_AUTOMAKE(SoWin, $SOWIN_VERSION)
AM_CONFIG_HEADER([src/config.h])
AM_DISABLE_STATIC
AM_MAINTAINER_MODE
# don't use CygWin's ranlib on static library
if $BUILD_WITH_MSVC; then
RANLIB=true
export RANLIB
fi
AC_PROG_LIBTOOL
# These are used for constructing the sowin-config file.
AC_SUBST([SOGUI_EXTRA_CPPFLAGS], [$CPPFLAGS])
AC_SUBST([SOGUI_EXTRA_CFLAGS], [$CFLAGS])
AC_SUBST([SOGUI_EXTRA_CXXFLAGS], [$CXXFLAGS])
AC_SUBST([SOGUI_EXTRA_LDFLAGS], [$LDFLAGS])
AC_SUBST([SOGUI_EXTRA_LIBS], [$LIBS])
# **************************************************************************
# Header files we might want.
# We expect these to include their own dependencies.
AC_CHECK_HEADERS([windows.h crtdbg.h unistd.h sys/types.h sys/time.h X11/extensions/SGIMisc.h X11/Xproto.h X11/extensions/XInput.h netinet/in.h])
SIM_AC_CHECK_HEADER_TLHELP32_H
SIM_AC_CHECK_WIN32_API
# **************************************************************************
# Misc set-up.
if $SOWIN_STATIC; then :; else
# Functions from the gdi32.lib and user32.lib libraries are used.
LIBS="$LIBS -lgdi32 -luser32"
fi
SOGUI_EXTRA_LIBS="$SOGUI_EXTRA_LIBS -lgdi32 -luser32"
# *******************************************************************
# Instead of getenv() on most Win32 platforms (not Windows CE).
AC_MSG_CHECKING([for GetEnvironmentVariable() function])
AC_TRY_LINK([#include <windows.h>],
[(void)GetEnvironmentVariable("FOOBAR", NULL, 0);],
[AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_GETENVIRONMENTVARIABLE],1, [Define to use GetEnvironmentVariable() instead of getenv()])],
[AC_MSG_RESULT([no])])
# *******************************************************************
# This function supersedes SetWindowLong() and is recommended for
# 64-bit compatibility, but is not part of the MSVC 6 SDK.
#
# The LONG_PTR type is not available from MSVC 6 either.
AC_MSG_CHECKING([for SetWindowLongPtr() function])
AC_TRY_LINK([#include <windows.h>],
[(void)SetWindowLongPtr(0, 0, 0); (void)GetWindowLongPtr(0, 0);],
[AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_SETWINDOWLONGPTR], 1, [Define to use SetWindowLongPtr() instead of SetWindowLong()])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for SetClassLongPtr() function])
AC_TRY_LINK([#include <windows.h>],
[(void)SetClassLongPtr(0, 0, 0); (void)GetClassLongPtr(0, 0);],
[AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_SETCLASSLONGPTR], 1, [Define to use SetClassLongPtr() instead of SetClassLong()])],
[AC_MSG_RESULT([no])])
AC_MSG_CHECKING([for LONG_PTR type])
AC_TRY_COMPILE([#include <windows.h>],
[LONG_PTR tjobing;],
[AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_LONG_PTR_TYPE], 1, [Define if LONG_PTR typedef / define is available])],
[AC_MSG_RESULT([no])])
# *******************************************************************
# Win32 LoadLibrary() and friends available? (Used for Win32-specific
# debugging code).
SIM_AC_CHECK_LOADLIBRARY(
AC_DEFINE([HAVE_WIN32_LOADLIBRARY], 1, [Define to use Win32 LoadLibrary()])
)
# **************************************************************************
# Compiler control.
# Make it possible for the user to turn off optimization flags.
SIM_AC_COMPILER_OPTIMIZATION
SIM_AC_COMPILE_DEBUG(
[CPPFLAGS="$CPPFLAGS -DSOWIN_DEBUG=1"],
[CPPFLAGS="$CPPFLAGS -DSOWIN_DEBUG=0"])
SIM_AC_CHECK_VAR_FUNCTIONNAME
SIM_AC_DEBUGSYMBOLS
SIM_AC_RTTI_SUPPORT
SIM_AC_EXCEPTION_HANDLING
SIM_AC_PROFILING_SUPPORT
SIM_AC_COMPILER_WARNINGS
# This is at least used to allow static compilation on Cygwin + MSWindows
# without hitting the SOWIN_DLL / SOWIN_NOT_DLL safety check.
CPPFLAGS="$CPPFLAGS -DSOWIN_INTERNAL"
SIM_AC_SOGUI_STATIC_DEFAULTS
# **************************************************************************
# Variable substitutions for using libSoWin in the generic code.
AC_SUBST([Gui], [Win])
AC_SUBST([gui], [win])
AC_SUBST([GUI], [WIN])
AC_SUBST([WIDGET], [HWND])
AC_SUBST([EVENT], ["MSG *"])
AC_SUBST([COMPONENTHEADER], [])
# **************************************************************************
sim_ac_makensis_exe=false
case $host in
*-cygwin)
AC_PATH_PROG([sim_ac_makensis_exe], [makensis], [false], [$PATH])
;;
esac
# **************************************************************************
# it is important that $CONFIG is set up before the Coin detection is run...
AC_ARG_WITH(
[alternate],
[AC_HELP_STRING([--with-alternate=string],
[specify name of alternate configuration])],
[CONFIG=$withval],
[CONFIG=default])
AC_SUBST(CONFIG)
AC_ARG_WITH(
[suffix],
[AC_HELP_STRING([--with-suffix=string],
[specify library name suffix (e.g. "d" for debug)])],
[SUFFIX=$withval],
[SUFFIX=])
AC_SUBST(SUFFIX)
# **************************************************************************
AM_CONDITIONAL([MAC_FRAMEWORK], [false])
SIM_AC_SOGUI_SETUP_DOXYGEN(SoWin)
# The following variables are used in sogui.doxygen.in
AC_SUBST([SOGUI_MAJOR_VERSION], [SOWIN_MAJOR])
# **************************************************************************
AC_ARG_WITH(
[alternate],
[AC_HELP_STRING([--with-alternate=string],
[specify name of alternate configuration])],
[CONFIG=$withval],
[CONFIG=default])
AC_SUBST(CONFIG)
AC_ARG_WITH(
[suffix],
[AC_HELP_STRING([--with-suffix=string],
[specify library name suffix (e.g. "_g")])],
[SUFFIX=$withval],
[SUFFIX=])
AC_SUBST(SUFFIX)
# **************************************************************************
sim_ac_build_library=true
sim_ac_build_ivf=false
AC_ARG_ENABLE(
[build],
[AC_HELP_STRING([--disable-build], [disable configuring for library build])],
[case $enableval in
no | false)
sim_ac_build_library=false
SIM_AC_CONFIGURATION_SETTING([SoWin build type], [build disabled])
;;
esac])
if $sim_ac_build_library; then
AC_ARG_ENABLE(
[ivf],
[AC_HELP_STRING([--enable-ivf], [enable build of the Ivf API])],
[case $enableval in
yes | true)
sim_ac_build_ivf=true
SIM_AC_CONFIGURATION_SETTING([Ivf build], [enabled (incomplete, experimental)])
;;
esac])
fi
# **************************************************************************
AM_CONDITIONAL(BUILD_LIBRARY, $sim_ac_build_library)
AM_CONDITIONAL(BUILD_IVF, $sim_ac_build_ivf)
if $sim_ac_build_ivf; then
AC_DEFINE([HAVE_IVF], 1, [Define if the Ivf API is to be included in the SoWin library])
else
SIM_AC_CONFIGURATION_SETTING([Ivf build], [disabled (default)])
fi
# **************************************************************************
# Will naturally always be false for SoWin.
AM_CONDITIONAL(BUILD_METAFILES, false)
AM_CONDITIONAL(HAVE_JOYSTICK_LINUX, false)
# **************************************************************************
# Always available on windows
AC_DEFINE([HAVE_SPACENAV_SUPPORT], 1, [Define if the Space Navigator support should be included])
# **************************************************************************
# Search for and set up stuff we depend on.
# At least with MSVC++, these headers needs windows.h to be
# included first.
AC_CHECK_HEADERS([GL/gl.h GL/glu.h], [], [], [
#if HAVE_WINDOWS_H
#include <windows.h>
#endif
])
# Expected to be correct for Mac OS X.
AC_CHECK_HEADERS([OpenGL/gl.h OpenGL/glu.h])
AC_LANG(C++)
# check for Coin library and its dependencies
if $sim_ac_build_library; then
SIM_AC_HAVE_COIN_IFELSE([
SOGUI_EXTRA_CPPFLAGS="$SOGUI_EXTRA_CPPFLAGS $sim_ac_coin_cppflags"
SOGUI_EXTRA_LDFLAGS="$SOGUI_EXTRA_LDFLAGS $sim_ac_coin_ldflags"
SOGUI_EXTRA_LIBS="$sim_ac_coin_libs $SOGUI_EXTRA_LIBS"
CPPFLAGS="$CPPFLAGS $sim_ac_coin_cppflags"
if $SOWIN_STATIC && $BUILD_WITH_MSVC; then :; else
LDFLAGS="$LDFLAGS $sim_ac_coin_ldflags"
LIBS="$sim_ac_coin_libs $LIBS"
fi
], AC_MSG_ERROR(couldn't compile and link against Coin))
fi
## FIXME: make it possible to build SoWin on top of SGI Inventor.
## 20011007 mortene.
# **************************************************************************
# misc implementation-dependent Open Inventor features
# One or more of the macros used above is buggy and doesn't reset
# from C to C++ mode. The AC_LANG(C++) reset below is a work-around.
# FIXME: should of course smoke out the offender and fix that instead
# of just hiding the bug. 20011012 mortene.
sim_ac_configure_save_ldflags=$LDFLAGS
sim_ac_configure_save_libs=$LIBS
if $SOWIN_STATIC && $BUILD_WITH_MSVC; then
LDFLAGS="$LDFLAGS $sim_ac_coin_ldflags"
LIBS="$sim_ac_coin_libs $LIBS"
fi
SIM_AC_HAVE_INVENTOR_NODE(SoPolygonOffset)
SIM_AC_HAVE_INVENTOR_FEATURE(
[for SoKeyboardEvent::DELETE enum],
[#include <Inventor/events/SoKeyboardEvent.h>], [
/* This is either DELETE or KEY_DELETE */
SoKeyboardEvent::Key key = SoKeyboardEvent::DELETE;],
[HAVE_SOKEYBOARDEVENT_DELETE])
SIM_AC_HAVE_INVENTOR_FEATURE(
[for SoMouseButtonEvent::BUTTON5 enum],
[#include <Inventor/events/SoMouseButtonEvent.h>], [
/* mouse wheel support needs BUTTON4 and BUTTON5 */
SoMouseButtonEvent::Button button = SoMouseButtonEvent::BUTTON5;],
[HAVE_SOMOUSEBUTTONEVENT_BUTTON5])
SIM_AC_HAVE_INVENTOR_FEATURE(
[for SoCamera::setStereoMode() function],
[#include <Inventor/nodes/SoPerspectiveCamera.h>], [
/* SoCamera is abstract, so test with SoPerspectiveCamera */
SoPerspectiveCamera * c = new SoPerspectiveCamera;
c->setStereoMode(SoCamera::MONOSCOPIC);],
[HAVE_SOCAMERA_SETSTEREOMODE])
SIM_AC_HAVE_INVENTOR_FEATURE(
[for SoGLRenderAction::SORTED_LAYERS_BLEND transparency mode],
[#include <Inventor/actions/SoGLRenderAction.h>], [
/* try to get SORTED_LAYERS_BLEND transparency mode value */
int num = (int) SoGLRenderAction::SORTED_LAYERS_BLEND;],
[HAVE_SORTED_LAYERS_BLEND])
AC_DEFINE_UNQUOTED([GUI_TOOLKIT_VERSION], [GetOSDisplayString()],
[Version string for Windows])
LDFLAGS=$sim_ac_configure_save_ldflags
LIBS=$sim_ac_configure_save_libs
# **************************************************************************
AC_SUBST([sowin_build_dir])
AC_SUBST([sowin_src_dir])
AC_SUBST([sowin_w32_build_dir])
AC_SUBST([sowin_w32_src_dir])
# **************************************************************************
# Remove redundant options from certain option lists.
SIM_AC_UNIQIFY_LIST(SOGUI_EXTRA_CPPFLAGS, -I$includedir $SOGUI_EXTRA_CPPFLAGS)
SIM_AC_UNIQIFY_LIST(SOGUI_EXTRA_LDFLAGS, -L$libdir $SOGUI_EXTRA_LDFLAGS)
SIM_AC_UNIQIFY_LIST(SOGUI_EXTRA_LIBS, $SOGUI_EXTRA_LIBS)
SIM_AC_UNIQIFY_LIST(CPPFLAGS, $CPPFLAGS)
SIM_AC_UNIQIFY_LIST(LDFLAGS, $LDFLAGS)
SIM_AC_UNIQIFY_LIST(LIBS, $LIBS)
AC_SUBST([LIBFLAGS], [])
# **************************************************************************
# Remaining setup based on platform.
# check if compiler/linker handles __declspec()
sim_ac_win32_declspec_available=false
AC_MSG_CHECKING([for __declspec() support])
AC_TRY_LINK(
[],
[__declspec(dllimport) int foo;],
[sim_ac_win32_declspec_available=true
AC_MSG_RESULT([available])],
[AC_MSG_RESULT([not available])])
if $sim_ac_win32_declspec_available; then
if $SOWIN_STATIC; then
SOGUI_EXTRA_CPPFLAGS="$SOGUI_EXTRA_CPPFLAGS -DSOWIN_NOT_DLL"
else
CPPFLAGS="-DSOWIN_MAKE_DLL $CPPFLAGS"
SOGUI_EXTRA_CPPFLAGS="$SOGUI_EXTRA_CPPFLAGS -DSOWIN_DLL"
fi
fi
AM_CONDITIONAL(BUILD_WITH_MSVC, $BUILD_WITH_MSVC)
if $BUILD_WITH_MSVC; then
rm -f vc60.pdb
## Ensure that if we link with Coin, we use the same C library as Coin
if test x"$sim_ac_coin_msvcrt" != x"" &&
test x"$sim_ac_msvcrt" != x"$sim_ac_coin_msvcrt"; then
SIM_AC_CONFIGURATION_WARNING([You have built Coin with the $sim_ac_coin_msvcrt C library, while you try to build So$Gui with the $sim_ac_msvcrt C library. This can cause mysterious crashes for you. We recommend that you run So$Gui's configure script with the --with-msvcrt=$sim_ac_coin_msvcrt option.])
fi
LIBFLAGS="$LIBFLAGS $sim_ac_msvcrt_LIBLDFLAGS"
LIBS="$LIBS $sim_ac_msvcrt_LIBLIBS"
debugfile="`pwd`/src/Inventor/Win/sowin${SOWIN_MAJOR_VERSION}${SUFFIX}.pdb"
debugfile=`cygpath -w "$debugfile" | sed 's,\\\\,\\\\\\\\,g'`
if $SOWIN_STATIC; then
SIM_AC_CONFIGURATION_SETTING([SoWin build type], [static .lib])
LIBFLAGS="-LIB $LIBFLAGS"
LIBFLAGS="$LIBFLAGS /OUT:sowin$SOWIN_MAJOR_VERSION$SUFFIX.lib"
else
LIBFLAGS="-DLL /INCREMENTAL:NO $LIBFLAGS"
case $enable_symbols in
no | false)
SIM_AC_CONFIGURATION_SETTING([SoWin build type],
[dynamic .dll, no symbols])
LIBFLAGS="$LIBFLAGS /RELEASE"
;;
*)
SIM_AC_CONFIGURATION_SETTING([SoWin build type], [dynamic .dll + .pdb])
CFLAGS="/Fd$debugfile $CFLAGS"
CXXFLAGS="/Fd$debugfile $CXXFLAGS"
LIBFLAGS="$LIBFLAGS /DEBUG /PDB:sowin$SOWIN_MAJOR_VERSION$SUFFIX.pdb"
;;
esac
LIBFLAGS="$LIBFLAGS /OUT:sowin$SOWIN_MAJOR_VERSION$SUFFIX.dll"
fi
SIM_AC_CONFIGURATION_SETTING([C library version], [$sim_ac_msvcrt])
# We use a version suffix on the .dll-file, so several incompatible
# (major) versions can be installed on a system.
#
# BTW, when linking DLLs, the 3rd-party .lib files will be
# linked into the .dll file. I believe it is still advisable to
# list all libs used upon `sowin-config --libs`, as we can then
# also use them from "parent" code (remember that their interfaces
# is not exposed from the DLL) without any fuss.
SOGUI_EXTRA_LIBS="-lsowin$SOWIN_MAJOR_VERSION$SUFFIX $SOGUI_EXTRA_LIBS"
win_srcdir=`cd $srcdir; pwd`
win_srcdir=`cygpath -w "$srcdir" | sed 's,\\\\,\\\\\\\\,g'`
AC_SUBST(win_srcdir)
else
SOGUI_EXTRA_LIBS="-lSoWin $SOGUI_EXTRA_LIBS"
# For the build/sowin.spec RPM specification file.
SIM_AC_ISO8601_DATE(sowin_configure_date)
AC_SUBST(sowin_configure_date)
fi
COIN_COMPILER="$CXX"
if $BUILD_WITH_MSVC; then
COIN_COMPILER="wrapmsvc"
fi
AC_SUBST(COIN_COMPILER)
SIM_AC_MSVC_DSP_SETUP([SOWIN], [SoWin], [sowin], [-I$sowin_build_dir/src -I$sowin_build_dir/data -I$sowin_src_dir/src])
# **************************************************************************
# Submodules that needs to be configured...
# Material editor(s) not part of the public API yet, so there's
# no point yet in installing the material data.
# AC_CONFIG_SUBDIRS(data)
# **************************************************************************
# finally generate all the directories, makefiles, autogenerated
# sourcefiles, and config headers.
#
# Note that sowin-$CONFIG.cfg needs to be generated from the configure
# script -- not just from the Makefile -- as the data/configure script
# depends on it. (data/configure is temporarily disabled, BTW, but anyway..)
AC_OUTPUT([
sowin-$CONFIG.cfg:src/Inventor/Win/common/sogui.cfg.in
SoWin.pc
Makefile
src/Makefile
src/Ivf/Makefile
src/Inventor/Makefile
src/Inventor/Win/Makefile
src/Inventor/Win/devices/Makefile
src/Inventor/Win/editors/Makefile
src/Inventor/Win/engines/Makefile
src/Inventor/Win/nodes/Makefile
src/Inventor/Win/widgets/Makefile
src/Inventor/Win/viewers/Makefile
man/Makefile
man/man1/Makefile
man/man3/Makefile
html/Makefile
htmlhelp/Makefile
cfg/gendsp.sh
cfg/gendsp.pl
])
if test -f cfg/gendsp.sh; then
chmod +x cfg/gendsp.sh
fi
if test -f cfg/gendsp.pl; then
chmod +x cfg/gendsp.pl
fi
SIM_AC_CONFIGURATION_SETTING([Installation Prefix], [$prefix])
SIM_AC_CONFIGURATION_SUMMARY
if $sim_ac_build_library; then
echo ""
echo "Now, run 'make install' to build and install."
echo ""
else
echo ""
fi
# **************************************************************************