root/juggler/branches/2.2/modules/vapor/configure.ac

Revision 21069, 41.1 kB (checked in by patrick, 8 months ago)

MFT r21067: Handle Boost 1.35 where the new library Boost.System is a

dependency of Boost.Filesystem.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
<
Line 
1 # ***************** <VPR heading BEGIN do not edit this line> *****************
2 #
3 # VR Juggler Portable Runtime
4 #
5 # Original Authors:
6 #   Allen Bierbaum, Patrick Hartling, Kevin Meinert, Carolina Cruz-Neira
7 #
8 # ****************** <VPR heading END do not edit this line> ******************
9
10 # ************** <auto-copyright.pl BEGIN do not edit this line> **************
11 #
12 # VR Juggler is (C) Copyright 1998-2007 by Iowa State University
13 #
14 # Original Authors:
15 #   Allen Bierbaum, Christopher Just,
16 #   Patrick Hartling, Kevin Meinert,
17 #   Carolina Cruz-Neira, Albert Baker
18 #
19 # This library is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU Library General Public
21 # License as published by the Free Software Foundation; either
22 # version 2 of the License, or (at your option) any later version.
23 #
24 # This library is distributed in the hope that it will be useful,
25 # but WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
27 # Library General Public License for more details.
28 #
29 # You should have received a copy of the GNU Library General Public
30 # License along with this library; if not, write to the
31 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
32 # Boston, MA 02111-1307, USA.
33 #
34 # *************** <auto-copyright.pl END do not edit this line> ***************
35
36 # -----------------------------------------------------------------------------
37 # Base configure.in for VR Juggler Portable Runtime.
38 # -----------------------------------------------------------------------------
39 # This file is "compiled" by GNU autoconf to generate the configure script
40 # that is actually run.
41 # -----------------------------------------------------------------------------
42
43 AC_INIT([VR Juggler Portable Runtime], [2.0],
44         [vrjuggler-devel@lists.sourceforge.net])
45 AC_CONFIG_HEADERS([vpr/vprDefines.h])
46 AC_PREREQ([2.53])
47 AC_COPYRIGHT([VR Juggler is (C) Copyright 1998-2007 by Iowa State University])
48 AC_CONFIG_SRCDIR([vpr/vprConfig.h])
49 AC_REVISION($Revision$)
50 AC_CONFIG_AUX_DIR([../../share/config])
51 DPP_PREREQ([2.1.9])
52 DPP_INIT
53
54 # Generate the reconfig script first so that it's easy to run configure again
55 # if it fails later on.
56 DPP_GEN_RECONFIG
57
58 # -----------------------------------------------------------------------------
59 # Path setup.
60 # -----------------------------------------------------------------------------
61 DPP_WIN32_SETUP
62
63 # $srcdir is the root directory of the juggler source tree.  To get a value
64 # for $VPRROOT_ABS, we cd there and save the value of running pwd.  Then
65 # return to the directory where configure is being run ($topdir).
66 cd "$srcdir"
67 UNIX_VPRROOT_ABS=`pwd`
68
69 cd "$UNIX_VPRROOT_ABS/../.."
70 UNIX_JUGGLERROOT_ABS=`pwd`
71 cd "$topdir"
72
73 if test "x$CYGPATH" != "xno" ; then
74    VPRROOT_ABS=`dospath -p "$UNIX_VPRROOT_ABS"`
75    JUGGLERROOT_ABS=`dospath -p "$UNIX_JUGGLERROOT_ABS"`
76 else
77    VPRROOT_ABS="$UNIX_VPRROOT_ABS"
78    JUGGLERROOT_ABS="$UNIX_JUGGLERROOT_ABS"
79 fi
80
81 # -----------------------------------------------------------------------------
82 # Command-line arguments (--enable-option, --with-pkg=package_name).
83 # -----------------------------------------------------------------------------
84
85 # ------------------------------------------------------ #
86 # --enable-feature[=arg] and --disable-feature arguments #
87 # ------------------------------------------------------ #
88
89 DPP_STD_CPP(yes)
90
91 # Define which threading model to use.  Possible values are "SPROC", "POSIX",
92 # or "NSPR".
93 # The default is "SPROC".
94 AC_ARG_ENABLE([subsystem],
95               [  --enable-subsystem=<SPROC|POSIX|NSPR>
96                           Define OS abstraction subsystem],
97               [SUBSYSTEM="$enableval"], [SUBSYSTEM='none'])
98
99 AC_ARG_ENABLE([versioning],
100               [  --disable-versioning    Disable all versioning capabilities],
101               [ENABLE_VERSIONING="$enableval"], [ENABLE_VERSIONING='yes'])
102
103 AC_ARG_ENABLE([simulator],
104               [  --enable-simulator      Compile simulated sockets layer ],
105               [SIMULATOR="$enableval"], [SIMULATOR='no'])
106
107 # Rudimentary spell checking based on the first letter in the $SUBSYSTEM name.
108 case $SUBSYSTEM in
109     S*)
110         SUBSYSTEM='SPROC'
111         ;;
112     P*)
113         SUBSYSTEM='POSIX'
114         ;;
115     N*)
116         SUBSYSTEM='NSPR'
117         ;;
118 esac
119
120 # This enables the use of so-called "NSPR threads".  By default, NSPR is not
121 # compiled to use NSPR threads, so we do not want to use them by default
122 # either.
123 DPP_ENABLE_NSPR_THREADS(no)
124
125 # Force the use of GCC as the compiler.
126 # NOTE: This is not fully implemented yet for any platform, but it is
127 # partially usable on Windows.
128 DPP_WITH_GCC(no)
129
130 if test "x$SIMULATOR" != "xno" ; then
131     SIMULATOR='Y'
132     AC_DEFINE(VPR_SIMULATOR, , [Define if VPR simulated sockets will be used.])
133 else
134     SIMULATOR='N'
135 fi
136
137 # Define the binary format.
138 DPP_ABI_SETUP
139
140 AC_ARG_WITH([boost-system-lib],
141             [  --with-boost-system-lib=<LIB NAME>
142                           The name of the Boost.System
143                           (1.35 and newer) library
144                           suitable for the -l compiler
145                           option                          [default=Auto-detect]],
146             [given_boost_system_libname="$withval"],
147             [given_boost_system_libname=''])
148
149 AC_ARG_WITH([boost-fs-lib],
150             [  --with-boost-fs-lib=<LIB NAME>
151                           The name of the Boost.Filesystem
152                           library suitable for the -l
153                           compiler option                 [default=Auto-detect]],
154             [given_boost_fs_libname="$withval"], [given_boost_fs_libname=''])
155
156 AC_ARG_WITH([boost-signals-lib],
157             [  --with-boost-signals-lib=<LIB NAME>
158                           The name of the Boost.Signals
159                           library suitable for the -l
160                           compiler option                 [default=Auto-detect]],
161             [given_boost_signals_libname="$withval"], [given_boost_signals_libname=''])
162
163 # -----------------------------------------------------------------------------
164 # System-dependent stuff.
165 # -----------------------------------------------------------------------------
166 AC_CANONICAL_TARGET
167 DPP_SYSTEM_SETUP
168
169 # These are used on all platforms.
170 AC_DEFINE_UNQUOTED([VPR_OS_RELEASE], ["$OS_REL_STR"],
171                    [Define to match the output of running 'uname -r'.])
172 AC_DEFINE_UNQUOTED([VPR_OS_RELEASE_MAJOR], [$OS_REL_NUM_MAJOR],
173                    [Define to match the numeric major version number of the target OS.])
174 AC_DEFINE_UNQUOTED([VPR_OS_RELEASE_MINOR], [$OS_REL_NUM_MINOR],
175                    [Define to match the numeric minor version number of the target OS.])
176
177 # Templates for Autoheader.
178 AH_TEMPLATE([_BSD_TYPES],
179             [Define if building on Darwin or IRIX.])
180 AH_TEMPLATE([VPR_OS_HPUX], [Define if building on HP-UX.])
181 AH_TEMPLATE([VPR_HPUX_VERSION],
182             [Define to the major version number of your HP-UX installation.])
183 AH_TEMPLATE([_INCLUDE_TERMIO], [Define if building on HP-UX.])
184 AH_TEMPLATE([_CMA_NOWRAPPERS_], [Define if building on HP-UX.])
185
186 AC_DEFUN([VPR_FORCE_SUBSYSTEM],
187 [
188    if test "x$SUBSYSTEM" = "xnone" ; then
189       AC_MSG_WARN([*** Forcing the use of the $1 subsystem ***])
190       SUBSYSTEM='$1'
191    fi
192 ])
193
194 # Depending on the target operating system, set various command options and
195 # such.
196 case $target_os in
197     # IBM RS/6000 running AIX.
198     aix*)
199         VPR_FORCE_SUBSYSTEM([POSIX])
200         AC_DEFINE(VPR_OS_AIX, , [Define if building on AIX.])
201         ;;
202     # i386-class machine running Windows {98,NT} with Cygnus GNU-Win32.
203     cygwin)
204         VPR_FORCE_SUBSYSTEM([NSPR])
205         AC_DEFINE(VPR_OS_Win32, , [Define if building on a Win32 platform.])
206         ;;
207     # Darwin, aka Mac OS X.
208     darwin*)
209         VPR_FORCE_SUBSYSTEM([POSIX])
210         AC_DEFINE(VPR_OS_Darwin, , [Define if building on Darwin.])
211         AC_DEFINE(_BSD_TYPES, 1)
212         ;;
213     # A machine running FreeBSD.  Currently only i386 is known to compile.
214     freebsd*)
215         VPR_FORCE_SUBSYSTEM([POSIX])
216         AC_DEFINE(VPR_OS_FreeBSD, , [Define if building on FreeBSD.])
217         ;;
218     # A machine running DragonFlyBSD.
219     dragonfly*)
220         VPR_FORCE_SUBSYSTEM([POSIX])
221         AC_DEFINE(VPR_OS_DragonFly, , [Define if building on DragonFly.])
222         ;;
223     # HP PA-RISC machine running HP-UX 10.20.
224     hpux10.20)
225         # We have to use the NSPR subsystem on HP-UX 10.20.
226         VPR_FORCE_SUBSYSTEM([NSPR])
227         AC_DEFINE(VPR_OS_HPUX,)
228         AC_DEFINE(VPR_HPUX_VERSION, 10)
229         AC_DEFINE(_INCLUDE_TERMIO,)
230         AC_DEFINE(_CMA_NOWRAPPERS_,)
231         ;;
232     # HP PA-RISC machine running HP-UX 11.x.
233     hpux11*)
234         AC_DEFINE(VPR_OS_HPUX,)
235         AC_DEFINE(VPR_HPUX_VERSION, 11)
236         AC_DEFINE(_INCLUDE_TERMIO,)
237         AC_DEFINE(_CMA_NOWRAPPERS_,)
238         ;;
239     # SGI running IRIX 6.*.
240     irix6*)
241         if test "x$USE_GCC" != "xyes" ; then
242             DBG_FLAGS="$DBG_FLAGS -gslim"
243         fi
244
245         VPR_FORCE_SUBSYSTEM([SPROC])
246         AC_DEFINE(VPR_OS_IRIX, , [Define if building on IRIX.])
247         AC_DEFINE(_BSD_TYPES,)
248         ;;
249     # A machine running Linux.  Currently only i386 is known to work.
250     linux*)
251         VPR_FORCE_SUBSYSTEM([POSIX])
252         AC_DEFINE(VPR_OS_Linux, , [Define if building on Linux.])
253         ;;
254     # DEC Alpha running Digital UNIX 4.0.
255     osf4.0)
256         AC_DEFINE(VPR_OS_DUX, , [Define if building on Digital UNIX.])
257         ;;
258     # A machine running Solaris (aka SunOS) 10.  Currently only i386 is known
259     # to work.
260     solaris2.10)
261         VPR_FORCE_SUBSYSTEM([POSIX])
262         AC_DEFINE(VPR_OS_Solaris, , [Define if building on Solaris/SunOS.])
263         ;;
264     # A machine running Solaris (aka SunOS) older than version 10 (2.10/5.10).
265     # Currently only i386 is known to work.
266     solaris*)
267         VPR_FORCE_SUBSYSTEM([NSPR])
268         AC_DEFINE(VPR_OS_Solaris, , [Define if building on Solaris/SunOS.])
269         ;;
270     unknown)
271         AC_DEFINE(VPR_OS_GENERIC, ,
272                   [Define if the target OS does not match anything else.])
273         ;;
274 esac
275
276 # -----------------------------------------------------------------------------
277 # Checks for programs.
278 # -----------------------------------------------------------------------------
279 VJ_COMPILER_SETUP
280 VJ_PROG_CC_PROF_FLAG(yes)
281 VJ_PROG_CXX_PROF_FLAG(yes)
282 DPP_PROG_CC_NOSTDINC
283
284 # Ensure that the C++ compiler we've found is capable of compiling the newer
285 # newer C++ features that we need.
286 DPP_CXX_NAMESPACE([AC_MSG_ERROR([*** The library requires C++ namesapce support ***])])
287 DPP_CXX_HAVE_STD
288 DPP_CXX_INLINE([AC_MSG_ERROR([*** The library requires C++ inline support ***])])
289 DPP_CXX_RTTI([AC_MSG_ERROR([*** The library requires C++ RTTI support ***])])
290 DPP_CXX_STATIC_CAST([AC_MSG_ERROR([*** The library requires C++ static_cast<> ***])])
291
292 # Now check to see if the compiler accepts the -pthread option.
293 if test "x$SUBSYSTEM" != "xSPROC" -a "x$NSPR_THREADS_ENABLED" = "xno" ; then
294     DPP_CC_PTHREAD_ARG
295
296     if test "x$CC_ACCEPTS_PTHREAD" = "xno" ; then
297         DPP_CC_PTHREADS_ARG
298     fi
299 fi
300
301 # Ensure that a version of Perl greater than or equal to 5.004 is available.
302 DPP_PERL_VER(5.004, , , [AC_MSG_ERROR([*** Perl is required ***])])
303
304 AC_CHECK_PROG([MTREE_CMD], [mtree], [mtree], [\$(PERL) \$(scriptdir)/mtree.pl])
305
306 DPP_HAVE_GNU_MAKE([3.78], ,
307     [AC_MSG_ERROR([*** The build system requires GNU make 3.78 or newer ***])])
308 DPP_BASIC_PROGS([$PLATFORM], [$OS_TYPE])
309 DPP_PROG_INSTALL
310 VJ_LINKER_SETUP
311
312 # -----------------------------------------------------------------------------
313 # Checks for libraries.
314 # -----------------------------------------------------------------------------
315
316 # The $USE_DYLD stuff is for Darwin.
317 DPP_CHECK_DYNLOAD_LIB([USE_DYLD='N'], [USE_DYLD='Y'])
318 DPP_HAVE_CPPUNIT([1.9.10])
319
320 # Shared memory and synchronization primitives.
321 SEMAPHORE_SYS=''                # POSIX, SPROC, NSPR
322 MUTEX_SYS=''                    # POSIX, SPROC, NSPR
323 SHMEM_SYS=''                    # POSIX, SPROC, NSPR
324 THREAD_SYS=''                   # POSIX, SPROC, NSPR
325
326 # Test for libpthread or for libcma if libpthread is not present.  If the
327 # library is found, check for pthread_kill().  If it is present, Draft 10 (the
328 # "final" draft) of the POSIX threads standard is in place.  If not, Draft 4
329 # is available.
330 if test "x$SUBSYSTEM" = "xPOSIX" ; then
331     DPP_GET_PTHREAD_LIB
332
333     # If $PTHREAD_LIB has a value at this point, then the pthread libraries
334     # needed are in $LIBS, so now we make a check for the draft revision being
335     # used.  This is done by determining if pthread_kill() is in the library.
336     # If it is, Draft 10 is in use.  Otherwise, assume it is Draft 4.
337     if test "$xPTHREAD_LIB" != "x" ; then
338         AH_TEMPLATE([VPR_POSIX_C_SOURCE],
339                     [Define if using POSIX threads.])
340         DPP_GET_PTHREAD_VER([$PLATFORM], [VPR_POSIX_C_SOURCE])
341
342         AH_TEMPLATE([VPR_THREAD_SCOPE],
343                     [Define to be the POSIX threads constant for thread scoping.])
344         # Define the default thread scope depending on the platform.  On IRIX,
345         # only process scope is avaiable without special configuration options.
346         # Other systems may support system scope.
347 #        if test "$PLATFORM" = "IRIX" ; then
348 #            AC_DEFINE(VPR_THREAD_SCOPE, PTHREAD_SCOPE_PROCESS)
349 #        else
350             AC_DEFINE(VPR_THREAD_SCOPE, PTHREAD_SCOPE_SYSTEM)
351 #        fi
352
353         USE_PTHREADS='yes'
354         DPP_GET_POSIX_SEMAPHORE_LIB( ,
355             AC_MSG_ERROR(*** POSIX semaphores are required for POSIX subsystem ***))
356     else
357         AC_MSG_WARN(*** POSIX threads will not be used (no library found) ***)
358     fi
359
360     # Do not define _POSIX_C_SOURCE here because it will cause problems when
361     # compiling on IRIX.  Instead, define that in the source files where
362     # appropriate.
363     AC_DEFINE(VPR_USE_PTHREADS, , [Define if using POSIX threads.])
364     AC_DEFINE(VPR_POSIX_SEMAPHORES, , [Define if using POSIX semaphores.])
365     # Use POSIX threading, mutexes and shared memory.
366     MUTEX_SYS='POSIX'
367     SHMEM_SYS='POSIX'
368     THREAD_SYS='POSIX'
369     SEMPANORE_SYS='POSIX'
370     HANDLE_ABS='UNIX'
371     SERIAL_PORT_ABS='TERMIOS'
372     SOCKET_ABS='BSD'
373 # If we are not using POSIX threads, we must be using the IRIX sproc(2) model,
374 # but we test $SUBSYSTEM just to be sure it is set right.
375 elif test "x$SUBSYSTEM" = "xSPROC" ; then
376     AC_CHECK_HEADERS([sys/types.h])
377     AC_CHECK_HEADERS([sys/prctl.h], ,
378         [AC_MSG_ERROR([*** IRIX sproc(2) threading will not be used (no headers found) ***])],
379 [#if HAVE_SYS_TYPES_H
380 #include <sys/types.h>
381 #endif
382 ])
383
384     AC_DEFINE(VPR_USE_IRIX_SPROC, , [Define if using IRIX SPROC threads.])
385
386     # Set to IRIX sproc threading, synchronization and shared memory.
387     THREAD_SYS='SPROC'
388     SEMAPHORE_SYS='SPROC'
389     SHMEM_SYS='SPROC'
390     MUTEX_SYS='SPROC'
391     HANDLE_ABS='UNIX'
392     SERIAL_PORT_ABS='TERMIOS'
393     SOCKET_ABS='BSD'
394 # NSPR subsystem.
395 else
396     if test "x$NSPR_THREADS_ENABLED" = "xno" -a "x$OS_TYPE" = "xUNIX" ; then
397         DPP_GET_PTHREAD_LIB
398         DPP_GET_POSIX_SEMAPHORE_LIB( ,
399             [AC_MSG_ERROR([*** POSIX semaphores are required for NSPR subsystem ***])])
400         USE_PTHREADS='yes'
401     else
402         USE_PTHREADS='no'
403     fi
404
405     _vpr_save_LIBS="$LIBS"
406     LIBS="$LIBS $DYN_LOAD_LIB"
407     DPP_HAVE_NSPR([4.0], ["$USE_PTHREADS"],
408         [AC_MSG_ERROR([*** NSPR requried for compiling ***])])
409     LIBS="${_vpr_save_LIBS}"
410
411     AC_DEFINE(VPR_USE_NSPR, , [Define if using the Netscape Portable Runtime.])
412
413     # Set to NSPR threading, synchronization and shared memory.
414     SEMPANORE_SYS='NSPR'
415     THREAD_SYS='NSPR'
416     MUTEX_SYS='NSPR'
417     SHMEM_SYS='NSPR'
418
419     if test "x$OS_TYPE" = "xUNIX" ; then
420         SERIAL_PORT_ABS='TERMIOS'
421     else
422         SERIAL_PORT_ABS='WIN32'
423     fi
424
425     HANDLE_ABS='NSPR'
426     SOCKET_ABS='NSPR'
427 fi
428
429 if test "x$USE_PTHREADS" = "xyes" ; then
430     if test "x$PTHREAD_ARG" = "x" ; then
431        AC_DEFINE(_REENTRANT, 1, [Define if using POSIX threads.])
432     fi
433
434     AC_DEFINE(_THREAD_SAFE, , [Define if using POSIX threads.])
435     AC_DEFINE(RWSTD_MULTI_THREAD, , [Define if using POSIX threads.])
436     AC_DEFINE(RW_MULTI_THREAD, , [Define if using POSIX threads.])
437 fi
438
439 # -----------------------------------------------------------------------------
440 # Checks for typedefs, structures, and compiler characteristics.
441 # -----------------------------------------------------------------------------
442 if test "x$SUBSYTEM" = "xSPROC" ; then
443    AC_TYPE_PID_T
444 fi
445
446 AC_TYPE_SIZE_T
447 AC_TYPE_SIGNAL
448 DPP_TYPE_SOCKLEN_T
449
450 # The following checks for availability of the sigset_t type.  Since it is
451 # is included through signal.h, the usual AC_CHECK_TYPE method will not work.
452 AC_CACHE_CHECK([for sigset_t], [ac_cv_has_sigset_t],
453     [AC_TRY_COMPILE([#include <signal.h> ],
454                     [ sigset_t var; ],
455                     [ac_cv_has_sigset_t='yes'],
456                     [ac_cv_has_sigset_t='no'])])
457
458 if test "x$ac_cv_has_sigset_t" = "xno" ; then
459     AC_DEFINE(sigset_t, unsigned int,
460               [Define to unsigned int if the sigset_t type is not available.])
461 fi
462
463 # The following checks for availability of the timeval type.  Since it is
464 # is included through sys/time.h, the usual AC_CHECK_TYPE method will not work.
465 AC_CACHE_CHECK([for timeval], [ac_cv_has_timeval],
466     [AC_TRY_COMPILE([#include <sys/time.h> ],
467                     [ struct timeval var; ],
468                     [ac_cv_has_timeval='yes'],
469                     [ac_cv_has_timeval='no'])])
470
471 if test "x$ac_cv_has_timeval" = "xyes" ; then
472     AC_DEFINE(HAVE_TIMEVAL, ,
473               [Define if the timeval type is available.])
474 fi
475
476 # The following checks for availability of the timezone type.  Since it is
477 # is included through sys/time.h, the usual AC_CHECK_TYPE method will not work.
478 AC_CACHE_CHECK([for timezone], [ac_cv_has_timezone],
479     [AC_TRY_COMPILE([#include <sys/time.h> ],
480                     [ struct timezone var; ],
481                     [ac_cv_has_timezone='yes'],
482                     [ac_cv_has_timezone='no'])])
483
484 if test "x$ac_cv_has_timezone" = "xyes" ; then
485     AC_DEFINE(HAVE_TIMEZONE, ,
486               [Define if the timezone type is available.])
487 fi
488
489 if test "x$SUBSYSTEM" != "xNSPR" ; then
490     # The following checks for availability of the in_addr_t type.  Since it is
491     # supposed to be defined in netinet/in.h, the usual AC_CHECK_TYPE method
492     # will not work.
493     AC_CACHE_CHECK([for in_addr_t], [ac_cv_has_in_addr_t],
494         [AC_TRY_COMPILE([#include <sys/types.h>
495                          #include <netinet/in.h> ],
496                         [ in_addr_t var; ],
497                         [ac_cv_has_in_addr_t='yes'],
498                         [ac_cv_has_in_addr_t='no'])])
499
500     if test "x$ac_cv_has_in_addr_t" = "xno" ; then
501         AC_DEFINE(in_addr_t, int,
502                   [Define to int if the in_addr_t type is not available.])
503     fi
504
505     # Determine whether the sockaddr_in struct declares the sin_len member.
506     # Some platforms (most notably, Linux) do not include this.
507     # NOTE: If sockaddr_in does not declare sin_len, then sockaddr does not
508     # declare sa_len.
509     AC_CACHE_CHECK([whether struct sockaddr_in has sin_len],
510         [ac_cv_have_sin_len],
511         [AC_TRY_COMPILE([
512 #include <sys/types.h>
513 #include <netinet/in.h>],
514                         [struct sockaddr_in addr; addr.sin_len = 0;],
515                         [ac_cv_have_sin_len='yes'],
516                         [ac_cv_have_sin_len='no'])])
517
518     AH_TEMPLATE([HAVE_SIN_LEN], [Define if struct sockaddr_in has sin_len])
519
520    if test "x$ac_cv_have_sin_len" = "xyes" ; then
521         AC_DEFINE(HAVE_SIN_LEN)
522    fi
523 fi
524
525 # If we are not using NSPR, we make typedefs in vprTypes.h based on the results
526 # of the following tests.
527 if test "x$SUBSYSTEM" != "xNSPR" ; then
528     AC_CHECK_SIZEOF(char, 8)
529     AC_CHECK_SIZEOF(short, 16)
530     AC_CHECK_SIZEOF(int, 32)
531     AC_CHECK_SIZEOF(long, 64)
532     AC_CHECK_SIZEOF(long long, 64)
533 fi
534
535 # -----------------------------------------------------------------------------
536 # Checks for header files.
537 # -----------------------------------------------------------------------------
538 AC_HEADER_STDC
539 AC_HEADER_TIME
540 AC_CHECK_HEADERS([bstring.h fcntl.h limits.h signal.h strings.h sys/file.h \
541                  sys/filio.h sys/ioctl.h sys/sysinfo.h sys/time.h \
542                  termios.h unistd.h sys/capability.h sys/stdsyms.h \
543                  uuid.h uuid/uuid.h sys/uuid.h])
544
545 DPP_LANG_SAVE
546 DPP_LANG_CPLUSPLUS
547 AC_CHECK_HEADERS([hash_map ext/hash_map hash_map.h])
548 AC_CHECK_HEADERS(hash_set ext/hash_set hash_set.h ext/numeric)
549 DPP_LANG_RESTORE
550
551 DPP_HAVE_BOOST([1.31.0], [/usr], , ,
552                [AC_MSG_ERROR([*** Boost is required for VPR ***])])
553 BOOST_VERSION_DOT="$dpp_boost_version"
554
555 # -----------------------------------------------------------------------------
556 # Checks for library functions.
557 # -----------------------------------------------------------------------------
558 AC_CHECK_FUNCS([gettimeofday sigaction sigemptyset sigfillset sigaddset \
559                 sigdelset sigismember snprintf strerror strerror_r \
560                 getifaddrs])
561
562 _vpr_save_LIBS="$LIBS"
563 AC_CHECK_FUNC([socket], [SOCKET_LIB=''],
564    [AC_CHECK_LIB([socket], [socket], [SOCKET_LIB='-lsocket'])])
565 LIBS="${_vpr_save_LIBS}"
566
567 _vpr_save_LIBS="$LIBS"
568 AC_CHECK_FUNC([gethostbyname], [NS_LIB=''],
569    [AC_CHECK_LIB([socket], [gethostbyname], [NS_LIB='-lsocket'],
570       [AC_CHECK_LIB([nsl], [gethostbyname], [NS_LIB='-lnsl'])])])
571 LIBS="${_vpr_save_LIBS}"
572
573 if test "x$SOCKET_LIB" = "x$NS_LIB" ; then
574    NS_LIB=''
575 fi
576
577 # Default to using the Leach UUID implementation found in
578 # juggler/external/leach-uuid.
579 USE_LEACH_UUID='Y'
580
581 AH_TEMPLATE([VPR_USE_DCE_1_1_UUID],
582             [Define to 1 if you have the DCE 1.1 UUID functions (uuid_create(3), etc.).])
583 AH_TEMPLATE([VPR_USE_LIBUUID],
584             [Define to 1 if you have the e2fsprogs libuuid funcs (uuid_generate(3), etc.).])
585
586 # Test for the DCE 1.1 UUID interface.
587 _vpr_save_LIBS="$LIBS"
588 AC_CHECK_FUNC([uuid_create],
589    [AC_DEFINE([VPR_USE_DCE_1_1_UUID])
590     UUID_LIB=''
591     USE_LEACH_UUID='N'],
592    [AC_CHECK_LIB([uuid], [uuid_create],
593       [AC_DEFINE([VPR_USE_DCE_1_1_UUID])
594        UUID_LIB='-luuid'
595        USE_LEACH_UUID='N'])])
596 LIBS="${_vpr_save_LIBS}"
597
598 # If $USE_LEACH_UUID is still "Y", then we did not find uuid_create(3).
599 # Let's try uuid_generate(3) instead.  This comes from libuuid (only on
600 # Linux), typically.
601 if test "x$USE_LEACH_UUID" = "xY" ; then
602    _vpr_save_LIBS="$LIBS"
603    AC_CHECK_FUNC([uuid_generate],
604       [AC_DEFINE([VPR_USE_LIBUUID])
605        UUID_LIB=''
606        USE_LEACH_UUID='N'],
607       [AC_CHECK_LIB([uuid], [uuid_generate],
608          [AC_DEFINE([VPR_USE_LIBUUID])
609           UUID_LIB='-luuid'
610           USE_LEACH_UUID='N'])])
611    LIBS="${_vpr_save_LIBS}"
612 fi
613
614 # If we do not have the DCE 1.1 UUID interface or the libuuid stuff, we have
615 # to use the local Leach UUID implementation.
616 if test "x$USE_LEACH_UUID" = "xY" ; then
617    AC_DEFINE([VPR_USE_LEACH_UUID], 1,
618              [Define to 1 if neither uuid_create(3) nor uuid_generate(3) are available.])
619 fi
620
621 AH_TEMPLATE([HAVE_SCHED_YIELD],
622             [Define to 1 if you have the sched_yield(2) function.])
623
624 # Ensure that we have sched_yield(3).  On Solaris, sched_yield(3) and its
625 # synchronization friends are in libposix4.
626 _vpr_save_LIBS="$LIBS"
627 AC_CHECK_FUNC([sched_yield], [AC_DEFINE([HAVE_SCHED_YIELD])],
628               [AC_CHECK_LIB([posix4], [sched_yield],
629                   [ _sched_lib='-lposix4'
630                     AC_DEFINE([HAVE_SCHED_YIELD]) ])])
631 LIBS="${_vpr_save_LIBS}"
632
633 # Test to see if the function backtrace() (a GLIBC feature) is available.
634 # As of right now, we know of no other libc implementation with this feature,
635 # so this test is not very sophisticated.
636 AC_CACHE_CHECK([for backtrace], [ac_cv_has_backtrace],
637    [AC_TRY_COMPILE([#include <execinfo.h> ],
638                    [int size = backtrace(0, 0);],
639                    [ac_cv_has_backtrace='yes'],
640                    [ac_cv_has_backtrace='no'])])
641
642 if test "x$ac_cv_has_backtrace" = "xyes" ; then
643    AC_DEFINE([HAVE_BACKTRACE], ,
644              [Define if the GLIBC backtrace() function is available.])
645 fi
646
647 VJ_GET_BOOST_LIB_SUFFIX_LIST([$dpp_boost_major], [$dpp_boost_minor],
648                              [$BOOST_LIB_VERSION], [boost_suffixes])
649
650 if test "x$given_boost_system_libname" != "x" ; then
651    boost_system_name="$given_boost_system_libname"
652 fi
653
654 if test "x$given_boost_fs_libname" != "x" ; then
655    boost_fs_name="$given_boost_fs_libname"
656 fi
657
658 if test "x$given_boost_signals_libname" != "x" ; then
659    boost_signals_name="$given_boost_signals_libname"
660 fi
661
662 # Ensure that a compiled version of the Boost.Filesystem library is available.
663 vprsave_CXXFLAGS="$CXXFLAGS"
664 vprsave_CPPFLAGS="$CPPFLAGS"
665 vprsave_LIBS="$LIBS"
666 vprsave_LDFLAGS="$LDFLAGS"
667
668 CXXFLAGS="$CXXFLAGS $ABI_FLAGS"
669 CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES"
670
671 if test "lib$LIBBITSUF" != "lib" ; then
672    libdirs="lib$LIBBITSUF lib"
673 else
674    libdirs="lib"
675 fi
676
677 DPP_LANG_SAVE
678 DPP_LANG_CPLUSPLUS
679
680 testBoostSystem ( )
681 {
682    libname="$1"
683    orig_LIBS="$2"
684
685    # NOTE: We do not need $ABI_FLAGS in $LDFLAGS since $CXXFLAGS and $LDFLAGS
686    # are used together by AC_TRY_LINK().
687    LIBS="-l$libname $orig_LIBS"
688
689    AC_MSG_CHECKING([for boost::system::error_code::clear() in $libname in $cur_boost_libdir])
690    AC_TRY_LINK([#include <boost/system/error_code.hpp>],
691                [boost::system::error_code ec; ec.clear();],
692                [vpr_have_boost_system='yes'], [vpr_have_boost_system='no'])
693    rm -rf ./ii_files
694    AC_MSG_RESULT([$vpr_have_boost_system])
695
696    LIBS="$orig_LIBS"
697 }
698
699 for l in $libdirs ; do
700    cur_boost_libdir="$BOOST_ROOT/$l"
701    LDFLAGS="-L$cur_boost_libdir $vprsave_LDFLAGS"
702
703    if test "x$boost_system_name" != "x" ; then
704       testBoostSystem $boost_system_name $vprsave_LIBS
705    else
706       # The extra empty string is to allow for no suffix to be used on the
707       # boost_system library name.
708       for s in $boost_suffixes "" ; do
709          cur_boost_system_name="boost_system$s"
710
711          testBoostSystem $cur_boost_system_name $vprsave_LIBS
712
713          if test "$vpr_have_boost_system" = "yes" ; then
714             boost_system_name="$cur_boost_system_name"
715             break
716          fi
717       done
718    fi
719
720    if test "$vpr_have_boost_system" = "yes" ; then
721       BOOST_LIBDIR="$cur_boost_libdir"
722       break
723    fi
724 done
725
726 if test "x$vpr_have_boost_system" = "xyes" ; then
727    BOOST_SYSTEM_LINK="-l$boost_system_name"
728 fi
729
730 testBoostFilesystem ( )
731 {
732    libname="$1"
733    orig_LIBS="$2"
734
735    # NOTE: We do not need $ABI_FLAGS in $LDFLAGS since $CXXFLAGS and $LDFLAGS
736    # are used together by AC_TRY_LINK().
737    LIBS="-l$libname $BOOST_SYSTEM_LINK $orig_LIBS"
738
739    AC_MSG_CHECKING([for boost::filesystem::exists() in $libname in $cur_boost_libdir])
740    AC_TRY_LINK([#include <boost/filesystem/operations.hpp>],
741                [boost::filesystem::path p("dir"); boost::filesystem::exists(p);],
742                [vpr_have_boost_fs='yes'], [vpr_have_boost_fs='no'])
743    rm -rf ./ii_files
744    AC_MSG_RESULT([$vpr_have_boost_fs])
745
746    LIBS="$orig_LIBS"
747 }
748
749 for l in $libdirs ; do
750    cur_boost_libdir="$BOOST_ROOT/$l"
751    LDFLAGS="-L$cur_boost_libdir $vprsave_LDFLAGS"
752
753    if test "x$boost_fs_name" != "x" ; then
754       testBoostFilesystem $boost_fs_name $vprsave_LIBS
755    else
756       # The extra empty string is to allow for no suffix to be used on the
757       # boost_filesystem library name.
758       for s in $boost_suffixes "" ; do
759          cur_boost_fs_name="boost_filesystem$s"
760
761          testBoostFilesystem $cur_boost_fs_name $vprsave_LIBS
762
763          if test "$vpr_have_boost_fs" = "yes" ; then
764             boost_fs_name="$cur_boost_fs_name"
765             break
766          fi
767       done
768    fi
769
770    if test "$vpr_have_boost_fs" = "yes" ; then
771       BOOST_LIBDIR="$cur_boost_libdir"
772       break
773    fi
774 done
775
776 if test "x$vpr_have_boost_fs" != "xyes" ; then
777    AC_MSG_ERROR([*** Boost.Filesystem required by VPR ***])
778 else
779    BOOST_FS_LINK="-l$boost_fs_name"
780 fi
781
782 testBoostSignals ( )
783 {
784    libname="$1"
785    orig_LIBS="$2"
786
787    # NOTE: We do not need $ABI_FLAGS in $LDFLAGS since $CXXFLAGS and $LDFLAGS
788    # are used together by AC_TRY_LINK().
789    LIBS="-l$libname $orig_LIBS"
790
791    AC_MSG_CHECKING([for boost::signal::operator()() in $libname])
792    AC_TRY_LINK([#include <boost/signal.hpp>],
793                [boost::signal<void ()> s; s();],
794                [vpr_have_boost_signals='yes'], [vpr_have_boost_signals='no'])
795    rm -rf ./ii_files
796    AC_MSG_RESULT([$vpr_have_boost_signals])
797
798    LIBS="$orig_LIBS"
799 }
800
801 LDFLAGS="-L$BOOST_LIBDIR $vprsave_LDFLAGS"
802
803 if test "x$boost_signals_name" != "x" ; then
804    testBoostSignals $boost_signals_name $vprsave_LIBS
805 else
806    # The extra empty string is to allow for no suffix to be used on the
807    # boost_signals library name.
808    for s in $boost_suffixes "" ; do
809       cur_boost_signals_name="boost_signals$s"
810
811       testBoostSignals $cur_boost_signals_name $vprsave_LIBS
812
813       if test "$vpr_have_boost_signals" = "yes" ; then
814          boost_signals_name="$cur_boost_signals_name"
815          break
816       fi
817    done
818 fi
819
820 if test "x$vpr_have_boost_signals" != "xyes" ; then
821    AC_MSG_ERROR([*** Boost.Signals required by VPR ***])
822 else
823    BOOST_SIGNALS_LINK="-l$boost_signals_name"
824 fi
825
826 DPP_LANG_RESTORE
827
828 CXXFLAGS="$vprsave_CXXFLAGS"
829 CPPFLAGS="$vprsave_CPPFLAGS"
830 LIBS="$vprsave_LIBS"
831 LDFLAGS="$vprsave_LDFLAGS"
832
833 # -----------
834 # CppDOM
835 # -----------
836 _vpr_save_CXXFLAGS="$CXXFLAGS"
837 _vpr_save_CPPFLAGS="$CPPFLAGS"
838 _vpr_save_LDFLAGS="$LDFLAGS"
839
840 AM_PATH_FLAGPOLL([0.9.1], ,
841    [AC_MSG_ERROR([*** Flagpoll (https://realityforge.vrsource.org/view/FlagPoll/WebHome) is required to build Juggler ***])])
842
843 if ! (eval $FLAGPOLL cppdom --modversion >/dev/null 2>&1) ; then
844    AC_MSG_ERROR([*** Flagpoll does not have a valid CppDOM configuration ***])
845 fi
846
847 CPPDOM_CXXFLAGS=`$FLAGPOLL cppdom --cflags`
848 CPPDOM_LDFLAGS=`$FLAGPOLL cppdom --libs-only-L`
849 CPPDOM_LIBS=`$FLAGPOLL cppdom --libs-only-l`
850 CPPDOM_VERSION=`$FLAGPOLL cppdom --modversion`
851
852 # Verify that we have a new enough version of CppDOM.
853 min_cppdom_version='0.6.5'
854
855 AC_MSG_CHECKING([whether CppDOM version is >= $min_cppdom_version])
856 DPP_VERSION_CHECK([$CPPDOM_VERSION], [$min_cppdom_version],
857    [AC_MSG_RESULT([yes (version $CPPDOM_VERSION)])],
858    [AC_MSG_RESULT([no (version $CPPDOM_VERSION)])
859     AC_MSG_ERROR([*** CppDOM version $min_cppdom_version or newer is requried for VPR ***])])
860
861 CXXFLAGS="$CPPDOM_CXXFLAGS $CXXFLAGS $STDFLAGS $ABI_FLAGS"
862 CPPFLAGS="$CPPDOM_CXXFLAGS $CPPFLAGS"
863 LDFLAGS="$CPPDOM_LDFLAGS $CPPDOM_LIBS $LDFLAGS"
864
865 DPP_LANG_SAVE
866 DPP_LANG_CPLUSPLUS
867
868 # XXX: We should test for linking features too.
869 AC_CHECK_HEADER([cppdom/config.h], ,
870     [AC_MSG_ERROR([*** CppDOM is required for VPR ***])])
871
872 DPP_LANG_RESTORE
873
874 CXXFLAGS="${_vpr_save_CXXFLAGS}"
875 CPPFLAGS="${_vpr_save_CPPFLAGS}"
876 LDFLAGS="${_vpr_save_LDFLAGS}"
877
878 # -----------------------------------------------------------------------------
879 # Miscellaneous checks.
880 # -----------------------------------------------------------------------------
881
882 DPP_INSTALLER(vrjuggler, 0644, 0755, 0755)
883
884 # -----------------------------------------------------------------------------
885 # Do Makefile substitutions.
886 # -----------------------------------------------------------------------------
887 VJ_VERSION_GROK(VERSION)
888
889 # Set the form of the version number used for versioned directory and file
890 # naming. Unstable builds use all three version numbers; stable builds use
891 # only the major and minor version numbers.
892 if test "x$ENABLE_VERSIONING" = "xyes" ; then
893    VERSION_DOT="$MAJOR_VERSION.$MINOR_VERSION"
894    VERSION_UNDERSCORE="${MAJOR_VERSION}_${MINOR_VERSION}"
895
896    HEADER_VERSION="vpr-$VERSION_DOT"
897    CLOSE_HEADER_VERSION='..'
898    LIBRARY_VERSION="-$VERSION_UNDERSCORE"
899    DATA_VERSION="vpr-$VERSION_DOT"
900
901 # If versioning is disabled, then none of the version variables need to be
902 # set except for $DATA_VERSION. Its use is different than the others. The
903 # important thing to note is that the directory name is unversioned in this
904 # case.
905 else
906    DATA_VERSION="vpr"
907 fi
908
909 vpr_cxxflags="$STDFLAGS"
910
911 # Add these C++ options when compiling with G++.
912 if test "x$GXX" = "xyes" ; then
913 #   CXXFLAGS="-fhonor-std $CXXFLAGS"
914    CXXFLAGS="$CXXFLAGS $PTHREAD_ARG"
915    vpr_cxxflags="$vpr_cxxflags $PTHREAD_ARG"
916
917    _vpr_gxx_ver=`$CXX -dumpversion`
918
919    case ${_vpr_gxx_ver} in
920       3.*)
921          CXXFLAGS="$CXXFLAGS -fexceptions"
922          vpr_cxxflags="$vpr_cxxflags -fexceptions"
923          ;;
924       2.9*)
925          if test "x$PLATFORM" = "xLinux" ; then
926             AC_DEFINE([_GNU_SOURCE], ,
927                       [Define if compiling on Linux with GCC older than 3.0.])
928          fi
929          ;;
930    esac
931 fi
932
933 # For use in linking applications.
934 BASE_APP_LINK_FLAGS="$STDFLAGS"
935
936 if test "x$ac_cv_header_sys_sysinfo_h" = "xyes" ; then
937     UUID_DEFS='-DHAVE_SYS_SYSINFO_H'
938 fi
939
940 if test "x$PLATFORM" = "xIRIX" -a "x$USE_GCC" != "xyes" ; then
941 #    CFLAGS="$CFLAGS -woff 1685,515,608,658,799,803,852,1048,1233,1499"
942     CXXFLAGS="$CXXFLAGS -w2"
943     BASE_APP_LINK_FLAGS="$BASE_APP_LINK_FLAGS -J4"
944 elif test "x$PLATFORM" = "xDarwin" ; then
945     CFLAGS="$CFLAGS -Wno-long-double"
946     CXXFLAGS="$CXXFLAGS -Wno-long-double"
947
948     changequote(<<, >>)
949     vpr_gcc_major=`echo $dpp_gcc_ver | sed -e 's/^\([0-9]*\)\..*/\1/'`
950     changequote([, ])
951
952     # GCC 4.0 in Darwin removed -fexport-coalesced.
953     if test $vpr_gcc_major -lt 4 ; then
954        CFLAGS_DYNLIB="$CFLAGS_DYNLIB -fexport-coalesced"
955        CXXFLAGS_DYNLIB="$CXXFLAGS_DYNLIB -fexport-coalesced"
956     fi
957
958     vpr_cxxflags="$vpr_cxxflags -Wno-long-double"
959     BASE_APP_LINK_FLAGS="$BASE_APP_LINK_FLAGS -Wl,-bind_at_load"
960 elif test "x$OS_TYPE" = "xWin32" -a "x$USE_GCC" != "xyes" ; then
961     vc_cflags='/QIfdiv /QI0f'
962     vc_cxxflags='/GR /GX /EHc /QIfdiv /QI0f'
963     CFLAGS="$CFLAGS $vc_cflags"
964     CXXFLAGS="$CXXFLAGS $vc_cxxflags"
965     DBG_FLAGS="$DBG_FLAGS /MDd"
966     OPT_FLAGS="$OPT_FLAGS /MD"
967     UUID_DEFS="$UUID_DEFS -DWININC"
968     vpr_cxxflags="$vc_cxxflags"
969 fi
970
971 # Add visibility flag if supported.
972 CXXFLAGS="$CXXFLAGS $CXX_VISIBILITY_FLAGS"
973
974 # If we are using pthreads, add the library containing the pthread calls to
975 # $LIBS.
976 if test "x$USE_PTHREADS" = "xyes" ; then
977     DPP_PTHREAD_FINISH
978 fi
979
980 subsystem_includes="$subsystem_includes $NSPR_INCLUDES"
981 INCLUDES="$INCLUDES $NSPR_INCLUDES"
982
983 # For makedepend(1) to work properly on HP-UX with aCC, we have to include
984 # these extra paths.
985 if test "x$PLATFORM" = "xHP" ; then
986     _aCC_ROOT="/opt/aCC"
987     DEPEND_EXTRAS="$DEPEND_EXTRAS -I${_aCC_ROOT} -I${_aCC_ROOT}/include -I${_aCC_ROOT}/include/iostream"
988 elif test "x$OS_TYPE" = "xWin32" ; then
989     DEPEND_EXTRAS="$DEPEND_EXTRAS -D__cplusplus"
990 fi
991
992 # Define the base path to the source directory using $VPRROOT_ABS as an
993 # alternative to using $srcdir.
994 UNIX_VPRROOT_ABS="$VPRROOT_ABS"
995
996 # Put together the basic information needed to compile VPR applications.
997 APP_EXTRA_LIBS="$LDFLAGS $CPPDOM_LDFLAGS $CPPDOM_LIBS $BOOST_LDFLAGS $BOOST_SIGNALS_LINK $BOOST_FS_LINK $BOOST_SYSTEM_LINK $PTHREAD_ARG $LIBS $NSPR_LDFLAGS $NSPR_LIB $PLC_LIB $PTHREAD_LIB $SEM_LIB $SOCKET_LIB $NS_LIB $UUID_LIB $DYN_LOAD_LIB"
998
999 vpr_lib_name="vpr$LIBRARY_VERSION"
1000 vpr_prof_lib_name="vpr_p$LIBRARY_VERSION"
1001
1002 VJ_APP_COMPILER($CC, $CFLAGS, $CXX, $CXXFLAGS, $DBG_FLAGS, $OPT_FLAGS,
1003                 VPR_BASE_DIR, $DEFS, $INCLUDES, $ABI_FLAGS, $HEADER_VERSION)
1004 VJ_APP_LINKER([$CXX], [$BASE_APP_LINK_FLAGS], [$LDOPTS_DBG], [$LDOPTS_OPT],
1005               [VPR_BASE_DIR], [$vpr_lib_name], [$APP_EXTRA_LIBS])
1006
1007 APP_BASE_DIR='$(topdir)/instlinks'
1008 APP_BASE_DIR_INST='$(VPR_BASE_DIR)'
1009
1010 # Translate paths from UNIX-style to Win32.
1011 if test "x$OS_TYPE" = "xWin32" ; then
1012     VPRROOT_ABS=`dospath -p "$VPRROOT_ABS"`
1013     JUGGLERROOT_ABS=`dospath -p "$JUGGLERROOT_ABS"`
1014
1015     if test "x$DEPEND_EXTRAS" != "x" ; then
1016         DEPEND_EXTRAS=`dospath "$DEPEND_EXTRAS"`
1017     fi
1018
1019     if test "x$INCLUDES" != "x" ; then
1020         INCLUDES=`dospath "$INCLUDES"`
1021     fi
1022
1023     if test "x$LIBS" != "x" ; then
1024         LIBS=`dospath "$LIBS"`
1025     fi
1026
1027     LN_S='cp -pr'
1028     RM_LN='rm -rf'
1029     MTREE_CMD=`dospath "$MTREE_CMD"`
1030
1031 #    APP_EXTRA_LIBS=`dospath "$APP_EXTRA_LIBS"`
1032 else
1033     RM_LN='rm -f'
1034 fi
1035
1036 # Dependencies for dynamic/shared libraries.
1037 if test "x$OS_TYPE" = "xWin32" ; then
1038     DYLIB_DEPS="$CPPDOM_LDFLAGS $CPPDOM_LIBS $BOOST_LDFLAGS_LINK_EXE $boost_signals_name.lib $boost_fs_name.lib $NSPR_LDFLAGS_LINK_EXE $NSPR_LIB_LINK_EXE $PLC_LIB_LINK_EXE ws2_32.lib"
1039 else
1040     DYLIB_DEPS="$APP_EXTRA_LIBS"
1041     VJ_BUILD_LIB_FILE_LIST([$DYLIB_DEPS], [DYLIB_DEP_FILES])
1042 fi
1043
1044 # Set up some sed expressions that will help separate the share directory from
1045 # the full installation prefix.
1046 if test "x$prefix" = "xNONE" ; then
1047    _prefix_exp="s|^$ac_default_prefix/||"
1048 else
1049    _prefix_exp="s|^$prefix/||"
1050 fi
1051
1052 # In Autoconf 2.60, datadir has been renamed to datarootdir.
1053 if test "x$datarootdir" != "x" ; then
1054    data_var="$datarootdir"
1055 else
1056    data_var="$datadir"
1057 fi
1058
1059 # Make a best-effort attempt to extract the actual share directory from the
1060 # full installation prefix.  This is not foolproof, but it will work in almost
1061 # all cases.  A person would have to be doing something malicious or foolish
1062 # to make it break.
1063 data_subdir=`echo "$data_var" | sed -e 's|^${prefix}/||' -e "${_prefix_exp}"`
1064 VPR_SHARE_DIR="$data_subdir/$DATA_VERSION"
1065
1066 subsystem_cxxflags="$subsystem_includes"
1067 vpr_extra_cxxflags=''
1068 vpr_extra_include_dirs=''
1069 vpr_ldflags="-L\${prefix}/lib\${LIBBITSUF}"
1070 vpr_extra_ldflags="$EXTRA_LDFLAGS"
1071 vpr_libs="-l$vpr_lib_name"
1072 vpr_prof_libs="-l$vpr_prof_lib_name"
1073
1074 # Information needed to generate vpr-config.
1075 case $SUBSYSTEM in
1076     SPROC)
1077         subsystem_libs="$SEM_LIB $SOCKET_LIB $NS_LIB $UUID_LIB $DYN_LOAD_LIB"
1078         static_begin="-B static"
1079         static_end="-B dynamic"
1080         # This is for the MIPSpro Compilers 7.3.
1081         BOOST_INCLUDES="$BOOST_INCLUDES -I$BOOST_INCLUDE_DIR/boost/compatibility/cpp_c_headers"
1082         ;;
1083     POSIX)
1084         subsystem_libs="$PTHREAD_LIB $SEM_LIB $SOCKET_LIB $NS_LIB $UUID_LIB $DYN_LOAD_LIB"
1085         ;;
1086     NSPR)
1087         vpr_extra_deps='nspr >= 4.0'
1088
1089         subsystem_libs="$NSPR_LIB $PLC_LIB $PTHREAD_LIB $SEM_LIB $SOCKET_LIB $NS_LIB $UUID_LIB $DYN_LOAD_LIB"
1090         ;;
1091 esac
1092
1093 case $SUBSYSTEM in
1094    POSIX|NSPR)
1095       if test "x$PLATFORM" != "xDarwin" ; then
1096          if test "x$GNU_LD" = "xyes" ; then
1097             static_begin="-Wl,-Bstatic"
1098             static_end="-Wl,-Bdynamic"
1099          else
1100             static_begin="-B static"
1101             static_end="-B dynamic"
1102          fi
1103       fi
1104       ;;
1105 esac
1106
1107 includedir="$includedir/$HEADER_VERSION"
1108
1109 DPP_SUBST
1110
1111 AC_SUBST(data_subdir)
1112 AC_SUBST(topdir)
1113 AC_SUBST(UNIX_VPRROOT_ABS)
1114 AC_SUBST(UNIX_JUGGLERROOT_ABS)
1115 AC_SUBST(VPRROOT_ABS)