gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated (641a5ee4f -> 1713968e4)


From: gnunet
Subject: [gnunet] branch master updated (641a5ee4f -> 1713968e4)
Date: Thu, 21 Nov 2019 15:38:23 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a change to branch master
in repository gnunet.

    from 641a5ee4f gnunet-bugreport: add check for git commit.
     new 8ac3f324a gnunet-bugreport: fix compiling tests, add usage with -h
     new 1713968e4 gnunet-bugreport: satisfy gnu standards.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 contrib/scripts/gnunet-bugreport | 67 ++++++++++++++++++++++++++++------------
 1 file changed, 48 insertions(+), 19 deletions(-)

diff --git a/contrib/scripts/gnunet-bugreport b/contrib/scripts/gnunet-bugreport
index 5f090a350..724c38e06 100755
--- a/contrib/scripts/gnunet-bugreport
+++ b/contrib/scripts/gnunet-bugreport
@@ -230,7 +230,7 @@ gnunet010x_check()
     TEST=`$WHICH gnunet-arm | grep -v "not found" 2>/dev/null`
     if test -n "$TEST"; then
         VER=`gnunet-arm -v | sed -e "s/v//" 2>/dev/null | awk '{print $2}'`
-        VER9=`echo $VER | grep ^0\.10\.`
+        VER10=`echo $VER | grep ^0\.10\.`
         if test -n "$VER10"; then
             warningmsg "GNUnet 0.10    : $VER"
         else
@@ -470,8 +470,9 @@ gnurl_check()
 
 libmicrohttpd_check()
 {
-    TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX`
-    cat - >$TMPFILE.c <<EOF
+    # TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX`
+    TMPFILE="bugreport-test_lmhd.c"
+    cat - >$TMPFILE <<EOF
 #include <microhttpd.h>
 #include <stdio.h>
 int main()
@@ -480,17 +481,24 @@ int main()
   return 0;
 }
 EOF
-    VER="Not found"
-    gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
-    cc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
-    rm -f $TMPFILE $TMPFILE.bin
+    if test -x `$WHICH gcc | awk '{print $NF}'`; then
+        gcc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin "$TMPFILE"
+        VER=`./"$TMPFILE".bin`
+    elif test -x `$WHICH cc | awk '{print $NF}'`; then
+        cc $CPPFLAGS $CFLAGS -o $TMPFILE.bin $TMPFILE
+        VER=`./$TMPFILE.bin`
+    else
+        VER="Not found"
+    fi
     infomsg "libmicrohttpd  : $VER"
+    rm -f $TMPFILE.c $TMPFILE $TMPFILE.bin
 }
 
 glpk_check()
 {
-    TMPFILE=`mktemp /tmp/glpk-version-testXXXXXX`
-    cat - >$TMPFILE.c <<EOF
+    # TMPFILE=`mktemp /tmp/glpk-version-testXXXXXX`
+    TMPFILE="bugreport-glpk_check.c"
+    cat - >$TMPFILE <<EOF
 #include <glpk.h>
 #include <stdio.h>
 int main()
@@ -499,17 +507,24 @@ int main()
   return 0;
 }
 EOF
-    VER="Not found"
-    gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
-    cc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
-    rm -f $TMPFILE $TMPFILE.bin
+    if test -x `$WHICH gcc | awk '{print $NF}'`; then
+        gcc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE
+        VER=`./$TMPFILE.bin`
+    elif test -x `$WHICH cc | awk '{print $NF}'`; then
+        cc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE
+        VER=`./"$TMPFILE".bin`
+    else
+        VER="Not found"
+    fi
     infomsg "GNU GLPK       : $VER"
+    rm -f $TMPFILE.c $TMPFILE $TMPFILE.bin
 }
 
 gnutls_check()
 {
-    TMPFILE=`mktemp /tmp/gnutls-version-testXXXXXX`
-    cat - >$TMPFILE.c <<EOF
+    # TMPFILE=`mktemp /tmp/gnutls-version-testXXXXXX`
+    TMPFILE="bugreport-gnutls_check.c"
+    cat - >$TMPFILE <<EOF
 #include <gnutls/gnutls.h>
 #include <stdio.h>
 int main()
@@ -518,15 +533,29 @@ int main()
   return 0;
 }
 EOF
-    VER="Not found"
-    gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
-    cc -o $TMPFILE $TMPFILE.c 2> /dev/null && VER=`$TMPFILE`
-    rm -f $TMPFILE $TMPFILE.bin
+    if test -x `$WHICH gcc | awk '{print $NF}'`; then
+        gcc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE
+        VER=`./"$TMPFILE".bin`
+    elif test -x `$WHICH cc | awk '{print $NF}'`; then
+        cc $CPPFLAGS $CFLAGS -o "$TMPFILE".bin $TMPFILE
+        VER=`./"$TMPFILE".bin`
+    else
+        VER="Not found"
+    fi
     infomsg "GnuTLS         : $VER"
+    rm -f $TMPFILE.c $TMPFILE $TMPFILE.bin
 }
 
 main()
 {
+    if test -n "$1" -a "$1" = "-h" -o "$1" = "--help"; then
+        echo "Usage: ${progname} [-h]"
+        echo "If CPPFLAGS and LDFLAGS are unset, try:"
+        echo "CPPFLAGS='-I/usr/pkg/include' LDFLAGS='-L/usr/pkg/lib' 
${progname}"
+        return 0
+    fi
+    echo $LDFLAGS
+    echo $CPPFLAGS
     infomsg "${progname} 0.11.0"
     infomsg
     infomsg "Please submit the following"

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]