root / trunk / configure.ac

Revision 1355, 13.6 kB (checked in by timdewhirst, 10 months ago)

audiotube
- reinstate glew plugin

  • Property svn:eol-style set to native
Line 
1dnl
2dnl     Configure.ac for openlibraries
3dnl
4
5AC_INIT
6AC_CONFIG_SRCDIR([src/openobjectlib/sg/core.hpp])
7AM_CONFIG_HEADER([openlibraries_global_config.hpp])
8
9dnl
10dnl     Require autoconf version 2.56
11dnl
12AC_PREREQ(2.56)
13
14dnl
15dnl Versioning
16dnl
17OL_MAJOR=0
18OL_MINOR=5
19OL_SUB=0
20
21OL_LT_CURRENT=0
22OL_LT_REVISION=5
23OL_LT_AGE=0
24
25AC_SUBST(OL_MAJOR)
26AC_SUBST(OL_MINOR)
27AC_SUBST(OL_SUB)
28
29AC_SUBST(OL_LT_CURRENT)
30AC_SUBST(OL_LT_REVISION)
31AC_SUBST(OL_LT_AGE)
32
33dnl
34AM_INIT_AUTOMAKE("openlibraries", 0.5.0)
35
36dnl Check for programs
37AC_PROG_CXX
38AC_HEADER_STDC
39AC_PROG_MAKE_SET
40AC_PROG_INSTALL
41AC_PROG_LN_S
42
43dnl Check if specific olibs should be disabled
44AC_ARG_ENABLE(glew, AC_HELP_STRING([--disable-glew], [disable GLEW dependent parts]), [enableglew=$enableval], [enableglew=yes])
45if test "$enableglew" = "no" ; then
46        AC_MSG_WARN([*** GLEW is disabled - continuing build with non-opengl dependent components ***])
47fi
48
49AC_ARG_ENABLE(openassetlib, AC_HELP_STRING([--with-openassetlib], [disable openassetlib]), [enableassetlib=$enableval], [enableassetlib=yes])
50if test "x$enableassetlib" = "xyes" && test "x$enableglew" = "xyes" ; then
51        AC_DEFINE(HAVE_OPENASSETLIB,1,[Defined if you have openassetlib])
52fi
53AM_CONDITIONAL(HAVE_OPENASSETLIB, [test "x$enableassetlib" = "xyes" && test "x$enableglew" = "xyes"])
54
55AC_ARG_ENABLE(openeffectlib, AC_HELP_STRING([--with-openeffectlib], [disable openeffectlib]), [enableeffectlib=$enableval], [enableeffectlib=yes])
56if test "x$enableeffectlib" = "xyes" && test "x$enableglew" = "xyes" ; then
57        AC_DEFINE(HAVE_OPENEFFECTLIB,1,[Defined if you have openeffectlib])
58fi
59AM_CONDITIONAL(HAVE_OPENEFFECTLIB, [test "x$enableeffectlib" = "xyes" && test "x$enableglew" = "xyes"])
60
61AC_ARG_ENABLE(openobjectlib, AC_HELP_STRING([--with-openobjectlib], [disable openobjectlib]), [enableobjectlib=$enableval], [enableobjectlib=yes])
62if test "x$enableobjectlib" = "xyes" && test "x$enableglew" = "xyes" ; then
63        AC_DEFINE(HAVE_OPENOBJECTLIB, 1,[Defined if you have openobjectlib])
64fi
65AM_CONDITIONAL(HAVE_OPENOBJECTLIB, [test "x$enableobjectlib" = "xyes" && test "x$enableglew" = "xyes"])
66
67AC_ARG_ENABLE(pool, AC_HELP_STRING([--disable-pool], [disable memory pooling]), [enablepool=$enableval], [enablepool=yes])
68if test "$enablepool" = "yes" ; then
69        AC_DEFINE(HAVE_POOLING, 1,[Define this if you want memory pooling])
70fi
71
72dnl libtool
73AC_LIBTOOL_DLOPEN
74AC_DISABLE_STATIC
75AC_PROG_LIBTOOL
76AC_SUBST(LIBTOOL_DEPS)
77
78dnl dl support
79AC_CHECK_LIB(dl, dlopen,
80                         have_dl=yes DL_LIBS="-ldl",
81                         AC_MSG_ERROR([*** dynamic loading support is not available. Compilation will fail. ***]))
82AC_SUBST(DL_LIBS)
83
84dnl determine libdir name. tests for 64bit. (from xine-lib).
85AC_MSG_CHECKING([if compiler is 64bit])
86case $host in
87        *-*-linux*)
88                # Test if the compiler is 64bit
89                echo 'int i;' > conftest.$ac_ext
90                ol_cv_cc_64bit_output=no
91                if AC_TRY_EVAL(ac_compile); then
92                        case `/usr/bin/file conftest.$ac_objext` in
93                                *"ELF 64"*)
94                                ol_cv_cc_64bit_output=yes
95                                ;;
96                        esac
97                fi
98        rm -rf conftest*
99        ;;
100esac
101
102case $host_cpu:$ol_cv_cc_64bit_output in
103        powerpc64:yes | x86_64:yes)
104                OL_LIBNAME="lib64"
105                if test "$libdir" = '${exec_prefix}/lib'; then
106                        libdir='${exec_prefix}/lib64'
107                fi
108                ;;
109        *:*)
110                OL_LIBNAME="lib"
111                ;;
112esac
113AC_MSG_RESULT([$OL_LIBNAME])
114AC_SUBST(OL_LIBNAME)
115
116dnl C math library.
117AC_CHECK_LIB(m, sin)
118
119dnl zlib support
120AC_CHECK_ZLIB( )
121
122dnl bzip2 support
123AC_CHECK_BZIP2( )
124
125dnl SQLite support
126AC_CHECK_SQLITE3( )
127
128dnl check for X11
129AC_PATH_XTRA
130if test x"$no_x" != "xyes"; then
131    AC_DEFINE(HAVE_X11,1,[Define this if you have X11R6 installed])
132fi
133AM_CONDITIONAL(HAVE_X11, [test x"$no_x" != "xyes"])
134
135dnl OpenGL, GLU, GLUT support
136OPL_EXTRA_LIBS=""
137AC_MSG_CHECKING([the OpenGL environment])
138case $host in
139        *-*-linux*)
140                AC_CHECK_OPENGL( )
141        ;;
142        *-apple-darwin*)
143                if test "x$enableglew" = "xyes" ; then
144                        AC_MSG_RESULT([Apple Darwin build. OpenGL defaults on OSX...])
145                        AM_CONDITIONAL(HAVE_GL_GL_H, [test x"yes" = x"yes"] )
146                        AM_CONDITIONAL(HAVE_GL_GLUT_H, [test x"yes" = x"yes"] )
147                        OPENGL_LIBS="-Xlinker -framework -Xlinker OpenGL"
148                        GLUT_LIBS="-Xlinker -framework -Xlinker GLUT"
149                else
150                        OPL_EXTRA_LIBS="-Xlinker -framework -Xlinker Carbon"
151                        AM_CONDITIONAL(HAVE_GL_GL_H, [false])
152                        AM_CONDITIONAL(HAVE_GL_GLUT_H, [false])
153                fi
154                AC_SUBST(OPENGL_LIBS)
155                AC_SUBST(GLUT_LIBS)
156        ;;
157        *)
158                AC_MSG_RESULT([OpenGL configuration not tested.])
159                AM_CONDITIONAL(HAVE_GL_GL_H, [false])
160                AM_CONDITIONAL(HAVE_GL_GLUT_H, [false])
161        ;;
162esac
163AC_SUBST(OPL_EXTRA_LIBS)
164
165dnl GLEW support
166AC_CHECK_GLEW( )
167
168dnl NVIDIA Cg runtime support
169AC_CHECK_CG_RUNTIME( )
170
171dnl OFX support
172AC_CHECK_OFX( )
173
174dnl Umbrella Framework
175AC_CHECK_UMBRELLA_FRAMEWORK()
176
177dnl Boost support
178AC_LANG([C++])
179AC_CHECK_BOOST( )
180
181dnl libxml2 support
182AC_PATH_PROG(LIBXML2_CONFIG, xml2-config, no)
183if test "x$LIBXML2_CONFIG" = "xno" ; then
184        AC_MSG_RESULT([*** libxml2 support is not available ***])
185else
186        XML2_CXXFLAGS=`$LIBXML2_CONFIG --cflags`
187        XML2_LIBS=`$LIBXML2_CONFIG --libs`
188        have_libxml2="yes"
189        AC_DEFINE(HAVE_LIBXML2,1,[Define this for libxml2 support])
190fi
191
192AM_CONDITIONAL(HAVE_LIBXML2, test x"$have_libxml2" = "xyes")
193AC_SUBST(XML2_CXXFLAGS)
194AC_SUBST(XML2_LIBS)
195
196dnl OpenImageLib support
197AC_MSG_NOTICE([*** Configuring OpenImageLib ***])
198AC_CHECK_OPENIMAGELIB( )
199AC_CHECK_TIFF( )
200
201AC_CHECK_QUICKTIME( )
202
203SWAB_AUDIO=""
204AC_ARG_ENABLE(swab-audio, AC_HELP_STRING([--enable-swab-audio], [enable byte swapping of audio samples]),
205                [enableswabaudio=$enableval], [enableswabaudio=no])
206if test x$enableswabaudio = "xyes" ; then
207        SWAB_AUDIO="-DSWAB_AUDIO"
208fi
209AC_SUBST(SWAB_AUDIO)
210
211dnl include paths
212INCLUDES='-I$(top_srcdir)/src'
213AC_SUBST(INCLUDES)
214
215dnl OpenLibraries common flags
216dnl NOTE: we could use $(var) instead of @var@ if we want late-expansion in the generated makefiles.
217OLIB_CXXFLAGS='-fvisibility=hidden -fvisibility-inlines-hidden'
218AC_SUBST(OLIB_CXXFLAGS)
219
220OLIB_LDFLAGS=''
221
222case $host in
223        *-*-linux*)
224                OLIB_LDFLAGS='-Wl,-export-dynamic'
225        ;;
226        *-apple-darwin*)
227                OLIB_LDFLAGS='-Wl,-headerpad_max_install_names'
228        ;;
229esac
230
231AC_SUBST(OLIB_LDFLAGS)
232
233dnl Check for ffmpeg's libavformat
234AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
235if test "x$HAVE_PKG_CONFIG" = "xyes" ; then
236  PKG_CHECK_MODULES(LIBAVFORMAT, libavformat, libavformat="yes", libavformat="no")
237  if test x"$libavformat" = x"no"; then
238        AC_MSG_RESULT([*** ffmpeg development environment is not available ***])
239  else
240        AC_DEFINE(HAVE_LIBAVFORMAT,1,[Define this if you have libavformat])
241        AC_SUBST(LIBAVFORMAT_CFLAGS)
242        AC_SUBST(LIBAVFORMAT_LIBS)
243  fi
244fi
245AM_CONDITIONAL(HAVE_LIBAVFORMAT, [test x"$libavformat" = "xyes"])
246
247dnl mlt support
248AC_ARG_ENABLE(mlt, AC_HELP_STRING([--disable-mlt], [disable mlt dependent parts]), [enablemlt=$enableval], [enablemlt=yes])
249if test "$enablemlt" = "yes" ; then
250        AC_PATH_PROG(MLT_CONFIG, mlt-config, no)
251        if test "x$MLT_CONFIG" = "xno" ; then
252                AC_MSG_RESULT([*** mlt support is not available ***])
253        else
254                AC_DEFINE(HAVE_LIBMLT,1,[Define this for mlt support])
255                MLT_CXXFLAGS=`$MLT_CONFIG --cflags`
256                MLT_LIBS="-lmlt++ `$MLT_CONFIG --libs`"
257                AC_SUBST(MLT_CXXFLAGS)
258                AC_SUBST(MLT_LIBS)
259                have_libmlt="yes"
260        fi
261fi
262AM_CONDITIONAL(HAVE_LIBMLT, [test x"$have_libmlt" = "xyes"])
263
264dnl sdl support
265AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
266if test "x$SDL_CONFIG" = "xno" ; then
267        AC_MSG_RESULT([*** sdl support is not available ***])
268else
269        AC_DEFINE(HAVE_LIBSDL,1,[Define this for sdl support])
270        SDL_CXXFLAGS=`$SDL_CONFIG --cflags`
271        SDL_LIBS=`$SDL_CONFIG --libs`
272        AC_SUBST(SDL_CXXFLAGS)
273        AC_SUBST(SDL_LIBS)
274        have_libsdl="yes"
275fi
276AM_CONDITIONAL(HAVE_LIBSDL, [test x"$have_libsdl" = "xyes"])
277
278dnl qimage support
279AC_CHECK_QT( )
280
281dnl Check for ILM OpenEXR
282if test "x$HAVE_PKG_CONFIG" = "xyes" ; then
283  PKG_CHECK_MODULES(OPENEXR, OpenEXR, OpenEXR="yes", OpenEXR="no")
284  if test x"$OpenEXR" = x"no"; then
285        AC_MSG_RESULT([*** ILM OpenEXR development environment is not available ***])
286  else
287        AC_DEFINE(HAVE_OPENEXR,1,[Define this if you have ILM OpenEXR])
288        AC_SUBST(OPENEXR_CFLAGS)
289        AC_SUBST(OPENEXR_LIBS)
290  fi
291fi
292AM_CONDITIONAL(HAVE_OPENEXR, [test x"$OpenEXR" = "xyes"])
293
294dnl Check for openal
295AC_CHECK_OPENAL_RUNTIME( )
296
297dnl Check for gpl components
298AC_CHECK_GPL( )
299
300dnl Check for Python
301AC_CHECK_PYTHON( )
302
303dnl Universal Binary Support (OS X only)
304AC_CHECK_UNIVERSAL_BINARY_SUPPORT( )
305
306dnl Fast Math support
307AC_CHECK_FAST_MATH( )
308
309SHARED_EXT="so"
310case $host in
311        *-apple-darwin*)
312                SHARED_EXT="dylib"
313        ;;
314esac
315AC_SUBST(SHARED_EXT)
316
317dnl include, lib and plugin path
318OPENLIBRARIES_INCLUDEPATH="$includedir/openlibraries-$OL_MAJOR.$OL_MINOR.$OL_SUB"
319OPENLIBRARIES_LIBPATH="$libdir/openlibraries-$OL_MAJOR.$OL_MINOR.$OL_SUB"
320OPENLIBRARIES_DATAPATH="$datadir/openlibraries-$OL_MAJOR.$OL_MINOR.$OL_SUB"
321OPENIMAGELIB_LIBPATH="${OPENLIBRARIES_LIBPATH}/openimagelib/$OL_LIBNAME"
322OPENIMAGELIB_PLUGINPATH="${OPENLIBRARIES_LIBPATH}/openimagelib/plugins"
323OPENMEDIALIB_LIBPATH="${OPENLIBRARIES_LIBPATH}/openmedialib/$OL_LIBNAME"
324OPENMEDIALIB_PLUGINPATH="${OPENLIBRARIES_LIBPATH}/openmedialib/plugins"
325OPENEFFECTSLIB_PLUGINPATH="${OPENLIBRARIES_LIBPATH}/openeffectslib/plugins"
326OPENOBJECTLIB_LIBPATH="${OPENLIBRARIES_LIBPATH}/openobjectlib/$OL_LIBNAME"
327OPENOBJECTLIB_PLUGINPATH="${OPENLIBRARIES_LIBPATH}/openobjectlib/plugins"
328OPENOBJECTLIB_MEDIAPATH="$datadir/openlibraries-$OL_MAJOR.$OL_MINOR/media"
329OPENOBJECTLIB_SHADERSPATH="${OPENLIBRARIES_DATAPATH}/shaders"
330OPENASSETLIB_LIBPATH="${OPENLIBRARIES_LIBPATH}/openassetlib/$OL_LIBNAME"
331OPENASSETLIB_PLUGINPATH="${OPENLIBRARIES_LIBPATH}/openassetlib/plugins"
332OPENPLUGINLIB_LIBPATH="${OPENLIBRARIES_LIBPATH}/openpluginlib/$OL_LIBNAME"
333OPENEFFECTSLIB_SHADERSPATH="${OPENLIBRARIES_DATAPATH}/shaders"
334AC_SUBST(OPENIMAGELIB_LIBPATH)
335AC_SUBST(OPENIMAGELIB_PLUGINPATH)
336AC_SUBST(OPENMEDIALIB_LIBPATH)
337AC_SUBST(OPENMEDIALIB_PLUGINPATH)
338AC_SUBST(OPENEFFECTSLIB_PLUGINPATH)
339AC_SUBST(OPENLIBRARIES_INCLUDEPATH)
340AC_SUBST(OPENLIBRARIES_LIBPATH)
341AC_SUBST(OPENLIBRARIES_DATAPATH)
342AC_SUBST(OPENOBJECTLIB_LIBPATH)
343AC_SUBST(OPENOBJECTLIB_MEDIAPATH)
344AC_SUBST(OPENOBJECTLIB_PLUGINPATH)
345AC_SUBST(OPENOBJECTLIB_SHADERSPATH)
346AC_SUBST(OPENASSETLIB_LIBPATH)
347AC_SUBST(OPENASSETLIB_PLUGINPATH)
348AC_SUBST(OPENPLUGINLIB_LIBPATH)
349
350dnl pkg config link flags
351OPENOBJECTLIB_LDFLAGS=""
352if test "x$enableobjectlib" = "xyes" && test "x$enableglew" = "xyes" ; then
353        OPENOBJECTLIB_LDFLAGS="-L$OPENLIBRARIES_LIBPATH/openobjectlib/$OL_LIBNAME -lopenobjectlib_sg"
354fi
355AC_SUBST(OPENOBJECTLIB_LDFLAGS)
356
357OPENASSETLIB_LDFLAGS=""
358if test "x$enableassetlib" = "xyes" && test "x$enableglew" = "xyes" ; then
359        OPENASSETLIB_LDFLAGS="-L$OPENLIBRARIES_LIBPATH/openassetlib/$OL_LIBNAME -lopenassetlib_al"
360fi
361AC_SUBST(OPENASSETLIB_LDFLAGS)
362
363OPENMEDIALIB_LDFLAGS="-L$OPENLIBRARIES_LIBPATH/openmedialib/$OL_LIBNAME -lopenmedialib_ml"
364AC_SUBST(OPENMEDIALIB_LDFLAGS)
365
366OPENIMAGELIB_LDFLAGS="-L$OPENLIBRARIES_LIBPATH/openimagelib/$OL_LIBNAME -lopenimagelib_il"
367AC_SUBST(OPENIMAGELIB_LDFLAGS)
368
369OPENPLUGINLIB_LDFLAGS="-L$OPENLIBRARIES_LIBPATH/openpluginlib/$OL_LIBNAME -lopenpluginlib_pl"
370AC_SUBST(OPENPLUGINLIB_LDFLAGS)
371
372dnl
373dnl Output configuration files
374dnl
375AC_CONFIG_FILES([
376Makefile
377src/Makefile
378src/openpluginlib/Makefile
379src/openpluginlib/pl/Makefile
380src/openpluginlib/py/Makefile
381src/openimagelib/Makefile
382src/openimagelib/il/Makefile
383src/openimagelib/plugins/Makefile
384src/openimagelib/plugins/3D_lightmap/Makefile
385src/openimagelib/plugins/dds/Makefile
386src/openimagelib/plugins/dpx/Makefile
387src/openimagelib/plugins/exr/Makefile
388src/openimagelib/plugins/hdr/Makefile
389src/openimagelib/plugins/jpg/Makefile
390src/openimagelib/plugins/png/Makefile
391src/openimagelib/plugins/quicktime/Makefile
392src/openimagelib/plugins/sgi/Makefile
393src/openimagelib/plugins/tga/Makefile
394src/openimagelib/plugins/tiff/Makefile
395src/openimagelib/py/Makefile
396src/openmedialib/Makefile
397src/openmedialib/ml/Makefile
398src/openmedialib/plugins/Makefile
399src/openmedialib/plugins/avformat/Makefile
400src/openmedialib/plugins/oil/Makefile
401src/openmedialib/plugins/openal/Makefile
402src/openmedialib/plugins/sdl/Makefile
403src/openmedialib/plugins/gensys/Makefile
404src/openmedialib/plugins/quicktime/Makefile
405src/openmedialib/plugins/ofx/Makefile
406src/openmedialib/plugins/glew/Makefile
407src/openmedialib/py/Makefile
408src/openeffectslib/Makefile
409src/openeffectslib/plugins/Makefile
410src/openeffectslib/plugins/tonemap/Makefile
411src/openobjectlib/Makefile
412src/openobjectlib/sg/Makefile
413src/openobjectlib/plugins/Makefile
414src/openobjectlib/plugins/X3D/Makefile
415src/openobjectlib/plugins/wavefront/Makefile
416src/openassetlib/Makefile
417src/openassetlib/al/Makefile
418src/openassetlib/py/Makefile
419src/openassetlib/plugins/Makefile
420src/openassetlib/plugins/sqlite/Makefile
421src/umbrella_framework/Makefile
422media/Makefile
423effects/Makefile
424m4/Makefile
425test/Makefile
426test/openeffectslib/Makefile
427test/openeffectslib/tm_bench/Makefile
428test/openpluginlib/Makefile
429test/openpluginlib/discovery/Makefile
430test/openpluginlib/enumerate/Makefile
431test/openpluginlib/gettimeofday/Makefile
432test/openpluginlib/gpu_timer_query/Makefile
433test/openpluginlib/initialization/Makefile
434test/openpluginlib/rdtsc/Makefile
435test/openpluginlib/pcos/Makefile
436test/openpluginlib/pcos/key/Makefile
437test/openpluginlib/pcos/property/Makefile
438test/openpluginlib/pcos/subject-observer/Makefile
439test/openpluginlib/pcos/property_container/Makefile
440test/openimagelib/Makefile
441test/openimagelib/GL/Makefile
442test/openimagelib/GL/_2D/Makefile
443test/openimagelib/GL/_2D_compressed/Makefile
444test/openimagelib/GL/_2D_compressed_cubemap/Makefile
445test/openimagelib/GL/_2D_crop/Makefile
446test/openimagelib/GL/_2D_crop2/Makefile
447test/openimagelib/GL/_2D_exr/Makefile
448test/openimagelib/GL/_2D_scale/Makefile
449test/openimagelib/GL/_2D_sgi/Makefile
450test/openmedialib/Makefile
451test/openmedialib/player/Makefile
452test/openmedialib/store/Makefile
453test/openobjectlib/Makefile
454test/openobjectlib/GL/Makefile
455test/openobjectlib/GL/multipass_draw/Makefile
456test/openobjectlib/GL/noise_volume/Makefile
457test/openobjectlib/GL/obj_draw/Makefile
458test/openobjectlib/GL/texture_draw/Makefile
459test/openassetlib/Makefile
460openlibraries.pc
461])
462AC_OUTPUT
Note: See TracBrowser for help on using the browser.