- New configure file generated by qconf v1.3 instead of v1.2

This commit is contained in:
Christophe Dumez 2007-03-11 18:32:36 +00:00
parent 79f6030703
commit 4a11bc034b

50
configure vendored
View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# Generated by qconf 1.2 ( http://delta.affinix.com/qconf/ ) # Generated by qconf 1.3 ( http://delta.affinix.com/qconf/ )
# #
show_usage() { show_usage() {
@ -12,6 +12,7 @@ This script creates necessary configuration files to build/install.
Main options: Main options:
--prefix=[path] Base path for build/install. Default: /usr/local --prefix=[path] Base path for build/install. Default: /usr/local
--bindir=[path] Directory for binaries. Default: PREFIX/bin --bindir=[path] Directory for binaries. Default: PREFIX/bin
--datadir=[path] Directory for data. Default: PREFIX/share
--qtdir=[path] Directory where Qt is installed. --qtdir=[path] Directory where Qt is installed.
--verbose Show extra configure output. --verbose Show extra configure output.
--help This help text. --help This help text.
@ -121,6 +122,11 @@ while [ $# -gt 0 ]; do
shift shift
;; ;;
--datadir=*)
DATADIR=$optarg
shift
;;
--qtdir=*) --qtdir=*)
EX_QTDIR=$optarg EX_QTDIR=$optarg
shift shift
@ -137,6 +143,7 @@ done
PREFIX=${PREFIX:-/usr/local} PREFIX=${PREFIX:-/usr/local}
BINDIR=${BINDIR:-$PREFIX/bin} BINDIR=${BINDIR:-$PREFIX/bin}
DATADIR=${DATADIR:-$PREFIX/share}
echo "Configuring qbittorrent ..." echo "Configuring qbittorrent ..."
@ -144,6 +151,7 @@ if [ "$QC_DEBUG" = "Y" ]; then
echo echo
echo PREFIX=$PREFIX echo PREFIX=$PREFIX
echo BINDIR=$BINDIR echo BINDIR=$BINDIR
echo DATADIR=$DATADIR
echo EX_QTDIR=$EX_QTDIR echo EX_QTDIR=$EX_QTDIR
echo echo
fi fi
@ -574,6 +582,36 @@ int qc_runprogram(const QString &prog, const QStringList &args, QByteArray *out,
*/ */
} }
bool qc_removedir(const QString &dirPath)
{
QDir dir(dirPath);
if(!dir.exists())
return false;
QStringList list = dir.entryList();
foreach(QString s, list)
{
if(s == "." || s == "..")
continue;
QFileInfo fi(dir.filePath(s));
if(fi.isDir())
{
if(!qc_removedir(fi.filePath()))
return false;
}
else
{
if(!dir.remove(s))
return false;
}
}
QString dirName = dir.dirName();
if(!dir.cdUp())
return false;
if(!dir.rmdir(dirName))
return false;
return true;
}
void qc_splitcflags(const QString &cflags, QStringList *incs, QStringList *otherflags) void qc_splitcflags(const QString &cflags, QStringList *incs, QStringList *otherflags)
{ {
incs->clear(); incs->clear();
@ -873,9 +911,12 @@ bool Conf::doCompileAndLink(const QString &filedata, const QStringList &incs, co
QDir::setCurrent(oldpath); QDir::setCurrent(oldpath);
// cleanup // cleanup
dir.remove("atest.pro"); //dir.remove("atest.pro");
dir.remove("atest.cpp"); //dir.remove("atest.cpp");
tmp.rmdir("atest"); //tmp.rmdir("atest");
// remove whole dir since distclean doesn't always work
qc_removedir(tmp.filePath("atest"));
if(!ok) if(!ok)
return false; return false;
@ -1260,6 +1301,7 @@ EOT
export PREFIX export PREFIX
export BINDIR export BINDIR
export DATADIR
export EX_QTDIR export EX_QTDIR
export QC_DEBUG export QC_DEBUG
rm -rf .qconftemp rm -rf .qconftemp