/[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 188 by matthewc, Tue Sep 24 05:14:14 2002 UTC revision 189 by matthewc, Tue Sep 24 07:27:43 2002 UTC
# Line 8  Line 8 
8  echo "# Generated by $0 $*" >Makeconf  echo "# Generated by $0 $*" >Makeconf
9    
10    
 # Choose gcc if available  
   
 if `which gcc >/dev/null`; then  
     echo "CC          = gcc" >>Makeconf  
 fi  
   
   
 # Find X installation  
   
 xdirs="/usr/X11 /usr/X11R6 /usr/openwin /usr /usr/local/X11 /usr/local/X11R6 /usr/local"  
   
 for dir in $xdirs; do  
     if [ -f $dir/include/X11/Xlib.h ]; then  
         xdir=$dir  
         break  
     fi  
 done  
   
 if [ -z $xdir ]; then  
     echo "ERROR: could not find X installation"  
     echo "(searched for include/X11/Xlib.h in $xdirs)"  
     exit 1  
 fi  
   
 echo "X11DIR      = $xdir" >> Makeconf  
   
   
 # Add platform-specific options  
   
 case `uname -s` in  
   SunOS)  
     echo "LDFLAGS    += -R$(X11DIR)/lib -lsocket -lnsl" >>Makeconf  
     ;;  
 esac  
   
   
11  # Process command line options  # Process command line options
12    
13    cflags=
14    ldflags=
15    
16  for arg in $*; do  for arg in $*; do
17  optarg=`echo $arg | sed 's/[-a-z]*=//'`      optarg=`echo $arg | sed 's/[-a-z]*=//'`    
18  case $arg in  case $arg in
# Line 65  case $arg in Line 32  case $arg in
32      echo "datadir     = $optarg" >>Makeconf      echo "datadir     = $optarg" >>Makeconf
33      ;;      ;;
34    --with-openssl*)    --with-openssl*)
     echo "CFLAGS     += -DWITH_OPENSSL" >>Makeconf  
     echo "LDFLAGS    += -lcrypto" >>Makeconf  
     echo "CRYPTOBJ    =" >>Makeconf  
35      ;;      ;;
36    --without-openssl*)    --without-openssl*)
37      ;;      ;;
38    --with-debug)    --with-debug)
39      echo "CFLAGS     += -g -DWITH_DEBUG" >>Makeconf      cflags="$cflags -g -DWITH_DEBUG"
40      ;;      ;;
41    --with-debug-kbd)    --with-debug-kbd)
42      echo "CFLAGS     += -g -DWITH_DEBUG_KBD" >>Makeconf      cflags="$cflags -g -DWITH_DEBUG_KBD"
43      ;;      ;;
44    --without-debug*)    --without-debug*)
45      ;;      ;;
# Line 90  case $arg in Line 54  case $arg in
54      echo " --sharedir=SHAREDIR    location for architecture-independent shared files [PREFIX/share/rdesktop]"      echo " --sharedir=SHAREDIR    location for architecture-independent shared files [PREFIX/share/rdesktop]"
55      echo      echo
56      echo "Build configuration:"      echo "Build configuration:"
     echo " --with-openssl         use system OpenSSL libraries for crypto"  
57      echo " --with-debug           enable protocol debugging output"      echo " --with-debug           enable protocol debugging output"
58      echo " --with-debug-kbd       enable debugging of keyboard handling"      echo " --with-debug-kbd       enable debugging of keyboard handling"
59      echo      echo
# Line 100  case $arg in Line 63  case $arg in
63  esac  esac
64  done  done
65    
66    
67    # Platform-specific options
68    
69    need_runpath=no
70    
71    case `uname -s` in
72      SunOS)
73        ldflags="$ldflags -lsocket -lnsl"
74        need_runpath=yes
75        ;;
76    esac
77    
78    
79    # Find X installation
80    
81    xdirs="/usr /usr/X11R6 /usr/X11 /usr/openwin /usr/local /usr/local/X11R6 /usr/local/X11"
82    
83    for dir in $xdirs; do
84        if [ -f $dir/include/X11/Xlib.h ]; then
85            xdir=$dir
86            break
87        fi
88    done
89    
90    if [ -z "$xdir" ]; then
91        echo "ERROR: could not find X Window System headers"
92        echo "(searched for include/X11/Xlib.h in $xdirs)"
93    
94        # additional helpful information for Linux users
95        if [ -f /etc/redhat_release ]; then
96          echo You probably need to install the XFree86-devel package
97        elif [ -f /etc/debian_version ]; then
98          echo You probably need to install the xlibs-dev package
99        fi
100        exit 1
101    fi
102    
103    if [ $xdir != "/usr" ]; then
104        cflags="$cflags -I$xdir/include"
105        ldflags="$ldflags -L$xdir/lib"
106        if [ $need_runpath = "yes" ]; then
107            ldflags="$ldflags -R$xdir/lib"
108        fi
109    fi
110    
111    ldflags="$ldflags -lX11"
112    
113    
114    # Find OpenSSL installation if available
115    
116    ssldirs="/usr /usr/openssl /usr/ssl /usr/local /usr/local/openssl /usr/local/ssl"
117    
118    for dir in $ssldirs; do
119        if [ -f $dir/include/openssl/rc4.h ]; then
120            ssldir=$dir
121            break
122        fi
123    done
124    
125    if [ -z "$ssldir" ]; then
126        echo "WARNING: could not find OpenSSL headers"
127        echo "(searched for include/openssl/rc4.h in $ssldirs)"
128        echo "Using in-tree crypto; installing OpenSSL is recommended."
129        echo
130    else
131        echo "CRYPTOBJ    =" >>Makeconf
132    
133        if [ $ssldir != "/usr" ]; then
134            cflags="$cflags -I$ssldir/include"
135            ldflags="$ldflags -L$ssldir/lib"
136            if [ $need_runpath = "yes" ]; then
137                ldflags="$ldflags -R$ssldir/lib"
138            fi
139        fi
140    
141        cflags="$cflags -DWITH_OPENSSL"
142        ldflags="$ldflags -lcrypto"
143    fi
144    
145    
146    echo "CFLAGS     += $cflags" >>Makeconf
147    echo "LDFLAGS    += $ldflags" >>Makeconf
148    
149  echo "configure complete - now run make"  echo "configure complete - now run make"

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

  ViewVC Help
Powered by ViewVC 1.1.26