Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > dea614a19b37ad2edb78230cc85e9d7f > files > 2

gkrellm-2.3.5-8.mga3.src.rpm

diff -Naur gkrellm-2.3.5/src/configure gkrellm-2.3.5-force-libsensors-test-result//src/configure
--- gkrellm-2.3.5/src/configure	2010-09-14 16:40:38.000000000 +0200
+++ gkrellm-2.3.5-force-libsensors-test-result//src/configure	2010-10-11 11:25:17.000000000 +0200
@@ -185,44 +185,11 @@
 echo -n "Checking for libsensors... "
 echo "Checking for libsensors... " 1>& 5
 
-cat << EOF > test.c
-#include <stdio.h>
-#include <sensors/sensors.h>
-
-int main()
-	{
-#if SENSORS_API_VERSION < 0x400 /* libsensors 3 code */
-	FILE	*f;
-
-	f = fopen("/etc/sensors.conf", "r");
-	if (!f)
-		return 1;
-	if (sensors_init(f) != 0)
-		return 1;
-	fclose(f);
-	return 0;
-#else /* libsensors 4 code */
-	if (sensors_init(NULL) != 0)
-		return 1;
-	return 0;
-#endif
-	}
-EOF
-
-${CC} ${CFLAGS} ${GTK_INCLUDE} -c test.c -o test.o 2>& 5 || true
-${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} -lsensors 2>& 5 || true
-
-if [ -x ./test ] && ./test
-then
-	echo "Found"
-	echo 'Defining HAVE_LIBSENSORS' 1>& 5
-	echo '#define HAVE_LIBSENSORS 1' >> configure.h
-	echo 'HAVE_LIBSENSORS=1' >> configure.mk
-	echo 'SENSORS_LIBS="-lsensors"' >> configure.mk
-else
-	echo "Not found"
-	echo "Not found, sensors will not have libsensors support..." 1>& 5
-fi
+# actual test relies on having sensors configured on build host
+echo 'Defining HAVE_LIBSENSORS' 1>& 5
+echo '#define HAVE_LIBSENSORS 1' >> configure.h
+echo 'HAVE_LIBSENSORS=1' >> configure.mk
+echo 'SENSORS_LIBS="-lsensors"' >> configure.mk
 fi
 # end of libsensors check
 
