/[rdesktop]/sourceforge.net/trunk/rdesktop/configure
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /sourceforge.net/trunk/rdesktop/configure

Parent Directory Parent Directory | Revision Log Revision Log


Revision 341 - (hide annotations)
Thu Mar 6 15:36:28 2003 UTC (21 years, 3 months ago) by forsberg
File size: 6303 byte(s)
Defined a DEBUG_RDP5 macro for selective debugging during the RDP5 integration process.

1 matty 30 #!/bin/sh
2     #
3     # rdesktop: A Remote Desktop Protocol client
4     # configure script
5 matthewc 207 # Copyright (C) Matthew Chapman 1999-2002
6 matty 30 #
7    
8 matthewc 202 echo "rdesktop build configuration script"
9     echo
10    
11 matty 30 echo "# Generated by $0 $*" >Makeconf
12    
13 matthewc 156
14 matthewc 189 # Process command line options
15 matthewc 156
16 matthewc 298 cflags='-DKEYMAP_PATH=\"$(KEYMAP_PATH)\"'
17     ldflags=''
18 matthewc 221 rpath=
19 matthewc 156
20 matty 30 for arg in $*; do
21 matthewc 220 optarg=`echo $arg | sed 's/[-a-z]*=//'`
22 matty 30 case $arg in
23     --prefix=*)
24 matthewc 156 echo "prefix = $optarg" >>Makeconf
25 matty 30 ;;
26     --exec-prefix=*)
27 matthewc 156 echo "exec_prefix = $optarg" >>Makeconf
28 matty 30 ;;
29     --bindir=*)
30 matthewc 156 echo "bindir = $optarg" >>Makeconf
31 matty 30 ;;
32     --mandir=*)
33 matthewc 156 echo "mandir = $optarg" >>Makeconf
34 matty 30 ;;
35 astrand 98 --sharedir=*)
36 matthewc 156 echo "datadir = $optarg" >>Makeconf
37 astrand 98 ;;
38 matthewc 220 --with-x*)
39     extraxdir=$optarg
40     ;;
41 matty 32 --with-openssl*)
42 matthewc 220 extrassldir=$optarg
43 matty 32 ;;
44     --without-openssl*)
45 astrand 267 withoutopenssl=yes
46 matty 32 ;;
47 matthewc 220 --with-egd-socket=*)
48     extraegdpath=$optarg
49     ;;
50 astrand 333 --with-libvncserver)
51     withvncserver=yes
52     ;;
53     --with-libvncserver-config=*)
54     vncserverconfig=$optarg
55     ;;
56 astrand 63 --with-debug)
57 matthewc 189 cflags="$cflags -g -DWITH_DEBUG"
58 matty 30 ;;
59 astrand 63 --with-debug-kbd)
60 matthewc 189 cflags="$cflags -g -DWITH_DEBUG_KBD"
61 astrand 63 ;;
62 forsberg 341 --with-debug-rdp5)
63     cflags="$cflags -g -DWITH_DEBUG_RDP5"
64     ;;
65 matty 30 --without-debug*)
66     ;;
67     *)
68     echo "Target directories:"
69 matthewc 220 echo " --prefix=PREFIX location for architecture-independent files"
70     echo " --exec-prefix=EPREFIX location for architecture-dependent files"
71     echo " --bindir=BINDIR location for program binaries [EPREFIX/bin]"
72     echo " --mandir=MANDIR location for man pages [PREFIX/man]"
73     echo " --sharedir=SHAREDIR location for architecture-independent shared files [PREFIX/share/rdesktop]"
74 matty 30 echo
75     echo "Build configuration:"
76 matthewc 220 echo " --with-x=DIR look for X Window System at DIR/include, DIR/lib"
77     echo " --with-openssl=DIR look for OpenSSL at DIR/include, DIR/lib"
78 astrand 267 echo " --without-openssl use in-tree crypto, even if OpenSSL is available"
79 matthewc 220 echo " --with-egd-socket=PATH look for Entropy Gathering Daemon socket at PATH"
80 astrand 333 echo " --with-libvncserver make rdp2vnc"
81     echo " --with-libvncserver-config=CMD"
82     echo " use CMD as libvncserver-config"
83 matthewc 220 echo " --with-debug enable protocol debugging output"
84     echo " --with-debug-kbd enable debugging of keyboard handling"
85 matty 30 echo
86     rm -f Makeconf
87     exit 1
88     ;;
89     esac
90     done
91    
92 matthewc 189
93 matthewc 258 # Find compiler
94    
95     compilers="$CC gcc cc"
96    
97     for compiler in $compilers; do
98     if [ -x "`which $compiler`" ]; then
99     cc=$compiler
100     break
101     fi
102     done
103    
104     if [ -z "$cc" ]; then
105     echo "ERROR: could not find a C compiler (tried: $compilers)"
106     echo "You probably want to install gcc"
107     exit 1
108     fi
109    
110     echo "CC = $cc" >>Makeconf
111    
112     if $cc -v 2>&1 |grep '^gcc' >/dev/null; then
113     cflags="$cflags -Wall -O2"
114     else
115     cflags="$cflags -O"
116     fi
117    
118    
119 matthewc 189 # Find X installation
120    
121 matthewc 220 xdirs="$extraxdir /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local"
122 matthewc 189
123     for dir in $xdirs; do
124     if [ -f $dir/include/X11/Xlib.h ]; then
125     xdir=$dir
126     break
127     fi
128     done
129    
130     if [ -z "$xdir" ]; then
131     echo "ERROR: could not find X Window System headers"
132 matthewc 220 echo "(searched for include/X11/Xlib.h in: $xdirs)"
133 matthewc 189
134     # additional helpful information for Linux users
135     if [ -f /etc/redhat_release ]; then
136     echo You probably need to install the XFree86-devel package
137     elif [ -f /etc/debian_version ]; then
138     echo You probably need to install the xlibs-dev package
139     fi
140     exit 1
141     fi
142    
143 matthewc 202 echo "X Window System:"
144     echo " includes $xdir/include"
145     echo " libraries $xdir/lib"
146     echo
147    
148 matthewc 189 if [ $xdir != "/usr" ]; then
149     cflags="$cflags -I$xdir/include"
150     ldflags="$ldflags -L$xdir/lib"
151 matthewc 221 rpath="$rpath:$xdir/lib"
152 matthewc 189 fi
153    
154 astrand 333 ldflags="$ldflags"
155     targets="$targets rdesktop"
156 matthewc 189
157 astrand 267 if [ -z "$withoutopenssl" ]; then
158     # Find OpenSSL installation if available
159     ssldirs="$extrassldir /usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local"
160    
161     for dir in $ssldirs; do
162     if [ -f $dir/include/openssl/rc4.h ]; then
163     ssldir=$dir
164     break
165     fi
166     done
167    
168     if [ -z "$ssldir" ]; then
169     echo "WARNING: could not find OpenSSL headers"
170     echo "(searched for include/openssl/rc4.h in: $ssldirs)"
171     echo "Using in-tree crypto; installing OpenSSL is recommended."
172     echo
173     else
174     echo "OpenSSL:"
175     echo " includes $ssldir/include"
176     echo " libraries $ssldir/lib"
177     echo
178    
179     echo "CRYPTOBJ =" >>Makeconf
180    
181     if [ $ssldir != "/usr" ]; then
182     cflags="$cflags -I$ssldir/include"
183     ldflags="$ldflags -L$ssldir/lib"
184     rpath="$rpath:$ssldir/lib"
185     fi
186    
187     cflags="$cflags -DWITH_OPENSSL"
188     ldflags="$ldflags -lcrypto"
189 matthewc 189 fi
190     fi
191 astrand 267
192 astrand 333 if [ ! -z "$withvncserver" ]; then
193     if [ -z "$vncserverconfig" ]; then
194     vncserverconfig=libvncserver-config
195     fi
196 matthewc 189
197 astrand 333 echo "VNCINC=`$vncserverconfig --cflags`" >> Makeconf
198     echo "LDVNC=`$vncserverconfig --libs`" >> Makeconf
199     echo "CCLD=`$vncserverconfig --link`" >> Makeconf
200     echo >> Makeconf
201     targets="$targets rdp2vnc"
202    
203     echo "Found libvncserver: Building rdp2vnc"
204     fi
205    
206    
207 matthewc 220 # Find EGD socket if we don't have /dev/urandom or /dev/random
208 matthewc 221
209 matthewc 220 if [ ! -c /dev/random -a ! -c /dev/urandom ]; then
210     egdpaths="$extraegdpath /var/run/egd-pool /dev/egd-pool /etc/egd-pool /etc/entropy"
211    
212     for path in $egdpaths; do
213     # -e isn't portable, so we use -r
214     if [ -r $path ]; then
215     egdpath=$path
216     break
217     fi
218     done
219    
220     if [ -z "$egdpath" ]; then
221     echo "WARNING: could not find /dev/urandom, /dev/random or Entropy Gathering Daemon (EGD) socket"
222     echo "(searched: $egdpaths)"
223     echo "Session keys may be less secure; installing a system randomness source is recommended."
224     echo
225     else
226     echo "Entropy Gathering Daemon (EGD):"
227     echo " socket $egdpath"
228     echo
229     cflags="$cflags -DEGD_SOCKET=\\\"$egdpath\\\""
230     fi
231     fi
232    
233 matthewc 221
234     # Platform-specific options
235    
236     # strip leading colon from rpath
237     rpath=`echo $rpath |sed 's/^://'`
238    
239     case `uname -s` in
240     SunOS)
241     ldflags="$ldflags -lsocket -lnsl -R$rpath"
242     ;;
243     OSF1)
244     ldflags="$ldflags -Wl,-rpath,$rpath"
245     ;;
246     esac
247    
248    
249 matthewc 298 echo "CFLAGS = $cflags" >>Makeconf
250     echo "LDFLAGS = $ldflags" >>Makeconf
251 astrand 333 echo "TARGETS = $targets" >>Makeconf
252 matthewc 189
253 matty 30 echo "configure complete - now run make"
254 matthewc 221

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26