/[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 66 by astrand, Thu Jul 18 18:28:12 2002 UTC revision 220 by matthewc, Thu Oct 10 07:25:31 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    
14    # Process command line options
15    
16    cflags=
17    ldflags=
18    
19  for arg in $*; do  for arg in $*; do
20  optarg=`echo $arg | sed 's/[-a-z]*=//'`      optarg=`echo $arg | sed 's/[-a-z]*=//'`
21  case $arg in  case $arg in
22    --prefix=*)    --prefix=*)
23      echo "PREFIX   = $optarg" >>Makeconf      echo "prefix      = $optarg" >>Makeconf
24      ;;      ;;
25    --exec-prefix=*)    --exec-prefix=*)
26      echo "EPREFIX  = $optarg" >>Makeconf      echo "exec_prefix = $optarg" >>Makeconf
27      ;;      ;;
28    --bindir=*)    --bindir=*)
29      echo "BINDIR   = $optarg" >>Makeconf      echo "bindir      = $optarg" >>Makeconf
30      ;;      ;;
31    --mandir=*)    --mandir=*)
32      echo "MANDIR   = $optarg" >>Makeconf      echo "mandir      = $optarg" >>Makeconf
33        ;;
34      --sharedir=*)
35        echo "datadir     = $optarg" >>Makeconf
36        ;;
37      --with-x*)
38        extraxdir=$optarg
39      ;;      ;;
40    --with-openssl*)    --with-openssl*)
41      echo "CFLAGS  += -DWITH_OPENSSL" >>Makeconf      extrassldir=$optarg
     echo "LDLIBS  += -lcrypto" >>Makeconf  
     echo "CRYPTOBJ =" >>Makeconf  
42      ;;      ;;
43    --without-openssl*)    --without-openssl*)
44      ;;      ;;
45      --with-egd-socket=*)
46        extraegdpath=$optarg
47        ;;
48    --with-debug)    --with-debug)
49      echo "CFLAGS  += -g -DWITH_DEBUG" >>Makeconf      cflags="$cflags -g -DWITH_DEBUG"
50      ;;      ;;
51    --with-debug-kbd)    --with-debug-kbd)
52      echo "CFLAGS  += -g -DWITH_DEBUG_KBD" >>Makeconf      cflags="$cflags -g -DWITH_DEBUG_KBD"
53      ;;      ;;
54    --without-debug*)    --without-debug*)
55      ;;      ;;
56    *)    *)
     echo "rdesktop build configuration script"  
     echo  
57      echo "Target directories:"      echo "Target directories:"
58      echo " --prefix=PREFIX        location for architecture-independent files"      echo " --prefix=PREFIX         location for architecture-independent files"
59      echo " --exec-prefix=EPREFIX  location for architecture-dependent files"      echo " --exec-prefix=EPREFIX   location for architecture-dependent files"
60      echo " --bindir=BINDIR        location for program binaries [EPREFIX/bin]"      echo " --bindir=BINDIR         location for program binaries [EPREFIX/bin]"
61      echo " --mandir=MANDIR        location for man pages [PREFIX/man]"      echo " --mandir=MANDIR         location for man pages [PREFIX/man]"
62        echo " --sharedir=SHAREDIR     location for architecture-independent shared files [PREFIX/share/rdesktop]"
63      echo      echo
64      echo "Build configuration:"      echo "Build configuration:"
65      echo " --with-openssl         use system OpenSSL libraries for crypto"      echo " --with-x=DIR            look for X Window System at DIR/include, DIR/lib"
66      echo " --with-debug           enable debugging output"      echo " --with-openssl=DIR      look for OpenSSL at DIR/include, DIR/lib"
67      echo " --with-debug-kbd       enable debugging of keyboard handling"      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      echo      echo
71      rm -f Makeconf      rm -f Makeconf
72      exit 1      exit 1
# Line 57  case $arg in Line 74  case $arg in
74  esac  esac
75  done  done
76    
77    
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    xdirs="$extraxdir /usr/X11R6 /usr/X11 /usr/openwin /usr /usr/local/X11R6 /usr/local/X11 /usr/local"
93    
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        echo "(searched for include/X11/Xlib.h in: $xdirs)"
104    
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    echo "X Window System:"
115    echo "  includes  $xdir/include"
116    echo "  libraries $xdir/lib"
117    echo
118    
119    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    ssldirs="$extrassldir /usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local"
133    
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        echo "(searched for include/openssl/rc4.h in: $ssldirs)"
144        echo "Using in-tree crypto; installing OpenSSL is recommended."
145        echo
146    else
147        echo "OpenSSL:"
148        echo "  includes  $ssldir/include"
149        echo "  libraries $ssldir/lib"
150        echo
151    
152        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    # 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    echo "CFLAGS     += $cflags" >>Makeconf
193    echo "LDFLAGS    += $ldflags" >>Makeconf
194    
195  echo "configure complete - now run make"  echo "configure complete - now run make"

Legend:
Removed from v.66  
changed lines
  Added in v.220

  ViewVC Help
Powered by ViewVC 1.1.26