1 diff -x '*~' -rc checkinstall-1.6.2pre20081116-orig/installwatch/create-localdecls checkinstall-1.6.2pre20081116/installwatch/create-localdecls
2 *** checkinstall-1.6.2pre20081116-orig/installwatch/create-localdecls 2008-11-16 17:18:58.000000000 +0100
3 --- checkinstall-1.6.2pre20081116/installwatch/create-localdecls 2009-09-18 17:01:13.000000000 +0200
6 echo -n 'Checking libc version... '
7 gcc -Wall -o libctest libctest.c
8 VERSION=`ldd libctest | grep libc\\.so | awk '{print $1}'`
11 echo "#define LIBC_VERSION \"$VERSION\"" >> $OUTFILE
12 if test "$VERSION" = 'libc.so.5' ; then
17 if test "$VERSION" = 'libc.so.6' ; then
18 echo -n 'Checking glibc subversion... '
19 ! tmp="`ldd /bin/sh | grep libc.so 2> /dev/null`"
20 LibcPath=`expr "$tmp" : '[^/]*\(/[^ ]*\)'`
21 tmp="`strings $LibcPath | grep -i 'c library'`"
22 OsLibcMajor=`expr "$tmp" : '.* \([0-9][0-9]*\)'`
25 if test "$VERSION" = 'libc.so.6' ; then
26 echo -n 'Checking glibc subversion... '
27 ! tmp="`ldd libctest | grep libc.so 2> /dev/null`"
28 LibcPath=`expr "$tmp" : '[^/]*\(/[^ ]*\)'`
29 tmp="`strings $LibcPath | grep -i 'c library'`"
30 OsLibcMajor=`expr "$tmp" : '.* \([0-9][0-9]*\)'`
34 echo '#define GLIBC_MINOR 6' >> $OUTFILE
35 SUBVERSION='glibc-2.6' ;;
37 echo '#define GLIBC_MINOR 7' >> $OUTFILE
38 SUBVERSION='glibc-2.7' ;;
40 - echo 'Treated as glibc >= 2.1 (finger crossed)'
41 echo '#define GLIBC_MINOR 1' >> $OUTFILE
42 SUBVERSION='glibc-2.1' ;;
49 echo '#endif' >> $OUTFILE
53 echo '#define GLIBC_MINOR 6' >> $OUTFILE
54 SUBVERSION='glibc-2.6' ;;
55 ! 7|8|9|10|11|12|13|14|15|16|17|18)
56 echo '#define GLIBC_MINOR 7' >> $OUTFILE
57 SUBVERSION='glibc-2.7' ;;
59 echo '#define GLIBC_MINOR 1' >> $OUTFILE
60 SUBVERSION='glibc-2.1' ;;
70 echo '#endif' >> $OUTFILE