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