📄 configure
字号:
#! /bin/sh## $Id: configure,v 1.9 2001/03/19 19:27:34 root Exp $## Copyright (C) 1997-2001 by Dimitri van Heesch.# # Permission to use, copy, modify, and distribute this software and its# documentation under the terms of the GNU General Public License is hereby # granted. No representations are made about the suitability of this software # for any purpose. It is provided "as is" without express or implied warranty.# See the GNU General Public License for more details.# # Documents produced by Doxygen are derivative works derived from the# input used in their production; they are not affected by this license.# # shell script to configure doxygenbin_dirs=`echo $PATH | sed -e "s/:/ /g"`f_debug=NOf_shared=YESf_make=NOf_dot=NOf_perl=NOf_plf_auto=NOf_prefix=/usrf_insttool=NOf_english=NOf_wizard=NOf_langs=nl,se,cz,fr,it,de,jp,es,fi,ru,hr,pl,pt,hu,kr,ro,si,cn,no,br,dk,sk,uawhile test -n "$1"; do case $1 in --prefix | -prefix) shift; f_prefix=$1 ;; --docdir | -docdir) shift; f_docdir=$1/doxygen ;; --shared | -shared) f_shared=YES ;; --static | -static) f_shared=NO ;; --release | -release) f_debug=NO ;; --debug | -debug) f_debug=YES ;; --english-only | -english-only) f_english=YES ;; --enable-langs | -enable-langs) shift; f_langs=$1 ;; --platform | -platform) shift; f_platform=$1 ;; --make | -make) shift; f_make=$1 ;; --dot | -dot) shift; f_dot=$1 ;; --perl | -perl) shift; f_perl=$1 ;; --install | -install) shift; f_insttool=$1 ;; --with-doxywizard | -with-doxywizard) f_wizard=YES ;; -h | -help | --help) f_help=y ;; *) echo $1: unknown argument f_help=y f_error=y ;; esac shiftdoneif test "$f_help" = y; then cat <<EOFUsage: $0 [--help] [--shared] [--static] [--release] [--debug] [--perl name] [--make name] [--dot name] [--platform target] [--prefix dir] [--docdir dir] [--install name] [--english-only] [----enable-langs list] [--with-doxywizard] Options: --help Print this help --shared | --static Build using shared or static linking [default: shared] --release | --debug Build for release or debug [default: release] --perl name Use \`name' as the name of the perl interpreter [default: autodetect] --make name Use \`name' as the name of the GNU make tool [default: autodetect] --dot name Use \`name' as the name of the dot tool that is part of the Graphviz package. [default: autodetect] --platform target Do not detect platform but use \`target' instead. See PLATFORMS for a list of possibilities --prefix dir Installation prefix directory (doxygen will be put in PREFIX/bin/doxygen) [default: /usr] --docdir dir Documentation is installed in DOCDIR/doxygen/ [default: PREFIX/share/doc/packages] --install name Use \`name' as the name of the GNU install tool [default: autodetect] --english-only Include support for English only. --enable-langs list Include support for output languages listed in list. [default: $f_langs] --with-doxywizard Build the GUI frontend for doxygen. This requires Qt 2.x.xEOF test "$f_error" = y && exit 1 exit 0;fiu_release=`(uname -r) 2>/dev/null` || u_release=unknownu_system=`(uname -s) 2>/dev/null` || u_system=unknownif test -z "$f_platform"; then f_platforms="`cat PLATFORMS`" case "$u_system:$u_release" in AIX*) f_platform=aix-xlc ;; dgux:*) f_platform=dgux-g++ ;; FreeBSD:*) f_platform=freebsd-g++ ;; GNU:*) f_platform=gnu-g++ ;; HP-UX:*) f_platform=hpux-g++ ;; IRIX64:*) f_platform=irix-64 ;; IRIX:*) f_platform=irix-n32 ;; Linux:*) f_platform=linux-g++ ;; NetBSD:*) f_platform=netbsd-g++ ;; OpenBSD:*) f_platform=openbsd-g++ ;; OSF1:*) f_platform=osf1-g++ ;; QNX:*) f_platform=qnx-g++ ;; *:3.2) f_platform=sco-g++ ;; SunOS:4*) f_platform=sunos-g++ ;; SunOS:5*) f_platform=solaris-cc ;; ULTRIX:*) f_platform=ultrix-g++ ;; UNIX_SV:4.2*) f_platform=unixware-g++ ;; *) echo echo "Your platform was not recognised by this configure script" echo "Please use the -platform option to specify one of platforms" echo "in this list:" echo for p in $f_platforms do echo " $0 $* -platform $p" done echo exit 2 esac echo " Autodetected platform $f_platform... " f_plf_auto=YESfiif test -z "$f_docdir"; then f_docdir=$f_prefix/share/doc/packages/doxygenfiif test "$f_plf_auto" = NO; then echo -n " Checking for platform $f_platform... " if test '!' -d tmake/lib/$f_platform; then echo "not supported!" echo exit 2 fi echo "supported"fi#- check for qt --------------------------------------------------------------# # echo -n " Checking for Qt..."# if test -z "$QTDIR"; then# echo "QTDIR not set!"# echo# echo "tmake requires the QTDIR environment variable to be set."# echo "check your Qt installation!"# exit 2# else# if test ! -d "$QTDIR/lib"; then# echo "QTDIR is set, but library directory does not exist!"# exit 2# fi# if test ! -d "$QTDIR/include"; then# echo "QTDIR is set, but include directory does not exist!"# exit 2# fi# echo " headers $QTDIR/include,"# echo " libraries $QTDIR/lib" # fi# # - check for make ------------------------------------------------------------echo -n " Checking for GNU make tool... "if test "$f_make" = NO; then make_names="gmake make" make_dirs="/usr/bin /usr/local/bin /bin /sbin $bin_dirs" make_prog=NO for i in $make_names; do for j in $make_dirs; do if test -x "$j/$i"; then if test -n "`$j/$i --version 2>/dev/null | grep GNU`"; then make_prog="$j/$i" break 2 fi fi done done f_make="$make_prog" fiif test "$f_make" = NO; then echo "not found!"; echo exit 2fiecho "using $f_make"# - check for install ------------------------------------------------------------echo -n " Checking for GNU install tool... "if test "$f_insttool" = NO; then install_names="ginstall install" install_dirs="/usr/bin /usr/local/bin /bin /sbin $bin_dirs" install_prog=NO install_found=NO for i in $install_names; do for j in $install_dirs; do if test -x "$j/$i"; then install_found=YES install_prog="$j/$i" break 2 fi done done f_insttool="$install_prog" fiif test "$f_insttool" = NO; then if test "$install_found" = YES; then echo "GNU version of install is required!" else echo "not found!"; fi echo exit 2fiecho "using $f_insttool";# - check for dot ------------------------------------------------------------echo -n " Checking for dot (part of GraphViz)... "if test "$f_dot" = NO; then dot_dirs="$bin_dirs" dot_prog=NO for j in $dot_dirs; do if test -x "$j/dot"; then dot_prog="$j/dot" break 2 fi done f_dot="$dot_prog" fiif test "$f_dot" = NO; then echo "not found!";else echo "using $f_dot"fi# - check for perl ------------------------------------------------------------echo -n " Checking for perl... "if test "$f_perl" = NO; then perl_names="perl perl5" perl_dirs="/usr/bin /usr/local/bin /bin /sbin $bin_dirs" perl_prog=NO perl_found=NO for i in $perl_names; do for j in $perl_dirs; do if test -x "$j/$i"; then perl_found=YES if $j/$i -e 'require 5.000;' 2>/dev/null ; then perl_prog="$j/$i" break 2 fi fi done done f_perl="$perl_prog" fiif test "$f_perl" = NO; then if test "$perl_found" = YES; then echo "version is too old (5.000 or higher is required)." else echo "not found!"; fi echo exit 2fiecho "using $f_perl";# -----------------------------------------------------------------------------test -f .makeconfig && rm .makeconfigtest -f .tmakeconfig && rm .tmakeconfigcat > .makeconfig <<EOFDOXYGEN = $PWDTMAKEPATH = $PWD/tmake/lib/$f_platformENV = env TMAKEPATH=\$(TMAKEPATH)TMAKE = $PWD/tmake/bin/tmakeMAKE = $f_makePERL = $f_perlRM = rm -fCP = cpVERSION = `cat VERSION`INSTALL = $f_prefixINSTTOOL = $f_insttoolDOXYDOCS = ..DOCDIR = $f_docdirEOFif test "$f_dot" != NO; then cat >> .makeconfig <<EOFHAVE_DOT = $f_dotEOFfitouch .tmakeconfigif test "$f_shared" = NO; then if test "$f_platform" = "osf1-cxx" -o "$f_platform" = "irix-n32"; then cat >> .tmakeconfig <<EOF TMAKE_LFLAGS += -non_sharedEOF elif test "$f_platform" = "solaris-cc"; then cat >> .tmakeconfig <<EOF TMAKE_LFLAGS += -BstaticEOF elif test "$f_platform" = "hpux-cc"; then cat >> .tmakeconfig <<EOF TMAKE_LFLAGS += -nosharedEOF else cat >> .tmakeconfig <<EOF TMAKE_LFLAGS += -staticEOF fifiif test "$f_english" = YES; then cat >> .tmakeconfig <<EOFTMAKE_CXXFLAGS += -DENGLISH_ONLYEOFfif_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/xmlparse/Makefile.in"for i in $f_inmakefiles ; do SRC=$i DST=`echo $i|sed 's%\(.*\).in$%\1%'` TIME=`date` cat > $DST <<EOF## This file was generated from `basename $i` on $TIME#EOF cat .makeconfig >> $DST if test $i = Makefile.in; then echo "" >> $DST echo "all: src/version.cpp " >> $DST echo " \$(MAKE) -C qtools" >> $DST echo " \$(MAKE) -C src" >> $DST if test $f_wizard = YES; then echo " \$(MAKE) -C addon/doxywizard" >> $DST fi echo "" >> $DST echo "doxywizard_install:" >> $DST if test $f_wizard = YES; then echo " \$(MAKE) -C addon/doxywizard install" >> $DST fi echo "" >> $DST fi cat $SRC >> $DST echo " Created $DST from $SRC..."donef_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/doxywizard/doxywizard.pro.in addon/xmlparse/xmlparse.pro.in" for i in $f_inprofiles ; do SRC=$i DST=`echo $i|sed 's%\(.*\).in$%\1%'` TIME=`date` cat > $DST <<EOF## This file was generated from `basename $i` on $TIME#EOF if test "$f_debug" = NO; then cat $SRC .tmakeconfig | sed -e "s/\$extraopts/release/g" >> $DST else cat $SRC .tmakeconfig | sed -e "s/\$extraopts/debug/g" >> $DST fi echo " Created $DST from $SRC..."done# - generating src/lang_cfg.h echo -n " Generating src/lang_cfg.h..."echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>); chomp @l; @allowed=(NL,SE,CZ,FR,IT,DE,JP,ES,FI,RU,HR,PL,PT,HU,KR,RO,SI,CN,NO,BR, DK,SK,UA); foreach my $elem (@l){ $elem =~ tr/a-z/A-Z/; $r=0; foreach my $tst (@allowed){ if ($tst eq $elem) { $r=1; last; } } if ($r!=1) { die "ERROR: Invalid language $elem was selected!\n"; } print "#define LANG_$elem\n"; };' > ./src/lang_cfg.h echo
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -