mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2024-11-23 19:59:40 +00:00
1d174668f1
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@592 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
47 lines
853 B
Bash
Executable File
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 $*
|