summaryrefslogtreecommitdiffstats
path: root/src/prokit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/prokit.sh')
-rw-r--r--src/prokit.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/prokit.sh b/src/prokit.sh
index 5679e33..272c64c 100644
--- a/src/prokit.sh
+++ b/src/prokit.sh
@@ -30,14 +30,22 @@ PACKAGE_VERSION='@PACKAGE_VERSION@'
PKGDATADIR='@pkgdatadir@'
OPTSTRING='hV'
+if [ -f "${0%/*}/../.builddirstamp" ]; then
+ in_place=true
+ srcdir="${0%/*}/.."
+else
+ in_place=false
+ srcdir=''
+fi
+
# use() must be defined inline so it can be used to load other modules.
use()
{
local module="${1}"
local dir=
- if [ -f "${0%/*}/../lib/output.sm" ]; then
- dir="${0%/*}/../lib"
+ if ${in_place}; then
+ dir="${srcdir}/lib"
else
dir="${PKGDATADIR}"
fi