/[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 220 by matthewc, Thu Oct 10 07:25:31 2002 UTC revision 523 by matthewc, Wed Oct 29 06:16:31 2003 UTC
# Line 13  echo "# Generated by $0 $*" >Makeconf Line 13  echo "# Generated by $0 $*" >Makeconf
13    
14  # Process command line options  # Process command line options
15    
16  cflags=  cflags='-DKEYMAP_PATH=\"$(KEYMAP_PATH)\"'
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]*=//'`
# Line 41  case $arg in Line 42  case $arg in
42      extrassldir=$optarg      extrassldir=$optarg
43      ;;      ;;
44    --without-openssl*)    --without-openssl*)
45        withoutopenssl=yes
46      ;;      ;;
47    --with-egd-socket=*)    --with-egd-socket=*)
48      extraegdpath=$optarg      extraegdpath=$optarg
49      ;;      ;;
50      --with-libvncserver)
51        withvncserver=yes
52        ;;
53      --with-libvncserver-config=*)
54        vncserverconfig=$optarg
55        ;;
56    --with-debug)    --with-debug)
57      cflags="$cflags -g -DWITH_DEBUG"      cflags="$cflags -g -DWITH_DEBUG"
58      ;;      ;;
59    --with-debug-kbd)    --with-debug-kbd)
60      cflags="$cflags -g -DWITH_DEBUG_KBD"      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    *)    *)
# Line 64  case $arg in Line 78  case $arg in
78      echo "Build configuration:"      echo "Build configuration:"
79      echo " --with-x=DIR            look for X Window System at DIR/include, DIR/lib"      echo " --with-x=DIR            look for X Window System at DIR/include, DIR/lib"
80      echo " --with-openssl=DIR      look for OpenSSL at DIR/include, DIR/lib"      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"      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"      echo " --with-debug            enable protocol debugging output"
87      echo " --with-debug-kbd        enable debugging of keyboard handling"      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 75  esac Line 95  esac
95  done  done
96    
97    
98  # Platform-specific options  # Find compiler
99    
100  need_runpath=no  compilers="$CC gcc cc"
101    
102  case `uname -s` in  for compiler in $compilers; do
103    SunOS)      if [ -x "`which $compiler`" ]; then
104      ldflags="$ldflags -lsocket -lnsl"          cc=$compiler
105      need_runpath=yes          break
106      ;;      fi
107  esac  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  # Find X installation
# Line 103  if [ -z "$xdir" ]; then Line 153  if [ -z "$xdir" ]; then
153      echo "(searched for include/X11/Xlib.h in: $xdirs)"      echo "(searched for include/X11/Xlib.h in: $xdirs)"
154    
155      # additional helpful information for Linux users      # additional helpful information for Linux users
156      if [ -f /etc/redhat_release ]; then      if [ -f /etc/redhat-release ]; then
157        echo You probably need to install the XFree86-devel package        echo You probably need to install the XFree86-devel package
158      elif [ -f /etc/debian_version ]; then      elif [ -f /etc/debian_version ]; then
159        echo You probably need to install the xlibs-dev package        echo You probably need to install the xlibs-dev package
# Line 119  echo Line 169  echo
169  if [ $xdir != "/usr" ]; then  if [ $xdir != "/usr" ]; then
170      cflags="$cflags -I$xdir/include"      cflags="$cflags -I$xdir/include"
171      ldflags="$ldflags -L$xdir/lib"      ldflags="$ldflags -L$xdir/lib"
172      if [ $need_runpath = "yes" ]; then      rpath="$rpath:$xdir/lib"
         ldflags="$ldflags -R$xdir/lib"  
     fi  
173  fi  fi
174    
175  ldflags="$ldflags -lX11"  ldflags="$ldflags"
176    targets="$targets rdesktop"
177    
178  # Find OpenSSL installation if available  #withoutopenssl not currently supported
179    #if [ -z "$withoutopenssl" ]; then
180  ssldirs="$extrassldir /usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local"      # Find OpenSSL installation if available
181        ssldirs="$extrassldir /usr/openssl /usr/ssl /usr /usr/local/openssl /usr/local/ssl /usr/local"
182  for dir in $ssldirs; do      
183      if [ -f $dir/include/openssl/rc4.h ]; then      for dir in $ssldirs; do
184          ssldir=$dir          if [ -f $dir/include/openssl/rc4.h ]; then
185          break              ssldir=$dir
186      fi              break
187  done          fi
188        done
189  if [ -z "$ssldir" ]; then      
190      echo "WARNING: could not find OpenSSL headers"      if [ -z "$ssldir" ]; then
191      echo "(searched for include/openssl/rc4.h in: $ssldirs)"          echo "ERROR: could not find OpenSSL headers"
192      echo "Using in-tree crypto; installing OpenSSL is recommended."          echo "(searched for include/openssl/rc4.h in: $ssldirs)"
193      echo          # additional helpful information for Linux users
194  else          if [ -f /etc/redhat-release ]; then
195      echo "OpenSSL:"              echo You probably need to install the openssl-devel package
196      echo "  includes  $ssldir/include"          elif [ -f /etc/debian_version ]; then
197      echo "  libraries $ssldir/lib"              echo You probably need to install the libssl-dev package
     echo  
   
     echo "CRYPTOBJ    =" >>Makeconf  
   
     if [ $ssldir != "/usr" ]; then  
         cflags="$cflags -I$ssldir/include"  
         ldflags="$ldflags -L$ssldir/lib"  
         if [ $need_runpath = "yes" ]; then  
             ldflags="$ldflags -R$ssldir/lib"  
