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