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.
|
||||
Libbz2 and development packages.
|
||||
OpenSSL version 0.9.8 or greater.
|
||||
Libarchive and its development packages.
|
||||
Libarchive 3.x or greater and its development packages.
|
||||
|
||||
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/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}/usr/lib/x86_64-linux-gnu"
|
||||
"${use_prefix}/usr/lib/x86_64-linux-gnu" "${use_prefix}/.libs" "${use_prefix}"
|
||||
do
|
||||
if [ -d ${lib} ]
|
||||
then
|
||||
|
@ -515,21 +515,51 @@ do
|
|||
then
|
||||
use_prefix="$prefix"
|
||||
fi
|
||||
found=0
|
||||
for inc in "${pref}/include" "${pref}/usr/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
|
||||
if [ -d ${inc} ]
|
||||
then
|
||||
if [ -f "${inc}/${hdrf}" ]
|
||||
then
|
||||
eval "${var}=\"-I${inc}\""
|
||||
found=1
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ $found -ne 1 ]
|
||||
then
|
||||
echo "Cannot find header $hdrf"
|
||||
exit 1
|
||||
fi
|
||||
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 ..."
|
||||
linkvar="LINK"
|
||||
compilevar="COMPILE"
|
||||
|
|
Loading…
Reference in a new issue