darling-libkqueue/configure
mheily 1d174668f1 Convert the build script to Makeconf
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@592 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
2012-11-26 02:42:53 +00:00

47 lines
853 B
Bash
Executable File

#!/bin/sh
#
# Bootstrap configuration script for Makeconf
#
# Author: Mark Heily <mark@heily.com>
#
die() {
printf "\n*** ERROR: $1 ***\n\n$2\n\n"
exit 1
}
if [ "$RUBY" != "" ] ; then
ruby=$RUBY
else
ruby=`which ruby`
fi
printf 'checking for ruby.. '
if [ ! -x "$ruby" ] ; then
echo 'no'
die 'Ruby was not found' 'Please install Ruby from http://www.ruby-lang.org/'
fi
if [ "$RUBYLIB" != "" ] ; then
echo "$ruby (RUBYLIB=$RUBYLIB)"
export RUBYLIB
else
echo $ruby
fi
printf 'checking for makeconf.. '
ruby -e "require 'makeconf'" > /dev/null 2>&1
if [ $? -ne 0 ] ; then
if [ -x ./makeconf ] ; then
echo 'yes (using local copy)'
ruby="$ruby -I./makeconf"
else
echo 'no'
die 'Makeconf was not found' 'Please install Makeconf from https://rubygems.org/'
fi
else
echo 'yes'
fi
exec $ruby ./configure.rb $*