summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure45
1 files changed, 14 insertions, 31 deletions
diff --git a/configure b/configure
index 6f18fa3..5addd3e 100755
--- a/configure
+++ b/configure
@@ -1,16 +1,17 @@
#! /bin/sh
# configure script for Plzip - A parallel version of the lzip data compressor
-# Copyright (C) 2009 Antonio Diaz Diaz.
+# Copyright (C) 2009, 2010 Antonio Diaz Diaz.
#
# This configure script is free software: you have unlimited permission
# to copy, distribute and modify it.
#
-# Date of this version: 2009-09-05
+# Date of this version: 2010-01-17
args=
no_create=
+pkgname=plzip
+pkgversion=0.2
progname=plzip
-progversion=0.1
srctrigger=plzip.h
# clear some things potentially inherited from environment.
@@ -24,15 +25,13 @@ datadir='$(prefix)/share'
infodir='$(datadir)/info'
mandir='$(datadir)/man'
sysconfdir='$(prefix)/etc'
-CC=
CXX=
CPPFLAGS=
-CFLAGS='-Wall -W -O2'
CXXFLAGS='-Wall -W -O2'
LDFLAGS=
# Loop over all args
-while [ x"$1" != x ] ; do
+while [ -n "$1" ] ; do
# Get the first arg, and shuffle
option=$1
@@ -62,16 +61,14 @@ while [ x"$1" != x ] ; do
echo " --infodir=DIR info files directory [${infodir}]"
echo " --mandir=DIR man pages directory [${mandir}]"
echo " --sysconfdir=DIR read-only single-machine data directory [${sysconfdir}]"
- echo " CC=COMPILER C compiler to use [gcc]"
echo " CXX=COMPILER C++ compiler to use [g++]"
echo " CPPFLAGS=OPTIONS command line options for the preprocessor [${CPPFLAGS}]"
- echo " CFLAGS=OPTIONS command line options for the C compiler [${CFLAGS}]"
echo " CXXFLAGS=OPTIONS command line options for the C++ compiler [${CXXFLAGS}]"
echo " LDFLAGS=OPTIONS command line options for the linker [${LDFLAGS}]"
echo
exit 0 ;;
--version | --ve* | -V)
- echo "Configure script for ${progname} version ${progversion}"
+ echo "Configure script for ${pkgname} version ${pkgversion}"
exit 0 ;;
--srcdir* | --sr*)
srcdir=`echo ${optarg} | sed -e 's,/$,,'` ;;
@@ -92,10 +89,8 @@ while [ x"$1" != x ] ; do
--no-create | --no-c*)
no_create=yes ;;
- CC=*) CC=${optarg} ;;
CXX=*) CXX=${optarg} ;;
CPPFLAGS=*) CPPFLAGS=${optarg} ;;
- CFLAGS=*) CFLAGS=${optarg} ;;
CXXFLAGS=*) CXXFLAGS=${optarg} ;;
LDFLAGS=*) LDFLAGS=${optarg} ;;
@@ -108,7 +103,7 @@ done
# Find the source files, if location was not specified.
srcdirtext=
-if [ x"${srcdir}" = x ] ; then
+if [ -z "${srcdir}" ] ; then
srcdirtext="or . or .." ; srcdir=.
if [ ! -r ${srcdir}/${srctrigger} ] ; then srcdir=.. ; fi
if [ ! -r ${srcdir}/${srctrigger} ] ; then
@@ -128,19 +123,8 @@ fi
# Set srcdir to . if that's what it is.
if [ "`pwd`" = "`cd ${srcdir} ; pwd`" ] ; then srcdir=. ; fi
-# checking whether we are using GNU C.
-if [ x"${CC}" = x ] ; then # Let the user override the test.
- if [ -x /bin/gcc ] ||
- [ -x /usr/bin/gcc ] ||
- [ -x /usr/local/bin/gcc ] ; then
- CC="gcc"
- else
- CC="cc"
- fi
-fi
-
# checking whether we are using GNU C++.
-if [ x"${CXX}" = x ] ; then # Let the user override the test.
+if [ -z "${CXX}" ] ; then # Let the user override the test.
if [ -x /bin/g++ ] ||
[ -x /usr/bin/g++ ] ||
[ -x /usr/local/bin/g++ ] ; then
@@ -151,7 +135,7 @@ if [ x"${CXX}" = x ] ; then # Let the user override the test.
fi
echo
-if [ x${no_create} = x ] ; then
+if [ -z ${no_create} ] ; then
echo "creating config.status"
rm -f config.status
cat > config.status << EOF
@@ -176,23 +160,22 @@ echo "datadir = ${datadir}"
echo "infodir = ${infodir}"
echo "mandir = ${mandir}"
echo "sysconfdir = ${sysconfdir}"
-echo "CC = ${CC}"
echo "CXX = ${CXX}"
echo "CPPFLAGS = ${CPPFLAGS}"
-echo "CFLAGS = ${CFLAGS}"
echo "CXXFLAGS = ${CXXFLAGS}"
echo "LDFLAGS = ${LDFLAGS}"
rm -f Makefile
cat > Makefile << EOF
# Makefile for Plzip - A parallel version of the lzip data compressor
-# Copyright (C) 2009 Antonio Diaz Diaz.
+# Copyright (C) 2009, 2010 Antonio Diaz Diaz.
# This file was generated automatically by configure. Do not edit.
#
# This Makefile is free software: you have unlimited permission
# to copy, distribute and modify it.
+pkgname = ${pkgname}
+pkgversion = ${pkgversion}
progname = ${progname}
-progversion = ${progversion}
VPATH = ${srcdir}
prefix = ${prefix}
exec_prefix = ${exec_prefix}
@@ -201,13 +184,13 @@ datadir = ${datadir}
infodir = ${infodir}
mandir = ${mandir}
sysconfdir = ${sysconfdir}
-CC = ${CC}
CXX = ${CXX}
CPPFLAGS = ${CPPFLAGS}
-CFLAGS = ${CFLAGS}
CXXFLAGS = ${CXXFLAGS}
LDFLAGS = ${LDFLAGS}
EOF
cat ${srcdir}/Makefile.in >> Makefile
echo "OK. Now you can run make."
+echo "If make fails, verify that the lzlib compression library is correctly"
+echo "installed. (see INSTALL)"