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