/[rdesktop]/sourceforge.net/tags/RDESKTOP-1-3-1/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/tags/RDESKTOP-1-3-1/rdesktop/configure

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

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

Legend:
Removed from v.98  
changed lines
  Added in v.333

  ViewVC Help
Powered by ViewVC 1.1.26