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