diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 120 |
1 files changed, 91 insertions, 29 deletions
@@ -29,23 +29,31 @@ f_shared=YES f_make=NO f_dot=NO f_perl=NO +f_python=NO f_plf_auto=NO f_prefix=/usr/local f_insttool=NO f_english=NO f_wizard=NO f_app=NO +f_doxmlparser=NO f_thread=NO f_flex=NO f_bison=NO f_search=NO -f_langs=nl,sv,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,mk,br,dk,sk,ua,gr,tw,sr,ca,lt,za,ar,fa,sc,vi,tr,eo,am f_sqlite3=NO f_sqlite3static=NO f_sqlite3_path=NO f_libclang=NO f_libclangstatic=NO +# +# first setup the list with availabe languages, so we cannot forget any +# list will be in case as specified (f_langs) and in uppercase (f_ulangs) as used in the internal perl script +# +f_langs=`ls -1 src/translator_??.h | sed -e 's%src/translator_%%g' | sed -e 's/\.h//' | tr '\012' ',' | sed -e 's/,$//'` +f_ulangs=`echo $f_langs | tr '[a-z]' '[A-Z]'` + while test -n "$1"; do case $1 in --prefix | -prefix) @@ -81,6 +89,9 @@ while test -n "$1"; do --dot | -dot) shift; f_dot=$1 ;; + --python | -python) + shift; f_python=$1 + ;; --perl | -perl) shift; f_perl=$1 ;; @@ -99,6 +110,9 @@ while test -n "$1"; do --with-doxyapp | -with-doxyapp) f_app=YES ;; + --with-doxmlparser | -with-doxmlparser) + f_doxmlparser=YES + ;; --with-doxysearch | -with-doxysearch) f_search=YES ;; @@ -133,13 +147,14 @@ done if test "$f_help" = y; then cat <<EOF -Usage: $0 [--help] [--shared] [--static] [--release] [--debug] +Usage: $0 [--help] [--shared] [--static] [--release] [--debug] [--python name] [--perl name] [--flex name] [--bison name] [--make name] [--dot name] [--platform target] [--prefix dir] [--docdir dir] [--install name] [--english-only] [--enable-langs list] [--with-sqlite3] [--with-sqlite3-static] [--sqlite3-path] [--with-libclang] [--with-libclang-static] [--with-doxywizard] [--with-doxysearch] [--with-doxyapp] + [--with-doxxmlparser] Options: @@ -148,6 +163,8 @@ Options: [default: shared] --release | --debug Build for release or debug [default: release] + --python name Use \`name' as the name of the python interpreter + [default: autodetect] --perl name Use \`name' as the name of the perl interpreter [default: autodetect] --flex name Use \`name' as the name of the GNU lexical scanner @@ -178,6 +195,7 @@ Options: --with-doxysearch Build external search tools (doxysearch and doxyindexer) requires Xapian library version 1.2 --with-doxyapp Example showing how to embed doxygen in an application. + --with-doxmlparser Example showing how to parse doxygen's XML output. EOF test "$f_error" = y && exit 1 @@ -312,11 +330,18 @@ if test "$f_wizard" = YES; then for d in /usr/{lib,share,qt}/{qt-4,qt4,qt,qt*,4} /usr; do if test -x "$d/bin/qmake"; then QTDIR=$d + break 2 fi done else - echo " Detected Qt via the QTDIR environment variable..." - printf " " + if test -e "$QTDIR/bin/qmake"; then + printf " Detected Qt via the QTDIR environment variable..." + else + printf "ERROR Detected Qt via the QTDIR environment variable..." + echo ", but $QTDIR/bin/qmake does not exist." + echo " Set the QTDIR environment variable such that \$QTDIR/bin/qmake exists." + exit 2 + fi fi if test -z "$QTDIR"; then echo "QTDIR not set and Qt not found at standard locations!" @@ -325,6 +350,7 @@ if test "$f_wizard" = YES; then echo "check the Qt installation instructions!" exit 2 fi + echo using $QTDIR fi #- check for xapian ----------------------------------------------------------- @@ -335,13 +361,24 @@ if test "$f_search" = YES; then for d in /usr /usr/local /opt/local; do if test -e "$d/include/xapian.h"; then XAPIAN=$d + break 2 fi done + else + if test -e "$XAPIAN/include/xapian.h"; then + printf " Detected Xapian via the XAPIAN environment variable..." + else + printf "ERROR Detected Xapian via the XAPIAN environment variable..." + echo ", but $XAPIAN/include/xapian.h does not exist." + echo " Set the XAPIAN environment variable such that \$XAPIAN/include/xapian.h exists." + exit 2 + fi fi if test -z "$XAPIAN"; then echo "XAPIAN not set and xapian.h not found at standard locations!" exit 2; fi + echo using $XAPIAN fi # - check for make ------------------------------------------------------------ @@ -520,6 +557,39 @@ if test "$f_libclang" = YES; then fi fi +# - check for python ---------------------------------------------------------- + +printf " Checking for python... " +if test "$f_python" = NO; then + python_names="python" + python_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin" + python_prog=NO + python_found=NO + for i in $python_names; do + for j in $python_dirs; do + if test -x "$j/$i"; then + python_found=YES + if test `$j/$i -c "import sys; print sys.version_info.major"` = 2; then + python_prog="$j/$i" + break 2 + fi + fi + done + done + f_python="$python_prog" +fi + +if test "$f_python" = NO; then + if test "$python_found" = YES; then + echo "version should be python 2." + else + echo "not found!"; + fi + echo + exit 2 +fi +echo "using $f_python"; + # - check for perl ------------------------------------------------------------ printf " Checking for perl... " @@ -625,7 +695,8 @@ TMAKEPATH = $configPWD/tmake/lib/$f_platform ENV = env TMAKEPATH="\$(TMAKEPATH)" TMAKE = $configPWD/tmake/bin/tmake MAKE = $f_make -PERL = $f_perl +PYTHON = $f_python +LEX = $f_flex RM = rm -f CP = cp VERSION = `cat VERSION` @@ -777,6 +848,11 @@ EOF if test $f_app = YES; then echo " \$(MAKE) -C addon/doxyapp" >> $DST fi + if test $f_doxmlparser = YES; then + echo " \$(MAKE) -C addon/doxmlparser/src" >> $DST + echo " \$(MAKE) -C addon/doxmlparser/test" >> $DST + echo " \$(MAKE) -C addon/doxmlparser/examples/metrics" >> $DST + fi echo "" >> $DST echo "doxywizard_install:" >> $DST if test $f_wizard = YES; then @@ -796,8 +872,8 @@ EOF echo " Created $DST from $SRC..." done -cat src/libdoxycfg.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" > src/libdoxycfg.t -cat src/libdoxygen.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" > src/libdoxygen.t +cat src/libdoxycfg.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" -e "s|%%PYTHON%%|$f_python|g" > src/libdoxycfg.t +cat src/libdoxygen.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" -e "s|%%PYTHON%%|$f_python|g" > src/libdoxygen.t f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libmd5/libmd5.pro.in addon/doxyapp/doxyapp.pro.in addon/doxysearch/doxysearch.pro.in addon/doxysearch/doxyindexer.pro.in" @@ -831,7 +907,7 @@ fi echo " Generating src/lang_cfg.h..." echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>); chomp @l; - @allowed=(split(/,/,"NL,SV,CZ,FR,ID,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,MK,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA,AR,FA,SC,VI,TR,EO,AM")); + @allowed=(split(/,/,"'$f_ulangs'")); foreach my $elem (@l){ $elem =~ tr/a-z/A-Z/; $r=0; @@ -845,25 +921,11 @@ echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>); if test -f "src/config.h"; then chmod u+w src/config.h fi -echo " Generating src/settings.h..." -echo "#ifndef SETTINGS_H" > src/settings.h -echo "#define SETTINGS_H" >> src/settings.h -echo "" >> src/settings.h -if test "$f_sqlite3" != NO; then -echo "#define USE_SQLITE3 1" >> src/settings.h -else -echo "#define USE_SQLITE3 0" >> src/settings.h +if test -f "src/settings.h"; then + chmod u+w src/settings.h fi -if test "$f_libclang" != NO; then -echo "#define USE_LIBCLANG 1" >> src/settings.h -else -echo "#define USE_LIBCLANG 0" >> src/settings.h -fi -echo "" >> src/settings.h -echo "#define IS_SUPPORTED(x) \\" >> src/settings.h -echo " ((USE_SQLITE3 && strcmp(\"USE_SQLITE3\",(x))==0) || \\" >> src/settings.h -echo " (USE_LIBCLANG && strcmp(\"USE_LIBCLANG\",(x))==0) || \\" >> src/settings.h -echo " 0)" >> src/settings.h -echo "" >> src/settings.h -echo "#endif" >> src/settings.h -echo +echo " Generating src/settings.h..." +cd src +$f_python settings.py $f_sqlite3 $f_libclang +cd .. +echo " Finished" |