root/juggler/branches/2.2/modules/vrjuggler/vrjconfig/configure.ac

Revision 20797, 10.4 kB (checked in by patrick, 1 year ago)

MFT r20779: Use VJ_DATA_DIR instead of VRJ_DATA_DIR in order to be consistent

with the spelling of VJ_BASE_DIR.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 # ************** <auto-copyright.pl BEGIN do not edit this line> **************
2 #
3 # VR Juggler is (C) Copyright 1998-2007 by Iowa State University
4 #
5 # Original Authors:
6 #   Allen Bierbaum, Christopher Just,
7 #   Patrick Hartling, Kevin Meinert,
8 #   Carolina Cruz-Neira, Albert Baker
9 #
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Library General Public
12 # License as published by the Free Software Foundation; either
13 # version 2 of the License, or (at your option) any later version.
14 #
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 # Library General Public License for more details.
19 #
20 # You should have received a copy of the GNU Library General Public
21 # License along with this library; if not, write to the
22 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 # Boston, MA 02111-1307, USA.
24 #
25 # *************** <auto-copyright.pl END do not edit this line> ***************
26
27 # -----------------------------------------------------------------------------
28 # Base configure.in for VRJConfig.
29 # -----------------------------------------------------------------------------
30 # This file is "compiled" by GNU autoconf to generate the configure script
31 # that is actually run.
32 # -----------------------------------------------------------------------------
33
34 AC_INIT([VRJConfig], [1.2], [vrjuggler-devel@lists.sourceforge.net])
35 AC_PREREQ([2.53])
36 AC_COPYRIGHT([VR Juggler is (C) Copyright 1998-2007 by Iowa State University])
37 AC_CONFIG_SRCDIR([VRJConfig.xml])
38 AC_REVISION($Revision$)
39 AC_CONFIG_AUX_DIR([../../../share/config])
40 DPP_PREREQ([1.99.17])
41 DPP_INIT
42
43 # Generate the reconfig script first so that it's easy to run configure again
44 # if it fails later on.
45 DPP_GEN_RECONFIG
46
47 # -----------------------------------------------------------------------------
48 # Command-line arguments (--enable-option, --with-pkg=package_name).
49 # -----------------------------------------------------------------------------
50 # Enable versioning by default
51 AC_ARG_ENABLE([versioning],
52               [  --disable-versioning    Disable all versioning capabilities],
53               [ENABLE_VERSIONING="$enableval"], [ENABLE_VERSIONING='yes'])
54 # -------------------------------------------- #
55 # --with-pkg[=arg] and --without-pkg arguments #
56 # -------------------------------------------- #
57
58 # Specify where Java3D is located
59 AC_ARG_WITH(java3d,
60             [  --with-java3d=<PATH>    Path to Java3D JAR file(s) ],
61             JAVA3D_JAR="$withval", JAVA3D_JAR='none')
62
63 # Specify where JOGL is located
64 AC_ARG_WITH(jogl,
65             [  --with-jogl=<PATH>      Path to JOGL JAR file(s) ],
66             JOGL_JARS="$withval", JOGL_JARS='')
67
68 # -----------------------------------------------------------------------------
69 # System-dependent stuff.
70 # -----------------------------------------------------------------------------
71 DPP_SYSTEM_SETUP
72
73 # -----------------------------------------------------------------------------
74 # Path setup.
75 # -----------------------------------------------------------------------------
76
77 # $srcdir is the root directory of the juggler source tree.  To get a value for
78 # $VJROOT_ABS, we cd there and save the value of running pwd.  Then return to
79 # the directory where configure is being run ($topdir).
80 cd "$srcdir"
81 VJROOT_ABS=`pwd`
82 cd "$VJROOT_ABS/../../.."
83 UNIX_JUGGLERROOT_ABS=`pwd`
84 cd "$topdir"
85
86 JUGGLERROOT_ABS="$UNIX_JUGGLERROOT_ABS"
87
88 # -----------------------------------------------------------------------------
89 # Checks for programs.
90 # -----------------------------------------------------------------------------
91
92 # Check for the JDK.
93 DPP_PATH_JAVA( , [BUILD_JAVA='Y'], [BUILD_JAVA='N'])
94
95 # If there is still no value in $JAVAC, then warn that VRJConfig will not be
96 # built.
97 if test "x$BUILD_JAVA" = "xN" ; then
98    AC_MSG_WARN([*** VRJConfig requires the JDK -- it will not be built ***])
99 else
100    DPP_JDK_VERSION([$JDK_HOME], [1.4], ,
101       [AC_MSG_WARN([*** JDK 1.4 or newer required for VRJConfig ***])
102        BUILD_JAVA='N'])
103 fi
104
105 ANT="JAVA_HOME=\"$JDK_HOME\" \"$UNIX_JUGGLERROOT_ABS/external/ant/bin/ant\" --noconfig"
106
107 # Ensure that a version of Perl greater than or equal to 5.004 is available.
108 DPP_PERL_VER(5.004, , , [AC_MSG_ERROR([*** Perl is required ***])])
109
110 DPP_HAVE_GNU_MAKE([3.78], ,
111     [AC_MSG_ERROR([*** The build system requires GNU make 3.78 or newer ***])])
112 DPP_BASIC_PROGS($PLATFORM, $OS_TYPE)
113 DPP_PROG_INSTALL
114
115 # -----------------------------------------------------------------------------
116 # Checks for libraries.
117 # -----------------------------------------------------------------------------
118
119 if test "x$BUILD_JAVA" = "xY" ; then
120    TWEEK_PATH_JAVA([0.92.4],
121       [JCCL_PATH_JAVA([0.92.11], ,
122          [AC_MSG_WARN([*** JCCL Java API required for VRJConfig ***])
123           BUILD_JAVA='N'])],
124       [AC_MSG_WARN(*** Tweek Java API required for VRJConfig ***)
125        BUILD_JAVA='N'])
126 fi
127
128 # --------
129 # Java3D.
130 # --------
131 BUILD_JAVA_3D_EDITOR='N'
132 if test "x$BUILD_JAVA" = "xY" ; then
133    # If we are building VRJConfig, we can try to enable building the
134    # Java3D-based editor(s).
135    if test "x$BUILD_JAVA" = "xY" ; then
136       DPP_CHECK_JAVA_STATIC_METHOD([javax.media.j3d.VirtualUniverse],
137          [getJ3DThreadPriority()], ,
138          [BUILD_JAVA_3D_EDITOR='Y'],
139          [ AC_MSG_WARN([*** Java3D required for Java3D custom editor ***])
140            BUILD_JAVA_3D_EDITOR='N' ],
141          [$JAVA3D_JAR])
142    fi
143 fi
144
145 # --------
146 # JOGL.
147 # --------
148 BUILD_JOGL_EDITOR='N'
149 if test "x$BUILD_JAVA" = "xY" ; then
150    # If we are building VRJConfig, we can try to enable building the
151    # JOGL-based editor(s).
152    if test "x$BUILD_JAVA" = "xY" ; then
153       DPP_CHECK_JAVA_STATIC_METHOD([net.java.games.jogl.Version],
154          [getVersion()], ,
155          [BUILD_JOGL_EDITOR='Y'],
156          [ AC_MSG_WARN([*** JOGL required for JOGL custom editor ***])
157            BUILD_JOGL_EDITOR='N' ],
158          [$JOGL_JARS])
159       if test "x$BUILD_JOGL_EDITOR" = "xY" ; then
160          DPP_CHECK_JAVA_STATIC_METHOD([gleem.ManipManager],
161             [getManipManager()], ,
162             [BUILD_JOGL_EDITOR='Y'],
163             [ AC_MSG_WARN([*** Gleem required for JOGL custom editor ***])
164               BUILD_JOGL_EDITOR='N' ],
165             [$JOGL_JARS])
166       fi
167    fi
168 fi
169
170 # -----------------------------------------------------------------------------
171 # Miscellaneous checks.
172 # -----------------------------------------------------------------------------
173 DPP_INSTALLER(vrjuggler, 0644, 0755, 0755)
174
175 # -----------------------------------------------------------------------------
176 # Finalize substitution settings.
177 # -----------------------------------------------------------------------------
178 #
179
180 VJ_VERSION_GROK(../VERSION)
181
182 TWEEK_DATA_DIR="share/$TWEEK_DATA_SUBDIR"
183 JCCL_DATA_DIR="share/$JCCL_DATA_SUBDIR"
184
185 if test "x$ENABLE_VERSIONING" = "xyes" ; then
186    VJ_VERSION_DOT="$MAJOR_VERSION.$MINOR_VERSION"
187    VJ_DATA_VERSION="vrjuggler-$VJ_VERSION_DOT"
188    VJ_DATA_DIR="share/vrjuggler-$VJ_VERSION_DOT"
189    PLUGIN_DIR_VERSION="vrjuggler-$VJ_VERSION_DOT"
190
191 # If versioning is disabled, then none of the version variables need to be
192 # set except for $DATA_VERSION. Its use is different than the others. The
193 # important thing to note is that the directory name is unversioned in this
194 # case.
195 else
196    VJ_DATA_VERSION="vrjuggler"
197    VJ_DATA_DIR="share/vrjuggler"
198    PLUGIN_DIR_VERSION="vrjuggler"
199 fi
200
201 # Define the base path to the source directory using $(VJROOT_ABS) as an
202 # alternative to using $(srcdir).
203 UNIX_VJROOT_ABS="$VJROOT_ABS"
204
205 if test "x$PLATFORM" = "xDarwin" ; then
206    changequote(<<, >>)
207    vrjconfig_bundle_tweek_jardir=`echo $TWEEK_JARS | awk -F: '{ print $1 }' | sed -e 's/^\(.*\)\/[^/]*\.jar$/\1/'`
208    vrjconfig_bundle_jccl_jardir=`echo $JCCL_JARS | awk -F: '{ print $1 }' | sed -e 's/^\(.*\)\/[^/]*\.jar$/\1/'`
209
210    tweek_java_api_jars_bundle=`echo $TWEEK_JARS | sed -e "s|$vrjconfig_bundle_tweek_jardir/\([^/]*.jar\)|"'$JAVAROOT/\1|g'`
211    tweek_ext_java_api_jars_bundle=`echo $TWEEK_EXT_JARS | sed -e 's/:/ /g' -e "s|$vrjconfig_bundle_tweek_jardir/\([^/].jar\)|\1|g"`
212    changequote([, ])
213
214    tweek_datadir=`echo $vrjconfig_bundle_tweek_jardir | sed -e 's/\(.*\)java$/\1/'`
215    vrjconfig_bundle_tweek_beandir="${tweek_datadir}beans"
216
217    jccl_datadir=`echo $vrjconfig_bundle_jccl_jardir | sed -e 's/\(.*\)java$/\1/'`
218    vrjconfig_bundle_jccl_beandir="${jccl_datadir}beans"
219    vrjconfig_bundle_jccl_datadir="${jccl_datadir}data"
220 fi
221
222 # -----------------------------------------------------------------------------
223 # Do Makefile substitutions.
224 # -----------------------------------------------------------------------------
225
226 DPP_SUBST
227
228 AC_SUBST(topdir)
229 AC_SUBST(UNIX_VJROOT_ABS)
230 AC_SUBST(UNIX_JUGGLERROOT_ABS)
231 AC_SUBST(VJROOT_ABS)
232 AC_SUBST(JUGGLERROOT_ABS)
233
234 AC_SUBST(TWEEK_DATA_DIR)
235 AC_SUBST(JCCL_DATA_DIR)
236 AC_SUBST(VJ_DATA_VERSION)
237 AC_SUBST(VJ_DATA_DIR)
238 AC_SUBST(PLUGIN_DIR_VERSION)
239 AC_SUBST(ANT)
240 AC_SUBST(RM_LN)
241
242 AC_SUBST(BUILD_JAVA)
243 AC_SUBST(BUILD_JAVA_3D_EDITOR)
244 AC_SUBST(JAVA3D_JAR)
245 AC_SUBST(JOGL_JARS)
246
247 AC_SUBST(tweek_java_api_jars_bundle)
248 AC_SUBST(tweek_ext_java_api_jars_bundle)
249 AC_SUBST(vrjconfig_bundle_tweek_beandir)
250 AC_SUBST(vrjconfig_bundle_tweek_jardir)
251 AC_SUBST(vrjconfig_bundle_jccl_beandir)
252 AC_SUBST(vrjconfig_bundle_jccl_datadir)
253 AC_SUBST(vrjconfig_bundle_jccl_jardir)
254
255 # -----------------------------------------------------------------------------
256 # Final file generation step.
257 # -----------------------------------------------------------------------------
258
259 AC_CONFIG_FILES([
260    Makefile
261    build.xml
262    common.defs.mk
263    Info.plist
264    java.defs.mk
265    make.defs.mk
266    vrjconfig.sh
267    commoneditors/build.xml
268    commoneditors/Makefile
269    customeditors/Makefile
270    customeditors/cave/build.xml
271    customeditors/cave/Makefile
272    customeditors/display_window/build.xml
273    customeditors/display_window/Makefile
274    customeditors/flock/build.xml
275    customeditors/flock/Makefile
276    customeditors/intersense/build.xml
277    customeditors/intersense/Makefile
278    customeditors/motionstar/build.xml
279    customeditors/motionstar/Makefile
280    customeditors/pinchglove/build.xml
281    customeditors/pinchglove/Makefile
282    customeditors/proxyeditor/build.xml
283    customeditors/proxyeditor/Makefile
284    customeditors/surfacedisplayeditor/build.xml
285    customeditors/surfacedisplayeditor/Makefile
286    wizards/Makefile
287    wizards/cluster/build.xml
288    wizards/cluster/Makefile
289    wizards/newdevice/build.xml
290    wizards/newdevice/Makefile
291    wizards/vrsystem/build.xml
292    wizards/vrsystem/Makefile
293    ])
294
295 AC_CONFIG_COMMANDS([permission], [chmod a+x vrjconfig.sh])
296
297 AC_OUTPUT
Note: See TracBrowser for help on using the browser.