summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2009-06-11 22:48:42 +0200
committerSamuel Lidén Borell <samuel@slbdata.se>2010-01-02 22:30:06 +0100
commit24d49a7cdd93a6cb8633cff062201e6b1ea6f164 (patch)
treef2278b4208d786804437aaa0fee821cd5e6898fe /configure
parentd22b3daf633d89b6ac9c09b472839c3a53c6dd70 (diff)
downloadfribid-24d49a7cdd93a6cb8633cff062201e6b1ea6f164.tar.gz
fribid-24d49a7cdd93a6cb8633cff062201e6b1ea6f164.tar.bz2
fribid-24d49a7cdd93a6cb8633cff062201e6b1ea6f164.zip
Allow the configure script to be run from anywhere
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure b/configure
index 0fab087..bf575da 100755
--- a/configure
+++ b/configure
@@ -5,6 +5,8 @@ execprefix=""
error=""
+basedir=`dirname "$0"`
+
while [ "$#" != "0" ]; do
flag="$1"
shift
@@ -26,8 +28,8 @@ while [ "$#" != "0" ]; do
esac
done
-if [ ! -r "common/defines.h" ]; then
- echo "You must be in the root directory of the source code to compile."
+if [ ! -r "$basedir/common/defines.h" ]; then
+ echo "Source code not found."
error=1
fi
@@ -48,7 +50,7 @@ if [ -n "$execprefix" ]; then
echo "Executable/library prefix: $execPath"
fi
-CONFFILE=common/config.h
+CONFFILE="$basedir/common/config.h"
echo "
/* This file is automatically generated.