198          fi          fi
199            exit 1
200        else
201            echo "OpenSSL:"
202            echo "  includes  $ssldir/include"
203            echo "  libraries $ssldir/lib"
204            echo
205        
206            echo "CRYPTOBJ    =" >>Makeconf
207        
208            if [ $ssldir != "/usr" ]; then
209                cflags="$cflags -I$ssldir/include"
210                ldflags="$ldflags -L$ssldir/lib"
211                rpath="$rpath:$ssldir/lib"
212            fi
213        
214            cflags="$cflags -DWITH_OPENSSL"
215            ldflags="$ldflags -lcrypto"
216        fi
217    #fi
218        
219    if [ ! -z "$withvncserver" ]; then
220        if [ -z "$vncserverconfig" ]; then
221            vncserverconfig=libvncserver-config
222      fi      fi
223    
224      cflags="$cflags -DWITH_OPENSSL"      echo "VNCINC=`$vncserverconfig --cflags`" >> Makeconf
225      ldflags="$ldflags -lcrypto"      echo "LDVNC=`$vncserverconfig --libs`" >> Makeconf
226        echo "CCLD=`$vncserverconfig --link`" >> Makeconf
227        echo >> Makeconf
228        targets="$targets rdp2vnc"
229    
230        echo "Found libvncserver: Building rdp2vnc"
231  fi  fi
232    
233    
234  # Find EGD socket if we don't have /dev/urandom or /dev/random  # Find EGD socket if we don't have /dev/urandom or /dev/random
235    
236  if [ ! -c /dev/random -a ! -c /dev/urandom ]; then  if [ ! -c /dev/random -a ! -c /dev/urandom ]; then
237      egdpaths="$extraegdpath /var/run/egd-pool /dev/egd-pool /etc/egd-pool /etc/entropy"      egdpaths="$extraegdpath /var/run/egd-pool /dev/egd-pool /etc/egd-pool /etc/entropy"
238    
# Line 189  if [ ! -c /dev/random -a ! -c /dev/urand Line 257  if [ ! -c /dev/random -a ! -c /dev/urand
257      fi      fi
258  fi  fi
259    
260  echo "CFLAGS     += $cflags" >>Makeconf  # Check for OSS sound support
261  echo "LDFLAGS    += $ldflags" >>Makeconf  
262    if [ -f /usr/include/sys/soundcard.h ]; then
263        echo Sound support enabled: Open Sound System
264        echo
265        echo "SOUNDOBJ    = rdpsnd.o rdpsnd_oss.o" >>Makeconf
266        cflags="$cflags -DWITH_RDPSND"
267    elif [ -f /usr/include/sys/audioio.h ]; then
268        echo Sound support enabled: Sun
269        echo
270        echo "SOUNDOBJ    = rdpsnd.o rdpsnd_sun.o" >>Makeconf
271        cflags="$cflags -DWITH_RDPSND"
272    else
273        echo "WARNING: sound support disabled (no /usr/include/sys/soundcard.h or /usr/include/sys/audio.h)"
274        echo "Currently supported systems are Open Sound System and Sun"
275        echo
276    fi
277    
278    
279    # Platform-specific options
280    
281    # strip leading colon from rpath
282    rpath=`echo $rpath |sed 's/^://'`
283    
284    case `uname -s` in
285      SunOS)
286        ldflags="$ldflags -lsocket -lnsl -R$rpath"
287        ;;
288      OSF1)
289        ldflags="$ldflags -Wl,-rpath,$rpath"
290        ;;
291    esac
292    
293    
294    echo "CFLAGS      = $cflags" >>Makeconf
295    echo "LDFLAGS     = $ldflags" >>Makeconf
296    echo "TARGETS     = $targets" >>Makeconf
297    
298  echo "configure complete - now run make"  echo "configure complete - now run make"
299    

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

  ViewVC Help
Powered by ViewVC 1.1.26