report.sh 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. #!/bin/sh
  2. TEST=`type type|grep not`
  3. if test -n "$TEST"; then
  4. WHICH=which
  5. else
  6. WHICH=type
  7. fi
  8. echo "Please submit the following information with your bug report: "
  9. echo "--------------------------------------------------------------"
  10. OS=`uname -s 2>/dev/null`
  11. echo "OS : $OS"
  12. REL=`uname -r 2>/dev/null`
  13. echo "OS RELEASE : $REL"
  14. HW=`uname -m 2>/dev/null`
  15. echo "HARDWARE : $HW"
  16. TEST=`$WHICH gcc 2>/dev/null`
  17. if test -n "$TEST"; then
  18. VERS=`gcc --version 2>/dev/null | head -n 1`
  19. echo "gcc : $VERS"
  20. else
  21. echo "gcc : Not Found";
  22. fi
  23. TEST=`$WHICH gmake 2>/dev/null`
  24. if test -n "$TEST" ; then
  25. gmake --version 2>/dev/null |\
  26. awk -F, '{print $1}' |\
  27. awk '/GNU Make/{print "GNU gmake :",$NF}'
  28. else
  29. TEST=`make --version 2>/dev/null`
  30. if test -n "$TEST"; then
  31. make --version 2>/dev/null |\
  32. awk -F, '{print $1}' |\
  33. awk '/GNU Make/{print "make :",$NF}'
  34. else
  35. echo "make : Not Found"
  36. fi
  37. fi
  38. TEST=`$WHICH autoconf 2>/dev/null`
  39. if test -n "$TEST"; then
  40. autoconf --version |\
  41. head -n 1 |\
  42. awk '{\
  43. if (length($4) == 0) {\
  44. print "autoconf : "$3\
  45. } else {\
  46. print "autoconf : "$4\
  47. }}'
  48. else
  49. echo "autoconf : Not Found"
  50. fi
  51. TEST=`$WHICH automake 2>/dev/null`
  52. if test -n "$TEST"; then
  53. automake --version 2>/dev/null |\
  54. head -n 1 |\
  55. awk '{print "automake : "$4}'
  56. else
  57. echo "automake : Not Found"
  58. fi
  59. TEST=`$WHICH libtool 2>/dev/null`
  60. if test -n "$TEST"; then
  61. libtool --version 2>/dev/null |\
  62. head -n 1 |\
  63. awk '{print "libtool : "$4}'
  64. else
  65. echo "libtool : Not Found"
  66. fi
  67. TEST=`$WHICH extract 2>/dev/null`
  68. if test -n "$TEST"; then
  69. extract -v 2>/dev/null |\
  70. head -n 1 |\
  71. awk '{print "libextractor : "$2}'
  72. else
  73. echo "libextractor : Not Found"
  74. fi
  75. if test -x gnunetd; then
  76. gnunetd -v | sed -e "s/v//" 2>/dev/null |\
  77. awk '{print "GNUnet 0.8 : "$2 (may conflict!)}'
  78. else
  79. echo "GNUnet 0.8 : Not Found (good)"
  80. fi
  81. TEST=`$WHICH gnunet-arm 2>/dev/null`
  82. if test -n "$TEST"; then
  83. gnunet-arm -v | sed -e "s/v//" 2>/dev/null |\
  84. awk '{print "GNUnet 0.9 : "$2}'
  85. else
  86. echo "GNUnet 0.9 : Not Found"
  87. fi
  88. TEST=`$WHICH libgcrypt-config 2> /dev/null`
  89. if test -n "$TEST"; then
  90. libgcrypt-config --version 2> /dev/null | \
  91. awk '{print "libgcrypt : "$1}'
  92. else
  93. echo "libgcrypt : Not Found"
  94. fi
  95. TEST=`$WHICH mysql_config 2> /dev/null`
  96. if test -n "$TEST"; then
  97. mysql_config --version 2> /dev/null | \
  98. awk '{print "mysql : "$1}'
  99. else
  100. echo "mysql : Not Found"
  101. fi
  102. TEST=`$WHICH pkg-config 2> /dev/null`
  103. if test -n "$TEST"; then
  104. pkg-config --version 2> /dev/null | \
  105. awk '{print "pkg-config : "$1}'
  106. else
  107. echo "pkg-config : Not Found"
  108. fi
  109. TEST=`$WHICH pkg-config 2> /dev/null`
  110. if test -n "$TEST"; then
  111. pkg-config --modversion glib-2.0 2> /dev/null | \
  112. awk '{print "glib2 : "$1}'
  113. else
  114. echo "glib2 : Not Found"
  115. fi
  116. TEST=`$WHICH pkg-config 2> /dev/null`
  117. if test -n "$TEST"; then
  118. pkg-config --modversion gtk+-2.0 2> /dev/null | \
  119. awk '{print "gtk2+ : "$1}'
  120. else
  121. echo "gtk2+ : Not Found"
  122. fi
  123. TEST=`$WHICH dpkg 2> /dev/null`
  124. if test -n "$TEST"; then
  125. LINES=`dpkg -s libgmp3-dev | grep Version | wc -l`
  126. if test "$LINES" = "1"
  127. then
  128. VERSION=`dpkg -s libgmp3-dev | grep Version | awk '{print $2}'`
  129. echo "GMP : libgmp3-dev-$VERSION.deb"
  130. else
  131. echo "GMP : dpkg: libgmp3-dev not installed"
  132. fi
  133. else
  134. TEST=`$WHICH rpm 2> /dev/null`
  135. if test -n "$TEST"; then
  136. rpm -q gmp | sed -e "s/gmp-//" 2> /dev/null | \
  137. awk '{print "GMP : "$1.rpm}'
  138. else
  139. echo "GMP : Test not available"
  140. fi
  141. fi
  142. TEST=`$WHICH dpkg 2> /dev/null`
  143. if test -n "$TEST"; then
  144. LINES=`dpkg -s libunistring-dev | grep Version | wc -l`
  145. if test "$LINES" = "1"
  146. then
  147. VERSION=`dpkg -s libunistring-dev | grep Version | awk '{print $2}'`
  148. echo "libunistring : libunistring3-dev-$VERSION.deb"
  149. else
  150. echo "libunistring : dpkg: libunistring3-dev not installed"
  151. fi
  152. else
  153. TEST=`$WHICH rpm 2> /dev/null`
  154. if test -n "$TEST"; then
  155. rpm -q unistring | sed -e "s/unistring-//" 2> /dev/null | \
  156. awk '{print "libunistring : "$1.rpm}'
  157. else
  158. echo "libunistring : Test not available"
  159. fi
  160. fi
  161. TEST=`$WHICH gettext 2> /dev/null`
  162. if test -n "$TEST"; then
  163. gettext --version | head -n1 2> /dev/null | \
  164. awk '{print "GNU gettext : "$4}'
  165. else
  166. echo "GNU gettext : Not found"
  167. fi
  168. TEST=`$WHICH curl-config 2> /dev/null`
  169. if test -n "$TEST"; then
  170. curl-config --version | head -n1 2> /dev/null | \
  171. awk '{print "libcurl : "$2}'
  172. else
  173. echo "libcurl : Not found"
  174. fi
  175. echo -n "libmicrohttpd : "
  176. TMPFILE=`mktemp /tmp/mhd-version-testXXXXXX`
  177. cat - >$TMPFILE.c <<EOF
  178. #include <microhttpd.h>
  179. #include <stdio.h>
  180. int main()
  181. {
  182. fprintf (stdout, "%X\n", MHD_VERSION);
  183. return 0;
  184. }
  185. EOF
  186. gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found"
  187. rm -f $TMPFILE $TMPFILE.bin
  188. echo -n "GNU GLPK : "
  189. TMPFILE=`mktemp /tmp/glpk-version-testXXXXXX`
  190. cat - >$TMPFILE.c <<EOF
  191. #include <glpk.h>
  192. #include <stdio.h>
  193. int main()
  194. {
  195. fprintf (stdout, "%u.%u\n", GLP_MAJOR_VERSION, GLP_MINOR_VERSION);
  196. return 0;
  197. }
  198. EOF
  199. gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found"
  200. rm -f $TMPFILE $TMPFILE.bin
  201. echo -n "GNUtls : "
  202. TMPFILE=`mktemp /tmp/gnutls-version-testXXXXXX`
  203. cat - >$TMPFILE.c <<EOF
  204. #include <gnutls/gnutls.h>
  205. #include <stdio.h>
  206. int main()
  207. {
  208. fprintf (stdout, "%s\n", GNUTLS_VERSION);
  209. return 0;
  210. }
  211. EOF
  212. gcc -o $TMPFILE $TMPFILE.c 2> /dev/null && $TMPFILE || echo "Not found"
  213. rm -f $TMPFILE $TMPFILE.bin
  214. echo "--------------------------------------------------------------"