Fix issue #14
Updated fix for issue #12 Add check for correct Libarchive version. Update header checks to abort if not found.
This commit is contained in:
parent
ba1de93514
commit
31b1f56902
2 changed files with 33 additions and 3 deletions
2
INSTALL
2
INSTALL
|
@ -8,7 +8,7 @@ GCC 4.4 (with mpfr, ppl and cloog support packages for loop
|
||||||
libz (zlib) and development packages.
|
libz (zlib) and development packages.
|
||||||
Libbz2 and development packages.
|
Libbz2 and development packages.
|
||||||
OpenSSL version 0.9.8 or greater.
|
OpenSSL version 0.9.8 or greater.
|
||||||
Libarchive and its development packages.
|
Libarchive 3.x or greater and its development packages.
|
||||||
|
|
||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
34
config
34
config
|
@ -437,7 +437,7 @@ do
|
||||||
"${pref}/local/lib64" "${pref}/usr/local/lib64" "${pref}/local/lib" "${pref}/usr/local/lib" \
|
"${pref}/local/lib64" "${pref}/usr/local/lib64" "${pref}/local/lib" "${pref}/usr/local/lib" \
|
||||||
"${pref}/local/lib/x86_64-linux-gnu" "${pref}/usr/local/lib/x86_64-linux-gnu" \
|
"${pref}/local/lib/x86_64-linux-gnu" "${pref}/usr/local/lib/x86_64-linux-gnu" \
|
||||||
"${use_prefix}/lib64" "${use_prefix}/lib" "${use_prefix}/lib/x86_64-linux-gnu" \
|
"${use_prefix}/lib64" "${use_prefix}/lib" "${use_prefix}/lib/x86_64-linux-gnu" \
|
||||||
"${use_prefix}/usr/lib/x86_64-linux-gnu"
|
"${use_prefix}/usr/lib/x86_64-linux-gnu" "${use_prefix}/.libs" "${use_prefix}"
|
||||||
do
|
do
|
||||||
if [ -d ${lib} ]
|
if [ -d ${lib} ]
|
||||||
then
|
then
|
||||||
|
@ -515,21 +515,51 @@ do
|
||||||
then
|
then
|
||||||
use_prefix="$prefix"
|
use_prefix="$prefix"
|
||||||
fi
|
fi
|
||||||
|
found=0
|
||||||
for inc in "${pref}/include" "${pref}/usr/include" \
|
for inc in "${pref}/include" "${pref}/usr/include" \
|
||||||
"${pref}/local/include" "${pref}/usr/local/include" \
|
"${pref}/local/include" "${pref}/usr/local/include" \
|
||||||
"${use_prefix}/include" "${use_prefix}/usr/include"
|
"${use_prefix}/include" "${use_prefix}/usr/include" \
|
||||||
|
"${use_prefix}/libarchive" "${use_prefix}"
|
||||||
do
|
do
|
||||||
if [ -d ${inc} ]
|
if [ -d ${inc} ]
|
||||||
then
|
then
|
||||||
if [ -f "${inc}/${hdrf}" ]
|
if [ -f "${inc}/${hdrf}" ]
|
||||||
then
|
then
|
||||||
eval "${var}=\"-I${inc}\""
|
eval "${var}=\"-I${inc}\""
|
||||||
|
found=1
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
if [ $found -ne 1 ]
|
||||||
|
then
|
||||||
|
echo "Cannot find header $hdrf"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Checking for Libarchive version ..."
|
||||||
|
cat << _EOF > tst.c
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <archive.h>
|
||||||
|
|
||||||
|
int
|
||||||
|
main(void)
|
||||||
|
{
|
||||||
|
int flags = ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS;
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
_EOF
|
||||||
|
|
||||||
|
gcc ${extra_opt_flags} ${libarchive_inc} -L${libarchive_libdir} -O0 -g tst.c -o tst -larchive >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "Libarchive version 3.0 or newer is required."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -f tst tst.c
|
||||||
|
|
||||||
echo "Generating Makefile ..."
|
echo "Generating Makefile ..."
|
||||||
linkvar="LINK"
|
linkvar="LINK"
|
||||||
compilevar="COMPILE"
|
compilevar="COMPILE"
|
||||||
|
|
Loading…
Reference in a new issue