#!/bin/bash if [ -d cascade-make ] ; then source cascade-make/lib/cascade-lib.bash GEXTTESS . $* fi if [ -z $GEXTTESS ] ; then source ./setup.bash fi if [ -z $GEXTTESS_DEVEL ] ; then # Set environment variable so we can tell devel.bash has been sourced export GEXTTESS_DEVEL=$GEXTTESS export PATH="$GEXTTESS_INSTALLED/bin:$PATH" export CFLAGS="-I$GEXTTESS_INSTALLED/include -I$GEXTTESS_INSTALLED/include/libxml2 $CFLAGS" export CPPFLAGS="-I$GEXTTESS_INSTALLED/include -I$GEXTTESS_INSTALLED/include/libxml2 $CPPFLAGS" export CXXFLAGS="-I$GEXTTESS_INSTALLED/include -I$GEXTTESS_INSTALLED/include/libxml2 $CXXFLAGS" export LDFLAGS="-L$GEXTTESS_INSTALLED/lib $LDFLAGS" export PKG_CONFIG_PATH="$GEXTTESS_INSTALLED/lib/pkgconfig:$PKG_CONFIG_PATH" echo "+Your environment is now setup to compile with the TESSeract Support Library" if [ -d "$GEXTTESS_INSTALLED/lib/pkgconfig" ] ; then echo "" echo "+Testing that pkg-config is correctly configured..." pushd $GEXTTESS_INSTALLED/lib/pkgconfig if [ ! -e .fixed-prefix.awk ] ; then echo "Configuring ..." echo "/^prefix=/ { print \"prefix=$GEXTTESS_INSTALLED\" ; next }" > .fixed-prefix.awk echo " { print \$0 }" >> .fixed-prefix.awk for file in *.pc ; do cat $file | awk -f .fixed-prefix.awk > $file.new && \ /bin/mv $file.new $file done echo "... done" else echo "No configuration needed" fi popd fi else echo "+Your environment is already setup to compile with the TESSeract Support Library" fi