configure.in.sample 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. # Process this file with autoconf to produce a configure script.
  2. AC_INIT()
  3. AC_CONFIG_HEADER(CMake/Source/cmConfigure.h)
  4. CMAKE_CONFIG_DIR=`pwd`
  5. AC_SUBST(CMAKE_CONFIG_DIR)
  6. #
  7. # check for some programs we use
  8. #
  9. AC_PROG_CC
  10. AC_PROG_CXX
  11. AC_PROG_RANLIB
  12. AC_PROG_INSTALL
  13. AC_PATH_XTRA
  14. # get byte swapping info
  15. AC_C_BIGENDIAN
  16. if test $ac_cv_c_bigendian = yes; then
  17. AC_DEFINE(CMAKE_WORDS_BIGENDIAN)
  18. fi
  19. # some stuff Tcl uses
  20. #
  21. AC_CHECK_HEADER(limits.h, HAVE_LIMITS_H=-DHAVE_LIMITS_H,HAVE_LIMITS_H="")
  22. AC_SUBST(HAVE_LIMITS_H)
  23. AC_HAVE_HEADERS(unistd.h, HAVE_UNISTD_H=-DHAVE_UNISTD_H,HAVE_UNISTD_H="")
  24. AC_SUBST(HAVE_UNISTD_H)
  25. # Step 1: set the variable "system" to hold the name and version number
  26. # for the system. This can usually be done via the "uname" command, but
  27. # there are a few systems, like Next, where this doesn't work.
  28. AC_MSG_CHECKING([system version (for dynamic loading)])
  29. if test -f /usr/lib/NextStep/software_version; then
  30. system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
  31. else
  32. system=`uname -s`-`uname -r`
  33. if test "$?" -ne 0 ; then
  34. AC_MSG_RESULT([unknown (can't find uname command)])
  35. system=unknown
  36. else
  37. # Special check for weird MP-RAS system (uname returns weird
  38. # results, and the version is kept in special file).
  39. if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  40. system=MP-RAS-`awk '{print $3}' /etc/.relid'`
  41. fi
  42. AC_MSG_RESULT($system)
  43. fi
  44. fi
  45. #
  46. # use shared libs
  47. #
  48. AC_ARG_WITH(shared,
  49. [ --with-shared create shared libraries],
  50. [CMAKE_shared_ok=$withval], [CMAKE_shared_ok=no])
  51. INSTALL_TARGET="install"
  52. AC_SUBST(INSTALL_TARGET)
  53. BUILD_TOOLKITS=""
  54. CLEAN_TOOLKITS=""
  55. DEPEND_TOOLKITS=""
  56. INSTALL_TOOLKITS=""
  57. # --with-kits goes here
  58. AC_SUBST(BUILD_TOOLKITS)
  59. AC_SUBST(INSTALL_TOOLKITS)
  60. AC_SUBST(DEPEND_TOOLKITS)
  61. AC_SUBST(CLEAN_TOOLKITS)
  62. # option for handling BSD style makefile includes
  63. #
  64. AC_ARG_WITH(bsdmake,
  65. [ --with-bsdmake uses bsd style makefile includes],
  66. if test "$withval" = yes; then
  67. MAKEINCLUDE=".include"
  68. MAKEQUOTE='"'
  69. fi,
  70. MAKEINCLUDE="include"
  71. MAKEQUOTE='')
  72. AC_SUBST(MAKEINCLUDE)
  73. AC_SUBST(MAKEQUOTE)
  74. # the following is an excerpt from the tcl7.5b2 configure.in
  75. #--------------------------------------------------------------------
  76. # The statements below define a collection of symbols related to
  77. # dynamic loading and shared libraries:
  78. #
  79. # SHLIB_CFLAGS - Flags to pass to cc when compiling the components
  80. # of a shared library (may request position-independent
  81. # code, among other things).
  82. # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
  83. # creating shared libraries. This symbol typically
  84. # goes at the end of the "ld" commands that build
  85. # shared libraries. The value of the symbol if
  86. # "${LIBS}" if all of the dependent libraries should
  87. # be specified when creating a shared library. If
  88. # dependent libraries should not be specified (as on
  89. # SunOS 4.x, where they cause the link to fail, or in
  90. # general if Tcl and Tk aren't themselves shared
  91. # libraries), then this symbol has an empty string
  92. # as its value.
  93. # SHLIB_SUFFIX - Suffix to use for the name of the shared library. An
  94. # empty string means we don't know how to use shared
  95. # libraries on this platform.
  96. # CMAKE_SHLIB_BUILD_FLAGS -
  97. # Flags to use when building a shared library.
  98. # CMAKE_SHLIB_LINK_FLAGS -
  99. # Flags to pass to the compiler when linking object
  100. # files into an executable application binary such
  101. # as tclsh.
  102. #--------------------------------------------------------------------
  103. # Step 2: check for existence of -ldl library. This is needed because
  104. # Linux can use either -ldl or -ldld for dynamic loading.
  105. AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
  106. # Step 4: set configuration options based on system name and version.
  107. fullSrcDir=`cd $srcdir; pwd`
  108. AC_SUBST(fullSrcDir)
  109. case $system in
  110. AIX-*)
  111. # AIX: can't link shared library extensions unless Tcl and Tk are
  112. # also shared libraries.
  113. SHLIB_CFLAGS=""
  114. SHLIB_LD_LIBS='${LIBS}'
  115. SHLIB_SUFFIX="..o"
  116. DL_LIBS=""
  117. AC_CHECK_LIB(ld,printf, DL_LIBS="-lld")
  118. CMAKE_SHLIB_LINK_FLAGS=""
  119. ;;
  120. HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  121. SHLIB_CFLAGS="+z"
  122. SHLIB_LD_LIBS=""
  123. SHLIB_SUFFIX=".sl"
  124. DL_LIBS="-ldld"
  125. CMAKE_SHLIB_BUILD_FLAGS='+Z -Wl,-E -Wl,-b'
  126. CMAKE_SHLIB_LINK_FLAGS='-Wl,+s -Wl,+b,${LIB_RUNTIME_DIR}'
  127. if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
  128. CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
  129. CMAKE_SHLIB_LINK_FLAGS='-Wl,+s -Wl,+b,${LIB_RUNTIME_DIR}'
  130. fi
  131. ;;
  132. IRIX-5.*)
  133. SHLIB_CFLAGS=""
  134. SHLIB_LD_LIBS=""
  135. SHLIB_SUFFIX=".so"
  136. DL_LIBS=""
  137. CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
  138. ;;
  139. IRIX-6* | IRIX64-6* | IRIX-64-6*)
  140. SHLIB_CFLAGS=""
  141. SHLIB_LD_LIBS=""
  142. SHLIB_SUFFIX=".so"
  143. DL_LIBS=""
  144. CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
  145. ;;
  146. Linux*)
  147. SHLIB_CFLAGS="-fPIC"
  148. SHLIB_LD_LIBS=""
  149. SHLIB_SUFFIX=".so"
  150. CMAKE_SHLIB_BUILD_FLAGS="-shared"
  151. if test "$have_dl" = yes; then
  152. DL_LIBS="-ldl"
  153. CMAKE_SHLIB_LINK_FLAGS="-rdynamic"
  154. else
  155. AC_CHECK_HEADER(dld.h, [
  156. DL_LIBS="-ldld"
  157. CMAKE_SHLIB_LINK_FLAGS=""])
  158. fi
  159. ;;
  160. CYGWIN_NT*)
  161. SHLIB_CFLAGS=""
  162. DL_LIBS="-lgdi32"
  163. SHLIB_SUFFIX=".dll"
  164. CMAKE_SHLIB_LINK_FLAGS="-shared"
  165. ;;
  166. MP-RAS-02*)
  167. SHLIB_CFLAGS="-K PIC"
  168. SHLIB_LD_LIBS=""
  169. SHLIB_SUFFIX=".so"
  170. DL_LIBS="-ldl"
  171. CMAKE_SHLIB_LINK_FLAGS=""
  172. ;;
  173. MP-RAS-*)
  174. SHLIB_CFLAGS="-K PIC"
  175. SHLIB_LD_LIBS=""
  176. SHLIB_SUFFIX=".so"
  177. DL_LIBS="-ldl"
  178. CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
  179. ;;
  180. NetBSD-*|FreeBSD-*)
  181. # Not available on all versions: check for include file.
  182. if test -f /usr/include/dlfcn.h; then
  183. SHLIB_CFLAGS="-fpic"
  184. SHLIB_LD_LIBS=""
  185. SHLIB_SUFFIX=".so"
  186. DL_LIBS=""
  187. CMAKE_SHLIB_LINK_FLAGS="-shared"
  188. else
  189. SHLIB_CFLAGS=""
  190. SHLIB_LD_LIBS=""
  191. SHLIB_SUFFIX="..o"
  192. DL_LIBS=""
  193. CMAKE_SHLIB_LINK_FLAGS=""
  194. fi
  195. ;;
  196. NEXTSTEP-*)
  197. SHLIB_CFLAGS=""
  198. SHLIB_LD_LIBS=""
  199. SHLIB_SUFFIX=".so"
  200. DL_LIBS=""
  201. CMAKE_SHLIB_LINK_FLAGS=""
  202. ;;
  203. OSF1-1.[012])
  204. # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
  205. SHLIB_CFLAGS=""
  206. # Hack: make package name same as library name
  207. SHLIB_LD_LIBS=""
  208. SHLIB_SUFFIX=".so"
  209. DL_LIBS=""
  210. CMAKE_SHLIB_LINK_FLAGS=""
  211. ;;
  212. OSF1-1.*)
  213. # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
  214. SHLIB_CFLAGS="-fpic"
  215. SHLIB_LD_LIBS=""
  216. SHLIB_SUFFIX=".so"
  217. DL_LIBS=""
  218. CMAKE_SHLIB_LINK_FLAGS=""
  219. ;;
  220. OSF1-V*)
  221. # Digital OSF/1
  222. SHLIB_CFLAGS=""
  223. SHLIB_LD_LIBS=""
  224. SHLIB_SUFFIX=".so"
  225. DL_LIBS=""
  226. CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-expect_unresolved,"*"'
  227. CMAKE_SHLIB_LINK_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
  228. ;;
  229. RISCos-*)
  230. SHLIB_CFLAGS="-G 0"
  231. SHLIB_LD_LIBS=""
  232. SHLIB_SUFFIX="..o"
  233. DL_LIBS=""
  234. CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
  235. ;;
  236. SCO_SV-3.2*)
  237. # Note, dlopen is available only on SCO 3.2.5 and greater. However,
  238. # this test works, since "uname -s" was non-standard in 3.2.4 and
  239. # below.
  240. SHLIB_CFLAGS="-Kpic -belf"
  241. SHLIB_LD_LIBS=""
  242. SHLIB_SUFFIX=".so"
  243. DL_LIBS=""
  244. CMAKE_SHLIB_LINK_FLAGS="-belf -Wl,-Bexport"
  245. ;;
  246. SINIX*5.4*)
  247. SHLIB_CFLAGS="-K PIC"
  248. SHLIB_LD_LIBS=""
  249. SHLIB_SUFFIX=".so"
  250. DL_LIBS="-ldl"
  251. CMAKE_SHLIB_LINK_FLAGS=""
  252. ;;
  253. SunOS-4*)
  254. SHLIB_CFLAGS="-PIC"
  255. SHLIB_LD_LIBS=""
  256. SHLIB_SUFFIX=".so"
  257. DL_LIBS="-ldl"
  258. CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
  259. CMAKE_SHLIB_LINK_FLAGS='-Wl,-L${LIB_RUNTIME_DIR}'
  260. ;;
  261. SunOS-5*)
  262. SHLIB_CFLAGS="-KPIC"
  263. SHLIB_LD_LIBS='${LIBS}'
  264. SHLIB_SUFFIX=".so"
  265. DL_LIBS="-ldl"
  266. CMAKE_SHLIB_BUILD_FLAGS='-G'
  267. CMAKE_SHLIB_LINK_FLAGS='-R ${LIB_RUNTIME_DIR}'
  268. if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
  269. CMAKE_SHLIB_BUILD_FLAGS='-Wl,-G'
  270. CMAKE_SHLIB_LINK_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
  271. fi
  272. ;;
  273. ULTRIX-4.*)
  274. SHLIB_CFLAGS="-G 0"
  275. SHLIB_SUFFIX="..o"
  276. SHLIB_LD_LIBS=""
  277. DL_LIBS=""
  278. CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
  279. ;;
  280. UNIX_SV*)
  281. SHLIB_CFLAGS="-K PIC"
  282. SHLIB_LD_LIBS=""
  283. SHLIB_SUFFIX=".so"
  284. DL_LIBS="-ldl"
  285. CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
  286. ;;
  287. esac
  288. export SHLIB_SUFFIX
  289. # If we're running gcc, then change the C flags for compiling shared
  290. # libraries to the right flags for gcc, instead of those for the
  291. # standard manufacturer compiler.
  292. if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
  293. SHLIB_CFLAGS="-fPIC"
  294. fi
  295. # if running on cygwin remove -fPIC flag
  296. case $system in
  297. CYGWIN_NT*)
  298. SHLIB_CFLAGS=""
  299. ;;
  300. esac
  301. if test "$CMAKE_shared_ok" = "yes"; then
  302. CMAKE_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
  303. CMAKE_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
  304. CMAKE_TCL_SHLIB_TARGET="CMAKEtcl"
  305. RANLIB=":"
  306. TOOLKIT_DEPENDS=""
  307. CMAKE_LIB_EXT="${SHLIB_SUFFIX}"
  308. else
  309. CMAKE_LIB_EXT=".a"
  310. SHLIB_LD_LIBS=""
  311. CMAKE_SHLIB_CFLAGS=""
  312. CMAKE_LD_SEARCH_FLAGS=""
  313. fi
  314. export CMAKE_LIB_EXT
  315. AC_SUBST(CMAKE_TCL_SHLIB_TARGET)
  316. AC_SUBST(TOOLKIT_DEPENDS)
  317. AC_SUBST(CMAKE_SHLIB_LINK_FLAGS)
  318. AC_SUBST(CMAKE_SHLIB_BUILD_FLAGS)
  319. AC_SUBST(CMAKE_SHLIB_CFLAGS)
  320. AC_SUBST(CMAKE_LIB_EXT)
  321. AC_SUBST(DL_LIBS)
  322. AC_SUBST(SHLIB_LD_LIBS)
  323. AC_SUBST(SHLIB_SUFFIX)
  324. #--------------------------------------------------------------------
  325. # Include sys/select.h if it exists and if it supplies things
  326. # that appear to be useful and aren't already in sys/types.h.
  327. # This appears to be true only on the RS/6000 under AIX. Some
  328. # systems like OSF/1 have a sys/select.h that's of no use, and
  329. # other systems like SCO UNIX have a sys/select.h that's
  330. # pernicious. If "fd_set" isn't defined anywhere then set a
  331. # special flag.
  332. #--------------------------------------------------------------------
  333. AC_MSG_CHECKING([fd_set and sys/select])
  334. AC_TRY_COMPILE([#include <sys/types.h>],
  335. [fd_set readMask, writeMask;], tk_ok=yes, tk_ok=no)
  336. if test $tk_ok = no; then
  337. AC_HEADER_EGREP(fd_mask, sys/select.h, tk_ok=yes)
  338. if test $tk_ok = yes; then
  339. AC_DEFINE(HAVE_SYS_SELECT_H)
  340. fi
  341. fi
  342. AC_MSG_RESULT($tk_ok)
  343. if test $tk_ok = no; then
  344. AC_DEFINE(NO_FD_SET)
  345. fi
  346. ##########################
  347. ## ##
  348. ## Check thread support ##
  349. ## ##
  350. ##########################
  351. # initialize thread vars
  352. THREAD_LIBS=""
  353. THREAD_FLAGS=""
  354. use_sproc=no
  355. CMAKE_USE_SPROC=0
  356. CMAKE_USE_PTHREADS=0
  357. CMAKE_HP_PTHREADS=0
  358. ##########################
  359. ## ##
  360. ## sproc ##
  361. ## ##
  362. ##########################
  363. # check for sproc
  364. force_sproc=no
  365. AC_ARG_WITH(sproc,
  366. [ --with-sproc use sproc instead of pthreads if possible],
  367. if test "$withval" = yes; then
  368. force_sproc=yes
  369. fi,)
  370. AC_CHECK_HEADERS(sys/prctl.h, [use_sproc=yes])
  371. if test "$use_sproc" = "yes"; then
  372. case $system in
  373. Linux* | IRIX64-6.5 | IRIX-6.5)
  374. if test "$force_sproc" = "yes"; then
  375. CMAKE_USE_SPROC=1
  376. else
  377. use_sproc=no
  378. fi
  379. ;;
  380. IRIX*)
  381. CMAKE_USE_SPROC=1
  382. ;;
  383. esac
  384. fi
  385. use_pthreads=no
  386. AC_CHECK_HEADERS(pthread.h, [use_pthreads=yes])
  387. if test "$use_pthreads" = "yes"; then
  388. if test "$use_sproc" = "no"; then
  389. AC_CHECK_LIB(pthreads, pthread_create, THREAD_LIBS="-lpthreads")
  390. AC_CHECK_LIB(pthread, pthread_create, THREAD_LIBS="-lpthread")
  391. # Work around Solaris 5.6 and 5.7 bug:
  392. if test "`uname -s -r`" = "SunOS 5.6"; then
  393. AC_CHECK_LIB(thread, thr_create, THREAD_LIBS="$THREAD_LIBS -lthread")
  394. fi
  395. if test "`uname -s -r`" = "SunOS 5.7"; then
  396. AC_CHECK_LIB(thread, thr_create, THREAD_LIBS="$THREAD_LIBS -lthread")
  397. fi
  398. CMAKE_USE_PTHREADS=1
  399. fi
  400. fi
  401. # on an HP with pthread we need to use -lcma
  402. # on dec alphas we have had problems as well
  403. if test "$use_pthreads" = "yes"; then
  404. case $system in
  405. HP-UX-*.10.*)
  406. THREAD_LIBS="-lcma"
  407. CMAKE_USE_PTHREADS=1
  408. CMAKE_HP_PTHREADS=1
  409. ;;
  410. OSF1-V*)
  411. CMAKE_USE_PTHREADS=0
  412. THREAD_LIBS=""
  413. ;;
  414. FreeBSD*)
  415. CMAKE_USE_PTHREADS=0
  416. THREAD_LIBS=""
  417. ;;
  418. esac
  419. fi
  420. AC_SUBST(CMAKE_USE_SPROC)
  421. AC_SUBST(CMAKE_USE_PTHREADS)
  422. AC_SUBST(CMAKE_HP_PTHREADS)
  423. AC_SUBST(THREAD_LIBS)
  424. # on hp use -Aa for ansi
  425. if test $ac_cv_prog_gxx = no; then
  426. case $system in
  427. HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
  428. echo $ac_n "checking whether ${CC} accepts -Aa""... $ac_c" 1>&6
  429. echo 'void f(){}' > conftest.c
  430. if test -z "`${CC} -Aa -c conftest.c 2>&1`"; then
  431. echo "$ac_t""yes" 1>&6
  432. ANSI_CFLAGS="-Aa"
  433. else
  434. echo "$ac_t""no" 1>&6
  435. fi
  436. rm -f conftest*
  437. ;;
  438. esac
  439. fi
  440. AC_SUBST(ANSI_CFLAGS)
  441. # if we are not running g++ then we might need some other flags
  442. # to get the templates compiled correctly
  443. CMAKE_TEMPLATE_FLAGS=""
  444. if test $ac_cv_prog_gxx = no; then
  445. echo $ac_n "checking whether ${CXX} accepts -ptused -no_prelink""... $ac_c" 1>&6
  446. echo 'void f(){}' > conftest.cc
  447. if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
  448. echo "$ac_t""yes" 1>&6
  449. CMAKE_TEMPLATE_FLAGS="-ptused -no_prelink"
  450. else
  451. echo "$ac_t""no" 1>&6
  452. fi
  453. rm -f conftest*
  454. echo $ac_n "checking whether ${CXX} accepts -instances=semiexplicit""... $ac_c" 1>&6
  455. echo 'void f(){}' > conftest.cc
  456. if test -z "`${CXX} -instances=static -c conftest.cc 2>&1`"; then
  457. echo "$ac_t""yes" 1>&6
  458. CMAKE_TEMPLATE_FLAGS="-instances=static"
  459. else
  460. echo "$ac_t""no" 1>&6
  461. fi
  462. fi
  463. AC_SUBST(CMAKE_TEMPLATE_FLAGS)
  464. # check no g++ compilers to see if they have the standard
  465. # ansi stream files (without the .h)
  466. if test $ac_cv_prog_gxx = no; then
  467. AC_MSG_CHECKING( ansi standard C++ stream headers )
  468. echo "******"
  469. rm -rf conftest.*
  470. cat > conftest.cc <<!
  471. #include <iostream>
  472. !
  473. if test -z "`${CXX} -c conftest.cc 2>&1`"; then
  474. echo "$ac_t""yes" 1>&6
  475. else
  476. AC_DEFINE(CMAKE_NO_STD_NAMESPACE)
  477. echo "$ac_t""no" 1>&6
  478. fi
  479. fi
  480. # check to see if stl is in the std namespace
  481. if test $ac_cv_prog_gxx = no; then
  482. echo "******"
  483. AC_MSG_CHECKING( ansi standard namespace support )
  484. rm -rf conftest.*
  485. cat > conftest.cc <<!
  486. #include <list>
  487. void foo() { std::list<int> l; }
  488. !
  489. if test -z "`${CXX} -c conftest.cc 2>&1`"; then
  490. echo "$ac_t""yes" 1>&6
  491. else
  492. AC_DEFINE(CMAKE_NO_ANSI_STREAM_HEADERS)
  493. echo "$ac_t""no" 1>&6
  494. fi
  495. fi
  496. if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
  497. SHLIB_CFLAGS="-fPIC"
  498. fi
  499. if test -f $CMAKE_CONFIG_DIR/CMakeLocal.make.in; then
  500. echo "create CMakeLocal.make from $CMAKE_CONFIG_DIR/CMakeLocal.make.in"
  501. rm -f local.make
  502. cp $CMAKE_CONFIG_DIR/local.make.in local.make
  503. else
  504. echo "no $CMAKE_CONFIG_DIR/CMakeLocal.make.in creating an empty CMakeLocal.make file"
  505. rm -f CMakeLocal.make
  506. touch CMakeLocal.make
  507. fi
  508. AC_SUBST(EXTRA_GCC_FLAG)
  509. # find make to use to build cmake, prefer gmake
  510. AC_PATH_PROGS(RUNMAKE, gmake make)
  511. # generate output files.
  512. # create mkdir files just to make some of the directories
  513. AC_OUTPUT(
  514. CMakeSystemConfig.cmake:CMake/CMakeSystemConfig.cmake.in
  515. Makefile:CMake/CMakeTopMakefileTemplate.in
  516. CMakeTargets.make:CMake/CMakeTargets.make.in
  517. CMake/CMakeSimpleRules.make
  518. CMake/CMakeMaster.make
  519. CMake/CMakeVariables.make
  520. CMake/CMakeRules.make
  521. CMake/Source/CMakeTargets.make:CMake/dummy.in
  522. CMake/Source/Makefile
  523. )
  524. # build the CMakeBuildTargets program
  525. (cd CMake/Source; $RUNMAKE CMakeBuildTargets)
  526. # run CMakeBuildTargets in make cache mode so the
  527. # cache file can have the most recent changes from configure
  528. # in it.
  529. echo CMake/Source/CMakeBuildTargets ${fullSrcDir}/CMakeLists.txt -MakeCache -S${fullSrcDir} -O${CMAKE_CONFIG_DIR} -H${fullSrcDir} -B${CMAKE_CONFIG_DIR}
  530. CMake/Source/CMakeBuildTargets ${fullSrcDir}/CMakeLists.txt -MakeCache -S${fullSrcDir} -O${CMAKE_CONFIG_DIR} -H${fullSrcDir} -B${CMAKE_CONFIG_DIR} -DRUN_CONFIGURE
  531. echo CMakeCache.txt location: ${CMAKE_CONFIG_DIR}/CMakeCache.txt
  532. # force a rebuild of CMakeBuildTargets which will rebuild CMakeTargets.make
  533. # this has to be done because CMakeBuildTargets -MakeCache generates stub CMakeTargets.make files
  534. # and make programs other than gnu do not like to include make file fragments
  535. # that do not exist, even if they know how to create them.
  536. rm -f CMake/Source/CMakeBuildTargets
  537. rm -f CMake/Source/CMakeBuildTargets.exe