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