/[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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 834 - (show annotations)
Tue Mar 8 03:45:39 2005 UTC (19 years, 2 months ago) by stargo
File size: 7732 byte(s)
remove wrong AC_MSG_CHECKING([checking for sound support])

1 AC_INIT(rdesktop, 1.4.0)
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 AC_CHECK_HEADER(sys/select.h, AC_DEFINE(HAVE_SYS_SELECT_H))
20 AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H))
21 AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(HAVE_SYS_FILIO_H))
22 AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H))
23
24 rpath=""
25
26 #
27 # OpenSSL detection borrowed from stunnel
28 #
29 checkssldir() { :
30 if test -f "$1/include/openssl/ssl.h"; then
31 ssldir="$1"
32 return 0
33 fi
34 return 1
35 }
36 AC_MSG_CHECKING([for OpenSSL directory])
37 AC_ARG_WITH(openssl,
38 [ --with-openssl=DIR look for OpenSSL at DIR/include, DIR/lib],
39 [
40 dnl Check the specified location only
41 checkssldir "$withval"
42 ],
43 [
44 dnl Search default locations of OpenSSL library
45 for maindir in /usr/local /usr/lib /usr/pkg /usr /var/ssl /opt; do
46 for dir in $maindir $maindir/openssl $maindir/ssl; do
47 checkssldir $dir && break 2
48 done
49 done
50 ]
51 )
52 if test -z "$ssldir"; then
53 AC_MSG_RESULT([Not found])
54 echo
55 echo "Couldn't find your OpenSSL library installation dir"
56 echo "Use --with-openssl option to fix this problem"
57 echo
58 exit 1
59 fi
60 AC_MSG_RESULT([$ssldir])
61 AC_SUBST(ssldir)
62 AC_DEFINE_UNQUOTED(ssldir, "$ssldir")
63
64 dnl Add OpenSSL includes and libraries
65 CFLAGS="$CFLAGS -I$ssldir/include"
66 AC_ARG_ENABLE(static-openssl,
67 [ --enable-static-openssl link OpenSSL statically],
68 [
69 LIBS="$LIBS $ssldir/lib/libcrypto.a"
70 ],
71 [
72 LIBS="$LIBS -L$ssldir/lib -lcrypto"
73 rpath="$rpath:$ssldir/lib"
74 ])
75
76
77 #
78 # Alignment
79 #
80 AC_MSG_CHECKING([if architecture needs alignment])
81 AC_TRY_RUN([
82 #include <stdlib.h>
83 #include <signal.h>
84 int main(int argc, char **argv)
85 {
86 unsigned char test[8] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 };
87 signal(SIGBUS, exit);
88 signal(SIGABRT, exit);
89 signal(SIGSEGV, exit);
90 if (*((unsigned int *)(test + 1)) != 0x55443322 && *((unsigned int *)(test + 1)) != 0x22334455) {
91 return 1;
92 }
93 return 0;
94 }],
95 [AC_MSG_RESULT(no)],
96 [AC_MSG_RESULT(yes)
97 AC_DEFINE(NEED_ALIGN)],
98 [AC_MSG_RESULT(assuming yes)
99 AC_DEFINE(NEED_ALIGN)])
100
101
102 #
103 # EGD
104 #
105 AC_ARG_WITH(egd-socket,
106 [ --with-egd-socket=PATH look for Entropy Gathering Daemon socket at PATH],
107 [EGD_SOCKET="$withval"],
108 [EGD_SOCKET="/var/run/egd-pool"]
109 )
110 AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET")
111
112
113 #
114 # rdp2vnc
115 #
116 vncserverconfig=libvncserver-config
117 AC_ARG_WITH(libvncserver-config,
118 [ --with-libvncserver-config=CMD use CMD as libvncserver-config],
119 [vncserverconfig="$withval"]
120 )
121 AC_ARG_WITH(libvncserver,
122 [ --with-libvncserver make rdp2vnc],
123 [
124 VNCINC=`$vncserverconfig --cflags`
125 AC_SUBST(VNCINC)
126 LDVNC=`$vncserverconfig --libs`
127 AC_SUBST(LDVNC)
128 VNCLINK=`$vncserverconfig --link`
129 AC_SUBST(VNCLINK)
130 RDP2VNCTARGET="rdp2vnc"
131 AC_SUBST(RDP2VNCTARGET)
132 ]
133 )
134
135 #
136 # sound
137 #
138 AC_ARG_WITH(libao,
139 [ --with-libao=DIR look for libao at DIR/include, DIR/lib],
140 [
141 CFLAGS="$CFLAGS -I$withval/include"
142 CPPFLAGS="$CPPFLAGS -I$withval/include"
143 LIBS="$LIBS -L$withval/lib"
144 rpath="$rpath:$withval/lib"
145 ]
146 )
147
148 sound="yes"
149 AC_ARG_WITH(sound,
150 [ --with-sound select sound system ("oss", "sgi", "sun" or "libao") ],
151 [
152 sound="$withval"
153 ])
154 if test "$sound" = yes; then
155 AC_CHECK_HEADER(ao/ao.h, [sound=libao])
156 AC_CHECK_HEADER(sys/soundcard.h, [sound=oss])
157 AC_CHECK_HEADER(dmedia/audio.h, [sound=sgi])
158 AC_CHECK_HEADER(sys/audioio.h, [sound=sun])
159 fi
160 if test "$sound" = no; then
161 break
162 elif test "$sound" = oss; then
163 SOUNDOBJ="rdpsnd.o rdpsnd_oss.o"
164 AC_DEFINE(WITH_RDPSND)
165 elif test "$sound" = sgi; then
166 SOUNDOBJ="rdpsnd.o rdpsnd_sgi.o"
167 LDFLAGS="$LDFLAGS -laudio"
168 AC_DEFINE(WITH_RDPSND)
169 elif test "$sound" = sun; then
170 SOUNDOBJ="rdpsnd.o rdpsnd_sun.o"
171 AC_DEFINE(WITH_RDPSND)
172 elif test "$sound" = libao; then
173 SOUNDOBJ="rdpsnd.o rdpsnd_libao.o"
174 LDFLAGS="$LDFLAGS -lao"
175 AC_DEFINE(WITH_RDPSND)
176 else
177 AC_MSG_WARN([sound support disabled])
178 AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun) and libao])
179 fi
180 AC_SUBST(SOUNDOBJ)
181
182 #
183 # dirfd
184 #
185 dnl Find out how to get the file descriptor associated with an open DIR*.
186 dnl From Jim Meyering
187
188 AC_DEFUN([UTILS_FUNC_DIRFD],
189 [
190
191 AC_HEADER_DIRENT
192 dirfd_headers='
193 #if HAVE_DIRENT_H
194 # include <dirent.h>
195 #else /* not HAVE_DIRENT_H */
196 # define dirent direct
197 # if HAVE_SYS_NDIR_H
198 # include <sys/ndir.h>
199 # endif /* HAVE_SYS_NDIR_H */
200 # if HAVE_SYS_DIR_H
201 # include <sys/dir.h>
202 # endif /* HAVE_SYS_DIR_H */
203 # if HAVE_NDIR_H
204 # include <ndir.h>
205 # endif /* HAVE_NDIR_H */
206 #endif /* HAVE_DIRENT_H */
207 '
208 AC_CHECK_FUNCS(dirfd)
209 AC_CHECK_DECLS([dirfd], , , $dirfd_headers)
210
211 AC_CACHE_CHECK([whether dirfd is a macro],
212 jm_cv_func_dirfd_macro,
213 [AC_EGREP_CPP([dirent_header_defines_dirfd], [$dirfd_headers
214 #ifdef dirfd
215 dirent_header_defines_dirfd
216 #endif],
217 jm_cv_func_dirfd_macro=yes,
218 jm_cv_func_dirfd_macro=no)])
219
220 # Use the replacement only if we have no function, macro,
221 # or declaration with that name.
222 if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$jm_cv_func_dirfd_macro \
223 = no,no,no; then
224 AC_REPLACE_FUNCS([dirfd])
225 AC_CACHE_CHECK(
226 [how to get the file descriptor associated with an open DIR*],
227 gl_cv_sys_dir_fd_member_name,
228 [
229 dirfd_save_CFLAGS=$CFLAGS
230 for ac_expr in d_fd dd_fd; do
231
232 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
233 AC_TRY_COMPILE(
234 [$dirfd_headers
235 ],
236 [DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;],
237 dir_fd_found=yes
238 )
239 CFLAGS=$dirfd_save_CFLAGS
240 test "$dir_fd_found" = yes && break
241 done
242 test "$dir_fd_found" = yes || ac_expr=no_such_member
243
244 gl_cv_sys_dir_fd_member_name=$ac_expr
245 ]
246 )
247 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
248 AC_DEFINE_UNQUOTED(DIR_FD_MEMBER_NAME,
249 $gl_cv_sys_dir_fd_member_name,
250 [the name of the file descriptor member of DIR])
251 fi
252 AH_VERBATIM(DIR_TO_FD,
253 [#ifdef DIR_FD_MEMBER_NAME
254 # define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME)
255 #else
256 # define DIR_TO_FD(Dir_p) -1
257 #endif
258 ]
259 )
260 fi
261 ])
262
263 UTILS_FUNC_DIRFD
264
265
266 #
267 # IPv6
268 #
269 AC_ARG_WITH(ipv6,
270 [ --with-ipv6 enable IPv6-support],
271 [ AC_DEFINE(IPv6) ])
272
273
274 #
275 # debugging
276 #
277 AC_ARG_WITH(debug,
278 [ --with-debug enable protocol debugging output],
279 [ AC_DEFINE(WITH_DEBUG) ])
280
281 AC_ARG_WITH(debug-kbd,
282 [ --with-debug-kbd enable debugging of keyboard handling],
283 [ AC_DEFINE(WITH_DEBUG_KBD) ])
284
285 AC_ARG_WITH(debug-rdp5,
286 [ --with-debug-rdp5 enable debugging of RDP5 code],
287 [ AC_DEFINE(WITH_DEBUG_RDP5) ])
288
289 AC_ARG_WITH(debug-clipboard,
290 [ --with-debug-clipboard enable debugging of clipboard code],
291 [ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ])
292
293
294 #
295 # target-specific stuff
296 #
297 # strip leading colon from rpath
298 rpath=`echo $rpath |sed 's/^://'`
299 AC_CANONICAL_HOST
300 case "$host" in
301 *-*-solaris*)
302 LDFLAGS="$LDFLAGS -R$rpath"
303 ;;
304 *-dec-osf*)
305 LDFLAGS="$LDFLAGS -Wl,-rpath,$rpath"
306 ;;
307 *-*-hpux*)
308 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
309 ;;
310 *-*-irix6.5*)
311 LIBS="$LIBS -L$ssldir/lib32 -lcrypto"
312 CFLAGS="$CFLAGS -D__SGI_IRIX__"
313 ;;
314 esac
315
316
317 AC_OUTPUT(Makefile)
318
319 dnl Local Variables:
320 dnl comment-start: "dnl "
321 dnl comment-end: ""
322 dnl comment-start-skip: "\\bdnl\\b\\s *"
323 dnl compile-command: "autoconf"
324 dnl End:

  ViewVC Help
Powered by ViewVC 1.1.26