configure

来自「larbin是一种开源的网络爬虫/网络蜘蛛」· 代码 · 共 61 行

TXT
61
字号
#!/bin/bash# configure adns(cd adns; ./configure)#configure larbin itselfcat /dev/null > config.hcat /dev/null > config.makeif [ -e /proc/self/status ]; then    echo "#define HAS_PROC_SELF_STATUS" >> config.hfi# find existing programsfunction exists () {    command -v $1 2> /dev/null > /dev/null;}if exists gmake; then    echo "MAKE=gmake" >> config.make    export MAKE=gmakeelse    echo "MAKE=make" >> config.make    export MAKE=makefiif exists gcc; then    echo "CC=gcc" >> config.make    export CC=gccfiif exists g++; then    echo "CXX=g++" >> config.makefi#find libraries to useecho "int main () { return 0; }" > test.cfunction testlib () {    if $CC $1 -o test test.c 2> /dev/null > /dev/null; then        echo "LIBS +=" $1 >> config.make    fi}testlib -pthreadtestlib -lpthreadtestlib -lresolvtestlib -lsockettestlib -lnslrm -f test test.c test.o# run make deptouch .dependtouch adns/.dependtouch src/.dependtouch src/fetch/.dependtouch src/interf/.dependtouch src/utils/.depend$MAKE dep

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?