/[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 221 - (hide annotations)
Thu Oct 10 07:47:29 2002 UTC (21 years, 7 months ago) by matthewc
File size: 4775 byte(s)
Fix rpath handling - on OSF1 (at least) we need to pass the rpath in one
colon-separated list.

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

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26