]> git.mxchange.org Git - simgear.git/blob - configure.ac
Fix bug #346: httpd broken
[simgear.git] / configure.ac
1 dnl Process this file with autogen.sh to produce a working configure
2 dnl script.
3
4 AC_INIT(SimGear, m4_esyscmd([cat ./version | tr -d '\n']), [http://www.flightgear.org])
5
6 dnl Ensure touching the version causes autoconf to re-run
7 AC_SUBST([CONFIGURE_DEPENDENCIES], ['$(top_srcdir)/version'])
8
9 AC_CONFIG_SRCDIR([simgear/bucket/newbucket.cxx])
10
11 dnl Require at least automake 2.52
12 AC_PREREQ(2.52)
13
14 dnl Initialize the automake stuff
15 dnl Specify KAI C++ compiler and flags.
16 dnl Borrowed with slight modification from blitz distribution.
17 AC_ARG_WITH(cxx,
18   [  --with-cxx=COMPILER[:name-flags] set options for COMPILER (KCC)],
19   [case "$withval" in
20     KCC*)    # KAI C++ http://www.kai.com/
21       echo "Configuring for KAI C++"
22       AC_SG_SET_COMPILER($withval,"KCC","--restrict --strict_warnings")
23       CXX_OPTIMIZE_FLAGS=="+K3 -O3"
24       CXX_DEBUG_FLAGS="-g +K0"
25     ;;
26   esac
27 ])
28 dnl set the $host variable based on local machine/os
29 AC_CANONICAL_TARGET
30 AM_INIT_AUTOMAKE([dist-bzip2])
31
32 AC_ARG_ENABLE(headless,
33         AS_HELP_STRING([--enable-headless],[Enable only packages for headless build]))
34
35 AC_MSG_CHECKING([for headless mode])
36 AC_MSG_RESULT([$enable_headless])
37
38 AM_CONDITIONAL(WANT_HEADLESS,[test "x$enable_headless" = "xyes"])
39
40 AC_MSG_CHECKING([CXX])
41 AC_MSG_RESULT([$CXX])
42 AC_MSG_CHECKING([CC])
43 AC_MSG_RESULT([$CC])
44
45 dnl Checks for programs.
46 AC_PROG_MAKE_SET
47 AC_PROG_CC
48 AC_PROG_CPP
49 AC_PROG_CXX
50 AC_PROG_CXXCPP
51 AC_PROG_RANLIB
52 AC_PROG_INSTALL
53 AC_PROG_LN_S
54 AX_BOOST_BASE([1.37.0])
55
56 if test "x$BOOST_CPPFLAGS" != "x-I/usr/include" ; then
57    CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
58 fi
59
60 dnl set the $host variable based on local machine/os
61 AC_CANONICAL_HOST
62
63 dnl Used on the Irix platform
64 case "${host}" in
65 *-*-irix*)
66     if test "x$CXX" = "xCC" -o "x$CXX" = "xccache CC"; then
67         AR="$CXX -ar"
68         ARFLAGS="-o"
69         CXXFLAGS="$CXXFLAGS -I$(top_srcdir)/simgear/compatibility/MIPSpro740"
70         compatibility_DIR="compatibility"
71         MIPSpro_DIRS="MIPSpro740"
72         AC_MSG_CHECKING([for MIPSpro compiler version 7.4 or newer])
73         AC_TRY_RUN([
74            int main() {
75               if ( _COMPILER_VERSION < 740 ) {
76                  return -1;
77               }
78               return 0;
79            }
80
81         ], AC_MSG_RESULT(yes),
82         [  AC_MSG_RESULT(no)
83            CXXFLAGS="$CXXFLAGS -I$(top_srcdir)/simgear/compatibility/MIPSpro721"
84            MIPSpro_DIRS="$(MIPSpro_DIRS) MIPSpro721"
85            AC_MSG_WARN([Using our own subset of the STL headers])
86         ], AC_MSG_RESULT(yes))
87         AC_SUBST(MIPSpro_DIRS)
88     fi
89     ;;
90 *)
91     AR="ar"
92     ARFLAGS="cru"
93     compatibility_DIR=
94     ;;
95 esac
96 AC_SUBST(AR)
97 AC_SUBST(ARFLAGS)
98 AC_SUBST(compatibility_DIR)
99
100 # Show all compiler warnings by default
101 CXXFLAGS="$CXXFLAGS -Wall"
102 CFLAGS="$CFLAGS -Wall"
103
104 if echo $includedir | egrep "simgear$" > /dev/null; then
105     echo "includedir is" $includedir "libdir is" $libdir
106 else
107     includedir="${includedir}/simgear"
108     echo "includedir changed to" $includedir "libdir is" $libdir
109 fi
110
111 dnl set logging; default value of with_logging=yes
112 AC_ARG_WITH(logging, [  --with-logging          Include logging output (default)])
113 if test "x$with_logging" = "xno" ; then
114     AC_DEFINE([FG_NDEBUG], 1, [Define for no logging output])
115 fi
116
117 # Specify if we want to build with Norman's jpeg image server support.
118 # This requires libjpeg to be installed and available.
119 # Default to with_jpeg_server=no
120 JPEGLIB=''
121 AC_ARG_WITH(jpeg_factory, [  --with-jpeg-factory     Include Norman's jpeg image factory support code])
122 if test "x$with_jpeg_factory" = "xyes" ; then
123     echo "Building with Norman's jpeg image factory support"
124     AC_CHECK_LIB(jpeg, jpeg_start_compress)
125     if test "x$ac_cv_lib_jpeg_jpeg_start_compress" != "xyes" ; then
126         echo
127         echo "In order to build the jpeg factory code you need libjpeg installed."
128         echo "otherwise please configure with the --with-jpeg-sever=no option"
129         echo
130         echo "libjpeg is available at :"
131         echo "  ftp://ftp.uu.net in the directory graphics/jpeg"
132         exit 1
133     fi
134 else
135     echo "Building without Norman's jpeg image server support"
136 fi
137 AM_CONDITIONAL(ENABLE_JPEG_SERVER, test "x$with_jpeg_factory" = "xyes")
138
139 # specify the osg location
140 AC_ARG_WITH(osg, [  --with-osg=PREFIX       Specify the prefix path to osg])
141
142 if test "x$with_osg" != "x" ; then
143     echo "osg prefix is $with_osg"
144     EXTRA_DIRS="${EXTRA_DIRS} $with_osg"
145 fi
146
147 AC_ARG_WITH(osg_framework, [  --with-osg-framework=PREFIX     Specify the prefix path to OSG.framework ])
148
149 if test "x$with_osg_framework" != "x"; then
150     echo "osg framework prefix is $with_osg_framework"
151     CPPFLAGS = "$CPPFLAGS -F$with-osg-framework"
152     export DYLD_FRAMEWORK_PATH="$DYLD_FRAMEWORK_PATH:$with_osg_framework"
153 fi
154
155 dnl specifying ALUT.framework (for user provided ALUT.framework)
156 AC_ARG_WITH(alut_framework, [  --with-alut-framework=PREFIX    Specify the prefix path to ALUT.framework ])
157
158 if test "x$with_alut_framework" != "x"; then
159     echo "ALUT framework prefix is $with_alut_framework"
160 fi
161
162 # specify the rti13 location
163 AC_ARG_WITH(rti13, [  --with-rti13=PREFIX       Specify the prefix path to a HLA13 rti])
164
165 if test "x$with_rti13" != "x" ; then
166     echo "rti13 prefix is $with_rti13"
167     EXTRA_DIRS="${EXTRA_DIRS} $with_rti13"
168 fi
169
170 # specify the rti13 location
171 AC_ARG_WITH(rti1516, [  --with-rti1516=PREFIX     Specify the prefix path to a HLA1516 rti])
172
173 if test "x$with_rti1516" != "x" ; then
174     echo "rti1516 prefix is $with_rti1516"
175     EXTRA_DIRS="${EXTRA_DIRS} $with_rti1516"
176 fi
177
178 dnl Determine an extra directories to add to include/lib search paths
179 case "${host}" in
180 *-apple-darwin* | *-*-cygwin* | *-*-mingw32*)
181     echo no EXTRA_DIRS for $host
182     ;;
183
184 *)
185     if test -d /usr/X11R6 ; then
186         EXTRA_DIR1="/usr/X11R6"
187     fi
188     if test -d /opt/X11R6 ; then
189         EXTRA_DIR2="/opt/X11R6"
190     fi
191     EXTRA_DIRS="${EXTRA_DIRS} $EXTRA_DIR1 $EXTRA_DIR2"
192     ;;
193
194 esac
195 wi_EXTRA_DIRS(no, ${EXTRA_DIRS})
196
197
198 dnl Using AM_CONDITIONAL is a step out of the protected little
199 dnl automake fold so it is potentially dangerous.  But, we are
200 dnl beginning to run into cases where the standard checks are not
201 dnl enough.  AM_CONDITIONALS are then referenced to conditionally
202 dnl build a Makefile.in from a Makefile.am which lets us define custom
203 dnl includes, compile alternative source files, etc.
204
205 dnl X11 might be installed on Mac OS X or cygwin/mingwin, we don't want
206 dnl to use it if it is.
207 case "${host}" in
208 *-apple-darwin* | *-*-cygwin* | *-*-mingw32*)
209     echo no fancy X11 check
210     ;;
211
212 *)
213     AC_PATH_XTRA
214     ;;
215
216 esac
217
218 dnl Checks for libraries.
219
220 dnl Thread related checks
221 AC_CHECK_HEADER(pthread.h)
222 AC_SEARCH_LIBS(pthread_exit, [pthread c_r])
223 if test "x$ac_cv_header_pthread_h" = "xyes"; then
224     CXXFLAGS="$CXXFLAGS -D_REENTRANT"
225     CFLAGS="$CFLAGS -D_REENTRANT"
226
227   if test "x$ac_cv_search_pthread_exit" = "x-lc_r"; then
228     CXXFLAGS="-pthread $CXXFLAGS"
229     CFLAGS="-pthread $CFLAGS"
230   fi
231 fi
232
233 AM_CONDITIONAL(HAVE_THREADS, test "x$ac_cv_header_pthread_h" = "xyes")
234
235 thread_LIBS="$LIBS"
236 LIBS=""
237
238 dnl search for network related libraries
239 AC_SEARCH_LIBS(inet_addr, xnet)
240 AC_SEARCH_LIBS(socket, socket)
241
242 network_LIBS="$LIBS"
243 LIBS=""
244
245 dnl check for some default libraries
246 AC_SEARCH_LIBS(cos, m)
247 AC_SEARCH_LIBS(clock_gettime, rt)
248
249 base_LIBS="$LIBS"
250
251 dnl check for OpenGL related libraries
252 case "${host}" in
253 *-*-cygwin* | *-*-mingw32*)
254     dnl CygWin under Windoze.
255
256     echo Win32 specific hacks...
257     AC_DEFINE([WIN32], 1, [Define for Win32 platforms])
258     AC_DEFINE([NOMINMAX], 1, [Define for Win32 platforms])
259
260     LIBS="$LIBS -lglu32 -lopengl32"
261     LIBS="$LIBS -luser32 -lgdi32 -lwinmm"
262
263     dnl add -lwsock32 for mingwin
264     case "${host}" in
265     *-*-mingw32*)
266         base_LIBS="$base_LIBS -lws2_32"
267         ;;
268     esac
269
270     echo "Will link apps with $LIBS"
271     ;;
272
273 *-apple-darwin*)
274     dnl Mac OS X
275
276     LIBS="$LIBS -framework OpenGL -framework Carbon -lobjc"
277     ;;
278
279 *)
280     dnl X-Windows based machines
281
282     AC_SEARCH_LIBS(XCreateWindow, X11)
283     AC_SEARCH_LIBS(XShmCreateImage, Xext)
284     AC_SEARCH_LIBS(XGetExtensionVersion, Xi)
285     AC_SEARCH_LIBS(IceOpenConnection, ICE)
286     AC_SEARCH_LIBS(SmcOpenConnection, SM)
287     AC_SEARCH_LIBS(XtMalloc, Xt)
288     AC_SEARCH_LIBS(XmuLookupStandardColormap, Xmu)
289
290     AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ])
291     if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then
292         dnl if GLcore found, then also check for GL
293         AC_SEARCH_LIBS(glXCreateContext, GL)
294     fi
295
296     dnl if using mesa, check for xmesa.h
297     if test "x$ac_cv_search_glNewList" = "x-lMesaGL"; then
298         AC_CHECK_HEADER(GL/fxmesa.h)
299         if test "x$ac_cv_header_GL_fxmesa_h" = "xyes"; then
300             AC_DEFINE([XMESA], 1, [Define for fxmesa])
301             AC_DEFINE([FX], 1, [Define for fxmesa])
302         fi
303     fi
304
305     AC_SEARCH_LIBS(gluLookAt, [ GLU MesaGLU ])
306     ;;
307
308 esac
309
310 opengl_LIBS="$LIBS"
311 LIBS="$base_LIBS"
312
313 dnl check for OpenAL libraries
314 OPENAL_OK="no"
315 ALUT_OK="no"
316 case "${host}" in
317 *-*-cygwin* | *-*-mingw32*)
318     dnl CygWin under Windoze.
319     INCLUDES="$INCLUDES -I/usr/local/include/"
320     LIBS="$LIBS -L/usr/local/lib"
321     AC_SEARCH_LIBS(alGenBuffers, [ openal32 openal 'openal -ldsound -lwinmm' ] )
322     AC_SEARCH_LIBS(alutInit, [ openal32 ALut alut ] )
323     LIBS="$LIBS -lwinmm -ldsound -ldxguid -lole32"
324     openal_LIBS="$LIBS"
325     OPENAL_OK="$ac_cv_search_alGenBuffers"
326     ALUT_OK="$ac_cv_search_alutInit"
327     ;;
328
329 *-apple-darwin*)
330     dnl Mac OS X
331
332     LIBS="$LIBS -framework IOKit -framework OpenAL -framework ALUT"
333     openal_LIBS="$LIBS"
334
335     if test "x$with_openal_lib" != "x"; then
336         echo "libopenal is not supported on Mac OS platform."
337         openal_LIBS=""
338     fi
339
340     AC_CHECK_HEADERS([OpenAL/al.h],[OPENAL_OK="yes"])
341     # Looking for alut.h
342     AC_CHECK_HEADERS([ALUT/alut.h],[ALUT_OK="yes"])
343
344     dnl Thank you Christian Bauer from SheepSaver
345     dnl Modified by Tatsuhiro Nishioka for accepting a given framework path
346     dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES, $3=FRAMEWORK_PATH, $4=ACTION_IF_TRUE) ; $3 is optional
347     AC_DEFUN([AC_CHECK_FRAMEWORK], [
348     AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl
349     AC_CACHE_CHECK([whether compiler supports framework $1],
350         ac_Framework, [
351         saved_LIBS="$LIBS"
352         FRAMEWORKS="$FRAMEWORKS -framework $1"
353         if test "$3" = ""; then
354             FRAMEWORKS="$FRAMEWORKS $ADD2LD"
355         elif test "`echo $FRAMEWORKS | grep -- -F$3`" = ""; then
356             FRAMEWORKS="$FRAMEWORKS -F$3"
357             CXXFLAGS="$CXXFLAGS -F$3"
358             CPPFLAGS="$CPPFLAGS -F$3"
359             CCFLAGS="$CCFLAGS -F$3"
360             dnl This is needed for AC_TRY_LINK when a framework path is specified
361             export DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}:$3"
362         fi
363         AC_TRY_LINK(
364         [$2], [],
365         [AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"]
366         )
367     ])
368     AS_IF([test AS_VAR_GET(ac_Framework) = yes],
369         [AC_DEFINE(AS_TR_CPP(HAVE_FRAMEWORK_$1), 1, [Define if framework $1 is available.])]
370     )
371     AS_IF([test AS_VAR_GET(ac_Framework) = yes], $4)
372
373     AS_VAR_POPDEF([ac_Framework])dnl
374     ])
375
376     dnl Check for ALUT.framework when --with-alut-framework is specified
377     if test "x$with_alut_framework" != "x"; then
378       AC_CHECK_FRAMEWORK(ALUT, [#include <ALUT/alut.h>], $with_alut_framework, [ALUT_OK="yes"])
379     fi
380
381     ;;
382
383 *)
384     dnl default unix style machines
385
386     save_LIBS=$LIBS
387     LIBS="$LIBS $thread_LIBS"
388     AC_SEARCH_LIBS(alGenBuffers, openal)
389     AC_SEARCH_LIBS(alutInit, [ alut openal ] )
390     OPENAL_OK="$ac_cv_search_alGenBuffers"
391     ALUT_OK="$ac_cv_search_alutInit"
392     openal_LIBS="$LIBS"
393     LIBS=$save_LIBS
394     ;;
395
396 esac
397
398 if test "$OPENAL_OK" == "no" -a "x$enable_headless" != "xyes"; then
399     echo
400     echo "You *must* have the openal library installed on your system to build"
401     echo "SimGear!"
402     echo
403     echo "Please see README.OpenAL for more details."
404     echo
405     echo "configure aborted."
406     exit
407 fi
408
409 if test "$ALUT_OK" == "no" -a "x$enable_headless" != "xyes"; then
410     echo
411     echo "You *must* have the alut library installed on your system to build"
412     echo "SimGear!"
413     echo
414     echo "Please see README.OpenAL for more details."
415     echo
416     echo "configure aborted."
417     exit
418 fi
419
420
421
422 LIBS="$base_LIBS"
423
424 AC_SUBST(base_LIBS)
425 AC_SUBST(openal_LIBS)
426 AC_SUBST(opengl_LIBS)
427 AC_SUBST(thread_LIBS)
428 AC_SUBST(network_LIBS)
429
430 dnl Check for MS Windows environment
431 AC_CHECK_HEADER(windows.h)
432 AM_CONDITIONAL(EXTGL_NEEDED, test "x$ac_cv_header_windows_h" = "xyes")
433
434 # The following are C++ items that need to be tested for with the c++
435 # compiler
436
437 CXXCPP="g++ -E"
438 AC_LANG_PUSH(C++)
439
440 # OpenSceneGraph
441 case "${host}" in
442 *-apple-darwin*)
443     if test "x$with_osg_framework" != "x"; then
444 #       AC_CHECK_FRAMEWORK(osgViewer, [#include <osgViewer/Version>], $with_osg_framework)
445 #       AC_CHECK_FRAMEWORK(osgGA, [#include <osgGA/Version>], $with_osg_framework)
446 #       AC_CHECK_FRAMEWORK(osgText, [#include <osgText/Version>], $with_osg_framework)
447 #       AC_CHECK_FRAMEWORK(osgFX, [#include <osgFX/AnisotropicLighting>], $with_osg_framework)
448 #       AC_CHECK_FRAMEWORK(osgUtil, [#include <osgUtil/Version>], $with_osg_framework)
449 #       AC_CHECK_FRAMEWORK(osgDB, [#include <osgDB/Version>], $with_osg_framework)
450 #       AC_CHECK_FRAMEWORK(osgSim, [#include <osgSim/Version>], $with_osg_framework)
451 #       AC_CHECK_FRAMEWORK(osgParticle, [#include <osgParticle/Version>], $with_osg_framework)
452         AC_CHECK_FRAMEWORK(osg, [#include <osg/Version>], $with_osg_framework)
453 #       osg_FRAMEWORKS="$FRAMEWORKS"
454 #       FRAMEWORKS=""
455 #       AC_SUBST(osg_FRAMEWORKS)
456         AC_CHECK_FRAMEWORK(OpenThreads, [#include <OpenThreads/Version>], $with_osg_framework)
457         openthreads_FRAMEWORK="$FRAMEWORKS"
458         FRAMEWORKS=""
459         AC_SUBST(openthreads_FRAMEWORK)
460     else
461         dnl
462         dnl This is needed when osg dynamic libs are specified
463         dnl instead of OSG frameworks on Mac OS X
464         dnl
465         AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
466     fi
467     ;;
468 *)
469     if test "x$enable_osgdebug" = "xyes"; then
470         AC_CHECK_LIB(OpenThreadsd,OpenThreadsGetVersion)
471     else
472         AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
473     fi
474     ;;
475 esac
476
477 AM_CONDITIONAL(HAVE_FRAMEWORK_OSG, test "x$ac_cv_framework_osg" != "x")
478
479 AC_CHECK_HEADER(osg/Version)
480
481 if test "x$ac_cv_header_osg_Version" != "xyes" -o "x$ac_cv_lib_OpenThreads_OpenThreadsGetVersion" != "xyes"; then
482   if test "x$ac_cv_framework_osg" != "xyes"; then
483     echo
484     echo "You *must* have the OpenThreads library installed on your system"
485     echo "to build this version of SimGear!"
486     echo "   Maybe you need to specify --with-osg=DIR."
487     echo "   Maybe you need to specify some LDFLAGS to help the linker."
488     echo
489     echo "     LIBS: '$LIBS'"
490     echo "  LDFLAGS: '$LDFLAGS'"
491     echo " CPPFLAGS: '$CPPFLAGS'"
492     echo
493     echo "Please see README.OSG for more details."
494     echo
495     echo "configure aborted."
496     exit
497   fi
498 fi
499
500 AC_CHECK_HEADER(boost/version.hpp)
501 if test "x$ac_cv_header_boost_version_hpp" != "xyes"; then
502     echo
503     echo "You *must* have the Boost library installed on your system"
504     echo "to build this version of SimGear!"
505     echo
506     echo "     LIBS: '$LIBS'"
507     echo "  LDFLAGS: '$LDFLAGS'"
508     echo " CPPFLAGS: '$CPPFLAGS'"
509     echo
510     echo "configure aborted."
511     exit
512 fi
513
514 dnl Check for a HLA13 rti.
515 dnl This is really tricky because of the ancient iostream stuff in RTI13
516 saved_CPPFLAGS="$CPPFLAGS"
517 CPPFLAGS="$CPPFLAGS -DRTI_USES_STD_FSTREAM"
518 AC_CHECK_HEADER(RTI.hh)
519 CPPFLAGS="${saved_CPPFLAGS}"
520
521 dnl Up to now only RTI13
522 AM_CONDITIONAL(ENABLE_HLA, test "x$ac_cv_header_RTI_hh" = "xyes")
523 AM_CONDITIONAL(ENABLE_HLA13, test "x$ac_cv_header_RTI_hh" = "xyes")
524
525 AC_LANG_POP
526
527 dnl Check for system installed zlib
528 AC_CHECK_HEADER(zlib.h)
529 if test "x$ac_cv_header_zlib_h" != "xyes"; then
530     echo
531     echo "zlib library not found."
532     echo
533     echo "If your OS does not provide an installable package for zlib"
534     echo "you will have to compile and install it first yourself.  A copy"
535     echo "of zlib-1.1.4.tar.gz is included with SimGear.  You will"
536     echo "have to untar this source code, and follow its included instructions"
537     echo "to compile and install on your system."
538     echo
539     echo "configure aborted."
540     echo
541 fi
542
543 dnl Check for Subversion library support
544 # libsvn support defaults to yes
545 save_LIBS=$LIBS
546 save_CPPFLAGS=$CPPFLAGS
547 AC_ARG_WITH(libsvn, [  --without-libsvn        Do not use built-in subversion (libsvn) for simgear [default=no]], [], [with_libsvn=yes])
548 if test "x$with_libsvn" = "xyes"; then
549     LIBS="`apr-1-config --link-ld`"
550     CPPFLAGS="-I/usr/include/subversion-1 `apr-1-config --includes --cppflags`"
551     AC_CHECK_HEADERS([svn_client.h])
552        if test "x$ac_cv_header_svn_client_h" = "xyes"; then
553         echo "Using built-in subversion (libsvn) for scenery downloads."
554         AC_SEARCH_LIBS(svn_client_checkout, svn_client-1,
555                        [AC_DEFINE([HAVE_LIBSVN_CLIENT_1], [1], [Define to 1 if you have libsvn_client-1])],
556                        [AC_MSG_ERROR(svn_client-1 library not found.)],)
557         AC_SEARCH_LIBS(svn_cmdline_init, svn_subr-1, , [AC_MSG_ERROR(svn_subr-1 library not found.)],)
558         AC_SEARCH_LIBS(svn_ra_initialize, svn_ra-1, , [AC_MSG_ERROR(svn_ra-1 library not found.)],)
559         svn_LIBS=$LIBS
560         svn_CPPFLAGS=$CPPFLAGS
561         AC_SUBST(svn_LIBS)
562         AC_SUBST(svn_CPPFLAGS)
563        else
564         echo "Libsvn not found. Will use command line subversion for scenery downloads."
565         svn_LIBS=""
566         svn_CPPFLAGS=""
567        fi
568 else
569 echo "Libsvn explicitly disabled. Will use command line subversion for scenery downloads."
570   svn_LIBS=""
571   svn_CPPFLAGS=""
572 fi
573 LIBS=$save_LIBS
574 CPPFLAGS=$save_CPPFLAGS
575
576 dnl Checks for header files.
577 AC_HEADER_STDC
578 AC_CHECK_HEADERS( \
579         fcntl.h getopt.h malloc.h memory.h stdint.h stdlib.h sys/param.h \
580         sys/stat.h sys/time.h sys/timeb.h unistd.h values.h )
581
582 if test "x$ac_cv_header_stdint_h" = "xyes"; then
583     AC_DEFINE([HAVE_STDINT_H], 1, [Define if stdint.h exists])
584 fi
585
586 dnl Checks for typedefs, structures, and compiler characteristics.
587 AC_C_CONST
588 AC_TYPE_SIZE_T
589 AC_TYPE_MODE_T
590 AC_HEADER_TIME
591 AC_STRUCT_TM
592
593 dnl Checks for library functions.
594 old_LIBS=$LIBS
595 LIBS="$base_LIBS $network_LIBS $opengl_LIBS"
596 AC_TYPE_SIGNAL
597 AC_FUNC_VPRINTF
598 AC_CHECK_FUNCS( [ \
599         ftime gettimeofday timegm memcpy bcopy mktime strstr rand \
600         random drand48 setitimer getitimer signal GetLocalTime rint getrusage ] )
601 LIBS=$old_LIBS
602
603 AM_CONFIG_HEADER(simgear/simgear_config.h)
604
605 AC_CONFIG_FILES([ \
606         Makefile \
607         SimGear.spec \
608         simgear/Makefile \
609         simgear/version.h \
610         simgear/compatibility/Makefile \
611         simgear/compatibility/MIPSpro721/Makefile \
612         simgear/compatibility/MIPSpro740/Makefile \
613         simgear/bucket/Makefile \
614         simgear/debug/Makefile \
615         simgear/ephemeris/Makefile \
616         simgear/hla/Makefile \
617         simgear/io/Makefile \
618         simgear/magvar/Makefile \
619         simgear/math/Makefile \
620         simgear/environment/Makefile \
621         simgear/misc/Makefile \
622         simgear/nasal/Makefile \
623         simgear/props/Makefile \
624         simgear/route/Makefile \
625         simgear/scene/Makefile \
626         simgear/scene/bvh/Makefile \
627         simgear/scene/material/Makefile \
628         simgear/scene/model/Makefile \
629         simgear/scene/sky/Makefile \
630         simgear/scene/tgdb/Makefile \
631         simgear/scene/util/Makefile \
632         simgear/scene/tsync/Makefile \
633         simgear/screen/Makefile \
634         simgear/serial/Makefile \
635         simgear/sound/Makefile \
636         simgear/structure/Makefile \
637         simgear/threads/Makefile \
638         simgear/timing/Makefile \
639         simgear/xml/Makefile \
640 ])
641 AC_OUTPUT
642
643
644 echo ""
645 echo "Configure Summary"
646 echo "================="
647
648 echo "Prefix: $prefix"
649
650 if test "x$with_logging" != "x"; then
651     echo "Debug messages: $with_logging"
652 else
653     echo "Debug messages: yes"
654 fi
655
656 echo -n "Automake version: "
657 automake --version | head -1
658
659 if test "x$with_jpeg_factory" = "xyes"; then
660    echo "With JPEG Factory support"
661 else
662    echo "Without JPEG Factory support"
663 fi
664
665 if test "x$ac_cv_header_pthread_h" = "xyes"; then
666    echo "Threads: pthread lib found."
667 else
668    echo "Threads: no threads (pthread lib not found.)"
669 fi
670