Annotation of parser3/buildall-without-xml, revision 1.34

1.2       paf         1: #!/bin/sh
                      2: 
1.34    ! moko        3: # $Id: buildall-without-xml,v 1.33 2012-06-13 21:44:41 moko Exp $
1.2       paf         4: 
                      5: install_directory=$HOME/parser3install
                      6: sendmail_command="/usr/sbin/sendmail -i -t -f postmaster"
1.31      moko        7: cflags=""
1.33      moko        8: #cflags="--with-pic" #required for apache module on x64
1.2       paf         9: 
                     10: echo "buildall-without-xml"
                     11: echo "Script author: Alexander Petrosian <paf@design.ru> (http://paf.design.ru)"
                     12: echo
                     13: echo "Building..."
                     14: 
1.34    ! moko       15: download=`which fetch 2>/dev/null`
        !            16: if test -z "$download"; then
        !            17:        download="wget -c --passive-ftp"
        !            18: fi
        !            19: 
1.2       paf        20: parser3_directory=`pwd`
                     21: cd ..
                     22: project_directory=`pwd`
                     23: mkdir src >/dev/null 2>&1
                     24: 
                     25: if test ! -f "$project_directory/gc/lib/libgc.a"; then
                     26:   cd $project_directory/src
1.20      misha      27: # libgc="gc6.8" # FreeBSD 4.X is not supported in newer gc version
1.17      misha      28:   libgc="gc-7.1"
1.5       misha      29:   if test ! -f "$libgc.tar.gz"; then
1.34    ! moko       30:     echo "Downloading gc [1 lib of 2]..."
1.31      moko       31:     $download http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$libgc.tar.gz
1.5       misha      32:   fi
                     33:   echo "Unpacking gc..."
1.7       misha      34:   rm -rf $libgc
1.5       misha      35:   gunzip -c $libgc.tar.gz | tar vxf - >/dev/null
                     36:   cd $libgc
1.34    ! moko       37:   echo "Configuring gc..."
1.19      misha      38:   CPPFLAGS="-DUSE_LIBC_PRIVATES -DUSE_MMAP -DDONT_ADD_BYTE_AT_END" \
1.8       misha      39:        ./configure --prefix=$project_directory/gc \
                     40:                --disable-threads \
                     41:                --disable-shared \
1.31      moko       42:                --silent $cflags
1.34    ! moko       43:   echo "Building gc..."
1.2       paf        44:   make
                     45:   make install
1.10      misha      46:   cd ..
1.9       misha      47:   rm -rf $libgc
1.2       paf        48: fi
                     49: 
1.14      misha      50: if test ! -f "$project_directory/pcre/lib/libpcre.a"; then
                     51:   cd $project_directory/src
1.27      misha      52:   libpcre="pcre-8.30"
1.14      misha      53:   if test ! -f "$libpcre.tar.gz"; then
                     54:     echo "Downloading pcre [2 lib of 2]..."
1.31      moko       55:     $download ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$libpcre.tar.gz
1.14      misha      56:   fi
                     57:   echo "Unpacking pcre..."
                     58:   rm -rf $libpcre
                     59:   gunzip -c $libpcre.tar.gz | tar vxf - >/dev/null
                     60:   cd $libpcre
                     61:   echo "Configuring pcre..."
                     62:   ./configure --prefix="$project_directory/pcre" \
1.26      misha      63:     --with-match-limit=10000 \
                     64:     --with-match-limit-recursion=10000 \
1.14      misha      65:     --enable-utf8 \
                     66:     --enable-unicode-properties \
                     67:     --disable-shared \
                     68:     --disable-cpp \
                     69:     --disable-pcregrep-libz \
1.24      misha      70:     --disable-pcregrep-libbz2 \
1.31      moko       71:     --silent $cflags
1.14      misha      72:   echo "Building pcre..."
                     73:   make
                     74:   make install
                     75:   cd ..
                     76:   rm -rf $libpcre
                     77: fi
                     78: 
1.2       paf        79: cd $parser3_directory
                     80: 
                     81: if test ! -f "Makefile"; then
1.28      moko       82:   options="$@"
1.33      moko       83:   options="$options --with-gc=$project_directory/gc/lib"
                     84:   options="$options --with-pcre=$project_directory/pcre"
1.34    ! moko       85: #  options="$options --with-apache"
1.12      misha      86: #  options="$options --disable-safe-mode"
1.13      misha      87: #  options="$options --disable-stringstream"
1.32      moko       88:   options="$options --with-included-ltdl"
1.31      moko       89:   options="$options --silent $cflags"
1.2       paf        90:   echo "Configuring parser3..."
1.12      misha      91:   ./configure --prefix=$install_directory "--with-sendmail=$sendmail_command" $options
1.2       paf        92: fi
1.31      moko       93: 
1.2       paf        94: echo "Building parser3..."
                     95: make install
1.31      moko       96: if test $? -ne 0; then exit 1; fi
1.11      misha      97: 
                     98: # remove debug info
                     99: # strip ${install_directory}/bin/parser3
                    100: 
1.2       paf       101: echo "DONE"
                    102: 
                    103: echo
                    104: echo
                    105: echo "********************************************************************************************************"
1.33      moko      106: echo "Now you can copy $install_directory/bin to your cgi-bin directory"
1.2       paf       107: echo "  -Parser3 WITHOUT XML support-"
                    108: echo "Read more about installing Parser here:"
                    109: echo "  http://www.parser.ru/en/docs/lang/install4apachecgi.htm in English"
                    110: echo "  http://www.parser.ru/docs/lang/install4apachecgi.htm in Russian"
                    111: echo "********************************************************************************************************"

E-mail: