/[rdesktop]/sourceforge.net/trunk/rdesktop/configure.ac
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /sourceforge.net/trunk/rdesktop/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 740 - (hide annotations)
Sat Jul 31 13:07:41 2004 UTC (19 years, 9 months ago) by astrand
File size: 4658 byte(s)
Now using Autoconf. Old OpenSSL files removed.

1 astrand 740 AC_INIT(rdesktop, 1.3.1)
2    
3     AC_CONFIG_SRCDIR([rdesktop.c])
4    
5     AC_PROG_CC
6     if test "$GCC" = yes; then
7     CFLAGS="$CFLAGS -Wall"
8     fi
9    
10     AC_PROG_INSTALL
11     AC_LANG_C
12     AC_HEADER_STDC
13     AC_C_BIGENDIAN([AC_DEFINE(B_ENDIAN)], [AC_DEFINE(L_ENDIAN)])
14     AC_PATH_XTRA
15    
16     AC_SEARCH_LIBS(socket, socket)
17     AC_SEARCH_LIBS(inet_aton, resolv)
18    
19     rpath=""
20    
21     #
22     # OpenSSL detection borrowed from stunnel
23     #
24     checkssldir() { :
25     if test -f "$1/include/openssl/ssl.h"; then
26     ssldir="$1"
27     return 0
28     fi
29     return 1
30     }
31     AC_MSG_CHECKING([for OpenSSL directory])
32     AC_ARG_WITH(openssl,
33     [ --with-openssl=DIR look for OpenSSL at DIR/include, DIR/lib],
34     [
35     dnl Check the specified location only
36     checkssldir "$withval"
37     ],
38     [
39     dnl Search default locations of OpenSSL library
40     for maindir in /usr/local /usr/lib /usr/pkg /usr /var/ssl /opt; do
41     for dir in $maindir $maindir/openssl $maindir/ssl; do
42     checkssldir $dir && break 2
43     done
44     done
45     ]
46     )
47     if test -z "$ssldir"; then
48     AC_MSG_RESULT([Not found])
49     echo
50     echo "Couldn't find your OpenSSL library installation dir"
51     echo "Use --with-openssl option to fix this problem"
52     echo
53     exit 1
54     fi
55     AC_MSG_RESULT([$ssldir])
56     AC_SUBST(ssldir)
57     AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
58    
59     dnl Add OpenSSL includes and libraries
60     CFLAGS="$CFLAGS -I$ssldir/include"
61     AC_ARG_ENABLE(static-openssl,
62     [ --enable-static-openssl link OpenSSL statically],
63     [
64     LIBS="$LIBS $ssldir/lib/libcrypto.a"
65     ],
66     [
67     LIBS="$LIBS -L$ssldir/lib -lcrypto"
68     rpath="$rpath:$ssldir/lib"
69     ])
70    
71    
72     #
73     # Alignment
74     #
75     AC_MSG_CHECKING([if architecture needs alignment])
76     AC_TRY_RUN([
77     #include <stdlib.h>
78     #include <signal.h>
79     int main(int argc, char **argv)
80     {
81     unsigned char test[8] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 };
82     signal(SIGBUS, exit);
83     signal(SIGABRT, exit);
84     signal(SIGSEGV, exit);
85     if (*((unsigned int *)(test + 1)) != 0x55443322 && *((unsigned int *)(test + 1)) != 0x22334455) {
86     return 1;
87     }
88     return 0;
89     }],
90     [AC_MSG_RESULT(no)],
91     [AC_MSG_RESULT(yes)
92     AC_DEFINE(NEED_ALIGN)],
93     [AC_MSG_RESULT(assuming yes)
94     AC_DEFINE(NEED_ALIGN)])
95    
96    
97     #
98     # EGD
99     #
100     AC_ARG_WITH(egd-socket,
101     [ --with-egd-socket=PATH look for Entropy Gathering Daemon socket at PATH],
102     [EGD_SOCKET="$withval"],
103     [EGD_SOCKET="/var/run/egd-pool"]
104     )
105     AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
106    
107    
108     #
109     # rdp2vnc
110     #
111     vncserverconfig=libvncserver-config
112     AC_ARG_WITH(libvncserver-config,
113     [ --with-libvncserver-config=CMD use CMD as libvncserver-config],
114     [vncserverconfig="$withval"]
115     )
116     AC_ARG_WITH(libvncserver,
117     [ --with-libvncserver make rdp2vnc],
118     [
119     VNCINC=`$vncserverconfig --cflags`
120     AC_SUBST(VNCINC)
121     LDVNC=`$vncserverconfig --libs`
122     AC_SUBST(LDVNC)
123     VNCLINK=`$vncserverconfig --link`
124     AC_SUBST(VNCLINK)
125     RDP2VNCTARGET="rdp2vnc"
126     AC_SUBST(RDP2VNCTARGET)
127     ]
128     )
129    
130     #
131     # sound
132     #
133     sound="yes"
134     AC_ARG_WITH(sound,
135     [ --with-sound select sound system ("oss" or "sun") ],
136     [
137     sound="$withval"
138     ])
139     if test "$sound" = yes; then
140     AC_CHECK_HEADER(sys/soundcard.h, [sound=oss])
141     AC_CHECK_HEADER(sys/audioio.h, [sound=sun])
142     fi
143     if test "$sound" = no; then
144     break
145     elif test "$sound" = oss; then
146     SOUNDOBJ="rdpsnd.o rdpsnd_oss.o"
147     AC_DEFINE(WITH_RDPSND)
148     elif test "$sound" = sun; then
149     SOUNDOBJ="rdpsnd.o rdpsnd_sun.o"
150     AC_DEFINE(WITH_RDPSND)
151     else
152     AC_MSG_WARN([sound support disabled (no sys/soundcard.h or sys/audioio.h)])
153     AC_MSG_WARN([Currently supported systems are Open Sound System (oss) and Sun/BSD (sun)])
154     fi
155     AC_SUBST(SOUNDOBJ)
156    
157    
158     #
159     # debugging
160     #
161     AC_ARG_WITH(debug,
162     [ --with-debug enable protocol debugging output],
163     [ AC_DEFINE(WITH_DEBUG) ])
164    
165     AC_ARG_WITH(debug-kbd,
166     [ --with-debug-kbd enable debugging of keyboard handling],
167     [ AC_DEFINE(WITH_DEBUG_KBD) ])
168    
169     AC_ARG_WITH(debug-rdp5,
170     [ --with-debug-rdp5 enable debugging of RDP5 code],
171     [ AC_DEFINE(WITH_DEBUG_RDP5) ])
172    
173     AC_ARG_WITH(debug-clipboard,
174     [ --with-debug-clipboard enable debugging of clipboard code],
175     [ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ])
176    
177    
178     #
179     # target-specific stuff
180     #
181     # strip leading colon from rpath
182     rpath=`echo $rpath |sed 's/^://'`
183     AC_CANONICAL_HOST
184     case "$host" in
185     *-*-solaris*)
186     LDFLAGS="$LDFLAGS -R$rpath"
187     ;;
188     *-dec-osf*)
189     LDFLAGS="$LDFLAGS -Wl,-rpath,$rpath"
190     ;;
191     *-*-hpux*)
192     CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
193     ;;
194     esac
195    
196    
197     AC_OUTPUT(Makefile)
198    
199     dnl Local Variables:
200     dnl comment-start: "dnl "
201     dnl comment-end: ""
202     dnl comment-start-skip: "\\bdnl\\b\\s *"
203     dnl compile-command: "autoconf"
204     dnl End:

  ViewVC Help
Powered by ViewVC 1.1.26