fix segfault in locking utility
[openwrt.git] / openwrt / package / bitlbee / patches / 100-cross_compile_configure_fix
1 diff -Nur bitlbee-1.0.1-orig/configure bitlbee-1.0.1/configure
2 --- bitlbee-1.0.1-orig/configure 2006-01-14 16:14:05.000000000 +0100
3 +++ bitlbee-1.0.1/configure 2006-03-06 18:30:19.000000000 +0100
4 @@ -21,9 +21,12 @@
5
6 debug=0
7 strip=1
8 +sizeopt=0
9 ipv6=1
10 ssl=auto
11
12 +glib1=0
13 +
14 arch=`uname -s`
15 cpu=`uname -m`
16
17 @@ -52,11 +55,18 @@
18
19 --debug=0/1 Disable/enable debugging $debug
20 --strip=0/1 Disable/enable binary stripping $strip
21 +--sizeopt=0/1 Disable/enable size optimization $sizeopt
22 +
23 +--arch=... Describe Operating System ?! $arch
24 +--cpu=... Describe CPU $cpu
25
26 --ipv6=0/1 IPv6 socket support $ipv6
27
28 --ssl=... SSL library to use (gnutls, nss, openssl, bogus, auto)
29 $ssl
30 +--glib1=0/1 Force usage of glib1 even if glib2 is present
31 +--glib1prefix=...
32 +
33 EOF
34 exit;
35 fi
36 @@ -110,8 +120,13 @@
37 echo 'CFLAGS=-g' >> Makefile.settings
38 echo 'DEBUG=1' >> Makefile.settings
39 echo '#define DEBUG' >> config.h
40 + if [ "$sizeopt" = "1" ]; then
41 + echo "Warning: won't optimize for size since debug is on."
42 + fi
43 +elif [ "$sizeopt" = "1" ]; then
44 + echo 'CFLAGS=-Os' >> Makefile.settings
45 else
46 - echo 'CFLAGS=-O3' >> Makefile.settings
47 + echo 'CFLAGS=-O2' >> Makefile.settings
48 fi
49
50 echo CFLAGS+=-I`pwd` -I`pwd`/protocols -I. >> Makefile.settings
51 @@ -138,24 +153,33 @@
52 exit 1;
53 fi
54
55 -if type pkg-config > /dev/null 2>/dev/null && pkg-config glib-2.0; then
56 +if [ "$glib1" != "1" ] && \
57 + type pkg-config > /dev/null 2>/dev/null && pkg-config glib-2.0; then
58 cat<<EOF>>Makefile.settings
59 EFLAGS+=`pkg-config --libs glib-2.0`
60 CFLAGS+=`pkg-config --cflags glib-2.0`
61 EOF
62 echo '#define GLIB2' >> config.h
63 -elif type glib-config > /dev/null 2> /dev/null; then
64 +elif [ "x$glib1prefix" = "x" ] && \
65 + type glib-config > /dev/null 2> /dev/null; then
66 cat<<EOF>>Makefile.settings
67 EFLAGS+=`glib-config --libs`
68 CFLAGS+=`glib-config --cflags`
69 EOF
70 echo '#define GLIB1' >> config.h
71 +elif [ "x$glib1prefix" != "x" ] && \
72 + type "$glib1prefix/bin/glib-config" > /dev/null 2> /dev/null; then
73 + cat<<EOF>>Makefile.settings
74 +EFLAGS+=`$glib1prefix/bin/glib-config --prefix=$glib1prefix --libs`
75 +CFLAGS+=`$glib1prefix/bin/glib-config --prefix=$glib1prefix --cflags`
76 +EOF
77 + echo '#define GLIB1' >> config.h
78 else
79 echo 'Cannot find glib development libraries, aborting. (Install libglib-dev?)'
80 exit 1;
81 fi
82
83 -if [ -r /usr/include/iconv.h ]; then
84 +if [ -r "$STAGING_DIR/usr/include/iconv.h" ]; then
85 :;
86 elif [ -r /usr/local/include/iconv.h ]; then
87 echo CFLAGS+=-I/usr/local/include >> Makefile.settings;
88 @@ -360,6 +384,10 @@
89 CYGWIN* )
90 echo 'Cygwin is not officially supported.'
91 ;;
92 +OpenWrt )
93 + echo 'EFLAGS+=-liconv' >> Makefile.settings;
94 + echo "CFLAGS+=\"-I$STAGING_DIR/usr/include\"" >> Makefile.settings;
95 +;;
96 * )
97 echo 'We haven'\''t tested BitlBee on many platforms yet, yours is untested. YMMV.'
98 echo 'Please report any problems at http://bugs.bitlbee.org/.'
This page took 0.057918 seconds and 5 git commands to generate.