⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure

📁 一个跨平台的CA系统 实现了数字证书的制作、SSL安全通讯、加解密操作等功能
💻
字号:
#!/bin/sh -e###################################################### this configure-script searches for the needed includes# and libraries.## it is MUCH faster, smaller and does what I want. :-)## If you have openssl or the Berkeley db installed in # an unusual directory like /home/me/install/ssl# just give it as argument to ./configure# it then searches for headers in /home/me/install/ssl/include# and librarys in /home/me/install/ssl/lib## if you have a very unusual setup or you are cross-compiling# you can edit "Local.mak" to fit your needs and to reflect your setup# # The Makefiles should support parallel builds.########################################################DIRS=""for dir in $@; do  DIRS="$DIRS `cd $dir; pwd`"doneDIRS="$QTDIR $DIRS /usr /usr/X11R6 /usr/local"CF="-I. -I.."LIBS=-lstdc++LDIRS=MOC=mocUIC=uicerr() {  echo  echo ERROR: $1  echo   err_occ=Y}#adds an includedir to $CFadd_include() {  for _dir in -I/usr/include ${CF}; do    if test "-I$1" = "${_dir}"; then      return 0    fi  done   CF="${CF} -I$1"}add_lib() {  LIBS="$LIBS -l$2"  for _libs in -L/usr/lib ${LDIRS}; do    if test "-L$1" = "${_libs}"; then      return 0    fi  done  LDIRS="${LDIRS} -L$1"}# check for includessearch_includes() {  for dir in ${DIRS};  do    for dbn in "" ${subdirs}; do      if test -r ${dir}/include${dbn}/$1; then          add_include ${dir}/include${dbn}          echo Found:  $1 at ${dir}/include${dbn}          return 0      fi    done  done  return 1}# check for libssearch_lib() {  for dir in ${DIRS};  do    for dbn in $@; do      for suffix in so dylib obj; do        if test -r ${dir}/lib/lib${dbn}.${suffix}; then          add_lib ${dir}/lib ${dbn};	  echo Found: lib${dbn}.${suffix} at ${dir}/lib          return 0	fi      done    done  done  return 1} ######################## DBsubdirs="/db /db4 /db3"search_includes db_cxx.h || err "The Berkeley DB header files were not found"search_lib db_cxx db4_cxx db_cxx-4 db3_cxx db_cxx-3 || err "The Berkeley DB library was not found. Try installing db-dev" ## The fun of NPTL... (Thx Enrico Scholz)echo 'int main() {}' >conftest.cif g++ $LIBS $LDIRS $CF $CFLAGS conftest.c -o conftest &>conftest.log; then  :else  search_lib pthread || err "Lib pthread needed for db_cxx and not found"fi######################### QTsubdirs="/qt"search_includes qobject.h || err "The QT Library headerfiles were not found. Set QTDIR appropriately."search_lib qt qt-mt || err "The QT library was not found. Try installing qt-dev" search_lib c_r || true# look if it compiles...if g++ $LIBS $LDIRS $CF $CFLAGS conftest.c -o conftest &>conftest.log; then  :else  search_lib c_r || err "Libc_r needed for FreeBSD systems and was not found"fi###################### OpenSSLsubdirs=""search_includes openssl/opensslv.h || err "The OpenSSL library headerfiles were not found."search_lib crypto || err "The OpenSSL library was not found."export LD_LIBRARY_PATH##### Try to compile them all together and show the versions.cat >conftest.c <<EOF#include <openssl/opensslv.h>#include <db_cxx.h>#include <qglobal.h>main(){printf("\nThe Versions of the used libraries are:\n\t%s\n\t%s\n\tQT: %s\n",	 OPENSSL_VERSION_TEXT, DB_VERSION_STRING, QT_VERSION_STR );}EOFif g++ $LIBS $LDIRS $CF $CFLAGS conftest.c -o conftest &>conftest.log ; then  ./conftest ||err "Unable to execute a freshly compiled application, maybe you have to adjust your LD_LIBRARY_PATH or /etc/ld.so.conf"  #rm -f conftest.c conftest conftest.logelse  err "Unable to compile a minimal application look at 'conftest.log' for errors"fiif test -x $QTDIR/bin/moc; then  MOC="$QTDIR/bin/moc"fiif test -x $QTDIR/bin/uic; then  UIC="$QTDIR/bin/uic"fiechoecho "LDFLAGS   :${LIBS}${LDIRS}"echo "PREFIX    :${prefix:=/usr/local}"echo "CPPFLAGS  :${CF}"echo "CFLAGS    :${CFLAGS:=-Wall}"echocat >Local.mak <<EOFCPPFLAGS=$CFCFLAGS=${CFLAGS}LDFLAGS=$LDIRSLIBS=$LIBSMOC=$MOCUIC=$UICCC=${CC:=gcc}LD=${LD:=ld}STRIP=${STRIP:=strip}prefix=${prefix}basedir=${basedir}EOFfor dirs in /bin /usr/bin /usr/local/bin /sw/bin; do  for make in gmake make; do    if ${dirs}/${make} -v 2>/dev/null | grep GNU; then      mak=${dirs}/${make}    fi  done  doneechoif test ! -z "${mak}"; then  echo A usable "make" executable was found in ${mak}else  echo No usable "make" executable found.fiechoif test "x${err_occ}" = "xY"; then  echo  echo An error occured. Please edit 'Local.mak' manually if compiling fails.fi

⌨️ 快捷键说明

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