diff -Naur gkrellm-2.3.5/src/configure.orig gkrellm-2.3.5-force-libsensors-test-result//src/configure.orig
--- gkrellm-2.3.5/src/configure.orig	1970-01-01 01:00:00.000000000 +0100
+++ gkrellm-2.3.5-force-libsensors-test-result//src/configure.orig	2010-10-11 11:13:22.000000000 +0200
@@ -0,0 +1,232 @@
+#!/bin/sh
+
+# Configure some things for GKrellM when make is run.
+# This configure is run automatically so no need to run it by hand.
+#
+# Copyright (C) 2003-2009  Bill Wilson
+set -e
+
+for i
+do
+	if [ "$i" = "--without-gnutls" ]
+	then
+		without_gnutls=yes
+	fi
+	if [ "$i" = "--without-ssl" ]
+	then
+		without_ssl=yes
+	fi
+	if [ "$i" = "--without-libsensors" ]
+	then
+		without_libsensors=yes
+	fi
+	if [ "$i" = "--without-ntlm" ]
+	then
+		without_ntlm=yes
+	fi
+done
+
+rm -f configure.h configure.mk configure.log
+
+touch configure.h
+touch configure.mk
+exec 5>./configure.log
+
+GTK_CFLAGS=$(pkg-config gtk+-2.0 --cflags 2>& 5)
+GTK_LIBS=$(pkg-config gtk+-2.0 --libs 2>& 5)
+CC=${CC-gcc}
+
+echo "CC    : ${CC}" 1>& 5
+echo "CFLAGS: ${CFLAGS}" 1>& 5
+
+rm -f test test.exe test.o test.c
+
+if [ "$without_ssl" != "yes" ]
+then
+echo -n "Checking for OpenSSL... "
+echo "Checking for OpenSSL... " 1>& 5
+
+OPENSSL_INCLUDE="$(pkg-config openssl --cflags 2>& 5 || true)"
+OPENSSL_LIBS="$(pkg-config openssl --libs 2>& 5 || true)"
+if [ -z "$OPENSSL_LIBS" ]
+then
+	echo "OpenSSL not found via pkg-config, using hardcoded library names" 1>& 5
+	OPENSSL_LIBS="-lssl -lcrypto"
+fi
+
+cat << EOF > test.c
+#include <openssl/ssl.h>
+
+int main()
+	{
+	const SSL_METHOD	*ssl_method  = NULL;
+
+	SSLeay_add_ssl_algorithms();
+	SSL_load_error_strings();
+	if ((ssl_method = SSLv23_client_method()) == NULL)
+		return 1;
+	return 0;
+	}
+EOF
+
+$CC ${CFLAGS} ${GTK_INCLUDE} ${OPENSSL_INCLUDE} -c test.c -o test.o 2>& 5 || true
+$CC test.o -o test ${LINK_FLAGS} ${GTK_LIBS} ${OPENSSL_LIBS} 2>& 5 || true
+
+if [ -x ./test ] && ./test
+then
+	echo "Found"
+	echo 'Defining HAVE_SSL' 1>& 5
+	echo '#define HAVE_SSL 1' >> configure.h
+	echo 'HAVE_SSL=1' >> configure.mk
+	echo "SSL_LIBS=${OPENSSL_LIBS}" >> configure.mk
+	echo "SSL_INCLUDE=${OPENSSL_INCLUDE}" >> configure.mk
+	without_gnutls="yes"
+else
+	echo "Not found"
+	echo "OpenSSL not found..." 1>& 5
+fi
+fi
+# end of ssl check
+
+rm -f test test.exe test.o test.c
+
+if [ "$without_gnutls" != "yes" ]
+then
+echo -n "Checking for gnutls... "
+echo "Checking for gnutls... " 1>& 5
+
+GNUTLS_INCLUDE="$(pkg-config gnutls --cflags 2>& 5 || true)"
+GNUTLS_LIBS="$(pkg-config gnutls --libs 2>& 5 || true) -lgnutls-openssl -lgcrypt"
+
+cat << EOF > test.c
+#include <gnutls/openssl.h>
+#include <gcrypt.h>
+#include <errno.h>
+
+int main()
+	{
+	SSL_METHOD	*ssl_method  = NULL;
+
+	gnutls_global_init();
+
+	SSLeay_add_ssl_algorithms();
+	SSL_load_error_strings();
+	if ((ssl_method = SSLv23_client_method()) == NULL)
+		return 1;
+	return 0;
+	}
+EOF
+
+${CC} ${CFLAGS} ${GTK_INCLUDE} ${GNUTLS_INCLUDE} -c test.c -o test.o 2>& 5 || true
+${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} ${GNUTLS_LIBS} 2>& 5 || true
+
+if [ -x ./test ] && ./test
+then
+	echo "Found"
+	echo 'Defining HAVE_GNUTLS' 1>& 5
+	echo '#define HAVE_GNUTLS 1' >> configure.h
+	echo '#define HAVE_SSL 1' >> configure.h
+	echo 'HAVE_SSL=1' >> configure.mk
+	echo "SSL_LIBS=${GNUTLS_LIBS}" >> configure.mk
+	echo "SSL_INCLUDE=${GNUTLS_INCLUDE}" >> configure.mk
+else
+	echo "Not found"
+	echo "GnuTLS not found..." 1>& 5
+fi
+fi
+# end of gnutls check
+
+
+rm -f test test.exe test.o test.c
+
+if [ "$without_ntlm" != "yes" ]
+then
+echo -n "Checking for libntlm... "
+echo "Checking for libntlm... " 1>& 5
+
+PKG_NTLM_INCLUDE=$(pkg-config libntlm --cflags 2>& 5 || true)
+PKG_NTLM_LIBS=$(pkg-config libntlm --libs 2>& 5 || true)
+
+cat << EOF > test.c
+#include <ntlm.h>
+
+int main()
+	{
+	tSmbNtlmAuthRequest	request;
+
+	buildSmbNtlmAuthRequest(&request, "username", NULL);
+	return 0;
+	}
+EOF
+
+${CC} ${CFLAGS} ${GTK_INCLUDE} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5 || true
+${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} ${PKG_NTLM_LIBS} 2>& 5 || true
+
+if [ -x ./test ] && ./test
+then
+	echo "Found"
+	echo 'Defining HAVE_NTLM' 1>& 5
+	echo '#define HAVE_NTLM 1' >> configure.h
+	echo 'HAVE_NTLM=1' >> configure.mk
+	echo "NTLM_LIBS=${PKG_NTLM_LIBS}" >> configure.mk
+	echo "NTLM_INCLUDE=${PKG_NTLM_INCLUDE}" >> configure.mk
+else
+	echo "Not found"
+	echo "Not found, mail check will not have ntlm support..." 1>& 5
+fi
+fi
+# end of ntlm check
+
+
+rm -f test test.exe test.o test.c
+
+if [ "$without_libsensors" != "yes" ]
+then
+echo -n "Checking for libsensors... "
+echo "Checking for libsensors... " 1>& 5
+
+cat << EOF > test.c
+#include <stdio.h>
+#include <sensors/sensors.h>
+
+int main()
+	{
+#if SENSORS_API_VERSION < 0x400 /* libsensors 3 code */
+	FILE	*f;
+
+	f = fopen("/etc/sensors.conf", "r");
+	if (!f)
+		return 1;
+	if (sensors_init(f) != 0)
+		return 1;
+	fclose(f);
+	return 0;
+#else /* libsensors 4 code */
+	if (sensors_init(NULL) != 0)
+		return 1;
+	return 0;
+#endif
+	}
+EOF
+
+${CC} ${CFLAGS} ${GTK_INCLUDE} -c test.c -o test.o 2>& 5 || true
+${CC} test.o -o test ${LINK_FLAGS} ${GTK_LIBS} -lsensors 2>& 5 || true
+
+if [ -x ./test ] && ./test
+then
+	echo "Found"
+	echo 'Defining HAVE_LIBSENSORS' 1>& 5
+	echo '#define HAVE_LIBSENSORS 1' >> configure.h
+	echo 'HAVE_LIBSENSORS=1' >> configure.mk
+	echo 'SENSORS_LIBS="-lsensors"' >> configure.mk
+else
+	echo "Not found"
+	echo "Not found, sensors will not have libsensors support..." 1>& 5
+fi
+fi
+# end of libsensors check
+
+
+rm -f test test.exe test.o test.c
+
+exit 0
diff -Naur gkrellm-2.3.5/src/configure.rej gkrellm-2.3.5-force-libsensors-test-result//src/configure.rej
--- gkrellm-2.3.5/src/configure.rej	1970-01-01 01:00:00.000000000 +0100
+++ gkrellm-2.3.5-force-libsensors-test-result//src/configure.rej	2010-10-11 11:13:49.000000000 +0200
@@ -0,0 +1,46 @@
+--- src/configure	2009-12-21 02:47:44.000000000 +0100
++++ src/configure	2010-08-12 00:12:36.000000000 +0200
+@@ -167,40 +167,9 @@
+ then
+ echo "Checking for libsensors... " 1>& 5
+ 
+-cat << EOF > test.c
+-#include <stdio.h>
+-#include <sensors/sensors.h>
+-
+-int main()
+-	{
+-#if SENSORS_API_VERSION < 0x400 /* libsensors 3 code */
+-	FILE	*f;
+-
+-	f = fopen("/etc/sensors.conf", "r");
+-	if (!f)
+-		return 1;
+-	if (sensors_init(f) != 0)
+-		return 1;
+-	fclose(f);
+-	return 0;
+-#else /* libsensors 4 code */
+-	if (sensors_init(NULL) != 0)
+-		return 1;
+-	return 0;
+-#endif
+-	}
+-EOF
+-
+-$CC ${CFLAGS} ${PKG_INCLUDE} -c test.c -o test.o 2>& 5
+-$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -lsensors 2>& 5
+-
+-if [ -x ./test ] && ./test
+-then
+-	echo 'Defining HAVE_LIBSENSORS' 1>& 5
+-	echo '#define HAVE_LIBSENSORS 1' >> configure.h
+-else
+-	echo "Not found, sensors will not have libsensors support..." 1>& 5
+-fi
++# actual test relies on having sensors configured on build host
++echo 'Defining HAVE_LIBSENSORS' 1>& 5
++echo '#define HAVE_LIBSENSORS 1' >> configure.h
+ fi
+ # end of libsensors check
+