root/juggler/tags/1.0_alpha_02/configure.in

Revision 207, 23.2 kB (checked in by allenb, 10 years ago)

Changed to make test file copy over in n32 abi.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # -----------------------------------------------------------------------------
2 # Base configure.in for VR Juggler.
3 # $Date$
4 # -----------------------------------------------------------------------------
5 # This file is "compiled" by GNU autoconf to generate the configure script
6 # that is actually run.
7 # -----------------------------------------------------------------------------
8
9 AC_REVISION($Revision$)
10 AC_INIT(Config/vjChunkDesc.C)
11 AC_CONFIG_HEADER(config.h)
12
13 # -----------------------------------------------------------------------------
14 # Command-line arguments (--enable-option, --with-pkg=package_name).
15 # -----------------------------------------------------------------------------
16
17 dnl # -------------------------------------------- #
18 dnl # --with-pkg[=arg] and --without-pkg arguments #
19 dnl # -------------------------------------------- #
20
21 dnl # Enable binary format.  Possible values are "O32", "N32" or "64".
22 dnl # The default is "N32".
23 AC_ARG_WITH(abi,
24             [  --with-abi=[O32|N32_M3|N32_M4|64_M3|64_M4]
25                           define the Application Binary Interface to use
26                           [default=N32_M3]],
27             abi_type="$withval", abi_type='N32_M3')
28
29 dnl # Define the location where the library will be built.  This is not
30 dnl # currently used anyhwere in this script.
31 dnl # The default is "$srcdir/lib".
32 AC_ARG_WITH(builddir,
33             [  --with-builddir=[PATH]
34                           define the location where the library will be built
35                           [default=\$srcdir/lib]],
36             vj_builddir="$withval")
37
38 dnl # Define which threading model to use.  Possible values are "SGI_IPC" or
39 dnl # "POSIX".
40 dnl # The default is "SGI_IPC".
41 AC_ARG_WITH(threads,
42             [  --with-threads=[SGI_IPC|POSIX]
43                           define thread package [default=SGI_IPC]],
44             thread_pkg="$withval", thread_pkg='SGI_IPC')
45
46 dnl # Define the root directory for the Java installation.
47 dnl # The default is /usr/java.
48 JDK_HOME_DEFAULT="/usr/java"
49 JDK_HOME_ALT_LIST="/usr/local/java"
50 AC_ARG_WITH(jdkhome,
51             [  --with-jdkhome=[PATH]  JDK installation directory [default=/usr/java]],
52             JDK_HOME="$withval", JDK_HOME="$JDK_HOME_DEFAULT")
53
54 dnl # Define the root directory for the Performer installation.
55 dnl # The default is /usr.
56 AC_ARG_WITH(pfroot,
57             [  --with-pfroot=[PATH]    Performer installation directory [default=/usr]],
58             PFROOT="$withval", PFROOT='/usr')
59
60 dnl # Define the root directory for the OpenGL installation.
61 dnl # The default is /usr.
62 AC_ARG_WITH(oglroot,
63             [  --with-oglroot=[PATH]   OpenGL installation directory [default=/usr]],
64             OGLROOT="$withval", OGLROOT='/usr')
65
66 dnl # ------------------------------------------------------ #
67 dnl # --enable-feature[=arg] and --disable-feature arguments #
68 dnl # ------------------------------------------------------ #
69
70 dnl # Enable debugging.  Possible values are "yes" or "no".  "yes" is set
71 dnl # with --enable-debug and "no" is set with --disable-debug.
72 dnl # The default is "yes".
73 AC_ARG_ENABLE(debug,
74               [  --enable-debug          enable debugging [default=yes]],
75               enable_debug="$enableval", enable_debug="yes")
76
77 dnl # Enable compilation of the OpenGL API.  Possible values are "yes" or
78 dnl # "no".  "yes" is set with --enable-opengl and "no" is set with
79 dnl # --disable-opengl.
80 dnl # The default is "yes".
81 AC_ARG_ENABLE(opengl,
82               [  --enable-opengl         use OpenGL API [default=yes]],
83               enable_opengl="$enableval", enable_opengl='yes')
84
85 dnl # Enable compilation of the Performer API.  Possible values are "yes" or
86 dnl # "no".  "yes" is set with --enable-perf and "no" is set with
87 dnl # --disable-perf.
88 dnl # The default is "yes".
89 AC_ARG_ENABLE(perf,
90               [  --enable-perf           use Perfromer API [default=yes]],
91               enable_perf="$enableval", enable_perf='yes')
92
93 # Enable compile-time debugging blocks.
94 if test "x$enable_debug" = "xyes" ; then
95     AC_DEFINE(VJ_DEBUG,)
96 fi
97
98 # Set default values for these before checking $abi_type.  Currently, these
99 # are for non-SGI platforms.
100 ABI='32'
101 LIBBITSUF=''
102
103 # Based on the value of $abi_type, set $ABI for later use and the Makefile
104 # substitution variables $LIBBITSUF and $ABI.
105 if test "x$abi_type" = "x64_M3" ; then
106     ABI='64'
107     INST_SET='mips3'
108     LIBBITSUF='64'
109     _EXTRA_FLAGS='-64 -mips3'
110 elif test "x$abi_type" = "x64_M4" ; then
111     ABI='64'
112     INST_SET='mips4'
113     LIBBITSUF='64'
114     _EXTRA_FLAGS='-64 -mips4'
115 elif test "x$abi_type" = "xN32_M3" ; then
116     ABI='N32'
117     INST_SET='mips3'
118     LIBBITSUF='32'
119     _EXTRA_FLAGS='-n32 -mips3'
120 elif test "x$abi_type" = "xN32_M4" ; then
121     ABI='N32'
122     INST_SET='mips4'
123     LIBBITSUF='32'
124     _EXTRA_FLAGS='-n32 -mips4'
125 elif test "x$abi_type" = "xO32" ; then
126     ABI='O32'
127     INST_SET='mips2'
128     LIBBITSUF=''
129     _EXTRA_FLAGS='-o32 -mips2'
130 fi
131
132 # -----------------------------------------------------------------------------
133 # System-dependent stuff.
134 # -----------------------------------------------------------------------------
135 AC_CANONICAL_HOST
136
137 RELEASE=`uname -r`      # Operating system version number
138
139 AR=''                   # Archive library command (generally ar(1))
140 ARFLAGS=''              # Flags for $AR
141 LD=''                   # Shared library command (usually ld(1))
142 LDOPTS=''               # More options for shared library generator
143 SHAREDLIB_EXT=''        # Extension for shared libraries (usually 'so')
144
145 OPT_FLAGS=''            # Compiler optimization flags
146
147 DSOREGFILE=''
148 DSOVERSION=''
149 DSOVERSIONOPTS=''
150 ABI_LIST=''             # List of supported ABIs on a given platform
151 PLATFORM=''             # Platform name
152
153 # Depending on the host type, set various command options and such.
154 case $host in
155     # SGI running IRIX [56].*.
156     mips-sgi-irix*)
157         if test $RELEASE -lt 6.2 ; then
158             AC_DEFINE(IRIXREL, "IRIX5")
159         else
160             AC_DEFINE(IRIXREL, "IRIX6")
161         fi
162
163         # Set compiler flags and the location of $DSOREGFILE depending on
164         # $ABI.
165         if test "$ABI" = "64" ; then
166             DSOREGFILE='/usr/lib64/so_locations'
167             OPT_FLAGS='-OPT:Olimit=2000'
168         elif test "$ABI" = "N32" ; then
169             DSOREGFILE='/usr/lib32/so_locations'
170             OPT_FLAGS='-OPT:Olimit=2000'
171         elif test "$ABI" = "O32" ; then
172             DSOREGFILE='/usr/lib/so_locations'
173             OPT_FLAGS='-Olimit 2000'
174         fi
175
176         AR='${CXX}'
177         ARFLAGS='-ar -WR,-v -o'
178         CFLAGS="$CFLAGS"
179         CXXFLAGS="-ptv $CXXFLAGS"
180         INCLUDES="$INCLUDES -I/usr/include/CC -I/usr/include"
181         LD='${CXX} -shared'
182         LDFLAGS="$LDFLAGS"
183         _LD_REGOPTS='-check_registry ${DSOREGFILE}'
184         LDOPTS="$LDOPTS -all $_LD_REGOPTS"
185         SHAREDLIB_EXT='so'
186
187         DSOVERSION='sgi4.0'
188         DSOVERSIONOPTS='-set_version ${DSOVERSION}'
189
190         ABI_LIST='64_M4 64_M3 N32_M4 N32_M3'
191         PLATFORM='SGI'
192
193         AC_DEFINE(VJ_OS_SGI,)
194         AC_DEFINE(_BSD_TYPES,)
195         ;;
196     # HP PA-RISC machine running HP-UX 10.20.
197     hppa*hpux10.20)
198         AR='ar'
199         ARFLAGS='r'
200         CFLAGS="-Aa $CFLAGS"
201         CXXFLAGS="+p $CXXFLAGS"
202         LD='ld'
203         LDFLAGS="$LDFLAGS -L/usr/lib/X11R6"
204         LDOPTS='-b'
205         OPT_FLAGS='+inline_level 3'
206         SHAREDLIB_EXT='sl'
207
208         # We have to use POSIX threads on HP-UX.
209         if test "x$thread_pkg" != "xPOSIX" ; then
210             AC_MSG_WARN(*** POSIX threads must be used on $host ***)
211             thread_pkg='POSIX'
212         fi
213
214         PLATFORM='HP'
215
216         AC_DEFINE(VJ_OS_HPUX,)
217         AC_DEFINE(_HPUX_SOURCE,)
218         AC_DEFINE(_INCLUDE_TERMIO,)
219         AC_DEFINE(_CMA_NOWRAPPERS_,)
220         AC_DEFINE(notdef,)
221         ;;
222     # DEC Alpha running Digital UNIX 4.0.
223     alpha-[a-z]*-osf4.0)
224         AC_DEFINE(VJ_OS_DUX,)
225         PLATFORM='alpha-DUX'
226         ;;
227     # i386-class machine running FreeBSD.
228     i386-[a-z]*-freebsd*)
229         AC_DEFINE(VJ_OS_FreeBSD,)
230         ABI_LIST='AOUT ELF'
231         PLATFORM='i386-FBSD'
232         ;;
233     # Unkown operating system (to config.guess).
234     *-unknown)
235         AC_DEFINE(VJ_OS_GENERIC,)
236         PLATFORM='UNKNOWN'
237         ;;
238 esac
239
240 # -----------------------------------------------------------------------------
241 # Checks for programs.
242 # -----------------------------------------------------------------------------
243
244 vjsave_CFLAGS="$CFLAGS"
245 vjsave_CXXFLAGS="$CXXFLAGS"
246
247 # On HP-UX, we have to use the aCC C++ compiler.
248 if test "$PLATFORM" = "HP" ; then
249     AC_CHECK_PROG(CXX, aCC, aCC,
250         AC_MSG_ERROR(*** The library requires the HP-UX aCC C++ compiler ***))
251 # On IRIX, we have to use cc and CC (not gcc or g++).
252 elif test "$PLATFORM" = "SGI" ; then
253     AC_CHECK_PROG(CC, cc, cc,
254         AC_MSG_ERROR(*** The library requires the IRIX cc C compiler ***))
255     AC_CHECK_PROG(CXX, CC, CC,
256         AC_MSG_ERROR(*** The library requires the IRIX CC C++ compiler ***))
257 fi
258
259 CFLAGS="$CFLAGS $_EXTRA_FLAGS"
260 CXXFLAGS="$CXXFLAGS $_EXTRA_FLAGS"
261
262 AC_PROG_CC
263 AC_PROG_CXX
264 AC_PROG_CPP
265 AC_PROG_CXXCPP
266
267 CFLAGS="$vjsave_CFLAGS"
268 CXXFLAGS="$vjsave_CXXFLAGS"
269
270 # Check for the JDK (specifically try to find javac(1) in $JDK_HOME).
271 JAVAC=''
272 JAR=''
273
274 # In checking for javac(1), "${JDK_HOME}/bin" is added to the script's $PATH
275 # variable.  This directory may already be in the path, but this ensures that
276 # javac(1) will be found by AC_PATH_PROG().
277 vjsave_PATH="$PATH"
278 PATH="$PATH:${JDK_HOME}/bin"
279 AC_PATH_PROG(JAVAC, javac)
280 PATH="$vjsave_PATH"
281
282 # If $JAVAC was not set by AC_PATH_PROG(), try to find the JDK installation
283 # directory using the list in $JDK_HOME_ALT_LIST.
284 if test -z "$JAVAC" ; then
285     # Add the default value for $JDK_HOME (found in $JDK_HOME_DEFAULT) to
286     # the list of alternate installation directories in case the user gave
287     # a different value for $JDK_HOME on the command line.
288     if test "x$JDK_HOME" != "x$JDK_HOME_DEFAULT" ; then
289         JDK_HOME_ALT_LIST="$JDK_HOME_DEFAULT $JDK_HOME_ALT_LIST"
290     fi
291
292     # Loop over the list of possible alternate installation directories for
293     # the JDK found in $JDK_HOME_ALT_LIST.
294     for JDK_HOME_TMP in $JDK_HOME_ALT_LIST ; do
295         # Only check the directory in $JDK_HOME_TMP if it is not the same as
296         # the path given by the user on the command line.
297         if test "$JDK_HOME_TMP" != "$JDK_HOME" ; then
298             AC_MSG_CHECKING(for javac in $JDK_HOME_TMP)
299
300             # If an executable javac is found in $JDK_HOME_TMP, set $JAVAC to
301             # the full path to it, save $JDK_HOME_TMP in $JDK_HOME and quit
302             # looping.
303             if test -x "$JDK_HOME_TMP/bin/javac" ; then
304                 JAVAC="$JDK_HOME_TMP/bin/javac"
305                 JDK_HOME="$JDK_HOME_TMP"
306                 AC_MSG_RESULT(yes)
307                 break
308             # Otherwise, print "no" and go on to the next directory.
309             else
310                 AC_MSG_RESULT(no)
311             fi
312         fi
313     done
314 fi
315
316 BUILD_GUI=''
317
318 # If there is still no value in $JAVAC, then warn that the GUI will not be
319 # built.
320 if test -z "$JAVAC" ; then
321     AC_MSG_WARN(*** The GUI requires javac -- it will not be built ***)
322 # Otherwise, set $JAR to the path to jar(1) and continue.
323 else
324     JAR="${JDK_HOME}/bin/jar"
325     BUILD_GUI='yes'
326 fi
327
328 AC_PROG_INSTALL
329 AC_PROG_MAKE_SET
330 dnl # AC_PROG_RANLIB
331
332 # -----------------------------------------------------------------------------
333 # Checks for libraries.
334 # -----------------------------------------------------------------------------
335
336 THREADS=''
337
338 # Test for libpthread or for libcma if libpthread is not present.
339 # If the library is found, check for pthread_kill().  If it is present,
340 # Draft 10 (the "final" draft) of the POSIX threads standard is in place.  If
341 # not, Draft 4 is available.
342 if test "x$thread_pkg" = "xPOSIX" ; then
343     AC_CHECK_LIB(pthread, pthread_create,
344         AC_CHECK_HEADER(pthread.h,
345             [ THREADS='POSIX'; LIBS="$LIBS -lpthread";
346               AC_CHECK_LIB(pthread, pthread_kill,
347                   AC_DEFINE(_PTHREADS_DRAFT_10,),
348                   AC_DEFINE(_PTHREADS_DRAFT_4,)) ],
349             AC_MSG_WARN(*** POSIX threads will not be used (header file not found) ***)))
350
351     # On HP-UX 10.20, the pthreads library is in the cma library rather than
352     # pthreads, so test for that if $THREADS was not set above.
353     if test -z "$THREADS" ; then
354         AC_CHECK_LIB(cma, pthread_create,
355             AC_CHECK_HEADER(pthread.h,
356                 [ THREADS='POSIX'; LIBS="$LIBS -lcma";
357                   AC_CHECK_LIB(cma, pthread_kill,
358                       AC_DEFINE(_PTHREADS_DRAFT_10,),
359                       AC_DEFINE(_PTHREADS_DRAFT_4,)) ],
360                 AC_MSG_WARN(*** POSIX threads will not be used (header file not found) ***)),
361             AC_MSG_WARN(*** POSIX threads will not be used (no library found) ***))
362     fi
363 # If we are not using POSIX threads, we must be using the SGI IPC model, but
364 # we test $thread_pkg just to be sure it is set right.
365 elif test "x$thread_pkg" = "xSGI_IPC" ; then
366     AC_CHECK_HEADERS(sys/prctl.h,
367         THREADS='SGI_IPC',
368         AC_MSG_WARN(*** SGI IPC threading will not be used (no headers found) ***))
369 fi
370
371
372 #---------------------------------------
373 # SHARED MEM
374 # SYNC PRIMS
375 #---------------------------------------
376 SYNC_SYS=''                     # POSIX, SGI_IPC
377 SHMEM_SYS=''                    # SGI_IPC
378 THREAD_SYS=''                   # POSIX, SGI_IPC
379
380 # Define various CPP macros depending on which threads implementation will
381 # be used.  If no implementation was defined above, exit configure.
382 if test "$THREADS" = "POSIX" ; then
383     # Do not define _POSIX_C_SOURCE here because it will cause problems when
384     # compiling on IRIX.  Instead, define that in the source files where
385     # appropriate.
386     AC_DEFINE(VJ_USE_PTHREADS,)
387     AC_DEFINE(_THREAD_SAFE,)
388     AC_DEFINE(RWSTD_MULTI_THREAD,)
389     AC_DEFINE(RW_MULTI_THREAD,)
390     AC_DEFINE(_REENTRANT,)
391
392     # Set to POSIX THREADING
393     THREAD_SYS="POSIX"
394
395     # Nothing for these at this time.
396     SYNC_SYS='POSIX'
397     SHMEM_SYS=''
398 elif test "$THREADS" = "SGI_IPC" ; then
399     AC_DEFINE(VJ_SGI_IPC,)
400
401     # Set to SGI_IPC threading
402     THREAD_SYS="SGI_IPC"
403
404     SYNC_SYS='SGI_IPC'
405     SHMEM_SYS='SGI_IPC'
406 elif test -z "$THREADS" ; then
407     AC_MSG_ERROR(No threading package defined!)
408 fi
409
410 #------------------------------------------
411 # OPEN GL
412 #------------------------------------------
413 OPENGL_API=''                   # 'Y' then we are using OpenGL
414
415 LIBOPENGL=''
416 SYSTEM_OPENGL=''
417
418 # Test for the OpenGL library if the OpenGL API was enabled.
419 if test "x$enable_opengl" = "xyes" ; then
420     # Save these values in case they need to be restored later.
421     vjsave_CFLAGS="$CFLAGS"
422     vjsave_INCLUDES="$INCLUDES"
423     vjsave_LDFLAGS="$LDFLAGS"
424
425     # Add the user-specified OpenGL installation directory to these paths.
426     # Ensure that /usr/include and /usr/lib are not included multiple times
427     # if $OGLROOT is "/usr".
428     if test "x${OGLROOT}" != "x/usr" ; then
429         INCLUDES="$INCLUDES -I\${OGLROOT}/include"
430
431         if test "$PLATFORM" = "SGI" ; then
432             LDFLAGS="-L\${OGLROOT}/lib\${LIBBITSUF} $LDFLAGS"
433         else
434             LDFLAGS="-L\${OGLROOT}/lib $LDFLAGS"
435         fi
436     fi
437
438     CFLAGS="$CFLAGS $INCLUDES $_EXTRA_FLAGS"
439
440     # On HP-UX, we have to compile the test code with aCC (which is required
441     # by an above test) because the HP-UX OpenGL 1.1 implementation mandates
442     # this.
443     if test "$PLATFORM" = "HP" ; then
444         vjsave_CC="$CC"
445         vjsave_LIBS="$LIBS"
446         CC="$CXX"
447         LIBS="$LIBS -lGL"
448
449         # Check the cache in case this test was run previously and if not,
450         # compile the given code and try to link it against the GL library.
451         # We don't need to test for the existence of GL/gl.h after linking
452         # because the test program already includes it.
453         AC_CACHE_CHECK(for glEnable in -lGL, ac_cv_glEnable_available,
454             AC_TRY_LINK([#include <GL/gl.h>], [glEnable(GL_CULL_FACE)],
455                 ac_cv_glEnable_available='yes',
456                 [ LIBS="$vjsave_LIBS";
457                   AC_MSG_ERROR(*** OpenGL API will not be used (library not found) ***) ] ))
458
459         # If the library was found, add the OpenGL API object files to the
460         # files to be compiled and enable the OpenGL API compile-time option.
461         if test "$ac_cv_glEnable_available" = "yes" ; then
462             OPENGL_API="Y"
463             AC_DEFINE(VJ_API_OPENGL,)
464         fi
465
466         CC="$vjsave_CC"
467     else
468         # If the OpenGL library was found, add the API object files to the
469         # files to be compiled and enable the OpenGL API compile-time option.
470         AC_CHECK_LIB(GL, glEnable,
471             AC_CHECK_HEADER(GL/gl.h,
472                 [ OPENGL_API="Y";
473                   AC_DEFINE(VJ_API_OPENGL,) ],
474                 AC_MSG_ERROR(*** OpenGL API will not be used (header not found) ***)),
475             AC_MSG_ERROR(*** OpenGL API will not be used (library not found) ***))
476     fi
477
478     # Restore $CFLAGS now that we are done testing.
479     CFLAGS="$vjsave_CFLAGS"
480
481     # If OpenGL API files were added, define this extra stuff that is used
482     # in some Makefiles.
483     if test ! -z "$OPENGL_API" ; then
484         LIBOPENGL="-L${OGLROOT} -lGLU -lGL -lXext"
485
486         if test "$PLATFORM" = "HP" ; then
487             SYSTEM_OPENGL="$LIBOPENGL -lX11 -lm -lC"
488         else
489             if test "$ABI" = "64" ; then
490                 SYSTEM_OPENGL="-limage $LIBOPENGL -lXmu -lX11 -lm -lC"
491             elif test "$ABI" = "N32" ; then
492                 SYSTEM_OPENGL="-limage $LIBOPENGL -lXmu -lX11 -lm -lC"
493             elif test "$ABI" = "O32" ; then
494                 SYSTEM_OPENGL="-lmpc -limage -lGLw $LIBOPENGL -lfpe -lXm -lXt -lXmu -lX11 -lm -lmalloc -lC"
495             fi
496         fi
497     # No OpenGL API files were added, so restore $INCLUDES and $LDFLAGS so
498     # that no OpenGL stuff in included in them.
499     else
500         INCLUDES="$vjsave_INCLUDES"
501         LDFLAGS="$vjsave_LDFLAGS"
502     fi
503 fi
504
505 #----------------------------------------------------
506 # PERFORMER
507 #----------------------------------------------------
508 PERFORMER_API=''                # 'Y' then we are using Performer
509
510 # Test for the Performer library if the Performer API was enabled.
511 if test "x$enable_perf" = "xyes" ; then
512     vjsave_CFLAGS="$CFLAGS"
513     vjsave_INCLUDES="$INCLUDES"
514     vjsave_LDFLAGS="$LDFLAGS"
515
516     # Ensure that /usr/include and /usr/lib are not included multiple times
517     # if $PFROOT is "/usr".
518     if test "x${PFROOT}" != "x/usr" ; then
519         INCLUDES="$INCLUDES -I\${PFROOT}/include"
520         LDFLAGS="-L\${PFROOT}/lib\${LIBBITSUF} $LDFLAGS"
521     fi
522
523     CFLAGS="$CFLAGS $INCLUDES $_EXTRA_FLAGS"
524
525     # If the Performer library was found, add the API object files to the
526     # files to be compiled and enable the Performer API compile-time option.
527     AC_CHECK_LIB(pf, pfInit,
528         AC_CHECK_HEADER(Performer/pf.h,
529             PERFORMER_API="Y";  \
530             OGLLIB='-ignore_unresolved -lpf_ogl -lpfdu_ogl -lpfui -lpfutil_ogl'; \
531             AC_DEFINE(VJ_API_PERFORMER,),
532             AC_MSG_WARN(*** Performer API will not be used (pfChannel.h not found) ***)),
533         AC_MSG_WARN(*** Performer API will not be used (library not found) ***))
534
535     # Restore $CFLAGS now that we are done testing.
536     CFLAGS="$vjsave_CFLAGS"
537
538     # No Performer API files were added, so restore $INCLUDES and $LDFLAGS
539     # so that no OpenGL stuff in included in them.
540     if test -z "$PERFORMER_API" ; then
541         INCLUDES="$vjsave_INCLUDES"
542         LDFLAGS="$vjsave_LDFLAGS"
543     fi
544 fi
545
546 # -----------------------------------------------------------------------------
547 # Checks for header files.
548 # -----------------------------------------------------------------------------
549 AC_PATH_X
550 AC_HEADER_STDC
551 AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/file.h sys/ioctl.h      \
552                  sys/time.h termio.h unistd.h sys/z8530.h sys/stdsyms.h)
553
554 dnl # All of the above header file checks may not be necessary ...
555
556 # -----------------------------------------------------------------------------
557 # Checks for typedefs, structures, and compiler characteristics.
558 # -----------------------------------------------------------------------------
559 AC_TYPE_PID_T
560 AC_TYPE_SIZE_T
561 AC_TYPE_SIGNAL
562 AC_HEADER_TIME
563 AC_CHECK_TYPE(u_int, unsigned int)
564
565 # -----------------------------------------------------------------------------
566 # Checks for library functions.
567 # -----------------------------------------------------------------------------
568 AC_CHECK_FUNCS(gettimeofday socket strdup strerror strtod sginap)
569
570 dnl # All of the above function checks may not be necessary ...
571
572 # -----------------------------------------------------------------------------
573 # Do Makefile substitutions.
574 # -----------------------------------------------------------------------------
575 if test "$PLATFORM" = "SGI" ; then
576     CFLAGS="$CFLAGS -nostdinc -woff 1685,515,608,658,799,803,852,1048,1233,1499 -MDupdate Makedepend"
577     CXXFLAGS="$CXXFLAGS -nostdinc -woff 3322 -w2 -MDupdate Makedepend"
578 fi
579
580 DEPENDFLAGS=""
581 DEPEND_EXTRAS=""
582
583 # For makedepend(1) to work properly on HP-UX with aCC, we have to include
584 # these extra paths.
585 if test "$PLATFORM" = "HP" ; then
586     aCC_ROOT="/opt/aCC"
587     DEPEND_EXTRAS="-I${aCC_ROOT} -I${aCC_ROOT}/include -I${aCC_ROOT}/include/iostream"
588 fi
589
590 dnl # This build directory stuff is not presently being used.
591 if test -z "$vj_builddir" ; then
592     builddir='${top_srcdir}/lib'
593 else
594     if test -d "$vj_builddir" ; then
595         old_wd=`pwd`
596         cd "$vj_builddir"
597         builddir=`pwd`
598         cd "$old_wd"
599     else
600         AC_MSG_ERROR(Build directory $vj_builddir does not exist!)
601     fi
602 fi
603
604 # $srcdir is the root directory of the vjlib source tree.  To get a value for
605 # $VJROOT_ABS, we cd there and save the value of running pwd.  Then return to
606 # the directory where configure is being run ($topdir).
607 topdir=`pwd`
608 cd "$srcdir"
609 VJROOT_ABS=`pwd`
610 cd "$topdir"
611
612 # Define the base path to the source directory using ${VJROOT_ABS} as an
613 # alternative to using ${srcdir}.
614 VJ_SRCDIR='${VJROOT_ABS}'
615
616 # Variables set in Makefiles found in the test tree.
617 TEST_VJ_LIBS="-L\${VJ_BASE_DIR}/lib${LIBBITSUF} -lJuggler"
618 TEST_VJ_LIBS_SUBST="-L$\${VJ_BASE_DIR}/lib\${LIBBITSUF} -lJuggler"
619 TEST_EXTRA_LIBS="$LDFLAGS -L${OGLROOT}/lib${LIBBITSUF} $OGLLIB $SYSTEM_OPENGL $LIBS"
620 TEST_EXTRA_LIBS_SUBST="$LDFLAGS -L${OGLROOT}/lib\${LIBBITSUF} $OGLLIB $SYSTEM_OPENGL $LIBS"
621
622 dnl # AC_SUBST(builddir)
623 AC_SUBST(topdir)
624 AC_SUBST(VJROOT_ABS)
625 AC_SUBST(VJ_SRCDIR)
626
627 AC_SUBST(AR)
628 AC_SUBST(ARFLAGS)
629 AC_SUBST(CFLAGS)
630 AC_SUBST(CXXFLAGS)
631 AC_SUBST(DEPENDFLAGS)
632 AC_SUBST(DEPEND_EXTRAS)
633 AC_SUBST(INCLUDES)
634 AC_SUBST(LD)
635 AC_SUBST(LIBS)
636 AC_SUBST(LDOPTS)
637 AC_SUBST(OPT_FLAGS)
638 AC_SUBST(SHAREDLIB_EXT)
639
640 AC_SUBST(ABI)
641 AC_SUBST(INST_SET)
642 AC_SUBST(ABI_LIST)
643 AC_SUBST(LIBBITSUF)
644 AC_SUBST(PLATFORM)
645 AC_SUBST(DSOREGFILE)
646 AC_SUBST(DSOVERSION)
647 AC_SUBST(DSOVERSIONOPTS)
648
649 AC_SUBST(JDK_HOME)
650 AC_SUBST(JAVAC)
651 AC_SUBST(JAR)
652 AC_SUBST(BUILD_GUI)
653
654 AC_SUBST(OGLROOT)
655 AC_SUBST(PFROOT)
656
657 AC_SUBST(OPENGL_API)
658 AC_SUBST(PERFORMER_API)
659
660 AC_SUBST(SHMEM_SYS)
661 AC_SUBST(SYNC_SYS)
662 AC_SUBST(THREAD_SYS)
663
664 AC_SUBST(TEST_VJ_LIBS)
665 AC_SUBST(TEST_VJ_LIBS_SUBST)
666 AC_SUBST(TEST_EXTRA_LIBS)
667 AC_SUBST(TEST_EXTRA_LIBS_SUBST)
668
669 # -----------------------------------------------------------------------------
670 # Final file generation step.
671 # -----------------------------------------------------------------------------
672 AC_OUTPUT(Makefile Makefile.base Config/Makefile Math/Makefile
673           Input/Makefile Input/vjGlove/Makefile Input/vjInput/Makefile
674           Input/vjPosition/Makefile Input/InputManager/Makefile
675           Input/ibox/Makefile Kernel/Makefile Kernel/Pf/Makefile
676           Kernel/GL/Makefile SharedMem/Makefile Sync/Makefile
677           Threads/Makefile test/Makefile test/CfgTest/Makefile
678           test/input/Makefile test/ogl/Makefile test/ogl/cubes/Makefile
679           test/ogl/wand/Makefile test/pfNav/Makefile test/Sync/Makefile
680           test/Quat/Makefile test/testDynamicCastSTL/Makefile
681           test/threads/Makefile GUI/Makefile)
Note: See TracBrowser for help on using the browser.