Fix configure script in cross compile environments
Do not try to execute generated executables. Altough this is a nice idea in theory it breaks on cross compile environments which usually cannot execute binaries of the target platform.
This commit is contained in:
parent
320055e6c1
commit
5cd8fb8db0
|
@ -54,7 +54,7 @@ EOF
|
||||||
$CC -c test.c -o test.o 2>& 5
|
$CC -c test.c -o test.o 2>& 5
|
||||||
$CC test.o -o test -lsensors 2>& 5
|
$CC test.o -o test -lsensors 2>& 5
|
||||||
|
|
||||||
if [ -x ./test ] && ./test
|
if [ -x ./test ]
|
||||||
then
|
then
|
||||||
echo 'Defining HAVE_LIBSENSORS' 1>& 5
|
echo 'Defining HAVE_LIBSENSORS' 1>& 5
|
||||||
echo '#define HAVE_LIBSENSORS 1' >> configure.h
|
echo '#define HAVE_LIBSENSORS 1' >> configure.h
|
||||||
|
|
|
@ -70,7 +70,7 @@ EOF
|
||||||
$CC ${CFLAGS} ${OPENSSL_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
$CC ${CFLAGS} ${OPENSSL_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||||
$CC test.o -o test ${LINK_FLAGS} ${OPENSSL_LIBS} 2>& 5 || true
|
$CC test.o -o test ${LINK_FLAGS} ${OPENSSL_LIBS} 2>& 5 || true
|
||||||
|
|
||||||
if [ -x ./test ] && ./test
|
if [ -x ./test ]
|
||||||
then
|
then
|
||||||
echo "Found"
|
echo "Found"
|
||||||
echo 'Defining HAVE_SSL' 1>& 5
|
echo 'Defining HAVE_SSL' 1>& 5
|
||||||
|
@ -125,7 +125,7 @@ EOF
|
||||||
${CC} ${CFLAGS} ${GNUTLS_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
${CC} ${CFLAGS} ${GNUTLS_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||||
${CC} test.o -o test ${LINK_FLAGS} ${GNUTLS_LIBS} 2>& 5 || true
|
${CC} test.o -o test ${LINK_FLAGS} ${GNUTLS_LIBS} 2>& 5 || true
|
||||||
|
|
||||||
if [ -x ./test ] && ./test
|
if [ -x ./test ]
|
||||||
then
|
then
|
||||||
echo "Found"
|
echo "Found"
|
||||||
echo 'Defining HAVE_GNUTLS' 1>& 5
|
echo 'Defining HAVE_GNUTLS' 1>& 5
|
||||||
|
@ -167,7 +167,7 @@ EOF
|
||||||
${CC} ${CFLAGS} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
${CC} ${CFLAGS} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5 || true
|
||||||
${CC} test.o -o test ${LINK_FLAGS} ${PKG_NTLM_LIBS} 2>& 5 || true
|
${CC} test.o -o test ${LINK_FLAGS} ${PKG_NTLM_LIBS} 2>& 5 || true
|
||||||
|
|
||||||
if [ -x ./test ] && ./test
|
if [ -x ./test ]
|
||||||
then
|
then
|
||||||
echo "Found"
|
echo "Found"
|
||||||
echo 'Defining HAVE_NTLM' 1>& 5
|
echo 'Defining HAVE_NTLM' 1>& 5
|
||||||
|
@ -217,7 +217,7 @@ EOF
|
||||||
${CC} ${CFLAGS} -c test.c -o test.o 2>& 5 || true
|
${CC} ${CFLAGS} -c test.c -o test.o 2>& 5 || true
|
||||||
${CC} test.o -o test ${LINK_FLAGS} -lsensors 2>& 5 || true
|
${CC} test.o -o test ${LINK_FLAGS} -lsensors 2>& 5 || true
|
||||||
|
|
||||||
if [ -x ./test ] && ./test
|
if [ -x ./test ]
|
||||||
then
|
then
|
||||||
echo "Found"
|
echo "Found"
|
||||||
echo 'Defining HAVE_LIBSENSORS' 1>& 5
|
echo 'Defining HAVE_LIBSENSORS' 1>& 5
|
||||||
|
|
Loading…
Reference in New Issue