mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
synced 2025-10-29 17:52:44 +00:00
set eol-style to native
This commit is contained in:
194
configure
vendored
194
configure
vendored
@@ -1,97 +1,97 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
#
|
#
|
||||||
# configure
|
# configure
|
||||||
#
|
#
|
||||||
# $Id: //poco/1.2/dist/configure#3 $
|
# $Id: //poco/1.2/dist/configure#3 $
|
||||||
#
|
#
|
||||||
# Configuration script for POCO.
|
# Configuration script for POCO.
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# configure [<options>...]
|
# configure [<options>...]
|
||||||
#
|
#
|
||||||
# Options:
|
# Options:
|
||||||
# --config=<config_name>
|
# --config=<config_name>
|
||||||
# Use the given build configuration
|
# Use the given build configuration
|
||||||
# See $POCO_BASE/build/config for possible configs
|
# See $POCO_BASE/build/config for possible configs
|
||||||
#
|
#
|
||||||
# --prefix=<install_prefix>
|
# --prefix=<install_prefix>
|
||||||
# Use the given install directory for make install.
|
# Use the given install directory for make install.
|
||||||
# Default is /usr/local"
|
# Default is /usr/local"
|
||||||
#
|
#
|
||||||
# --no-tests
|
# --no-tests
|
||||||
# Do not build testsuites.
|
# Do not build testsuites.
|
||||||
#
|
#
|
||||||
# --no-samples
|
# --no-samples
|
||||||
# Do not build samples.
|
# Do not build samples.
|
||||||
#
|
#
|
||||||
|
|
||||||
# save cwd
|
# save cwd
|
||||||
build=`pwd`
|
build=`pwd`
|
||||||
# get directory where we are located
|
# get directory where we are located
|
||||||
cd `dirname $0`
|
cd `dirname $0`
|
||||||
base=`pwd`
|
base=`pwd`
|
||||||
cd $build
|
cd $build
|
||||||
|
|
||||||
tests="tests"
|
tests="tests"
|
||||||
samples="samples"
|
samples="samples"
|
||||||
# parse arguments
|
# parse arguments
|
||||||
while [ "$1" != "" ] ; do
|
while [ "$1" != "" ] ; do
|
||||||
val=`expr $1 : '--config=\(.*\)'`
|
val=`expr $1 : '--config=\(.*\)'`
|
||||||
if [ "$val" != "" ] ; then
|
if [ "$val" != "" ] ; then
|
||||||
config=$val;
|
config=$val;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
val=`expr $1 : '--prefix=\(.*\)'`
|
val=`expr $1 : '--prefix=\(.*\)'`
|
||||||
if [ "$val" != "" ] ; then
|
if [ "$val" != "" ] ; then
|
||||||
prefix=$val
|
prefix=$val
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "--no-samples" ] ; then
|
if [ "$1" = "--no-samples" ] ; then
|
||||||
samples=""
|
samples=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "--no-tests" ] ; then
|
if [ "$1" = "--no-tests" ] ; then
|
||||||
tests=""
|
tests=""
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$config" = "" ] ; then
|
if [ "$config" = "" ] ; then
|
||||||
config=`uname`
|
config=`uname`
|
||||||
cyg=`expr $config : '\(CYGWIN\).*'`
|
cyg=`expr $config : '\(CYGWIN\).*'`
|
||||||
if [ "$cyg" = "CYGWIN" ] ; then
|
if [ "$cyg" = "CYGWIN" ] ; then
|
||||||
config=CYGWIN
|
config=CYGWIN
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$base/build/config/$config" ] ; then
|
if [ ! -f "$base/build/config/$config" ] ; then
|
||||||
echo "Unknown configuration: $config"
|
echo "Unknown configuration: $config"
|
||||||
echo "Please use the --config option to specify another build configuration"
|
echo "Please use the --config option to specify another build configuration"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$prefix" = "" ] ; then
|
if [ "$prefix" = "" ] ; then
|
||||||
prefix=/usr/local
|
prefix=/usr/local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy Makefile to build dir
|
# copy Makefile to build dir
|
||||||
if [ "$base" != "$build" ] ; then
|
if [ "$base" != "$build" ] ; then
|
||||||
cp $base/Makefile $build
|
cp $base/Makefile $build
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# create config.make
|
# create config.make
|
||||||
echo '# config.make generated by configure script' >$build/config.make
|
echo '# config.make generated by configure script' >$build/config.make
|
||||||
echo "POCO_CONFIG = $config" >> $build/config.make
|
echo "POCO_CONFIG = $config" >> $build/config.make
|
||||||
echo "POCO_BASE = $base" >> $build/config.make
|
echo "POCO_BASE = $base" >> $build/config.make
|
||||||
echo "POCO_BUILD = $build" >> $build/config.make
|
echo "POCO_BUILD = $build" >> $build/config.make
|
||||||
echo "POCO_PREFIX = $prefix" >> $build/config.make
|
echo "POCO_PREFIX = $prefix" >> $build/config.make
|
||||||
|
|
||||||
echo "export POCO_CONFIG" >> $build/config.make
|
echo "export POCO_CONFIG" >> $build/config.make
|
||||||
echo "export POCO_BASE" >> $build/config.make
|
echo "export POCO_BASE" >> $build/config.make
|
||||||
echo "export POCO_BUILD" >> $build/config.make
|
echo "export POCO_BUILD" >> $build/config.make
|
||||||
echo "export POCO_PREFIX" >> $build/config.make
|
echo "export POCO_PREFIX" >> $build/config.make
|
||||||
|
|
||||||
echo ".PHONY: poco" >> $build/config.make
|
echo ".PHONY: poco" >> $build/config.make
|
||||||
echo "poco: libs $tests $samples" >> $build/config.make
|
echo "poco: libs $tests $samples" >> $build/config.make
|
||||||
|
|
||||||
echo "Configured for $config"
|
echo "Configured for $config"
|
||||||
|
|||||||
Reference in New Issue
Block a user