/[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 189 by matthewc, Tue Sep 24 07:27:43 2002 UTC revision 267 by astrand, Tue Nov 19 11:06:12 2002 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    
# Line 12  echo "# Generated by $0 $*" >Makeconf Line 15  echo "# Generated by $0 $*" >Makeconf
15    
16  cflags=  cflags=
17  ldflags=  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
# Line 31  case $arg in Line 35  case $arg in
35    --sharedir=*)    --sharedir=*)
36      echo "datadir     = $optarg" >>Makeconf      echo "datadir     = $optarg" >>Makeconf
37      ;;      ;;
38      --with-x*)
39        extraxdir=$optarg
40        ;;
41    --with-openssl*)    --with-openssl*)
42        extrassldir=$optarg
43      ;;      ;;
44    --without-openssl*)    --without-openssl*)
45        withoutopenssl=yes
46        ;;
47      --with-egd-socket=*)
48        extraegdpath=$optarg
49      ;;      ;;
50    --with-debug)    --with-debug)
51      cflags="$cflags -g -DWITH_DEBUG"      cflags="$cflags -g -DWITH_DEBUG"
# Line 44  case $arg in Line 56  case $arg in
56    --without-debug*)    --without-debug*)
57      ;;      ;;
58    *)    *)
     echo "rdesktop build configuration script"  
     echo  
59      echo "Target directories:"      echo "Target directories:"
60      echo " --prefix=PREFIX        location for architecture-independent files"      echo " --prefix=PREFIX         location for architecture-independent files"
61      echo " --exec-prefix=EPREFIX  location for architecture-dependent files"      echo " --exec-prefix=EPREFIX   location for architecture-dependent files"
62      echo " --bindir=BINDIR        location for program binaries [EPREFIX/bin]"      echo " --bindir=BINDIR         location for program binaries [EPREFIX/bin]"
63      echo " --mandir=MANDIR        location for man pages [PREFIX/man]"      echo " --mandir=MANDIR         location for man pages [PREFIX/man]"
64      echo " --sharedir=SHAREDIR    location for architecture-independent shared files [PREFIX/share/rdesktop]"      echo " --sharedir=SHAREDIR     location for architecture-independent shared files [PREFIX/share/rdesktop]"
65      echo      echo
66      echo "Build configuration:"      echo "Build configuration:"
67      echo " --with-debug           enable protocol debugging output"      echo " --with-x=DIR            look for X Window System at DIR/include, DIR/lib"
68      echo " --with-debug-kbd       enable debugging of keyboard handling"      echo " --with-openssl=DIR      look for OpenSSL at DIR/include, DIR/lib"
69        echo " --without-openssl       use in-tree crypto, even if OpenSSL is available"
70        echo " --with-egd-socket=PATH  look for Entropy Gathering Daemon socket at PATH"
71        echo " --with-debug            enable protocol debugging output"
72        echo " --with-debug-kbd        enable debugging of keyboard handling"
73      echo      echo
74      rm -f Makeconf      rm -f Makeconf
75      exit 1      exit 1
# Line 64  esac Line 78  esac
78  done  done
79    
80    
81  # Platform-specific options  # Find compiler
82    
83  need_runpath=no  compilers="$CC gcc cc"
84    
85  case `uname -s` in  for compiler in $compilers; do
86    SunOS)      if [ -x "`which $compiler`" ]; then
87      ldflags="$ldflags -lsocket -lnsl"          cc=$compiler
88      need_runpath=yes          break
89      ;;      fi
90  esac  done
91    
92    if [ -z "$cc" ]; then
93        echo "ERROR: could not find a C compiler (tried: $compilers)"
94        echo "You probably want to install gcc"
95        exit 1
96    fi
97    
98    echo "CC          = $cc" >>Makeconf
99    
100    if $cc -v 2>&1 |grep '^gcc' >/dev/null; then
101        cflags="$cflags -Wall -O2"
102    else
103        cflags="$cflags -O"
104    fi
105    
106    
107  # Find X installation  # Find X installation
108    
109  xdirs="/usr /usr/X11R6 /usr/X11 /usr/openwin /usr/local /usr/local/X11R6 /usr/local/X11"  xdirs="$extraxdir /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local"
110    
111  for dir in $xdirs; do  for dir in $xdirs; do
112      if [ -f $dir/include/X11/Xlib.h ]; then      if [ -f $dir/include/X11/Xlib.h ]; then
# Line 89  done Line 117  done
117    
118  if [ -z "$xdir" ]; then  if [ -z "$xdir" ]; then
119      echo "ERROR: could not find X Window System headers"      echo "ERROR: could not find X Window System headers"
120      echo "(searched for include/X11/Xlib.h in $xdirs)"      echo "(searched for include/X11/Xlib.h in: $xdirs)"
121    
122      # additional helpful information for Linux users      # additional helpful information for Linux users
123      if [ -f /etc/redhat_release ]; then      if [ -f /etc/redhat_release ]; then
# Line 100  if [ -z "$xdir" ]; then Line 128  if [ -z "$xdir" ]; then
128      exit 1      exit 1
129  fi  fi
130    
131    echo "X Window System:"
132    echo "  includes  $xdir/include"
133    echo "  libraries $xdir/lib"
134    echo
135    
136  if [ $xdir != "/usr" ]; then  if [ $xdir != "/usr" ]; then
137      cflags="$cflags -I$xdir/include"      cflags="$cflags -I$xdir/include"
138      ldflags="$ldflags -L$xdir/lib"      ldflags="$ldflags -L$xdir/lib"
139      if [ $need_runpath = "yes" ]; then      rpath="$rpath:$xdir/lib"
         ldflags="$ldflags -R$xdir/lib"  
     fi  
