summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:48:19 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:48:19 +0000
commitf84d656826e79b4c73e42656005c34a80c9bff86 (patch)
tree445c47ac2fbbf07c76f30ef998e1ff653a99dd2c /configure
parentAdding upstream version 1.4~rc2. (diff)
downloadlzlib-f84d656826e79b4c73e42656005c34a80c9bff86.tar.xz
lzlib-f84d656826e79b4c73e42656005c34a80c9bff86.zip
Adding upstream version 1.4.upstream/1.4
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure40
1 files changed, 30 insertions, 10 deletions
diff --git a/configure b/configure
index cfdce2a..149f91b 100755
--- a/configure
+++ b/configure
@@ -5,10 +5,8 @@
# This configure script is free software: you have unlimited permission
# to copy, distribute and modify it.
-args=
-no_create=
pkgname=lzlib
-pkgversion=1.4-rc2
+pkgversion=1.4
soversion=1
progname=minilzip
progname_shared=
@@ -33,18 +31,19 @@ CFLAGS='-Wall -W -O2'
LDFLAGS=
# checking whether we are using GNU C.
-if [ ! -x /bin/gcc ] &&
- [ ! -x /usr/bin/gcc ] &&
- [ ! -x /usr/local/bin/gcc ] ; then
+${CC} --version > /dev/null 2>&1
+if [ $? != 0 ] ; then
CC=cc
CFLAGS='-W -O2'
fi
# Loop over all args
-while [ -n "$1" ] ; do
+args=
+no_create=
+while [ $# != 0 ] ; do
# Get the first arg, and shuffle
- option=$1
+ option=$1 ; arg2=no
shift
# Add the argument quoted to args
@@ -82,6 +81,16 @@ while [ -n "$1" ] ; do
--version | -V)
echo "Configure script for ${pkgname} version ${pkgversion}"
exit 0 ;;
+ --srcdir) srcdir=$1 ; arg2=yes ;;
+ --prefix) prefix=$1 ; arg2=yes ;;
+ --exec-prefix) exec_prefix=$1 ; arg2=yes ;;
+ --bindir) bindir=$1 ; arg2=yes ;;
+ --datarootdir) datarootdir=$1 ; arg2=yes ;;
+ --includedir) includedir=$1 ; arg2=yes ;;
+ --infodir) infodir=$1 ; arg2=yes ;;
+ --libdir) libdir=$1 ; arg2=yes ;;
+ --mandir) mandir=$1 ; arg2=yes ;;
+
--srcdir=*) srcdir=${optarg} ;;
--prefix=*) prefix=${optarg} ;;
--exec-prefix=*) exec_prefix=${optarg} ;;
@@ -99,11 +108,22 @@ while [ -n "$1" ] ; do
CFLAGS=*) CFLAGS=${optarg} ;;
LDFLAGS=*) LDFLAGS=${optarg} ;;
- --* | *=* | *-*-*) ;;
+ --*)
+ echo "configure: WARNING: unrecognized option: '${option}'" 1>&2 ;;
+ *=* | *-*-*) ;;
*)
- echo "configure: Unrecognized option: \"${option}\"; use --help for usage." 1>&2
+ echo "configure: unrecognized option: '${option}'" 1>&2
+ echo "Try 'configure --help' for more information."
exit 1 ;;
esac
+
+ # Check if the option took a separate argument
+ if [ "${arg2}" = yes ] ; then
+ if [ $# != 0 ] ; then args="${args} \"$1\"" ; shift
+ else echo "configure: Missing argument to \"${option}\"" 1>&2
+ exit 1
+ fi
+ fi
done
# Find the source files, if location was not specified.