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

1.2       paf         1: #!/bin/sh
                      2: 
1.35    ! moko        3: # $Id: buildall-without-xml,v 1.34 2012-06-15 19:54:16 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-recursion=10000 \
1.14      misha      64:     --enable-utf8 \
                     65:     --enable-unicode-properties \
                     66:     --disable-shared \
                     67:     --disable-cpp \
                     68:     --disable-pcregrep-libz \
1.24      misha      69:     --disable-pcregrep-libbz2 \
1.31      moko       70:     --silent $cflags
1.14      misha      71:   echo "Building pcre..."
                     72:   make
                     73:   make install
                     74:   cd ..
                     75:   rm -rf $libpcre
                     76: fi
                     77: 
1.2       paf        78: cd $parser3_directory
                     79: 
                     80: if test ! -f "Makefile"; then
1.28      moko       81:   options="$@"
1.33      moko       82:   options="$options --with-gc=$project_directory/gc/lib"
                     83:   options="$options --with-pcre=$project_directory/pcre"
1.34      moko       84: #  options="$options --with-apache"
1.12      misha      85: #  options="$options --disable-safe-mode"
1.13      misha      86: #  options="$options --disable-stringstream"
1.32      moko       87:   options="$options --with-included-ltdl"
1.31      moko       88:   options="$options --silent $cflags"
1.2       paf        89:   echo "Configuring parser3..."
1.12      misha      90:   ./configure --prefix=$install_directory "--with-sendmail=$sendmail_command" $options
1.2       paf        91: fi
1.31      moko       92: 
1.2       paf        93: echo "Building parser3..."
                     94: make install
1.31      moko       95: if test $? -ne 0; then exit 1; fi
1.11      misha      96: 
                     97: # remove debug info
                     98: # strip ${install_directory}/bin/parser3
                     99: 
1.2       paf       100: echo "DONE"
                    101: 
                    102: echo
                    103: echo
                    104: echo "********************************************************************************************************"
1.33      moko      105: echo "Now you can copy $install_directory/bin to your cgi-bin directory"
1.2       paf       106: echo "  -Parser3 WITHOUT XML support-"
                    107: echo "Read more about installing Parser here:"
                    108: echo "  http://www.parser.ru/en/docs/lang/install4apachecgi.htm in English"
                    109: echo "  http://www.parser.ru/docs/lang/install4apachecgi.htm in Russian"
                    110: echo "********************************************************************************************************"

E-mail: