1 # Process this file with autoconf to produce a configure script.
6 # check for some programs we use
9 # save the CFLAGS and CXXFLAGS specified by the user
15 # restore the flags specified by the user and get rid of any flags
16 # found by autoconf (we do not want -02 -g by default)
23 AC_CHECK_SIZEOF(int, 4)
24 CMAKE_SIZEOF_INT=$ac_cv_sizeof_int
25 AC_SUBST(CMAKE_SIZEOF_INT)
26 AC_CHECK_SIZEOF(long, 4)
27 CMAKE_SIZEOF_LONG=$ac_cv_sizeof_long
28 AC_SUBST(CMAKE_SIZEOF_LONG)
29 AC_CHECK_SIZEOF(void *, 4)
30 CMAKE_SIZEOF_VOID_P=$ac_cv_sizeof_void_p
31 AC_SUBST(CMAKE_SIZEOF_VOID_P)
32 AC_CHECK_SIZEOF(char, 1)
33 CMAKE_SIZEOF_CHAR=$ac_cv_sizeof_char
34 AC_SUBST(CMAKE_SIZEOF_CHAR)
35 AC_CHECK_SIZEOF(short, 2)
36 CMAKE_SIZEOF_SHORT=$ac_cv_sizeof_short
37 AC_SUBST(CMAKE_SIZEOF_SHORT)
38 AC_CHECK_SIZEOF(float, 4)
39 CMAKE_SIZEOF_FLOAT=$ac_cv_sizeof_float
40 AC_SUBST(CMAKE_SIZEOF_FLOAT)
41 AC_CHECK_SIZEOF(double, 8)
42 CMAKE_SIZEOF_DOUBLE=$ac_cv_sizeof_double
43 AC_SUBST(CMAKE_SIZEOF_DOUBLE)
45 # check for X11 support
48 if test "$no_x"a = a; then
53 # get byte swapping info
55 if test $ac_cv_c_bigendian = yes; then
56 CMAKE_WORDS_BIGENDIAN=1
58 AC_SUBST(CMAKE_WORDS_BIGENDIAN)
63 AC_CHECK_HEADER(limits.h, HAVE_LIMITS_H=-DHAVE_LIMITS_H,HAVE_LIMITS_H="")
64 AC_SUBST(CMAKE_HAVE_LIMITS_H)
65 AC_HAVE_HEADERS(unistd.h, HAVE_UNISTD_H=-DHAVE_UNISTD_H,HAVE_UNISTD_H="")
66 AC_SUBST(CMAKE_HAVE_UNISTD_H)
68 # Step 1: set the variable "system" to hold the name and version number
69 # for the system. This can usually be done via the "uname" command, but
70 # there are a few systems, like Next, where this doesn't work.
72 AC_MSG_CHECKING([system version (for dynamic loading)])
73 if test -f /usr/lib/NextStep/software_version; then
74 system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
76 system=`uname -s`-`uname -r`
77 if test "$?" -ne 0 ; then
78 AC_MSG_RESULT([unknown (can't find uname command)])
81 # Special check for weird MP-RAS system (uname returns weird
82 # results, and the version is kept in special file).
84 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
85 system=MP-RAS-`awk '{print $3}' /etc/.relid'`
87 AC_MSG_RESULT($system)
97 # the following is an excerpt from the tcl7.5b2 configure.in
98 #--------------------------------------------------------------------
99 # The statements below define a collection of symbols related to
100 # dynamic loading and shared libraries:
102 # CMAKE_SHLIB_CFLAGS - Flags to pass to cc when compiling the components
103 # of a shared library (may request position-independent
104 # code, among other things).
105 # CMAKE_SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
106 # creating shared libraries. This symbol typically
107 # goes at the end of the "ld" commands that build
108 # shared libraries. The value of the symbol if
109 # "${LIBS}" if all of the dependent libraries should
110 # be specified when creating a shared library. If
111 # dependent libraries should not be specified (as on
112 # SunOS 4.x, where they cause the link to fail, or in
113 # general if Tcl and Tk aren't themselves shared
114 # libraries), then this symbol has an empty string
116 # CMAKE_SHLIB_SUFFIX - Suffix to use for the name of the shared library. An
117 # empty string means we don't know how to use shared
118 # libraries on this platform.
119 # CMAKE_SHLIB_BUILD_FLAGS -
120 # Flags to use when building a shared library.
121 # CMAKE_SHLIB_LINK_FLAGS -
122 # Flags to pass to the compiler when linking object
123 # files into an executable application binary such
125 # CMAKE_SHLIB_RUNTIME_FLAG -
126 # Flag used to specify the runtime directories (e.g. "-R" or
127 # "-Wl,-rpath,"). If null, no attempt is make to specify the
129 # CMAKE_SHLIB_RUNTIME_SEP -
130 # If null, then each path is a separate argument. If not null,
131 # then all the directories are joined together, separated by
132 # $(CMAKE_SHLIB_RUNTIME_SEP) and appended to
133 # $(CMAKE_SHLIB_RUNTIME_FLAG). When not null, this is
134 # typically a colon ":".
135 #--------------------------------------------------------------------
138 # Step 2: check for existence of -ldl library. This is needed because
139 # Linux can use either -ldl or -ldld for dynamic loading.
141 AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
143 # Step 4: set configuration options based on system name and version.
145 CMAKE_C_LINK_SHARED=${CC}
146 fullSrcDir=`cd $srcdir; pwd`
150 # AIX: can't link shared library extensions unless Tcl and Tk are
151 # also shared libraries.
152 CMAKE_SHLIB_CFLAGS=""
153 CMAKE_SHLIB_LD_LIBS='${LIBS}'
154 CMAKE_SHLIB_SUFFIX="..o"
155 CMAKE_MODULE_SUFFIX="..o"
157 AC_CHECK_LIB(ld,printf, CMAKE_DL_LIBS="-lld")
158 CMAKE_SHLIB_LINK_FLAGS=""
159 CMAKE_MODULE_LINK_FLAGS=""
160 CMAKE_SHLIB_RUNTIME_FLAG=""
161 CMAKE_SHLIB_RUNTIME_SEP=""
162 if test $ac_cv_prog_gcc = yes; then
163 CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-G'
164 CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-G'
165 CMAKE_SHLIB_LINK_FLAGS='-Wl,-brtl'
166 CMAKE_MODULE_LINK_FLAGS='-Wl,-brtl'
167 CMAKE_MODULE_SUFFIX=".so"
168 CMAKE_SHLIB_SUFFIX=".so"
172 CMAKE_SHLIB_CFLAGS=""
173 CMAKE_SHLIB_LD_LIBS=""
174 CMAKE_SHLIB_SUFFIX=".dylib"
175 CMAKE_MODULE_SUFFIX=".so"
177 CMAKE_SHLIB_BUILD_FLAGS="-dynamiclib"
178 CMAKE_SHLIB_LINK_FLAGS=""
179 CMAKE_MODULE_BUILD_FLAGS="-bundle -flat_namespace -undefined suppress"
180 CMAKE_MODULE_LINK_FLAGS=""
181 CMAKE_SHLIB_RUNTIME_FLAG=""
182 CMAKE_SHLIB_RUNTIME_SEP=":"
185 CMAKE_C_LINK_SHARED=ld
186 CMAKE_SHLIB_CFLAGS="+Z"
187 CMAKE_SHLIB_LD_LIBS=""
188 CMAKE_SHLIB_SUFFIX=".sl"
189 CMAKE_MODULE_SUFFIX=".sl"
190 CMAKE_DL_LIBS="-ldld"
191 CMAKE_SHLIB_BUILD_FLAGS='-E -b -L/usr/lib'
192 CMAKE_SHLIB_LINK_FLAGS='+s'
193 CMAKE_MODULE_BUILD_FLAGS='-E -b -L/usr/lib'
194 CMAKE_MODULE_LINK_FLAGS='+s'
195 CMAKE_SHLIB_RUNTIME_FLAG='+b,'
196 CMAKE_SHLIB_RUNTIME_SEP=':'
197 if test $ac_cv_prog_gcc = yes; then
198 CMAKE_C_LINK_SHARED=${CC}
199 CMAKE_SHLIB_CFLAGS="-fPIC"
200 CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
201 CMAKE_SHLIB_LINK_FLAGS='-Wl,+s'
202 CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
203 CMAKE_MODULE_LINK_FLAGS='-Wl,+s'
204 CMAKE_SHLIB_RUNTIME_FLAG='-Wl,+b,'
205 CMAKE_SHLIB_RUNTIME_SEP=':'
209 CMAKE_SHLIB_CFLAGS=""
210 CMAKE_SHLIB_LD_LIBS=""
211 CMAKE_SHLIB_SUFFIX=".so"
212 CMAKE_MODULE_SUFFIX=".so"
214 CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
215 CMAKE_MODULE_BUILD_FLAGS="-shared -rdata_shared"
216 CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
217 CMAKE_SHLIB_RUNTIME_SEP=""
219 IRIX-6* | IRIX64-6* | IRIX-64-6*)
220 CMAKE_SHLIB_CFLAGS=""
221 CMAKE_SHLIB_LD_LIBS=""
222 CMAKE_SHLIB_SUFFIX=".so"
223 CMAKE_MODULE_SUFFIX=".so"
225 CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
226 CMAKE_MODULE_BUILD_FLAGS="-shared -rdata_shared"
227 CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
228 CMAKE_SHLIB_RUNTIME_SEP=""
231 CMAKE_SHLIB_CFLAGS="-fPIC"
232 CMAKE_SHLIB_LD_LIBS=""
233 CMAKE_SHLIB_SUFFIX=".so"
234 CMAKE_MODULE_SUFFIX=".so"
235 CMAKE_SHLIB_BUILD_FLAGS="-shared"
236 CMAKE_MODULE_BUILD_FLAGS="-shared"
237 if test "$have_dl" = yes; then
239 CMAKE_SHLIB_LINK_FLAGS="-rdynamic"
240 CMAKE_MODULE_LINK_FLAGS="-rdynamic"
241 CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
242 CMAKE_SHLIB_RUNTIME_SEP=":"
244 AC_CHECK_HEADER(dld.h, [
245 CMAKE_DL_LIBS="-ldld"
246 CMAKE_SHLIB_LINK_FLAGS=""
247 CMAKE_MODULE_LINK_FLAGS=""
248 CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
249 CMAKE_SHLIB_RUNTIME_SEP=""])
253 CMAKE_SHLIB_CFLAGS=""
254 CMAKE_DL_LIBS="-lgdi32"
255 CMAKE_SHLIB_BUILD_FLAGS="-shared"
256 CMAKE_MODULE_BUILD_FLAGS="-shared"
257 CMAKE_SHLIB_SUFFIX=".dll"
258 CMAKE_MODULE_SUFFIX=".dll"
259 CMAKE_SHLIB_LINK_FLAGS=""
260 CMAKE_MODULE_LINK_FLAGS=""
261 CMAKE_SHLIB_RUNTIME_FLAG=""
262 CMAKE_SHLIB_RUNTIME_SEP=""
265 CMAKE_SHLIB_CFLAGS="-K PIC"
266 CMAKE_SHLIB_LD_LIBS=""
267 CMAKE_SHLIB_SUFFIX=".so"
268 CMAKE_MODULE_SUFFIX=".so"
270 CMAKE_SHLIB_LINK_FLAGS=""
271 CMAKE_MODULE_LINK_FLAGS=""
272 CMAKE_SHLIB_RUNTIME_FLAG=""
273 CMAKE_SHLIB_RUNTIME_SEP=""
276 CMAKE_SHLIB_CFLAGS="-K PIC"
277 CMAKE_SHLIB_LD_LIBS=""
278 CMAKE_SHLIB_SUFFIX=".so"
279 CMAKE_MODULE_SUFFIX=".so"
281 CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
282 CMAKE_MODULE_LINK_FLAGS="-Wl,-Bexport"
283 CMAKE_SHLIB_RUNTIME_FLAG=""
284 CMAKE_SHLIB_RUNTIME_SEP=""
287 # Not available on all versions: check for include file.
288 if test -f /usr/include/dlfcn.h; then
289 CMAKE_SHLIB_CFLAGS="-fPIC"
290 CMAKE_SHLIB_LD_LIBS=""
291 CMAKE_SHLIB_SUFFIX=".so"
292 CMAKE_MODULE_SUFFIX=".so"
294 CMAKE_SHLIB_BUILD_FLAGS="-shared"
295 CMAKE_SHLIB_LINK_FLAGS=""
296 CMAKE_MODULE_BUILD_FLAGS="-shared"
297 CMAKE_MODULE_LINK_FLAGS=""
298 CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
299 CMAKE_SHLIB_RUNTIME_SEP=":"
301 CMAKE_SHLIB_CFLAGS=""
302 CMAKE_SHLIB_LD_LIBS=""
303 CMAKE_SHLIB_SUFFIX="..o"
304 CMAKE_MODULE_SUFFIX="..o"
306 CMAKE_SHLIB_LINK_FLAGS=""
307 CMAKE_MODULE_LINK_FLAGS=""
308 CMAKE_SHLIB_RUNTIME_FLAG=""
309 CMAKE_SHLIB_RUNTIME_SEP=""
313 CMAKE_SHLIB_CFLAGS=""
314 CMAKE_SHLIB_LD_LIBS=""
315 CMAKE_SHLIB_SUFFIX=".so"
316 CMAKE_MODULE_SUFFIX=".so"
318 CMAKE_SHLIB_LINK_FLAGS=""
319 CMAKE_MODULE_LINK_FLAGS=""
320 CMAKE_SHLIB_RUNTIME_FLAG=""
321 CMAKE_SHLIB_RUNTIME_SEP=""
324 # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
325 CMAKE_SHLIB_CFLAGS=""
326 # Hack: make package name same as library name
327 CMAKE_SHLIB_LD_LIBS=""
328 CMAKE_SHLIB_SUFFIX=".so"
329 CMAKE_MODULE_SUFFIX=".so"
331 CMAKE_SHLIB_LINK_FLAGS=""
332 CMAKE_MODULE_LINK_FLAGS=""
333 CMAKE_SHLIB_RUNTIME_FLAG=""
334 CMAKE_SHLIB_RUNTIME_SEP=""
337 # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
338 CMAKE_SHLIB_CFLAGS="-fpic"
339 CMAKE_SHLIB_LD_LIBS=""
340 CMAKE_SHLIB_SUFFIX=".so"
341 CMAKE_MODULE_SUFFIX=".so"
343 CMAKE_SHLIB_LINK_FLAGS=""
344 CMAKE_MODULE_LINK_FLAGS=""
345 CMAKE_SHLIB_RUNTIME_FLAG=""
346 CMAKE_SHLIB_RUNTIME_SEP=""
350 CMAKE_SHLIB_CFLAGS=""
351 CMAKE_SHLIB_LD_LIBS=""
352 CMAKE_SHLIB_SUFFIX=".so"
353 CMAKE_MODULE_SUFFIX=".so"
355 CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-expect_unresolved,\\*'
356 CMAKE_SHLIB_LINK_FLAGS=''
357 CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-expect_unresolved,\\*'
358 CMAKE_MODULE_LINK_FLAGS=''
359 if test $ac_cv_prog_gcc = yes; then
360 CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
362 CMAKE_SHLIB_RUNTIME_FLAG="-rpath "
364 CMAKE_SHLIB_RUNTIME_SEP=":"
367 CMAKE_SHLIB_CFLAGS="-G 0"
368 CMAKE_SHLIB_LD_LIBS=""
369 CMAKE_SHLIB_SUFFIX="..o"
370 CMAKE_MODULE_SUFFIX="..o"
372 CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
373 CMAKE_MODULE_LINK_FLAGS="-Wl,-D,08000000"
374 CMAKE_SHLIB_RUNTIME_FLAG=""
375 CMAKE_SHLIB_RUNTIME_SEP=""
378 # Note, dlopen is available only on SCO 3.2.5 and greater. However,
379 # this test works, since "uname -s" was non-standard in 3.2.4 and
381 CMAKE_SHLIB_CFLAGS="-Kpic -belf"
382 CMAKE_SHLIB_LD_LIBS=""
383 CMAKE_SHLIB_SUFFIX=".so"
384 CMAKE_MODULE_SUFFIX=".so"
386 CMAKE_SHLIB_LINK_FLAGS="-belf -Wl,-Bexport"
387 CMAKE_SHLIB_MODULE_FLAGS="-belf -Wl,-Bexport"
388 CMAKE_SHLIB_RUNTIME_FLAG=""
389 CMAKE_SHLIB_RUNTIME_SEP=""
392 CMAKE_SHLIB_CFLAGS="-K PIC"
393 CMAKE_SHLIB_LD_LIBS=""
394 CMAKE_SHLIB_SUFFIX=".so"
395 CMAKE_MODULE_SUFFIX=".so"
397 CMAKE_SHLIB_LINK_FLAGS=""
398 CMAKE_MODULE_LINK_FLAGS=""
399 CMAKE_SHLIB_RUNTIME_FLAG=""
400 CMAKE_SHLIB_RUNTIME_SEP=""
403 CMAKE_SHLIB_CFLAGS="-PIC"
404 CMAKE_SHLIB_LD_LIBS=""
405 CMAKE_SHLIB_SUFFIX=".so"
406 CMAKE_MODULE_SUFFIX=".so"
408 CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
409 CMAKE_SHLIB_LINK_FLAGS=''
410 CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
411 CMAKE_MODULE_LINK_FLAGS=''
412 CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-R,"
413 CMAKE_SHLIB_RUNTIME_SEP=":"
416 CMAKE_SHLIB_CFLAGS="-KPIC"
417 CMAKE_SHLIB_LD_LIBS='${LIBS}'
418 CMAKE_SHLIB_SUFFIX=".so"
419 CMAKE_MODULE_SUFFIX=".so"
421 CMAKE_SHLIB_BUILD_FLAGS='-G'
422 CMAKE_SHLIB_LINK_FLAGS=''
423 CMAKE_MODULE_BUILD_FLAGS='-G'
424 CMAKE_MODULE_LINK_FLAGS=''
425 CMAKE_SHLIB_RUNTIME_FLAG="-R "
426 CMAKE_SHLIB_RUNTIME_SEP=":"
427 if test $ac_cv_prog_gcc = yes; then
428 CMAKE_SHLIB_BUILD_FLAGS='-shared -nostdlib'
429 CMAKE_SHLIB_LINK_FLAGS=''
430 CMAKE_MODULE_BUILD_FLAGS='-shared -nostdlib'
431 CMAKE_MODULE_LINK_FLAGS=''
432 CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-R,"
433 CMAKE_SHLIB_RUNTIME_SEP=":"
437 CMAKE_SHLIB_CFLAGS="-G 0"
438 CMAKE_SHLIB_SUFFIX="..o"
439 CMAKE_MODULE_SUFFIX="..o"
440 CMAKE_SHLIB_LD_LIBS=""
442 CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
443 CMAKE_MODULE_LINK_FLAGS="-Wl,-D,08000000"
444 CMAKE_SHLIB_RUNTIME_FLAG=""
445 CMAKE_SHLIB_RUNTIME_SEP=""
448 CMAKE_SHLIB_CFLAGS="-K PIC"
449 CMAKE_SHLIB_LD_LIBS=""
450 CMAKE_SHLIB_SUFFIX=".so"
451 CMAKE_MODULE_SUFFIX=".so"
453 CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
454 CMAKE_MODULE_LINK_FLAGS="-Wl,-Bexport"
455 CMAKE_SHLIB_RUNTIME_FLAG=""
456 CMAKE_SHLIB_RUNTIME_SEP=""
459 export CMAKE_SHLIB_SUFFIX
460 export CMAKE_MODULE_SUFFIX
462 # If we're running gcc, then change the C flags for compiling shared
463 # libraries to the right flags for gcc, instead of those for the
464 # standard manufacturer compiler.
465 if test $ac_cv_prog_gcc = yes; then
466 CMAKE_SHLIB_CFLAGS="-fPIC"
468 # if running on cygwin, AIX, or Darwin remove -fPIC flag
471 CMAKE_SHLIB_CFLAGS=""
474 CMAKE_SHLIB_CFLAGS=""
476 Darwin*) #don't need -fPIC on Darwin (on by default)
477 CMAKE_SHLIB_CFLAGS=""
481 # If the user has supplied C flags for compiling shared objects, use
483 if test "${SHLIB_CFLAGS}" != ""; then
484 CMAKE_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
486 CMAKE_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
488 AC_SUBST(CMAKE_C_LINK_SHARED)
489 AC_SUBST(CMAKE_SHLIB_LINK_FLAGS)
490 AC_SUBST(CMAKE_SHLIB_BUILD_FLAGS)
491 AC_SUBST(CMAKE_MODULE_LINK_FLAGS)
492 AC_SUBST(CMAKE_MODULE_BUILD_FLAGS)
493 AC_SUBST(CMAKE_SHLIB_CFLAGS)
494 AC_SUBST(CMAKE_DL_LIBS)
495 AC_SUBST(CMAKE_SHLIB_LD_LIBS)
496 AC_SUBST(CMAKE_SHLIB_SUFFIX)
497 AC_SUBST(CMAKE_MODULE_SUFFIX)
498 AC_SUBST(CMAKE_SHLIB_RUNTIME_FLAG)
499 AC_SUBST(CMAKE_SHLIB_RUNTIME_SEP)
502 ##########################
504 ## Check thread support ##
506 ##########################
507 # initialize thread vars
514 ##########################
518 ##########################
522 [ --with-sproc use sproc instead of pthreads if possible],
523 if test "$withval" = yes; then
529 AC_CHECK_HEADERS(sys/prctl.h, [use_sproc=yes])
530 if test "$use_sproc" = "yes"; then
532 Linux* | IRIX64-6.5 | IRIX-6.5)
533 if test "$force_sproc" = "yes"; then
545 AC_CHECK_HEADERS(pthread.h, [use_pthreads=yes])
546 if test "$use_pthreads" = "yes"; then
547 if test "$use_sproc" = "no"; then
548 AC_CHECK_LIB(pthreads, pthread_create, CMAKE_THREAD_LIBS="-lpthreads")
549 AC_CHECK_LIB(pthread, pthread_create, CMAKE_THREAD_LIBS="-lpthread")
550 # Work around Solaris 5.6 and 5.7 bug:
551 if test "`uname -s -r`" = "SunOS 5.6"; then
552 AC_CHECK_LIB(thread, thr_create, CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread")
554 if test "`uname -s -r`" = "SunOS 5.7"; then
555 AC_CHECK_LIB(thread, thr_create, CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread")
561 # on an HP with pthread we need to use -lcma
562 # on dec alphas we have had problems as well
563 if test "$use_pthreads" = "yes"; then
566 CMAKE_THREAD_LIBS="-lcma"
580 CMAKE_USE_WIN32_THREADS=0
586 AC_SUBST(CMAKE_USE_SPROC)
587 AC_SUBST(CMAKE_USE_PTHREADS)
588 AC_SUBST(CMAKE_USE_WIN32_THREADS)
589 AC_SUBST(CMAKE_HP_PTHREADS)
590 AC_SUBST(CMAKE_THREAD_LIBS)
594 # on hp use -Aa for ansi
595 if test $ac_cv_prog_gcc = no; then
598 echo $ac_n "checking whether ${CC} accepts -Aa""... $ac_c" 1>&6
599 echo 'void f(){}' > conftest.c
600 if test -z "`${CC} -Aa -c conftest.c 2>&1`"; then
601 echo "$ac_t""yes" 1>&6
602 CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa"
604 echo "$ac_t""no" 1>&6
606 echo $ac_n "checking whether ${CC} accepts -Ae""... $ac_c" 1>&6
607 if test -z "`${CC} -Ae -c conftest.c 2>&1`"; then
608 echo "$ac_t""yes" 1>&6
609 CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Ae"
611 echo "$ac_t""no" 1>&6
617 AC_SUBST(CMAKE_ANSI_CFLAGS)
620 if test $ac_cv_prog_gcc = yes; then
624 # find make to use to build cmake, prefer gmake
625 AC_PATH_PROGS(CMAKE_AR_TMP, ar)
626 CMAKE_AR="$CMAKE_AR_TMP"
629 AC_SUBST(CMAKE_AR_ARGS)
632 CMAKE_SYSTEM="$system"
633 AC_SUBST(CMAKE_SYSTEM)
634 # generate output files.
635 # create mkdir files just to make some of the directories
637 AC_OUTPUT( CCMakeSystemConfig.cmake )