140  fi  fi
141    
142  ldflags="$ldflags -lX11"  ldflags="$ldflags -lX11"
143    
144    
145  # Find OpenSSL installation if available  if [ -z "$withoutopenssl" ]; then
146        # Find OpenSSL installation if available
147  ssldirs="/usr /usr/openssl /usr/ssl /usr/local /usr/local/openssl /usr/local/ssl"      ssldirs="$extrassldir /usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local"
148        
149  for dir in $ssldirs; do      for dir in $ssldirs; do
150      if [ -f $dir/include/openssl/rc4.h ]; then          if [ -f $dir/include/openssl/rc4.h ]; then
151          ssldir=$dir              ssldir=$dir
152          break              break
153            fi
154        done
155        
156        if [ -z "$ssldir" ]; then
157            echo "WARNING: could not find OpenSSL headers"
158            echo "(searched for include/openssl/rc4.h in: $ssldirs)"
159            echo "Using in-tree crypto; installing OpenSSL is recommended."
160            echo
161        else
162            echo "OpenSSL:"
163            echo "  includes  $ssldir/include"
164            echo "  libraries $ssldir/lib"
165            echo
166        
167            echo "CRYPTOBJ    =" >>Makeconf
168        
169            if [ $ssldir != "/usr" ]; then
170                cflags="$cflags -I$ssldir/include"
171                ldflags="$ldflags -L$ssldir/lib"
172                rpath="$rpath:$ssldir/lib"
173            fi
174        
175            cflags="$cflags -DWITH_OPENSSL"
176            ldflags="$ldflags -lcrypto"
177      fi      fi
178  done  fi
179        
180    
181  if [ -z "$ssldir" ]; then  # Find EGD socket if we don't have /dev/urandom or /dev/random
182      echo "WARNING: could not find OpenSSL headers"  
183      echo "(searched for include/openssl/rc4.h in $ssldirs)"  if [ ! -c /dev/random -a ! -c /dev/urandom ]; then
184      echo "Using in-tree crypto; installing OpenSSL is recommended."      egdpaths="$extraegdpath /var/run/egd-pool /dev/egd-pool /etc/egd-pool /etc/entropy"
     echo  
 else  
     echo "CRYPTOBJ    =" >>Makeconf  
185    
186      if [ $ssldir != "/usr" ]; then      for path in $egdpaths; do
187          cflags="$cflags -I$ssldir/include"          # -e isn't portable, so we use -r
188          ldflags="$ldflags -L$ssldir/lib"          if [ -r $path ]; then
189          if [ $need_runpath = "yes" ]; then              egdpath=$path
190              ldflags="$ldflags -R$ssldir/lib"              break
191          fi          fi
192      fi      done
193    
194      cflags="$cflags -DWITH_OPENSSL"      if [ -z "$egdpath" ]; then
195      ldflags="$ldflags -lcrypto"          echo "WARNING: could not find /dev/urandom, /dev/random or Entropy Gathering Daemon (EGD) socket"
196            echo "(searched: $egdpaths)"
197            echo "Session keys may be less secure; installing a system randomness source is recommended."
198            echo
199        else
200            echo "Entropy Gathering Daemon (EGD):"
201            echo "  socket    $egdpath"
202            echo
203            cflags="$cflags -DEGD_SOCKET=\\\"$egdpath\\\""
204        fi
205  fi  fi
206    
207    
208    # Platform-specific options
209    
210    # strip leading colon from rpath
211    rpath=`echo $rpath |sed 's/^://'`
212    
213    case `uname -s` in
214      SunOS)
215        ldflags="$ldflags -lsocket -lnsl -R$rpath"
216        ;;
217      OSF1)
218        ldflags="$ldflags -Wl,-rpath,$rpath"
219        ;;
220    esac
221    
222    
223  echo "CFLAGS     += $cflags" >>Makeconf  echo "CFLAGS     += $cflags" >>Makeconf
224  echo "LDFLAGS    += $ldflags" >>Makeconf  echo "LDFLAGS    += $ldflags" >>Makeconf
225    
226  echo "configure complete - now run make"  echo "configure complete - now run make"
227    

Legend:
Removed from v.189  
changed lines
  Added in v.267

  ViewVC Help
Powered by ViewVC 1.1.26