/[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 220 - (hide annotations)
Thu Oct 10 07:25:31 2002 UTC (21 years, 8 months ago) by matthewc
File size: 4769 byte(s)
Improve security of random number generation (support EGD, use MD5
in our poor man's version) - Jacco de Leeuw <jacco2@dds.nl>

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 189 cflags=
17     ldflags=
18 matthewc 156
19 matty 30 for arg in $*; do
20 matthewc 220 optarg=`echo $arg | sed 's/[-a-z]*=//'`
21 matty 30 case $arg in
22     --prefix=*)
23 matthewc 156 echo "prefix = $optarg" >>Makeconf
24 matty 30 ;;
25     --exec-prefix=*)
26 matthewc 156 echo "exec_prefix = $optarg" >>Makeconf
27 matty 30 ;;
28     --bindir=*)
29 matthewc 156 echo "bindir = $optarg" >>Makeconf
30 matty 30 ;;
31     --mandir=*)
32 matthewc 156 echo "mandir = $optarg" >>Makeconf
33 matty 30 ;;
34 astrand 98 --sharedir=*)
35 matthewc 156 echo "datadir = $optarg" >>Makeconf
36 astrand 98 ;;
37 matthewc 220 --with-x*)
38     extraxdir=$optarg
39     ;;
40 matty 32 --with-openssl*)
41 matthewc 220 extrassldir=$optarg
42 matty 32 ;;
43     --without-openssl*)
44     ;;
45 matthewc 220 --with-egd-socket=*)
46     extraegdpath=$optarg
47     ;;
48 astrand 63 --with-debug)
49 matthewc 189 cflags="$cflags -g -DWITH_DEBUG"
50 matty 30 ;;
51 astrand 63 --with-debug-kbd)
52 matthewc 189 cflags="$cflags -g -DWITH_DEBUG_KBD"
53 astrand 63 ;;
54 matty 30 --without-debug*)
55     ;;
56     *)
57     echo "Target directories:"
58 matthewc 220 echo " --prefix=PREFIX location for architecture-independent files"
59     echo " --exec-prefix=EPREFIX location for architecture-dependent files"
60     echo " --bindir=BINDIR location for program binaries [EPREFIX/bin]"
61     echo " --mandir=MANDIR location for man pages [PREFIX/man]"
62     echo " --sharedir=SHAREDIR location for architecture-independent shared files [PREFIX/share/rdesktop]"
63 matty 30 echo
64     echo "Build configuration:"
65 matthewc 220 echo " --with-x=DIR look for X Window System at DIR/include, DIR/lib"
66     echo " --with-openssl=DIR look for OpenSSL at DIR/include, DIR/lib"
67     echo " --with-egd-socket=PATH look for Entropy Gathering Daemon socket at PATH"
68     echo " --with-debug enable protocol debugging output"
69     echo " --with-debug-kbd enable debugging of keyboard handling"
70 matty 30 echo
71     rm -f Makeconf
72     exit 1
73     ;;
74     esac
75     done
76    
77 matthewc 189
78     # Platform-specific options
79    
80     need_runpath=no
81    
82     case `uname -s` in
83     SunOS)
84     ldflags="$ldflags -lsocket -lnsl"
85     need_runpath=yes
86     ;;
87     esac
88    
89    
90     # Find X installation
91    
92 matthewc 220 xdirs="$extraxdir /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local"
93 matthewc 189
94     for dir in $xdirs; do
95     if [ -f $dir/include/X11/Xlib.h ]; then
96     xdir=$dir
97     break
98     fi
99     done
100    
101     if [ -z "$xdir" ]; then
102     echo "ERROR: could not find X Window System headers"
103 matthewc 220 echo "(searched for include/X11/Xlib.h in: $xdirs)"
104 matthewc 189
105     # additional helpful information for Linux users
106     if [ -f /etc/redhat_release ]; then
107     echo You probably need to install the XFree86-devel package
108     elif [ -f /etc/debian_version ]; then
109     echo You probably need to install the xlibs-dev package
110     fi
111     exit 1
112     fi
113    
114 matthewc 202 echo "X Window System:"
115     echo " includes $xdir/include"
116     echo " libraries $xdir/lib"
117     echo
118    
119 matthewc 189 if [ $xdir != "/usr" ]; then
120     cflags="$cflags -I$xdir/include"
121     ldflags="$ldflags -L$xdir/lib"
122     if [ $need_runpath = "yes" ]; then
123     ldflags="$ldflags -R$xdir/lib"
124     fi
125     fi
126    
127     ldflags="$ldflags -lX11"
128    
129    
130     # Find OpenSSL installation if available
131    
132 matthewc 220 ssldirs="$extrassldir /usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local"
133 matthewc 189
134     for dir in $ssldirs; do
135     if [ -f $dir/include/openssl/rc4.h ]; then
136     ssldir=$dir
137     break
138     fi
139     done
140    
141     if [ -z "$ssldir" ]; then
142     echo "WARNING: could not find OpenSSL headers"
143 matthewc 220 echo "(searched for include/openssl/rc4.h in: $ssldirs)"
144 matthewc 189 echo "Using in-tree crypto; installing OpenSSL is recommended."
145     echo
146     else
147 matthewc 202 echo "OpenSSL:"
148     echo " includes $ssldir/include"
149     echo " libraries $ssldir/lib"
150     echo
151    
152 matthewc 189 echo "CRYPTOBJ =" >>Makeconf
153    
154     if [ $ssldir != "/usr" ]; then
155     cflags="$cflags -I$ssldir/include"
156     ldflags="$ldflags -L$ssldir/lib"
157     if [ $need_runpath = "yes" ]; then
158     ldflags="$ldflags -R$ssldir/lib"
159     fi
160     fi
161    
162     cflags="$cflags -DWITH_OPENSSL"
163     ldflags="$ldflags -lcrypto"
164     fi
165    
166    
167 matthewc 220 # Find EGD socket if we don't have /dev/urandom or /dev/random
168     if [ ! -c /dev/random -a ! -c /dev/urandom ]; then
169     egdpaths="$extraegdpath /var/run/egd-pool /dev/egd-pool /etc/egd-pool /etc/entropy"
170    
171     for path in $egdpaths; do
172     # -e isn't portable, so we use -r
173     if [ -r $path ]; then
174     egdpath=$path
175     break
176     fi
177     done
178    
179     if [ -z "$egdpath" ]; then
180     echo "WARNING: could not find /dev/urandom, /dev/random or Entropy Gathering Daemon (EGD) socket"
181     echo "(searched: $egdpaths)"
182     echo "Session keys may be less secure; installing a system randomness source is recommended."
183     echo
184     else
185     echo "Entropy Gathering Daemon (EGD):"
186     echo " socket $egdpath"
187     echo
188     cflags="$cflags -DEGD_SOCKET=\\\"$egdpath\\\""
189     fi
190     fi
191    
192 matthewc 189 echo "CFLAGS += $cflags" >>Makeconf
193     echo "LDFLAGS += $ldflags" >>Makeconf
194    
195 matty 30 echo "configure complete - now run make"

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26