bootstrap 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468
  1. #!/bin/sh
  2. #=============================================================================
  3. # CMake - Cross Platform Makefile Generator
  4. # Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
  5. #
  6. # Distributed under the OSI-approved BSD License (the "License");
  7. # see accompanying file Copyright.txt for details.
  8. #
  9. # This software is distributed WITHOUT ANY WARRANTY; without even the
  10. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. # See the License for more information.
  12. #=============================================================================
  13. die() {
  14. echo "$@" 1>&2 ; exit 1
  15. }
  16. # Version number extraction function.
  17. cmake_version_component()
  18. {
  19. cat "${cmake_source_dir}/Source/CMakeVersion.cmake" | sed -n "
  20. /^set(CMake_VERSION_${1}/ {s/set(CMake_VERSION_${1} *\([0-9]*\))/\1/;p;}
  21. "
  22. }
  23. # Install destination extraction function.
  24. cmake_install_dest_default()
  25. {
  26. cat "${cmake_source_dir}/Source/CMakeInstallDestinations.cmake" | sed -n '
  27. /^ *set(CMAKE_'"${1}"'_DIR_DEFAULT.*) # '"${2}"'$/ {
  28. s/^ *set(CMAKE_'"${1}"'_DIR_DEFAULT *"\([^"]*\)").*$/\1/
  29. s/${CMake_VERSION_MAJOR}/'"${cmake_version_major}"'/
  30. s/${CMake_VERSION_MINOR}/'"${cmake_version_minor}"'/
  31. s/${CMake_VERSION_PATCH}/'"${cmake_version_patch}"'/
  32. p
  33. q
  34. }
  35. '
  36. }
  37. cmake_toupper()
  38. {
  39. echo "$1" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'
  40. }
  41. # Detect system and directory information.
  42. cmake_system=`uname`
  43. cmake_source_dir=`cd "\`dirname \"$0\"\`";pwd`
  44. cmake_binary_dir=`pwd`
  45. # Load version information.
  46. cmake_version_major="`cmake_version_component MAJOR`"
  47. cmake_version_minor="`cmake_version_component MINOR`"
  48. cmake_version_patch="`cmake_version_component PATCH`"
  49. cmake_version="${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}"
  50. cmake_version_rc="`cmake_version_component RC`"
  51. if [ "$cmake_version_rc" != "" ]; then
  52. cmake_version="${cmake_version}-rc${cmake_version_rc}"
  53. fi
  54. cmake_copyright="`grep '^Copyright .* Kitware' "${cmake_source_dir}/Copyright.txt"`"
  55. cmake_data_dir_keyword="OTHER"
  56. cmake_doc_dir_keyword="OTHER"
  57. cmake_man_dir_keyword="OTHER"
  58. cmake_xdgdata_dir_keyword="OTHER"
  59. cmake_data_dir=""
  60. cmake_doc_dir=""
  61. cmake_man_dir=""
  62. cmake_xdgdata_dir=""
  63. cmake_init_file=""
  64. cmake_bootstrap_system_libs=""
  65. cmake_bootstrap_qt_gui=""
  66. cmake_bootstrap_qt_qmake=""
  67. cmake_sphinx_man=""
  68. cmake_sphinx_html=""
  69. cmake_sphinx_qthelp=""
  70. cmake_sphinx_build=""
  71. cmake_sphinx_flags=""
  72. # Determine whether this is a Cygwin environment.
  73. if echo "${cmake_system}" | grep CYGWIN >/dev/null 2>&1; then
  74. cmake_system_cygwin=true
  75. cmake_doc_dir_keyword="CYGWIN"
  76. cmake_man_dir_keyword="CYGWIN"
  77. else
  78. cmake_system_cygwin=false
  79. fi
  80. # Determine whether this is a MinGW environment.
  81. if echo "${cmake_system}" | grep MINGW >/dev/null 2>&1; then
  82. cmake_system_mingw=true
  83. else
  84. cmake_system_mingw=false
  85. fi
  86. # Determine whether this is OS X
  87. if echo "${cmake_system}" | grep Darwin >/dev/null 2>&1; then
  88. cmake_system_darwin=true
  89. else
  90. cmake_system_darwin=false
  91. fi
  92. # Determine whether this is BeOS
  93. if echo "${cmake_system}" | grep BeOS >/dev/null 2>&1; then
  94. cmake_system_beos=true
  95. cmake_doc_dir_keyword="HAIKU"
  96. cmake_man_dir_keyword="HAIKU"
  97. else
  98. cmake_system_beos=false
  99. fi
  100. # Determine whether this is Haiku
  101. if echo "${cmake_system}" | grep Haiku >/dev/null 2>&1; then
  102. cmake_system_haiku=true
  103. cmake_doc_dir_keyword="HAIKU"
  104. cmake_man_dir_keyword="HAIKU"
  105. else
  106. cmake_system_haiku=false
  107. fi
  108. # Determine whether this is OpenVMS
  109. if echo "${cmake_system}" | grep OpenVMS >/dev/null 2>&1; then
  110. cmake_system_openvms=true
  111. else
  112. cmake_system_openvms=false
  113. fi
  114. # Determine whether this is HP-UX
  115. if echo "${cmake_system}" | grep HP-UX >/dev/null 2>&1; then
  116. cmake_system_hpux=true
  117. else
  118. cmake_system_hpux=false
  119. fi
  120. # Determine whether this is Linux
  121. if echo "${cmake_system}" | grep Linux >/dev/null 2>&1; then
  122. cmake_system_linux=true
  123. else
  124. cmake_system_linux=false
  125. fi
  126. # Determine whether this is a PA-RISC machine
  127. # This only works for Linux or HP-UX, not other PA-RISC OSs (BSD maybe?). Also
  128. # may falsely detect parisc on HP-UX m68k
  129. cmake_machine_parisc=false
  130. if ${cmake_system_linux}; then
  131. if uname -m | grep parisc >/dev/null 2>&1; then
  132. cmake_machine_parisc=true
  133. fi
  134. elif ${cmake_system_hpux}; then
  135. if uname -m | grep ia64 >/dev/null 2>&1; then : ; else
  136. cmake_machine_parisc=true
  137. fi
  138. fi
  139. # Choose the generator to use for bootstrapping.
  140. if ${cmake_system_mingw}; then
  141. # Bootstrapping from an MSYS prompt.
  142. cmake_bootstrap_generator="MSYS Makefiles"
  143. else
  144. # Bootstrapping from a standard UNIX prompt.
  145. cmake_bootstrap_generator="Unix Makefiles"
  146. fi
  147. # Choose tools and extensions for this platform.
  148. if ${cmake_system_openvms}; then
  149. _tmp="_tmp"
  150. _cmk="_cmk"
  151. _diff=`which diff`
  152. else
  153. _tmp=".tmp"
  154. _cmk=".cmk"
  155. _diff="diff"
  156. fi
  157. # Construct bootstrap directory name.
  158. cmake_bootstrap_dir="${cmake_binary_dir}/Bootstrap${_cmk}"
  159. # Helper function to fix windows paths.
  160. case "${cmake_system}" in
  161. *MINGW*)
  162. cmake_fix_slashes()
  163. {
  164. cmd //c echo "$(echo "$1" | sed 's/\\/\//g')" | sed 's/^"//;s/" *$//'
  165. }
  166. ;;
  167. *)
  168. cmake_fix_slashes()
  169. {
  170. echo "$1" | sed 's/\\/\//g'
  171. }
  172. ;;
  173. esac
  174. # Choose the default install prefix.
  175. if ${cmake_system_mingw}; then
  176. if [ "x${PROGRAMFILES}" != "x" ]; then
  177. cmake_default_prefix=`cmake_fix_slashes "${PROGRAMFILES}/CMake"`
  178. elif [ "x${ProgramFiles}" != "x" ]; then
  179. cmake_default_prefix=`cmake_fix_slashes "${ProgramFiles}/CMake"`
  180. elif [ "x${SYSTEMDRIVE}" != "x" ]; then
  181. cmake_default_prefix=`cmake_fix_slashes "${SYSTEMDRIVE}/Program Files/CMake"`
  182. elif [ "x${SystemDrive}" != "x" ]; then
  183. cmake_default_prefix=`cmake_fix_slashes "${SystemDrive}/Program Files/CMake"`
  184. else
  185. cmake_default_prefix="c:/Program Files/CMake"
  186. fi
  187. elif ${cmake_system_haiku}; then
  188. cmake_default_prefix=`finddir B_COMMON_DIRECTORY`
  189. else
  190. cmake_default_prefix="/usr/local"
  191. fi
  192. # Lookup default install destinations.
  193. cmake_data_dir_default="`cmake_install_dest_default DATA ${cmake_data_dir_keyword}`"
  194. cmake_doc_dir_default="`cmake_install_dest_default DOC ${cmake_doc_dir_keyword}`"
  195. cmake_man_dir_default="`cmake_install_dest_default MAN ${cmake_man_dir_keyword}`"
  196. cmake_xdgdata_dir_default="`cmake_install_dest_default XDGDATA ${cmake_xdgdata_dir_keyword}`"
  197. CMAKE_KNOWN_C_COMPILERS="cc gcc xlc icc tcc"
  198. CMAKE_KNOWN_CXX_COMPILERS="aCC xlC CC g++ c++ icc como "
  199. CMAKE_KNOWN_MAKE_PROCESSORS="gmake make"
  200. CMAKE_PROBLEMATIC_FILES="\
  201. CMakeCache.txt \
  202. CMakeSystem.cmake \
  203. CMakeCCompiler.cmake \
  204. CMakeCXXCompiler.cmake \
  205. */CMakeSystem.cmake \
  206. */CMakeCCompiler.cmake \
  207. */CMakeCXXCompiler.cmake \
  208. Source/cmConfigure.h \
  209. Source/CTest/Curl/config.h \
  210. Utilities/cmexpat/expatConfig.h \
  211. Utilities/cmexpat/expatDllConfig.h \
  212. "
  213. CMAKE_UNUSED_SOURCES="\
  214. cmGlobalXCodeGenerator \
  215. cmLocalXCodeGenerator \
  216. cmXCodeObject \
  217. cmXCode21Object \
  218. cmSourceGroup \
  219. "
  220. CMAKE_CXX_SOURCES="\
  221. cmake \
  222. cmakemain \
  223. cmcmd \
  224. cmCommandArgumentLexer \
  225. cmCommandArgumentParser \
  226. cmCommandArgumentParserHelper \
  227. cmCommonTargetGenerator \
  228. cmCPackPropertiesGenerator \
  229. cmDefinitions \
  230. cmDepends \
  231. cmDependsC \
  232. cmDocumentationFormatter \
  233. cmPolicies \
  234. cmProperty \
  235. cmPropertyMap \
  236. cmPropertyDefinition \
  237. cmPropertyDefinitionMap \
  238. cmMakefile \
  239. cmExportBuildFileGenerator \
  240. cmExportFileGenerator \
  241. cmExportInstallFileGenerator \
  242. cmExportTryCompileFileGenerator \
  243. cmExportSet \
  244. cmExportSetMap \
  245. cmExternalMakefileProjectGenerator \
  246. cmGeneratorExpressionEvaluationFile \
  247. cmGeneratedFileStream \
  248. cmGeneratorTarget \
  249. cmGeneratorExpressionContext \
  250. cmGeneratorExpressionDAGChecker \
  251. cmGeneratorExpressionEvaluator \
  252. cmGeneratorExpressionLexer \
  253. cmGeneratorExpressionNode \
  254. cmGeneratorExpressionParser \
  255. cmGeneratorExpression \
  256. cmGlobalCommonGenerator \
  257. cmGlobalGenerator \
  258. cmInstallDirectoryGenerator \
  259. cmLocalCommonGenerator \
  260. cmLocalGenerator \
  261. cmInstalledFile \
  262. cmInstallGenerator \
  263. cmInstallExportGenerator \
  264. cmInstallFilesGenerator \
  265. cmInstallScriptGenerator \
  266. cmInstallTargetGenerator \
  267. cmScriptGenerator \
  268. cmSourceFile \
  269. cmSourceFileLocation \
  270. cmState \
  271. cmSystemTools \
  272. cmTestGenerator \
  273. cmVersion \
  274. cmFileTimeComparison \
  275. cmGlobalUnixMakefileGenerator3 \
  276. cmLocalUnixMakefileGenerator3 \
  277. cmMakefileExecutableTargetGenerator \
  278. cmMakefileLibraryTargetGenerator \
  279. cmMakefileTargetGenerator \
  280. cmMakefileUtilityTargetGenerator \
  281. cmOutputConverter \
  282. cmOSXBundleGenerator \
  283. cmNewLineStyle \
  284. cmBootstrapCommands1 \
  285. cmBootstrapCommands2 \
  286. cmCommandsForBootstrap \
  287. cmTarget \
  288. cmTest \
  289. cmCustomCommand \
  290. cmCustomCommandGenerator \
  291. cmCacheManager \
  292. cmListFileCache \
  293. cmComputeLinkDepends \
  294. cmComputeLinkInformation \
  295. cmOrderDirectories \
  296. cmComputeTargetDepends \
  297. cmComputeComponentGraph \
  298. cmExprLexer \
  299. cmExprParser \
  300. cmExprParserHelper \
  301. "
  302. if ${cmake_system_mingw}; then
  303. CMAKE_CXX_SOURCES="${CMAKE_CXX_SOURCES}\
  304. cmGlobalMSYSMakefileGenerator \
  305. cmGlobalMinGWMakefileGenerator"
  306. fi
  307. CMAKE_C_SOURCES="\
  308. cmListFileLexer \
  309. "
  310. if ${cmake_system_mingw}; then
  311. KWSYS_C_SOURCES="\
  312. EncodingC \
  313. ProcessWin32 \
  314. String \
  315. System \
  316. Terminal"
  317. else
  318. KWSYS_C_SOURCES="\
  319. EncodingC \
  320. ProcessUNIX \
  321. String \
  322. System \
  323. Terminal"
  324. fi
  325. KWSYS_CXX_SOURCES="\
  326. Directory \
  327. EncodingCXX \
  328. FStream \
  329. Glob \
  330. RegularExpression \
  331. SystemTools"
  332. KWSYS_FILES="\
  333. auto_ptr.hxx \
  334. Directory.hxx \
  335. Encoding.h \
  336. Encoding.hxx \
  337. FStream.hxx \
  338. Glob.hxx \
  339. Process.h \
  340. RegularExpression.hxx \
  341. String.h \
  342. String.hxx \
  343. System.h \
  344. SystemTools.hxx \
  345. Terminal.h"
  346. # Display CMake bootstrap usage
  347. cmake_usage()
  348. {
  349. echo '
  350. Usage: '"$0"' [<options>...] [-- <cmake-options>...]
  351. Options: [defaults in brackets after descriptions]
  352. Configuration:
  353. --help print this message
  354. --version only print version information
  355. --verbose display more information
  356. --parallel=n bootstrap cmake in parallel, where n is
  357. number of nodes [1]
  358. --enable-ccache Enable ccache when building cmake
  359. --init=FILE load FILE as script to populate cache
  360. --system-libs use all system-installed third-party libraries
  361. (for use only by package maintainers)
  362. --no-system-libs use all cmake-provided third-party libraries
  363. (default)
  364. --system-curl use system-installed curl library
  365. --no-system-curl use cmake-provided curl library (default)
  366. --system-expat use system-installed expat library
  367. --no-system-expat use cmake-provided expat library (default)
  368. --system-jsoncpp use system-installed jsoncpp library
  369. --no-system-jsoncpp use cmake-provided jsoncpp library (default)
  370. --system-zlib use system-installed zlib library
  371. --no-system-zlib use cmake-provided zlib library (default)
  372. --system-bzip2 use system-installed bzip2 library
  373. --no-system-bzip2 use cmake-provided bzip2 library (default)
  374. --system-liblzma use system-installed liblzma library
  375. --no-system-liblzma use cmake-provided liblzma library (default)
  376. --system-libarchive use system-installed libarchive library
  377. --no-system-libarchive use cmake-provided libarchive library (default)
  378. --qt-gui build the Qt-based GUI (requires Qt >= 4.2)
  379. --no-qt-gui do not build the Qt-based GUI (default)
  380. --qt-qmake=<qmake> use <qmake> as the qmake executable to find Qt
  381. --sphinx-man build man pages with Sphinx
  382. --sphinx-html build html help with Sphinx
  383. --sphinx-qthelp build qch help with Sphinx
  384. --sphinx-build=<sb> use <sb> as the sphinx-build executable
  385. --sphinx-flags=<flags> pass <flags> to sphinx-build executable
  386. Directory and file names:
  387. --prefix=PREFIX install files in tree rooted at PREFIX
  388. ['"${cmake_default_prefix}"']
  389. --datadir=DIR install data files in PREFIX/DIR
  390. ['"${cmake_data_dir_default}"']
  391. --docdir=DIR install documentation files in PREFIX/DIR
  392. ['"${cmake_doc_dir_default}"']
  393. --mandir=DIR install man pages files in PREFIX/DIR/manN
  394. ['"${cmake_man_dir_default}"']
  395. --xdgdatadir=DIR install XDG specific files in PREFIX/DIR
  396. ['"${cmake_xdgdata_dir_default}"']
  397. '
  398. exit 10
  399. }
  400. # Display CMake bootstrap usage
  401. cmake_version_display()
  402. {
  403. echo "CMake ${cmake_version}, ${cmake_copyright}"
  404. }
  405. # Display CMake bootstrap error, display the log file and exit
  406. cmake_error()
  407. {
  408. res=$1
  409. shift 1
  410. echo "---------------------------------------------"
  411. echo "Error when bootstrapping CMake:"
  412. echo "$*"
  413. echo "---------------------------------------------"
  414. if [ -f cmake_bootstrap.log ]; then
  415. echo "Log of errors: `pwd`/cmake_bootstrap.log"
  416. #cat cmake_bootstrap.log
  417. echo "---------------------------------------------"
  418. fi
  419. exit ${res}
  420. }
  421. cmake_generate_file ()
  422. {
  423. OUTFILE="$1"
  424. CONTENT="$2"
  425. echo "$CONTENT" > "$OUTFILE.tmp"
  426. if "${_diff}" "$OUTFILE.tmp" "$OUTFILE" > /dev/null 2> /dev/null ; then
  427. rm -f "$OUTFILE.tmp"
  428. else
  429. mv -f "$OUTFILE.tmp" "$OUTFILE"
  430. fi
  431. }
  432. # Replace KWSYS_NAMESPACE with cmsys
  433. cmake_replace_string ()
  434. {
  435. INFILE="$1"
  436. OUTFILE="$2"
  437. SEARCHFOR="$3"
  438. REPLACEWITH="$4"
  439. if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then
  440. cat "${INFILE}" |
  441. sed "s/\@${SEARCHFOR}\@/${REPLACEWITH}/g" > "${OUTFILE}${_tmp}"
  442. if [ -f "${OUTFILE}${_tmp}" ]; then
  443. if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then
  444. #echo "Files are the same"
  445. rm -f "${OUTFILE}${_tmp}"
  446. else
  447. mv -f "${OUTFILE}${_tmp}" "${OUTFILE}"
  448. fi
  449. fi
  450. else
  451. cmake_error 1 "Cannot find file ${INFILE}"
  452. fi
  453. }
  454. cmake_kwsys_config_replace_string ()
  455. {
  456. INFILE="$1"
  457. OUTFILE="$2"
  458. shift 2
  459. APPEND="$*"
  460. if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then
  461. echo "${APPEND}" > "${OUTFILE}${_tmp}"
  462. cat "${INFILE}" |
  463. sed "/./ {s/\@KWSYS_NAMESPACE\@/cmsys/g;
  464. s/@KWSYS_BUILD_SHARED@/${KWSYS_BUILD_SHARED}/g;
  465. s/@KWSYS_LFS_AVAILABLE@/${KWSYS_LFS_AVAILABLE}/g;
  466. s/@KWSYS_LFS_REQUESTED@/${KWSYS_LFS_REQUESTED}/g;
  467. s/@KWSYS_NAME_IS_KWSYS@/${KWSYS_NAME_IS_KWSYS}/g;
  468. s/@KWSYS_STL_HAS_WSTRING@/${KWSYS_STL_HAS_WSTRING}/g;
  469. }" >> "${OUTFILE}${_tmp}"
  470. if [ -f "${OUTFILE}${_tmp}" ]; then
  471. if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then
  472. #echo "Files are the same"
  473. rm -f "${OUTFILE}${_tmp}"
  474. else
  475. mv -f "${OUTFILE}${_tmp}" "${OUTFILE}"
  476. fi
  477. fi
  478. else
  479. cmake_error 2 "Cannot find file ${INFILE}"
  480. fi
  481. }
  482. # Write string into a file
  483. cmake_report ()
  484. {
  485. FILE=$1
  486. shift
  487. echo "$*" >> ${FILE}
  488. }
  489. # Escape spaces in strings
  490. cmake_escape ()
  491. {
  492. echo $1 | sed "s/ /\\\\ /g"
  493. }
  494. # Strip prefix from argument
  495. cmake_arg ()
  496. {
  497. echo "$1" | sed "s/^${2-[^=]*=}//"
  498. }
  499. # Write message to the log
  500. cmake_log ()
  501. {
  502. echo "$*" >> cmake_bootstrap.log
  503. }
  504. # Return temp file
  505. cmake_tmp_file ()
  506. {
  507. echo "cmake_bootstrap_$$_test"
  508. }
  509. # Run a compiler test. First argument is compiler, second one are compiler
  510. # flags, third one is test source file to be compiled
  511. cmake_try_run ()
  512. {
  513. COMPILER=$1
  514. FLAGS=$2
  515. TESTFILE=$3
  516. if [ ! -f "${TESTFILE}" ]; then
  517. echo "Test file ${TESTFILE} missing. Please verify your CMake source tree."
  518. exit 4
  519. fi
  520. TMPFILE=`cmake_tmp_file`
  521. echo "Try: ${COMPILER}"
  522. echo "Line: ${COMPILER} ${FLAGS} ${TESTFILE} -o ${TMPFILE}"
  523. echo "---------- file -----------------------"
  524. cat "${TESTFILE}"
  525. echo "------------------------------------------"
  526. "${COMPILER}" ${FLAGS} "${TESTFILE}" -o "${TMPFILE}"
  527. RES=$?
  528. if [ "${RES}" -ne "0" ]; then
  529. echo "Test failed to compile"
  530. return 1
  531. fi
  532. if [ ! -f "${TMPFILE}" ] && [ ! -f "${TMPFILE}.exe" ]; then
  533. echo "Test failed to produce executable"
  534. return 2
  535. fi
  536. ./${TMPFILE}
  537. RES=$?
  538. rm -f "${TMPFILE}"
  539. if [ "${RES}" -ne "0" ]; then
  540. echo "Test produced non-zero return code"
  541. return 3
  542. fi
  543. echo "Test succeeded"
  544. return 0
  545. }
  546. # Run a make test. First argument is the make interpreter.
  547. cmake_try_make ()
  548. {
  549. MAKE_PROC="$1"
  550. MAKE_FLAGS="$2"
  551. echo "Try: ${MAKE_PROC}"
  552. "${MAKE_PROC}" ${MAKE_FLAGS}
  553. RES=$?
  554. if [ "${RES}" -ne "0" ]; then
  555. echo "${MAKE_PROC} does not work"
  556. return 1
  557. fi
  558. if [ ! -f "test" ] && [ ! -f "test.exe" ]; then
  559. echo "${COMPILER} does not produce output"
  560. return 2
  561. fi
  562. ./test
  563. RES=$?
  564. rm -f "test"
  565. if [ "${RES}" -ne "0" ]; then
  566. echo "${MAKE_PROC} produces strange executable"
  567. return 3
  568. fi
  569. echo "${MAKE_PROC} works"
  570. return 0
  571. }
  572. # Parse arguments
  573. cmake_verbose=
  574. cmake_parallel_make=
  575. cmake_ccache_enabled=
  576. cmake_prefix_dir="${cmake_default_prefix}"
  577. while test $# != 0; do
  578. case "$1" in
  579. --prefix=*) dir=`cmake_arg "$1"`
  580. cmake_prefix_dir=`cmake_fix_slashes "$dir"` ;;
  581. --parallel=*) cmake_parallel_make=`cmake_arg "$1"` ;;
  582. --datadir=*) cmake_data_dir=`cmake_arg "$1"` ;;
  583. --docdir=*) cmake_doc_dir=`cmake_arg "$1"` ;;
  584. --mandir=*) cmake_man_dir=`cmake_arg "$1"` ;;
  585. --xdgdatadir=*) cmake_xdgdata_dir=`cmake_arg "$1"` ;;
  586. --init=*) cmake_init_file=`cmake_arg "$1"` ;;
  587. --system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;;
  588. --no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;;
  589. --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-zlib|--system-liblzma)
  590. lib=`cmake_arg "$1" "--system-"`
  591. cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;;
  592. --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-zlib|--no-system-liblzma)
  593. lib=`cmake_arg "$1" "--no-system-"`
  594. cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;;
  595. --qt-gui) cmake_bootstrap_qt_gui="1" ;;
  596. --no-qt-gui) cmake_bootstrap_qt_gui="0" ;;
  597. --qt-qmake=*) cmake_bootstrap_qt_qmake=`cmake_arg "$1"` ;;
  598. --sphinx-man) cmake_sphinx_man="1" ;;
  599. --sphinx-html) cmake_sphinx_html="1" ;;
  600. --sphinx-qthelp) cmake_sphinx_qthelp="1" ;;
  601. --sphinx-build=*) cmake_sphinx_build=`cmake_arg "$1"` ;;
  602. --sphinx-flags=*) cmake_sphinx_flags=`cmake_arg "$1"` ;;
  603. --help) cmake_usage ;;
  604. --version) cmake_version_display ; exit 2 ;;
  605. --verbose) cmake_verbose=TRUE ;;
  606. --enable-ccache) cmake_ccache_enabled=TRUE ;;
  607. --) shift; break ;;
  608. *) die "Unknown option: $1" ;;
  609. esac
  610. shift
  611. done
  612. # If verbose, display some information about bootstrap
  613. if [ -n "${cmake_verbose}" ]; then
  614. echo "---------------------------------------------"
  615. echo "Source directory: ${cmake_source_dir}"
  616. echo "Binary directory: ${cmake_binary_dir}"
  617. echo "Prefix directory: ${cmake_prefix_dir}"
  618. echo "System: ${cmake_system}"
  619. if [ "x${cmake_parallel_make}" != "x" ]; then
  620. echo "Doing parallel make: ${cmake_parallel_make}"
  621. fi
  622. echo ""
  623. fi
  624. echo "---------------------------------------------"
  625. # Get CMake version
  626. echo "`cmake_version_display`"
  627. # Check for in-source build
  628. cmake_in_source_build=
  629. if [ -f "${cmake_binary_dir}/Source/cmake.cxx" -a \
  630. -f "${cmake_binary_dir}/Source/cmake.h" ]; then
  631. if [ -n "${cmake_verbose}" ]; then
  632. echo "Warning: This is an in-source build"
  633. fi
  634. cmake_in_source_build=TRUE
  635. fi
  636. # If this is not an in-source build, then Bootstrap stuff should not exist.
  637. if [ -z "${cmake_in_source_build}" ]; then
  638. # Did somebody bootstrap in the source tree?
  639. if [ -d "${cmake_source_dir}/Bootstrap${_cmk}" ]; then
  640. cmake_error 10 "Found directory \"${cmake_source_dir}/Bootstrap${_cmk}\".
  641. Looks like somebody did bootstrap CMake in the source tree, but now you are
  642. trying to do bootstrap in the binary tree. Please remove Bootstrap${_cmk}
  643. directory from the source tree."
  644. fi
  645. # Is there a cache in the source tree?
  646. for cmake_problematic_file in ${CMAKE_PROBLEMATIC_FILES}; do
  647. if [ -f "${cmake_source_dir}/${cmake_problematic_file}" ]; then
  648. cmake_error 10 "Found \"${cmake_source_dir}/${cmake_problematic_file}\".
  649. Looks like somebody tried to build CMake in the source tree, but now you are
  650. trying to do bootstrap in the binary tree. Please remove \"${cmake_problematic_file}\"
  651. from the source tree."
  652. fi
  653. done
  654. fi
  655. # Make bootstrap directory
  656. [ -d "${cmake_bootstrap_dir}" ] || mkdir "${cmake_bootstrap_dir}"
  657. if [ ! -d "${cmake_bootstrap_dir}" ]; then
  658. cmake_error 3 "Cannot create directory ${cmake_bootstrap_dir} to bootstrap CMake."
  659. fi
  660. cd "${cmake_bootstrap_dir}"
  661. [ -d "cmsys" ] || mkdir "cmsys"
  662. if [ ! -d "cmsys" ]; then
  663. cmake_error 4 "Cannot create directory ${cmake_bootstrap_dir}/cmsys"
  664. fi
  665. # Delete all the bootstrap files
  666. rm -f "${cmake_bootstrap_dir}/cmake_bootstrap.log"
  667. rm -f "${cmake_bootstrap_dir}/cmConfigure.h${_tmp}"
  668. rm -f "${cmake_bootstrap_dir}/cmVersionConfig.h${_tmp}"
  669. # If exist compiler flags, set them
  670. cmake_c_flags=${CFLAGS}
  671. cmake_cxx_flags=${CXXFLAGS}
  672. cmake_ld_flags=${LDFLAGS}
  673. # Add Cygwin-specific flags
  674. if ${cmake_system_cygwin}; then
  675. cmake_ld_flags="${LDFLAGS} -Wl,--enable-auto-import"
  676. fi
  677. # Add CoreFoundation framework on Darwin
  678. if ${cmake_system_darwin}; then
  679. cmake_ld_flags="${LDFLAGS} -framework CoreFoundation"
  680. fi
  681. # Add BeOS toolkits...
  682. if ${cmake_system_beos}; then
  683. cmake_ld_flags="${LDFLAGS} -lroot -lbe"
  684. fi
  685. # Add Haiku toolkits...
  686. if ${cmake_system_haiku}; then
  687. cmake_ld_flags="${LDFLAGS} -lroot -lbe"
  688. fi
  689. # Workaround for short jump tables on PA-RISC
  690. if ${cmake_machine_parisc}; then
  691. if ${cmake_c_compiler_is_gnu}; then
  692. cmake_c_flags="${CFLAGS} -mlong-calls"
  693. fi
  694. if ${cmake_cxx_compiler_is_gnu}; then
  695. cmake_cxx_flags="${CXXFLAGS} -mlong-calls"
  696. fi
  697. fi
  698. #-----------------------------------------------------------------------------
  699. # Detect known toolchains on some platforms.
  700. cmake_toolchains=''
  701. case "${cmake_system}" in
  702. *AIX*) cmake_toolchains='XL GNU' ;;
  703. *CYGWIN*) cmake_toolchains='GNU' ;;
  704. *Darwin*) cmake_toolchains='GNU Clang' ;;
  705. *Linux*) cmake_toolchains='GNU Clang XL PGI PathScale' ;;
  706. *MINGW*) cmake_toolchains='GNU' ;;
  707. esac
  708. # Toolchain compiler name table.
  709. cmake_toolchain_Clang_CC='clang'
  710. cmake_toolchain_Clang_CXX='clang++'
  711. cmake_toolchain_GNU_CC='gcc'
  712. cmake_toolchain_GNU_CXX='g++'
  713. cmake_toolchain_PGI_CC='pgcc'
  714. cmake_toolchain_PGI_CXX='pgCC'
  715. cmake_toolchain_PathScale_CC='pathcc'
  716. cmake_toolchain_PathScale_CXX='pathCC'
  717. cmake_toolchain_XL_CC='xlc'
  718. cmake_toolchain_XL_CXX='xlC'
  719. cmake_toolchain_try()
  720. {
  721. tc="$1"
  722. TMPFILE=`cmake_tmp_file`
  723. eval "tc_CC=\${cmake_toolchain_${tc}_CC}"
  724. echo 'int main() { return 0; }' > "${TMPFILE}.c"
  725. cmake_try_run "$tc_CC" "" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1
  726. tc_result_CC="$?"
  727. rm -f "${TMPFILE}.c"
  728. test "${tc_result_CC}" = "0" || return 1
  729. eval "tc_CXX=\${cmake_toolchain_${tc}_CXX}"
  730. echo 'int main() { return 0; }' > "${TMPFILE}.cpp"
  731. cmake_try_run "$tc_CXX" "" "${TMPFILE}.cpp" >> cmake_bootstrap.log 2>&1
  732. tc_result_CXX="$?"
  733. rm -f "${TMPFILE}.cpp"
  734. test "${tc_result_CXX}" = "0" || return 1
  735. cmake_toolchain="$tc"
  736. }
  737. cmake_toolchain_detect()
  738. {
  739. cmake_toolchain=
  740. for tc in ${cmake_toolchains}; do
  741. echo "Checking for $tc toolchain" >> cmake_bootstrap.log 2>&1
  742. cmake_toolchain_try "$tc" &&
  743. echo "Found $tc toolchain" &&
  744. break
  745. done
  746. }
  747. if [ -z "${CC}" -a -z "${CXX}" ]; then
  748. cmake_toolchain_detect
  749. fi
  750. #-----------------------------------------------------------------------------
  751. # Test C compiler
  752. cmake_c_compiler=
  753. # If CC is set, use that for compiler, otherwise use list of known compilers
  754. if [ -n "${cmake_toolchain}" ]; then
  755. eval cmake_c_compilers="\${cmake_toolchain_${cmake_toolchain}_CC}"
  756. elif [ -n "${CC}" ]; then
  757. cmake_c_compilers="${CC}"
  758. else
  759. cmake_c_compilers="${CMAKE_KNOWN_C_COMPILERS}"
  760. fi
  761. # Check if C compiler works
  762. TMPFILE=`cmake_tmp_file`
  763. echo '
  764. #ifdef __cplusplus
  765. # error "The CMAKE_C_COMPILER is set to a C++ compiler"
  766. #endif
  767. #include<stdio.h>
  768. #if defined(__CLASSIC_C__)
  769. int main(argc, argv)
  770. int argc;
  771. char* argv[];
  772. #else
  773. int main(int argc, char* argv[])
  774. #endif
  775. {
  776. printf("%d%c", (argv != 0), (char)0x0a);
  777. return argc-1;
  778. }
  779. ' > "${TMPFILE}.c"
  780. for a in ${cmake_c_compilers}; do
  781. if [ -z "${cmake_c_compiler}" ] && \
  782. cmake_try_run "${a}" "${cmake_c_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
  783. cmake_c_compiler="${a}"
  784. fi
  785. done
  786. rm -f "${TMPFILE}.c"
  787. if [ -z "${cmake_c_compiler}" ]; then
  788. cmake_error 6 "Cannot find appropriate C compiler on this system.
  789. Please specify one using environment variable CC.
  790. See cmake_bootstrap.log for compilers attempted.
  791. "
  792. fi
  793. echo "C compiler on this system is: ${cmake_c_compiler} ${cmake_c_flags}"
  794. #-----------------------------------------------------------------------------
  795. # Test CXX compiler
  796. cmake_cxx_compiler=
  797. # On Mac OSX, CC is the same as cc, so make sure not to try CC as c++ compiler.
  798. # If CC is set, use that for compiler, otherwise use list of known compilers
  799. if [ -n "${cmake_toolchain}" ]; then
  800. eval cmake_cxx_compilers="\${cmake_toolchain_${cmake_toolchain}_CXX}"
  801. elif [ -n "${CXX}" ]; then
  802. cmake_cxx_compilers="${CXX}"
  803. else
  804. cmake_cxx_compilers="${CMAKE_KNOWN_CXX_COMPILERS}"
  805. fi
  806. # Check if C++ compiler works
  807. TMPFILE=`cmake_tmp_file`
  808. echo '
  809. #if defined(TEST1)
  810. # include <iostream>
  811. #else
  812. # include <iostream.h>
  813. #endif
  814. class NeedCXX
  815. {
  816. public:
  817. NeedCXX() { this->Foo = 1; }
  818. int GetFoo() { return this->Foo; }
  819. private:
  820. int Foo;
  821. };
  822. int main()
  823. {
  824. NeedCXX c;
  825. #ifdef TEST3
  826. cout << c.GetFoo() << endl;
  827. #else
  828. std::cout << c.GetFoo() << std::endl;
  829. #endif
  830. return 0;
  831. }
  832. ' > "${TMPFILE}.cxx"
  833. for a in ${cmake_cxx_compilers}; do
  834. for b in 1 2 3; do
  835. if [ -z "${cmake_cxx_compiler}" ] && \
  836. cmake_try_run "${a}" "${cmake_cxx_flags} -DTEST${b}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  837. cmake_cxx_compiler="${a}"
  838. fi
  839. done
  840. done
  841. rm -f "${TMPFILE}.cxx"
  842. if [ -z "${cmake_cxx_compiler}" ]; then
  843. cmake_error 7 "Cannot find appropriate C++ compiler on this system.
  844. Please specify one using environment variable CXX.
  845. See cmake_bootstrap.log for compilers attempted."
  846. fi
  847. echo "C++ compiler on this system is: ${cmake_cxx_compiler} ${cmake_cxx_flags}"
  848. #-----------------------------------------------------------------------------
  849. # Test Make
  850. cmake_make_processor=
  851. cmake_make_flags=
  852. # If MAKE is set, use that for make processor, otherwise use list of known make
  853. if [ -n "${MAKE}" ]; then
  854. cmake_make_processors="${MAKE}"
  855. else
  856. cmake_make_processors="${CMAKE_KNOWN_MAKE_PROCESSORS}"
  857. fi
  858. TMPFILE="`cmake_tmp_file`_dir"
  859. rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
  860. mkdir "${cmake_bootstrap_dir}/${TMPFILE}"
  861. cd "${cmake_bootstrap_dir}/${TMPFILE}"
  862. echo '
  863. test: test.c
  864. "'"${cmake_c_compiler}"'" '"${cmake_ld_flags} ${cmake_c_flags}"' -o test test.c
  865. '>"Makefile"
  866. echo '
  867. #include <stdio.h>
  868. int main(){ printf("1%c", (char)0x0a); return 0; }
  869. ' > "test.c"
  870. cmake_original_make_flags="${cmake_make_flags}"
  871. if [ "x${cmake_parallel_make}" != "x" ]; then
  872. cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}"
  873. fi
  874. for a in ${cmake_make_processors}; do
  875. if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then
  876. cmake_make_processor="${a}"
  877. fi
  878. done
  879. cmake_full_make_flags="${cmake_make_flags}"
  880. if [ "x${cmake_original_make_flags}" != "x${cmake_make_flags}" ]; then
  881. if [ -z "${cmake_make_processor}" ]; then
  882. cmake_make_flags="${cmake_original_make_flags}"
  883. for a in ${cmake_make_processors}; do
  884. if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then
  885. cmake_make_processor="${a}"
  886. fi
  887. done
  888. fi
  889. fi
  890. cd "${cmake_bootstrap_dir}"
  891. if [ -z "${cmake_make_processor}" ]; then
  892. cmake_error 8 "Cannot find appropriate Makefile processor on this system.
  893. Please specify one using environment variable MAKE."
  894. fi
  895. rm -rf "${cmake_bootstrap_dir}/${TMPFILE}"
  896. echo "Makefile processor on this system is: ${cmake_make_processor}"
  897. if [ "x${cmake_full_make_flags}" != "x${cmake_make_flags}" ]; then
  898. echo "---------------------------------------------"
  899. echo "Makefile processor ${cmake_make_processor} does not support parallel build"
  900. echo "---------------------------------------------"
  901. fi
  902. # Ok, we have CC, CXX, and MAKE.
  903. # Test C++ compiler features
  904. # Are we GCC?
  905. TMPFILE=`cmake_tmp_file`
  906. echo '
  907. #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
  908. #include <iostream>
  909. int main() { std::cout << "This is GNU" << std::endl; return 0;}
  910. #endif
  911. ' > ${TMPFILE}.cxx
  912. cmake_cxx_compiler_is_gnu=0
  913. if cmake_try_run "${cmake_cxx_compiler}" \
  914. "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  915. cmake_cxx_compiler_is_gnu=1
  916. fi
  917. if [ "x${cmake_cxx_compiler_is_gnu}" = "x1" ]; then
  918. echo "${cmake_cxx_compiler} is GNU compiler"
  919. else
  920. echo "${cmake_cxx_compiler} is not GNU compiler"
  921. fi
  922. rm -f "${TMPFILE}.cxx"
  923. if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
  924. # Check for non-GNU compiler flags
  925. # If we are on IRIX, check for -LANG:std
  926. cmake_test_flags="-LANG:std"
  927. if [ "x${cmake_system}" = "xIRIX64" ]; then
  928. TMPFILE=`cmake_tmp_file`
  929. echo '
  930. #include <iostream>
  931. int main() { std::cout << "No need for '"${cmake_test_flags}"'" << std::endl; return 0;}
  932. ' > ${TMPFILE}.cxx
  933. cmake_need_lang_std=0
  934. if cmake_try_run "${cmake_cxx_compiler}" \
  935. "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  936. :
  937. else
  938. if cmake_try_run "${cmake_cxx_compiler}" \
  939. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  940. cmake_need_lang_std=1
  941. fi
  942. fi
  943. if [ "x${cmake_need_lang_std}" = "x1" ]; then
  944. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  945. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  946. else
  947. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  948. fi
  949. rm -f "${TMPFILE}.cxx"
  950. fi
  951. cmake_test_flags=
  952. # If we are on OSF, check for -timplicit_local -no_implicit_include
  953. cmake_test_flags="-timplicit_local -no_implicit_include"
  954. if [ "x${cmake_system}" = "xOSF1" ]; then
  955. TMPFILE=`cmake_tmp_file`
  956. echo '
  957. #include <iostream>
  958. int main() { std::cout << "We need '"${cmake_test_flags}"'" << std::endl; return 0;}
  959. ' > ${TMPFILE}.cxx
  960. cmake_need_flags=1
  961. if cmake_try_run "${cmake_cxx_compiler}" \
  962. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  963. :
  964. else
  965. cmake_need_flags=0
  966. fi
  967. if [ "x${cmake_need_flags}" = "x1" ]; then
  968. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  969. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  970. else
  971. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  972. fi
  973. rm -f "${TMPFILE}.cxx"
  974. fi
  975. cmake_test_flags=
  976. # If we are on OSF, check for -std strict_ansi -nopure_cname
  977. cmake_test_flags="-std strict_ansi -nopure_cname"
  978. if [ "x${cmake_system}" = "xOSF1" ]; then
  979. TMPFILE=`cmake_tmp_file`
  980. echo '
  981. #include <iostream>
  982. int main() { std::cout << "We need '"${cmake_test_flags}"'" << std::endl; return 0;}
  983. ' > ${TMPFILE}.cxx
  984. cmake_need_flags=1
  985. if cmake_try_run "${cmake_cxx_compiler}" \
  986. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  987. :
  988. else
  989. cmake_need_flags=0
  990. fi
  991. if [ "x${cmake_need_flags}" = "x1" ]; then
  992. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  993. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  994. else
  995. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  996. fi
  997. rm -f "${TMPFILE}.cxx"
  998. fi
  999. cmake_test_flags=
  1000. # If we are on HP-UX, check for -Ae for the C compiler.
  1001. if [ "x${cmake_system}" = "xHP-UX" ]; then
  1002. cmake_test_flags="-Ae"
  1003. TMPFILE=`cmake_tmp_file`
  1004. echo '
  1005. int main(int argc, char** argv) { (void)argc; (void)argv; return 0; }
  1006. ' > ${TMPFILE}.c
  1007. cmake_need_Ae=0
  1008. if cmake_try_run "${cmake_c_compiler}" "${cmake_c_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
  1009. :
  1010. else
  1011. if cmake_try_run "${cmake_c_compiler}" \
  1012. "${cmake_c_flags} ${cmake_test_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
  1013. cmake_need_Ae=1
  1014. fi
  1015. fi
  1016. if [ "x${cmake_need_Ae}" = "x1" ]; then
  1017. cmake_c_flags="${cmake_c_flags} ${cmake_test_flags}"
  1018. echo "${cmake_c_compiler} needs ${cmake_test_flags}"
  1019. else
  1020. echo "${cmake_c_compiler} does not need ${cmake_test_flags}"
  1021. fi
  1022. rm -f "${TMPFILE}.c"
  1023. echo '
  1024. #include <iostream>
  1025. int main(int argc, char** argv) {
  1026. for(int i=0; i < 1; ++i);
  1027. for(int i=0; i < 1; ++i);
  1028. (void)argc; (void)argv; return 0; }
  1029. ' > ${TMPFILE}.cxx
  1030. cmake_need_AAstd98=0
  1031. cmake_test_flags="-AA +hpxstd98"
  1032. if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  1033. :
  1034. else
  1035. if cmake_try_run "${cmake_cxx_compiler}" \
  1036. "${cmake_cxx_flags} ${cmake_test_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  1037. cmake_need_AAstd98=1
  1038. fi
  1039. fi
  1040. if [ "x${cmake_need_AAstd98}" = "x1" ]; then
  1041. cmake_cxx_flags="${cmake_cxx_flags} ${cmake_test_flags}"
  1042. echo "${cmake_cxx_compiler} needs ${cmake_test_flags}"
  1043. else
  1044. echo "${cmake_cxx_compiler} does not need ${cmake_test_flags}"
  1045. fi
  1046. fi
  1047. cmake_test_flags=
  1048. fi
  1049. if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
  1050. # Are we SolarisStudio?
  1051. TMPFILE=`cmake_tmp_file`
  1052. echo '
  1053. #if defined(__SUNPRO_CC)
  1054. #include <iostream>
  1055. int main() { std::cout << "This is SolarisStudio" << std::endl; return 0;}
  1056. #endif
  1057. ' > ${TMPFILE}.cxx
  1058. cmake_cxx_compiler_is_solarisstudio=0
  1059. if cmake_try_run "${cmake_cxx_compiler}" \
  1060. "${cmake_cxx_flags} " "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
  1061. cmake_cxx_compiler_is_solarisstudio=1
  1062. fi
  1063. if [ "x${cmake_cxx_compiler_is_solarisstudio}" = "x1" ]; then
  1064. echo "${cmake_cxx_compiler} is SolarisStudio compiler"
  1065. else
  1066. echo "${cmake_cxx_compiler} is not SolarisStudio compiler"
  1067. fi
  1068. rm -f "${TMPFILE}.cxx"
  1069. if [ "x${cmake_cxx_compiler_is_solarisstudio}" = "x1" ]; then
  1070. cmake_cxx_flags="${cmake_cxx_flags} -library=stlport4"
  1071. fi
  1072. fi
  1073. # Test for kwsys features
  1074. KWSYS_NAME_IS_KWSYS=0
  1075. KWSYS_BUILD_SHARED=0
  1076. KWSYS_LFS_AVAILABLE=0
  1077. KWSYS_LFS_REQUESTED=0
  1078. KWSYS_STL_HAS_WSTRING=0
  1079. KWSYS_CXX_HAS_SETENV=0
  1080. KWSYS_CXX_HAS_UNSETENV=0
  1081. KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=0
  1082. KWSYS_CXX_HAS_UTIMENSAT=0
  1083. KWSYS_CXX_HAS_UTIMES=0
  1084. if cmake_try_run "${cmake_cxx_compiler}" \
  1085. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_SETENV" \
  1086. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  1087. KWSYS_CXX_HAS_SETENV=1
  1088. echo "${cmake_cxx_compiler} has setenv"
  1089. else
  1090. echo "${cmake_cxx_compiler} does not have setenv"
  1091. fi
  1092. if cmake_try_run "${cmake_cxx_compiler}" \
  1093. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_UNSETENV" \
  1094. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  1095. KWSYS_CXX_HAS_UNSETENV=1
  1096. echo "${cmake_cxx_compiler} has unsetenv"
  1097. else
  1098. echo "${cmake_cxx_compiler} does not have unsetenv"
  1099. fi
  1100. if cmake_try_run "${cmake_cxx_compiler}" \
  1101. "${cmake_cxx_flags} -DTEST_KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H" \
  1102. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  1103. KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=1
  1104. echo "${cmake_cxx_compiler} has environ in stdlib.h"
  1105. else
  1106. echo "${cmake_cxx_compiler} does not have environ in stdlib.h"
  1107. fi
  1108. if cmake_try_run "${cmake_cxx_compiler}" \
  1109. "${cmake_cxx_flags} -DTEST_KWSYS_STL_HAS_WSTRING" \
  1110. "${cmake_source_dir}/Source/kwsys/kwsysPlatformTestsCXX.cxx" >> cmake_bootstrap.log 2>&1; then
  1111. KWSYS_STL_HAS_WSTRING=1
  1112. echo "${cmake_cxx_compiler} has stl wstring"
  1113. else
  1114. echo "${cmake_cxx_compiler} does not have stl wstring"
  1115. fi
  1116. # Just to be safe, let us store compiler and flags to the header file
  1117. cmake_bootstrap_version='$Revision$'
  1118. cmake_compiler_settings_comment="/*
  1119. * Generated by ${cmake_source_dir}/bootstrap
  1120. * Version: ${cmake_bootstrap_version}
  1121. *
  1122. * Source directory: ${cmake_source_dir}
  1123. * Binary directory: ${cmake_bootstrap_dir}
  1124. *
  1125. * C compiler: ${cmake_c_compiler}
  1126. * C flags: ${cmake_c_flags}
  1127. *
  1128. * C++ compiler: ${cmake_cxx_compiler}
  1129. * C++ flags: ${cmake_cxx_flags}
  1130. *
  1131. * Make: ${cmake_make_processor}
  1132. *
  1133. * Sources:
  1134. * ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES}
  1135. * kwSys Sources:
  1136. * ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES}
  1137. */
  1138. "
  1139. cmake_report cmConfigure.h${_tmp} "${cmake_compiler_settings_comment}"
  1140. # When bootstrapping on MinGW with MSYS we must convert the source
  1141. # directory to a windows path.
  1142. if ${cmake_system_mingw}; then
  1143. CMAKE_BOOTSTRAP_SOURCE_DIR=`cd "${cmake_source_dir}"; pwd -W`
  1144. CMAKE_BOOTSTRAP_BINARY_DIR=`cd "${cmake_binary_dir}"; pwd -W`
  1145. else
  1146. CMAKE_BOOTSTRAP_SOURCE_DIR="${cmake_source_dir}"
  1147. CMAKE_BOOTSTRAP_BINARY_DIR="${cmake_binary_dir}"
  1148. fi
  1149. # Write CMake version
  1150. cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_MAJOR ${cmake_version_major}"
  1151. cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_MINOR ${cmake_version_minor}"
  1152. cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_PATCH ${cmake_version_patch}"
  1153. cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION \"${cmake_version}\""
  1154. cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_SOURCE_DIR \"${CMAKE_BOOTSTRAP_SOURCE_DIR}\""
  1155. cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_BINARY_DIR \"${CMAKE_BOOTSTRAP_BINARY_DIR}\""
  1156. cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\""
  1157. cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP"
  1158. # Regenerate configured headers
  1159. for h in Configure VersionConfig; do
  1160. if "${_diff}" cm${h}.h cm${h}.h${_tmp} > /dev/null 2> /dev/null; then
  1161. rm -f cm${h}.h${_tmp}
  1162. else
  1163. mv -f cm${h}.h${_tmp} cm${h}.h
  1164. fi
  1165. done
  1166. # Prepare KWSYS
  1167. cmake_kwsys_config_replace_string \
  1168. "${cmake_source_dir}/Source/kwsys/Configure.hxx.in" \
  1169. "${cmake_bootstrap_dir}/cmsys/Configure.hxx" \
  1170. "${cmake_compiler_settings_comment}"
  1171. cmake_kwsys_config_replace_string \
  1172. "${cmake_source_dir}/Source/kwsys/Configure.h.in" \
  1173. "${cmake_bootstrap_dir}/cmsys/Configure.h" \
  1174. "${cmake_compiler_settings_comment}"
  1175. for a in ${KWSYS_FILES}; do
  1176. cmake_replace_string "${cmake_source_dir}/Source/kwsys/${a}.in" \
  1177. "${cmake_bootstrap_dir}/cmsys/${a}" KWSYS_NAMESPACE cmsys
  1178. done
  1179. cmake_generate_file "${cmake_bootstrap_dir}/cmThirdParty.h" ""
  1180. # Generate Makefile
  1181. dep="cmConfigure.h cmsys/*.hxx cmsys/*.h `cmake_escape \"${cmake_source_dir}\"`/Source/*.h"
  1182. objs=""
  1183. for a in ${CMAKE_CXX_SOURCES} ${CMAKE_C_SOURCES} ${KWSYS_CXX_SOURCES} ${KWSYS_C_SOURCES}; do
  1184. objs="${objs} ${a}.o"
  1185. done
  1186. # Generate dependencies for cmBootstrapCommands1.cxx
  1187. for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands1.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do
  1188. cmBootstrapCommands1Deps="${cmBootstrapCommands1Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`"
  1189. done
  1190. cmBootstrapCommands1Deps=`echo $cmBootstrapCommands1Deps`
  1191. for file in `grep "#include.*cm[^.]*.cxx" "${cmake_source_dir}/Source/cmBootstrapCommands2.cxx" | sed "s/.* \"\(.*\)\"/\1/"`; do
  1192. cmBootstrapCommands2Deps="${cmBootstrapCommands2Deps} `cmake_escape "${cmake_source_dir}/Source/$file"`"
  1193. done
  1194. cmBootstrapCommands2Deps=`echo $cmBootstrapCommands2Deps`
  1195. if [ "x${cmake_ansi_cxx_flags}" != "x" ]; then
  1196. cmake_cxx_flags="${cmake_ansi_cxx_flags} ${cmake_cxx_flags}"
  1197. fi
  1198. if [ "x${cmake_c_flags}" != "x" ]; then
  1199. cmake_c_flags="${cmake_c_flags} "
  1200. fi
  1201. if [ "x${cmake_cxx_flags}" != "x" ]; then
  1202. cmake_cxx_flags="${cmake_cxx_flags} "
  1203. fi
  1204. cmake_c_flags_String="-DKWSYS_STRING_C"
  1205. if ${cmake_system_mingw}; then
  1206. cmake_c_flags_EncodingC="-DKWSYS_ENCODING_DEFAULT_CODEPAGE=CP_ACP"
  1207. fi
  1208. cmake_cxx_flags_SystemTools="
  1209. -DKWSYS_CXX_HAS_SETENV=${KWSYS_CXX_HAS_SETENV}
  1210. -DKWSYS_CXX_HAS_UNSETENV=${KWSYS_CXX_HAS_UNSETENV}
  1211. -DKWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=${KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H}
  1212. -DKWSYS_CXX_HAS_UTIMENSAT=${KWSYS_CXX_HAS_UTIMENSAT}
  1213. -DKWSYS_CXX_HAS_UTIMES=${KWSYS_CXX_HAS_UTIMES}
  1214. "
  1215. cmake_c_flags="${cmake_c_flags}-I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \
  1216. -I`cmake_escape \"${cmake_source_dir}/Utilities\"`"
  1217. cmake_cxx_flags="${cmake_cxx_flags} -I`cmake_escape \"${cmake_bootstrap_dir}\"` -I`cmake_escape \"${cmake_source_dir}/Source\"` \
  1218. -I`cmake_escape \"${cmake_source_dir}/Utilities\"`"
  1219. echo "cmake: ${objs}" > "${cmake_bootstrap_dir}/Makefile"
  1220. echo " ${cmake_cxx_compiler} ${cmake_ld_flags} ${cmake_cxx_flags} ${objs} -o cmake" >> "${cmake_bootstrap_dir}/Makefile"
  1221. for a in ${CMAKE_CXX_SOURCES}; do
  1222. src=`cmake_escape "${cmake_source_dir}/Source/${a}.cxx"`
  1223. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1224. echo " ${cmake_cxx_compiler} ${cmake_cxx_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1225. done
  1226. echo "cmBootstrapCommands1.o : $cmBootstrapCommands1Deps" >> "${cmake_bootstrap_dir}/Makefile"
  1227. echo "cmBootstrapCommands2.o : $cmBootstrapCommands2Deps" >> "${cmake_bootstrap_dir}/Makefile"
  1228. for a in ${CMAKE_C_SOURCES}; do
  1229. src=`cmake_escape "${cmake_source_dir}/Source/${a}.c"`
  1230. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1231. echo " ${cmake_c_compiler} ${cmake_c_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1232. done
  1233. for a in ${KWSYS_C_SOURCES}; do
  1234. src=`cmake_escape "${cmake_source_dir}/Source/kwsys/${a}.c"`
  1235. src_flags=`eval echo \\${cmake_c_flags_\${a}}`
  1236. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1237. echo " ${cmake_c_compiler} ${cmake_c_flags} -DKWSYS_NAMESPACE=cmsys ${src_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1238. done
  1239. for a in ${KWSYS_CXX_SOURCES}; do
  1240. src=`cmake_escape "${cmake_source_dir}/Source/kwsys/${a}.cxx"`
  1241. src_flags=`eval echo \\${cmake_cxx_flags_\${a}}`
  1242. echo "${a}.o : ${src} ${dep}" >> "${cmake_bootstrap_dir}/Makefile"
  1243. echo " ${cmake_cxx_compiler} ${cmake_cxx_flags} -DKWSYS_NAMESPACE=cmsys ${src_flags} -c ${src} -o ${a}.o" >> "${cmake_bootstrap_dir}/Makefile"
  1244. done
  1245. echo '
  1246. rebuild_cache:
  1247. cd "${cmake_binary_dir}" && "${cmake_source_dir}/bootstrap"
  1248. ' >> "${cmake_bootstrap_dir}/Makefile"
  1249. # Write our default settings to Bootstrap${_cmk}/InitialCacheFlags.cmake.
  1250. echo '
  1251. # Generated by '"${cmake_source_dir}"'/bootstrap
  1252. # Default cmake settings. These may be overridden any settings below.
  1253. set (CMAKE_INSTALL_PREFIX "'"${cmake_prefix_dir}"'" CACHE PATH "Install path prefix, prepended onto install directories." FORCE)
  1254. set (CMAKE_DOC_DIR "'"${cmake_doc_dir}"'" CACHE PATH "Install location for documentation (relative to prefix)." FORCE)
  1255. set (CMAKE_MAN_DIR "'"${cmake_man_dir}"'" CACHE PATH "Install location for man pages (relative to prefix)." FORCE)
  1256. set (CMAKE_DATA_DIR "'"${cmake_data_dir}"'" CACHE PATH "Install location for data (relative to prefix)." FORCE)
  1257. set (CMAKE_XDGDATA_DIR "'"${cmake_xdgdata_dir}"'" CACHE PATH "Install location for XDG specific files (relative to prefix)." FORCE)
  1258. ' > "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1259. # Add configuration settings given as command-line options.
  1260. if [ "x${cmake_bootstrap_qt_gui}" != "x" ]; then
  1261. echo '
  1262. set (BUILD_QtDialog '"${cmake_bootstrap_qt_gui}"' CACHE BOOL "Build Qt dialog for CMake" FORCE)
  1263. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1264. fi
  1265. if [ "x${cmake_bootstrap_qt_qmake}" != "x" ]; then
  1266. echo '
  1267. set (QT_QMAKE_EXECUTABLE "'"${cmake_bootstrap_qt_qmake}"'" CACHE FILEPATH "Location of Qt qmake" FORCE)
  1268. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1269. fi
  1270. if [ "x${cmake_sphinx_man}" != "x" ]; then
  1271. echo '
  1272. set (SPHINX_MAN "'"${cmake_sphinx_man}"'" CACHE BOOL "Build man pages with Sphinx" FORCE)
  1273. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1274. fi
  1275. if [ "x${cmake_sphinx_html}" != "x" ]; then
  1276. echo '
  1277. set (SPHINX_HTML "'"${cmake_sphinx_html}"'" CACHE BOOL "Build html help with Sphinx" FORCE)
  1278. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1279. fi
  1280. if [ "x${cmake_sphinx_qthelp}" != "x" ]; then
  1281. echo '
  1282. set (SPHINX_QTHELP "'"${cmake_sphinx_qthelp}"'" CACHE BOOL "Build qch help with Sphinx" FORCE)
  1283. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1284. fi
  1285. if [ "x${cmake_sphinx_build}" != "x" ]; then
  1286. echo '
  1287. set (SPHINX_EXECUTABLE "'"${cmake_sphinx_build}"'" CACHE FILEPATH "Location of Qt sphinx-build" FORCE)
  1288. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1289. fi
  1290. if [ "x${cmake_sphinx_flags}" != "x" ]; then
  1291. echo '
  1292. set (SPHINX_FLAGS [==['"${cmake_sphinx_flags}"']==] CACHE STRING "Flags to pass to sphinx-build" FORCE)
  1293. ' >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1294. fi
  1295. # Add user-specified settings. Handle relative-path case for
  1296. # specification of cmake_init_file.
  1297. (
  1298. cd "${cmake_binary_dir}"
  1299. if [ -f "${cmake_init_file}" ]; then
  1300. cat "${cmake_init_file}" >> "${cmake_bootstrap_dir}/InitialCacheFlags.cmake"
  1301. fi
  1302. )
  1303. echo "---------------------------------------------"
  1304. # Run make to build bootstrap cmake
  1305. if [ "x${cmake_parallel_make}" != "x" ]; then
  1306. ${cmake_make_processor} ${cmake_make_flags}
  1307. else
  1308. ${cmake_make_processor}
  1309. fi
  1310. RES=$?
  1311. if [ "${RES}" -ne "0" ]; then
  1312. cmake_error 9 "Problem while running ${cmake_make_processor}"
  1313. fi
  1314. cd "${cmake_binary_dir}"
  1315. # Set C, CXX, and MAKE environment variables, so that real real cmake will be
  1316. # build with same compiler and make
  1317. CC="${cmake_c_compiler}"
  1318. CXX="${cmake_cxx_compiler}"
  1319. if [ -n "${cmake_ccache_enabled}" ]; then
  1320. CC="ccache ${CC}"
  1321. CXX="ccache ${CXX}"
  1322. fi
  1323. MAKE="${cmake_make_processor}"
  1324. export CC
  1325. export CXX
  1326. export MAKE
  1327. # Run bootstrap CMake to configure real CMake
  1328. cmake_options="-DCMAKE_BOOTSTRAP=1"
  1329. if [ -n "${cmake_verbose}" ]; then
  1330. cmake_options="${cmake_options} -DCMAKE_VERBOSE_MAKEFILE=1"
  1331. fi
  1332. "${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_options} ${cmake_bootstrap_system_libs} "$@"
  1333. RES=$?
  1334. if [ "${RES}" -ne "0" ]; then
  1335. cmake_error 11 "Problem while running initial CMake"
  1336. fi
  1337. echo "---------------------------------------------"
  1338. # And we are done. Now just run make
  1339. echo "CMake has bootstrapped. Now run ${cmake_make_processor}."