summaryrefslogtreecommitdiff
path: root/ext/dba/install_cdb.sh
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2013-03-14 05:42:27 +0000
committer <>2013-04-03 16:25:08 +0000
commitc4dd7a1a684490673e25aaf4fabec5df138854c4 (patch)
tree4d57c44caae4480efff02b90b9be86f44bf25409 /ext/dba/install_cdb.sh
downloadphp2-master.tar.gz
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/dba/install_cdb.sh')
-rwxr-xr-xext/dba/install_cdb.sh53
1 files changed, 53 insertions, 0 deletions
diff --git a/ext/dba/install_cdb.sh b/ext/dba/install_cdb.sh
new file mode 100755
index 0000000..ce5f3cc
--- /dev/null
+++ b/ext/dba/install_cdb.sh
@@ -0,0 +1,53 @@
+#! /bin/sh
+
+# You can use this script if you want to use an external cdb lib. If you
+# compile php using --with-cdb the internal functions will be used and no
+# external library is used so that this script is not necessary.
+#
+# cdb-0.75 lacks support for installing header files and creating a
+# library which programs can link against. This shell script fills
+# the gap.
+#
+# $Id: install_cdb.sh,v 1.2 2002-11-04 17:53:04 helly Exp $
+
+if test -r "cdb.a" && test -r "auto-str.c" && test -r "byte.a"; then
+ :
+else
+ echo "Please execute this script in the cdb-0.75 source directory after 'make'"
+ exit 1
+fi
+
+prefix=$1
+
+if test -z "$prefix"; then
+ prefix=/usr/local
+fi
+
+echo "Using prefix $prefix"
+
+if mkdir -p "$prefix/include" "$prefix/lib"; then
+ :
+else
+ echo "Creating directories failed. Please become superuser."
+ exit 1
+fi
+
+mkdir -p tmp || exit 1
+cd tmp
+ar x ../cdb.a
+ar x ../byte.a
+ar x ../unix.a
+ar x ../byte.a
+ar x ../buffer.a
+cp ../error.o .
+
+# not really portable
+ar r "$prefix/lib/libcdb.a" *
+ranlib "$prefix/lib/libcdb.a"
+cd ..
+
+rm -rf tmp
+
+cp cdb.h uint32.h "$prefix/include"
+
+echo "done"