3 # Time-stamp: <08/06/07 15:22:19 yeti>
5 base
=`cd \`dirname $0\
`; echo $PWD`
7 configmak
=$base/build
/Makefiles
/gmake
/config.mak
10 target
=`echo $1 | sed -e 's/^[^=]*=//'`
11 echo $2 := $3$target >> ${configmak}
15 target
=`echo $1 | sed -e 's/^[^=]*=//'`
16 echo $2 ?
= $target >> ${configmak}
21 Configuration utility.
29 --prefix=<dir> base install path (/usr/local/)
30 --bindir=<dir> install path for executables (PREFIX/bin)
31 --libdir=<dir> install path for libraries (PREFIX/lib)
32 --includedir=<dir> install path for headers (PREFIX/include)
34 --target=<target> target platform (cross-compiling)
36 --help print this help message and exit
38 --with-stlport=<dir> use STLport in catalog <dir>
39 --without-stlport compile without STLport
40 --with-boost=<dir> use boost headers in catalog <dir>
41 --with-system-boost use boost installed on this system
42 --with-msvc=<dir> use MS VC from this catalog
43 --with-mssdk=<dir> use MS SDK from this catalog
44 --with-extra-cxxflags=<options>
45 pass extra options to C++ compiler
46 --with-extra-cflags=<options>
47 pass extra options to C compiler
48 --with-extra-ldflags=<options>
49 pass extra options to linker (via C/C++)
50 --use-static-gcc use static gcc libs instead of shared libgcc_s (useful for gcc compiler,
51 that was builded with --enable-shared [default]; if compiler was builded
52 with --disable-shared, static libraries will be used in any case)
53 --clean remove custom settings (file ${configmak})
54 and use default values
55 --with-cxx=<name> use <name> as C++ compiler (use --target= for cross-compilation)
56 --with-cc=<name> use <name> as C compiler (use --target= for cross-compilation)
57 --use-compiler-family=<name> use compiler family; one of:
58 gcc GNU compilers (default)
60 aCC HP's aCC compilers
61 CC SunPro's CC compilers
62 bcc Borland's compilers
63 --without-debug don't build debug variant
64 --without-stldebug don't build STLport's STLP_DEBUG mode
65 --enable-static build static
66 --disable-shared don't build shared
67 --with-lib-motif=<motif>
68 Use this option to customize the generated library name.
69 The motif will be used in the last place before version information,
70 separated by an underscore, ex:
71 stlportd_MOTIF.5.0.lib
72 stlportstld_static_MOTIF.5.1.lib
73 --without-thread Per default STLport libraries are built in order to be usable
74 in a multithreaded context. If you don't need this you can ask
75 for a not thread safe version with this option.
76 --without-rtti Disable RTTI when building libraries.
79 Enables usage of static (libc.lib family) or dynamic (msvcrt.lib family)
80 C/C++ runtime library when linking with STLport. If you want your appli/dll
81 to link statically with STLport but using the dynamic C runtime use
82 --with-dynamic-rtl; if you want to link dynamicaly with STLport but using the
83 static C runtime use --with-static-rtl. See README.options for details.
84 Don't forget to signal the link method when building your appli or dll, in
85 stlport/stl/config/host.h set the following macro depending on the configure
87 --with-static-rtl -> _STLP_USE_DYNAMIC_LIB"
88 --with-dynamic-rtl -> _STLP_USE_STATIC_LIB"
89 --windows-platform=<name>
90 Targetted OS when building for Windows; one of:
93 winxp Windows XP and later (default)
95 Environment variables:
97 \$CXX C++ compiler name (use --target= for cross-compilation)
98 \$CC C compiler name (use --target= for cross-compilation)
99 \$CXXFLAGS pass extra options to C++ compiler
100 \$CFLAGS pass extra options to C compiler
101 \$LDFLAGS pass extra options to linker (via C/C++)
103 Options has preference over environment variables.
108 default_settings
() {
109 # if [ "$boost_set" = "" ]; then
110 # write_option "${PWD}/external/boost" BOOST_DIR
113 # if [ -z "${stlport_set}" ]; then
114 # write_over_option "$base" STLPORT_DIR
117 # Set in Makefiles/gmake/top.mak
118 if [ -z "${compiler_family_set}" ]; then
119 # write_option gcc COMPILER_NAME
120 echo include gcc.mak
> ${base}/build
/lib
/Makefile
121 echo include gcc.mak
> ${base}/build
/test
/unit
/Makefile
122 echo include gcc.mak
> ${base}/build
/test
/eh
/Makefile
125 # Set in Makefiles/gmake/targetdirs.mak
126 # if [ -z "${prefix_set}" ]; then
127 # write_option "/usr/local" BASE_INSTALL_DIR '${DESTDIR}'
131 [ $# -eq 0 ] && { >${configmak}; default_settings
; exit 0; }
159 write_option
"$option" TARGET_OS
163 write_option
"$option" STLPORT_DIR
167 write_option
1 WITHOUT_STLPORT
171 write_option
"$option" BOOST_DIR
174 write_option
1 USE_SYSTEM_BOOST
177 write_option
"$option" MSVC_DIR
180 write_option
"$option" MSSDK_DIR
182 --with-extra-cxxflags=*)
183 write_option
"$option" EXTRA_CXXFLAGS
186 --with-extra-cflags=*)
187 write_option
"$option" EXTRA_CFLAGS
190 --with-extra-ldflags=*)
191 write_option
"$option" EXTRA_LDFLAGS
195 echo "Using $option in generated library names"
196 write_option
"$option" LIB_MOTIF
199 write_option
1 WITHOUT_THREAD
202 write_option
1 WITHOUT_RTTI
205 write_option
1 WITH_DYNAMIC_RTL
208 write_option
1 WITH_STATIC_RTL
211 write_option
1 USE_STATIC_LIBGCC
214 write_option
1 _NO_DBG_BUILD
217 write_option
1 _NO_STLDBG_BUILD
220 write_option
1 _STATIC_BUILD
223 write_option
1 _NO_SHARED_BUILD
226 write_option
"$option" _FORCE_CXX
230 write_option
"$option" _FORCE_CC
233 --use-compiler-family=*)
234 case `echo $option | sed -e 's/^[^=]*=//'` in
235 gcc|icc|aCC|CC|bcc|dmc
)
236 target
=`echo $option | sed -e 's/^[^=]*=//'`
237 echo COMPILER_NAME
:= $target >> ${configmak}
238 echo include
$target.mak
> ${base}/build
/lib
/Makefile
239 echo include
$target.mak
> ${base}/build
/test
/unit
/Makefile
240 echo include
$target.mak
> ${base}/build
/test
/eh
/Makefile
243 echo "Not supported compilers family"
247 compiler_family_set
=y
250 write_option
"$option" BASE_INSTALL_DIR
'${DESTDIR}'
254 write_option
"$option" INSTALL_BIN_DIR
'${DESTDIR}'
257 write_option
"$option" INSTALL_LIB_DIR
'${DESTDIR}'
260 write_option
"$option" INSTALL_HDR_DIR
'${DESTDIR}'
262 --windows-platform=*)
263 case `echo $option | sed -e 's/^[^=]*=//'` in
265 write_option
0x0400 WINVER
268 write_option
0x0410 WINVER
271 write_option
0x0501 WINVER
274 echo "Not supported windows platform"
280 echo "Unknown configuration option '$option'"
286 if [ -n "${CXX}" ]; then
287 if [ -n "${cxx_set}" ]; then
288 echo "Both --with-cxx and \$CXX set, using the first"
289 elif [ -z "${target_set}" ]; then
290 write_option
"${CXX}" _FORCE_CXX
292 echo "For cross-compilation with gcc use --target option only"
294 if [ -z "${CC}" -a -z "${cc_set}" ]; then
295 echo "\$CXX set, but I don't see \$CC!"
299 if [ -n "${CC}" ]; then
300 if [ -n "${cxx_set}" ]; then
301 echo "Both --with-cc and \$CC set, using the first"
303 write_option
"${CC}" _FORCE_CC
307 if [ -n "${CXXFLAGS}" ]; then
308 if [ -z "${cxxflags_set}" ]; then
309 write_option
"${CXXFLAGS}" EXTRA_CXXFLAGS
311 echo "Both --with-extra-cxxflags and \$CXXFLAGS set, using the first"
315 if [ -n "${CFLAGS}" ]; then
316 if [ -z "${cflags_set}" ]; then
317 write_option
"${CFLAGS}" EXTRA_CFLAGS
319 echo "Both --with-extra-cflags and \$CFLAGS set, using the first"
323 if [ -n "${LDFLAGS}" ]; then
324 if [ -z "${ldflags_set}" ]; then
325 write_option
"${LDFLAGS}" EXTRA_LDFLAGS
327 echo "Both --with-extra-ldflags and \$LDFLAGS set, using the first"