Return to install_cdb.sh CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / dba |
1.1 ! misho 1: #! /bin/sh ! 2: ! 3: # You can use this script if you want to use an external cdb lib. If you ! 4: # compile php using --with-cdb the internal functions will be used and no ! 5: # external library is used so that this script is not necessary. ! 6: # ! 7: # cdb-0.75 lacks support for installing header files and creating a ! 8: # library which programs can link against. This shell script fills ! 9: # the gap. ! 10: # ! 11: # $Id: install_cdb.sh,v 1.2 2002-11-04 17:53:04 helly Exp $ ! 12: ! 13: if test -r "cdb.a" && test -r "auto-str.c" && test -r "byte.a"; then ! 14: : ! 15: else ! 16: echo "Please execute this script in the cdb-0.75 source directory after 'make'" ! 17: exit 1 ! 18: fi ! 19: ! 20: prefix=$1 ! 21: ! 22: if test -z "$prefix"; then ! 23: prefix=/usr/local ! 24: fi ! 25: ! 26: echo "Using prefix $prefix" ! 27: ! 28: if mkdir -p "$prefix/include" "$prefix/lib"; then ! 29: : ! 30: else ! 31: echo "Creating directories failed. Please become superuser." ! 32: exit 1 ! 33: fi ! 34: ! 35: mkdir -p tmp || exit 1 ! 36: cd tmp ! 37: ar x ../cdb.a ! 38: ar x ../byte.a ! 39: ar x ../unix.a ! 40: ar x ../byte.a ! 41: ar x ../buffer.a ! 42: cp ../error.o . ! 43: ! 44: # not really portable ! 45: ar r "$prefix/lib/libcdb.a" * ! 46: ranlib "$prefix/lib/libcdb.a" ! 47: cd .. ! 48: ! 49: rm -rf tmp ! 50: ! 51: cp cdb.h uint32.h "$prefix/include" ! 52: ! 53: echo "done"