OLD | NEW |
1 # -*-autoconf-*- | 1 # -*-autoconf-*- |
2 AC_COPYRIGHT([ Copyright (c) 1999-2013, International Business Machines Corporat
ion and others. All Rights Reserved. ]) | 2 AC_COPYRIGHT([ Copyright (c) 1999-2014, International Business Machines Corporat
ion and others. All Rights Reserved. ]) |
3 # configure.in for ICU | 3 # configure.in for ICU |
4 # Stephen F. Booth, heavily modified by Yves and others | 4 # Stephen F. Booth, heavily modified by Yves and others |
5 | 5 |
6 # Check for autoconf version | 6 # Check for autoconf version |
7 AC_PREREQ(2.68) | 7 AC_PREREQ(2.68) |
8 | 8 |
9 # Process this file with autoconf to produce a configure script | 9 # Process this file with autoconf to produce a configure script |
10 AC_INIT([ICU]) | 10 AC_INIT([ICU], |
| 11 m4_esyscmd_s([sed -n 's/^[ » ]*#[ » ]*define[ » ]*U_ICU_VERSION[
» ]*"\([^"]*\)".*/\1/p' "./common/unicode/uvernum.h]"), |
| 12 [http://icu-project.org/bugs], |
| 13 [International Components for Unicode], |
| 14 [http://icu-project.org]) |
11 | 15 |
12 #TODO: IcuBug:8502 | 16 AC_CONFIG_MACRO_DIR([config/m4]) |
13 #AC_INIT([ICU], | |
14 # m4_esyscmd_s([sed -n 's/^[ » ]*#[ » ]*define[ » ]*U_ICU_VERSION[
» ]*"\([^"]*\)".*/\1/p' "./common/unicode/uvernum.h]"), | |
15 # [http://icu-project.org/bugs], | |
16 # [International Components for Unicode], | |
17 # [http://icu-project.org]) | |
18 | |
19 AC_CONFIG_SRCDIR([common/unicode/utypes.h]) | 17 AC_CONFIG_SRCDIR([common/unicode/utypes.h]) |
20 | 18 |
21 PACKAGE="icu" | 19 PACKAGE="icu" |
22 AC_SUBST(PACKAGE) | 20 AC_SUBST(PACKAGE) |
23 | 21 |
24 # Use custom echo test for newline option | 22 # Use custom echo test for newline option |
25 # Current autoconf (2.65) gives incorrect echo newline option | 23 # Current autoconf (2.65) gives incorrect echo newline option |
26 # for icu-config | 24 # for icu-config |
27 # This may be removed later - mow (June 17, 2010) | 25 # This may be removed later - mow (June 17, 2010) |
28 ICU_ECHO_C= ICU_ECHO_N= ICU_ECHO_T= | 26 ICU_ECHO_C= ICU_ECHO_N= ICU_ECHO_T= |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 # Don't use the default C/CXXFLags | 128 # Don't use the default C/CXXFLags |
131 : ${CFLAGS=""} | 129 : ${CFLAGS=""} |
132 : ${CXXFLAGS=""} | 130 : ${CXXFLAGS=""} |
133 | 131 |
134 # Checks for compilers | 132 # Checks for compilers |
135 AC_PROG_CC([clang gcc cc c99 c89 xlc_r xlc cl.exe icc]) | 133 AC_PROG_CC([clang gcc cc c99 c89 xlc_r xlc cl.exe icc]) |
136 # Make sure that we try clang++ first, which provides C++11 support. | 134 # Make sure that we try clang++ first, which provides C++11 support. |
137 # The g++ compiler is less likely to support C++11. | 135 # The g++ compiler is less likely to support C++11. |
138 AC_PROG_CXX([clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RC
C]) | 136 AC_PROG_CXX([clang++ g++ c++ gpp xlC_r xlC aCC CC cxx cc++ cl.exe icc FCC KCC RC
C]) |
139 | 137 |
| 138 # pkg-config is needed for harfbuzz support |
| 139 PKG_PROG_PKG_CONFIG([0.20]) |
| 140 PKG_CHECK_MODULES(ICULEHB, icu-le-hb, have_icu_le_hb=true, :) |
| 141 |
140 # Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it cor
rectly based on (enable/disable) debug or release option | 142 # Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it cor
rectly based on (enable/disable) debug or release option |
141 # The release mode use is the default one for autoconf | 143 # The release mode use is the default one for autoconf |
142 if test "$GCC" = yes; then | 144 if test "$GCC" = yes; then |
143 if test "$CFLAGS" = ""; then | 145 if test "$CFLAGS" = ""; then |
144 if test "$ENABLE_DEBUG" = 1; then | 146 if test "$ENABLE_DEBUG" = 1; then |
145 CFLAGS=-g | 147 CFLAGS=-g |
146 fi | 148 fi |
147 if test "$ENABLE_RELEASE" = 1; then | 149 if test "$ENABLE_RELEASE" = 1; then |
148 CFLAGS="$CFLAGS -O2" | 150 CFLAGS="$CFLAGS -O2" |
149 fi | 151 fi |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 *) ;; | 325 *) ;; |
324 esac], | 326 esac], |
325 ) | 327 ) |
326 AC_MSG_RESULT($enabled) | 328 AC_MSG_RESULT($enabled) |
327 AC_SUBST(UCLN_NO_AUTO_CLEANUP) | 329 AC_SUBST(UCLN_NO_AUTO_CLEANUP) |
328 | 330 |
329 # MSVC floating-point option | 331 # MSVC floating-point option |
330 MSVC_RELEASE_FLAG="" | 332 MSVC_RELEASE_FLAG="" |
331 if test $enabled = yes | 333 if test $enabled = yes |
332 then | 334 then |
333 if test $icu_cv_host_frag = mh-cygwin-msvc | 335 if test $icu_cv_host_frag = mh-cygwin-msvc -o $icu_cv_host_frag = mh-msys-ms
vc |
334 then | 336 then |
335 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | 337 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
336 #if defined _MSC_VER && _MSC_VER >= 1400 | 338 #if defined _MSC_VER && _MSC_VER >= 1400 |
337 #else | 339 #else |
338 Microsoft Visual C++ < 2005 | 340 Microsoft Visual C++ < 2005 |
339 #endif | 341 #endif |
340 ]], [[]])],[MSVC_RELEASE_FLAG="/fp:precise"],[MSVC_RELEASE_FLAG="/Op"]) | 342 ]], [[]])],[MSVC_RELEASE_FLAG="/fp:precise"],[MSVC_RELEASE_FLAG="/Op"]) |
341 | 343 |
342 CFLAGS="${CFLAGS} ${MSVC_RELEASE_FLAG}" | 344 CFLAGS="${CFLAGS} ${MSVC_RELEASE_FLAG}" |
343 CXXFLAGS="${CXXFLAGS} ${MSVC_RELEASE_FLAG}" | 345 CXXFLAGS="${CXXFLAGS} ${MSVC_RELEASE_FLAG}" |
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 [case "${enableval}" in | 1058 [case "${enableval}" in |
1057 yes) icuio=true ;; | 1059 yes) icuio=true ;; |
1058 no) icuio=false ;; | 1060 no) icuio=false ;; |
1059 *) AC_MSG_ERROR(bad value ${enableval} for --enable-icuio) ;; | 1061 *) AC_MSG_ERROR(bad value ${enableval} for --enable-icuio) ;; |
1060 esac], | 1062 esac], |
1061 icuio=true) | 1063 icuio=true) |
1062 ICU_CONDITIONAL(ICUIO, test "$icuio" = true) | 1064 ICU_CONDITIONAL(ICUIO, test "$icuio" = true) |
1063 | 1065 |
1064 # Enable/disable layout | 1066 # Enable/disable layout |
1065 AC_ARG_ENABLE(layout, | 1067 AC_ARG_ENABLE(layout, |
1066 » [ --enable-layout build ICU's layout library [default=yes]], | 1068 » [ --enable-layout build ICU's DEPRECATED layout library [defaul
t=yes]], |
1067 [case "${enableval}" in | 1069 [case "${enableval}" in |
1068 yes) layout=true ;; | 1070 yes) layout=true ;; |
1069 no) layout=false ;; | 1071 no) layout=false ;; |
1070 *) AC_MSG_ERROR(bad value ${enableval} for --enable-layout) ;; | 1072 *) AC_MSG_ERROR(bad value ${enableval} for --enable-layout) ;; |
1071 esac], | 1073 esac], |
1072 layout=true) | 1074 layout=true) |
1073 ICU_CONDITIONAL(LAYOUT, test "$layout" = true) | 1075 ICU_CONDITIONAL(LAYOUT, test "$layout" = true) |
1074 | 1076 |
| 1077 # Enable/disable layoutex |
| 1078 AC_ARG_ENABLE(layoutex, |
| 1079 [ --enable-layoutex build ICU's Paragraph Layout library [defau
lt=same-as-layout]. |
| 1080 If not building with the ICU Layout library, then icu-le-hb must be
installed via pkg-config. |
| 1081 See http://harfbuzz.org], |
| 1082 [case "${enableval}" in |
| 1083 yes) layoutex=true ;; |
| 1084 no) layoutex=false ;; |
| 1085 *) AC_MSG_ERROR(bad value ${enableval} for --enable-layoutex) ;; |
| 1086 esac], |
| 1087 layoutex=$layout) |
| 1088 ICU_CONDITIONAL(LAYOUTEX, test "$layoutex" = true) |
| 1089 |
1075 # Enable/disable tools | 1090 # Enable/disable tools |
1076 AC_ARG_ENABLE(tools, | 1091 AC_ARG_ENABLE(tools, |
1077 [ --enable-tools build ICU's tools [default=yes]], | 1092 [ --enable-tools build ICU's tools [default=yes]], |
1078 [case "${enableval}" in | 1093 [case "${enableval}" in |
1079 yes) tools=true ;; | 1094 yes) tools=true ;; |
1080 no) tools=false ;; | 1095 no) tools=false ;; |
1081 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;; | 1096 *) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;; |
1082 esac], | 1097 esac], |
1083 tools=true) | 1098 tools=true) |
1084 ICU_CONDITIONAL(TOOLS, test "$tools" = true) | 1099 ICU_CONDITIONAL(TOOLS, test "$tools" = true) |
1085 | 1100 |
1086 AC_ARG_WITH(data-packaging, | 1101 AC_ARG_WITH(data-packaging, |
1087 » [ --with-data-packaging=type specify how to package ICU data (files, ar
chive, library, static, auto) [default=auto]], | 1102 » [ --with-data-packaging specify how to package ICU data. Possible v
alues: |
| 1103 files raw files (.res, etc) |
| 1104 archive build a single icudtXX.dat file |
| 1105 library shared library (.dll/.so/etc.) |
| 1106 static static library (.a/.lib/etc.) |
| 1107 auto build shared if possible (default) |
| 1108 See http://userguide.icu-project.org/icudata for more info.], |
1088 [case "${withval}" in | 1109 [case "${withval}" in |
1089 files|archive|library) datapackaging=$withval ;; | 1110 files|archive|library) datapackaging=$withval ;; |
1090 auto) datapackaging=$withval ;; | 1111 auto) datapackaging=$withval ;; |
1091 common) datapackaging=archive ;; | 1112 common) datapackaging=archive ;; |
1092 dll) datapackaging=library ;; | 1113 dll) datapackaging=library ;; |
1093 static) datapackaging=static ;; | 1114 static) datapackaging=static ;; |
1094 *) AC_MSG_ERROR(bad value ${withval} for --with-data-packaging)
;; | 1115 *) AC_MSG_ERROR(bad value ${withval} for --with-data-packaging)
;; |
1095 esac], | 1116 esac], |
1096 [datapackaging=]) | 1117 [datapackaging=]) |
1097 | 1118 |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 test/testdata/Makefile \ | 1339 test/testdata/Makefile \ |
1319 test/testdata/pkgdataMakefile \ | 1340 test/testdata/pkgdataMakefile \ |
1320 test/hdrtst/Makefile \ | 1341 test/hdrtst/Makefile \ |
1321 test/intltest/Makefile \ | 1342 test/intltest/Makefile \ |
1322 test/cintltst/Makefile \ | 1343 test/cintltst/Makefile \ |
1323 test/iotest/Makefile \ | 1344 test/iotest/Makefile \ |
1324 test/letest/Makefile \ | 1345 test/letest/Makefile \ |
1325 test/perf/Makefile \ | 1346 test/perf/Makefile \ |
1326 test/perf/collationperf/Makefile \ | 1347 test/perf/collationperf/Makefile \ |
1327 test/perf/collperf/Makefile \ | 1348 test/perf/collperf/Makefile \ |
| 1349 test/perf/collperf2/Makefile \ |
1328 test/perf/dicttrieperf/Makefile \ | 1350 test/perf/dicttrieperf/Makefile \ |
1329 test/perf/ubrkperf/Makefile \ | 1351 test/perf/ubrkperf/Makefile \ |
1330 test/perf/charperf/Makefile \ | 1352 test/perf/charperf/Makefile \ |
1331 test/perf/convperf/Makefile \ | 1353 test/perf/convperf/Makefile \ |
1332 test/perf/normperf/Makefile \ | 1354 test/perf/normperf/Makefile \ |
1333 test/perf/DateFmtPerf/Makefile \ | 1355 test/perf/DateFmtPerf/Makefile \ |
1334 test/perf/howExpensiveIs/Makefile \ | 1356 test/perf/howExpensiveIs/Makefile \ |
1335 test/perf/strsrchperf/Makefile \ | 1357 test/perf/strsrchperf/Makefile \ |
1336 test/perf/unisetperf/Makefile \ | 1358 test/perf/unisetperf/Makefile \ |
1337 test/perf/usetperf/Makefile \ | 1359 test/perf/usetperf/Makefile \ |
1338 test/perf/ustrperf/Makefile \ | 1360 test/perf/ustrperf/Makefile \ |
1339 test/perf/utfperf/Makefile \ | 1361 test/perf/utfperf/Makefile \ |
1340 test/perf/utrie2perf/Makefile \ | 1362 test/perf/utrie2perf/Makefile \ |
1341 test/perf/leperf/Makefile \ | 1363 » » test/perf/leperf/Makefile \ |
1342 samples/Makefile samples/date/Makefile \ | 1364 samples/Makefile samples/date/Makefile \ |
1343 samples/cal/Makefile samples/layout/Makefile]) | 1365 samples/cal/Makefile samples/layout/Makefile]) |
1344 AC_OUTPUT | 1366 AC_OUTPUT |
1345 | 1367 |
1346 echo | 1368 echo |
1347 echo "ICU for C/C++ $VERSION is ready to be built." | 1369 echo "ICU for C/C++ $VERSION is ready to be built." |
1348 echo "=== Important Notes: ===" | 1370 echo "=== Important Notes: ===" |
1349 | 1371 |
1350 echo "Data Packaging: $datapackaging" | 1372 echo "Data Packaging: $datapackaging" |
1351 echo " This means: $datapackaging_msg" | 1373 echo " This means: $datapackaging_msg" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1416 echo "C++ apps may want to build with CXXFLAGS = ${UCONFIG_CXXFLAGS}" | 1438 echo "C++ apps may want to build with CXXFLAGS = ${UCONFIG_CXXFLAGS}" |
1417 fi | 1439 fi |
1418 | 1440 |
1419 if test "$tools" = false; | 1441 if test "$tools" = false; |
1420 then | 1442 then |
1421 echo "## Note: you have disabled ICU's tools. This ICU cannot build its
own data or tests." | 1443 echo "## Note: you have disabled ICU's tools. This ICU cannot build its
own data or tests." |
1422 echo "## Expect build failures in the 'data', 'test', and other director
ies." | 1444 echo "## Expect build failures in the 'data', 'test', and other director
ies." |
1423 fi | 1445 fi |
1424 | 1446 |
1425 $as_unset _CXX_CXXSUFFIX | 1447 $as_unset _CXX_CXXSUFFIX |
OLD | NEW |