2001-09-14 15:51:38 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# rdesktop: A Remote Desktop Protocol client
|
|
|
|
# configure script
|
|
|
|
# Copyright (C) Matthew Chapman 1999-2001
|
|
|
|
#
|
|
|
|
|
|
|
|
echo "# Generated by $0 $*" >Makeconf
|
|
|
|
|
2002-09-15 13:36:23 +02:00
|
|
|
|
|
|
|
# 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
|
2002-09-24 07:14:14 +02:00
|
|
|
if [ -f $dir/include/X11/Xlib.h ]; then
|
2002-09-15 13:36:23 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
# Process command line options
|
|
|
|
|
2001-09-14 15:51:38 +02:00
|
|
|
for arg in $*; do
|
|
|
|
optarg=`echo $arg | sed 's/[-a-z]*=//'`
|
|
|
|
case $arg in
|
|
|
|
--prefix=*)
|
2002-09-15 13:36:23 +02:00
|
|
|
echo "prefix = $optarg" >>Makeconf
|
2001-09-14 15:51:38 +02:00
|
|
|
;;
|
|
|
|
--exec-prefix=*)
|
2002-09-15 13:36:23 +02:00
|
|
|
echo "exec_prefix = $optarg" >>Makeconf
|
2001-09-14 15:51:38 +02:00
|
|
|
;;
|
|
|
|
--bindir=*)
|
2002-09-15 13:36:23 +02:00
|
|
|
echo "bindir = $optarg" >>Makeconf
|
2001-09-14 15:51:38 +02:00
|
|
|
;;
|
|
|
|
--mandir=*)
|
2002-09-15 13:36:23 +02:00
|
|
|
echo "mandir = $optarg" >>Makeconf
|
2001-09-15 11:37:17 +02:00
|
|
|
;;
|
2002-08-14 16:43:25 +02:00
|
|
|
--sharedir=*)
|
2002-09-15 13:36:23 +02:00
|
|
|
echo "datadir = $optarg" >>Makeconf
|
2002-08-14 16:43:25 +02:00
|
|
|
;;
|
2001-09-15 11:37:17 +02:00
|
|
|
--with-openssl*)
|
2002-09-15 13:36:23 +02:00
|
|
|
echo "CFLAGS += -DWITH_OPENSSL" >>Makeconf
|
|
|
|
echo "LDFLAGS += -lcrypto" >>Makeconf
|
|
|
|
echo "CRYPTOBJ =" >>Makeconf
|
2001-09-15 11:37:17 +02:00
|
|
|
;;
|
|
|
|
--without-openssl*)
|
2001-09-14 15:51:38 +02:00
|
|
|
;;
|
2002-07-18 16:44:32 +02:00
|
|
|
--with-debug)
|
2002-09-15 13:36:23 +02:00
|
|
|
echo "CFLAGS += -g -DWITH_DEBUG" >>Makeconf
|
2001-09-14 15:51:38 +02:00
|
|
|
;;
|
2002-07-18 16:44:32 +02:00
|
|
|
--with-debug-kbd)
|
2002-09-15 13:36:23 +02:00
|
|
|
echo "CFLAGS += -g -DWITH_DEBUG_KBD" >>Makeconf
|
2002-07-18 16:44:32 +02:00
|
|
|
;;
|
2001-09-14 15:51:38 +02:00
|
|
|
--without-debug*)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "rdesktop build configuration script"
|
|
|
|
echo
|
|
|
|
echo "Target directories:"
|
|
|
|
echo " --prefix=PREFIX location for architecture-independent files"
|
|
|
|
echo " --exec-prefix=EPREFIX location for architecture-dependent files"
|
|
|
|
echo " --bindir=BINDIR location for program binaries [EPREFIX/bin]"
|
|
|
|
echo " --mandir=MANDIR location for man pages [PREFIX/man]"
|
2002-08-14 16:43:25 +02:00
|
|
|
echo " --sharedir=SHAREDIR location for architecture-independent shared files [PREFIX/share/rdesktop]"
|
2001-09-14 15:51:38 +02:00
|
|
|
echo
|
|
|
|
echo "Build configuration:"
|
2001-09-15 11:37:17 +02:00
|
|
|
echo " --with-openssl use system OpenSSL libraries for crypto"
|
2002-09-15 13:36:23 +02:00
|
|
|
echo " --with-debug enable protocol debugging output"
|
2002-07-18 20:28:12 +02:00
|
|
|
echo " --with-debug-kbd enable debugging of keyboard handling"
|
2001-09-14 15:51:38 +02:00
|
|
|
echo
|
|
|
|
rm -f Makeconf
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "configure complete - now run make"
|