/[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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.63  
changed lines
  Added in v.515

  ViewVC Help
Powered by ViewVC 1.1.26