📄 configure
字号:
#!/bin/shecho 'configuring kdtree ...'PREFIX=/usr/localOPT=yesDBG=yesFALLOC=yesPTHREAD=yesfor arg; do case "$arg" in --prefix=*) value=`echo $arg | sed 's/--prefix=//'` PREFIX=${value:-$prefix} ;; --enable-opt) OPT=yes;; --disable-opt) OPT=no;; --enable-debug) DBG=yes;; --disable-debug) DBG=no;; --enable-pthread) PTHREAD=yes;; --disable-pthread) PTHREAD=no;; --enable-fastalloc) FALLOC=yes;; --disable-fastalloc) FALLOC=no;; --help) echo 'usage: ./configure [options]' echo 'options:' echo ' --prefix=<path>: installation path (default: /usr/local)' echo ' --enable-fastalloc: enable fast result node allocator (default)' echo ' --disable-fastalloc: disable fast result node allocator' echo ' --enable-pthread: enable pthread support (default if fastalloc is enabled)' echo " --disable-pthread: disable pthread support (don't)" echo ' --enable-opt: enable speed optimizations (default)' echo ' --disable-opt: disable speed optimizations' echo ' --enable-debug: include debugging symbols (default)' echo ' --disable-debug: do not include debugging symbols' echo 'all invalid options are silently ignored' exit 0 ;; esacdoneecho "prefix: $PREFIX"echo "optimize for speed: $OPT"echo "include debugging symbols: $DBG"echo "fast node allocator: $FALLOC"if [ "$FALLOC" = "yes" ]; then echo "pthread support: $PTHREAD"fi# create makefileecho 'creating makefile ...'echo "PREFIX = $PREFIX" >Makefileif [ "$DBG" = 'yes' ]; then echo 'dbg = -g' >>Makefilefiif [ "$OPT" = 'yes' ]; then echo 'opt = -O3' >>Makefilefiif [ "$FALLOC" = 'yes' ]; then echo 'falloc = -DUSE_LIST_NODE_ALLOCATOR' >>Makefilefiif [ "$PTHREAD" = 'no' ]; then echo 'pthreads = -DNO_PTHREADS' >>Makefileelse echo 'ldpthread = -lpthread' >>Makefilefiif [ "`uname -s`" = Darwin ]; then echo 'shared = -dynamiclib' >>Makefile echo 'so_suffix = dylib' >>Makefileelse echo 'shared = -shared' >>Makefile echo 'so_suffix = so' >>Makefilefiif [ "`uname -s`" != MINGW32 ]; then echo 'pic = -fPIC' >>Makefileficat Makefile.in >>Makefileecho 'configuration completed, type make (or gmake) to build.'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -