blob: ae17c8bfe3b6b540778956530a1ac547caec323f [file] [log] [blame]
Benny Prijonoc4c61d02006-08-20 20:47:34 +00001AC_INIT(pjproject,0.5.8)
2AC_CANONICAL_BUILD
3AC_CANONICAL_HOST
Benny Prijonoa9b372a2006-07-24 02:07:11 +00004AC_CANONICAL_TARGET
Benny Prijonoc4c61d02006-08-20 20:47:34 +00005AC_CONFIG_HEADER([pjlib/include/pj/compat/os_auto.h
6 pjlib/include/pj/compat/m_auto.h
7 ])
8AC_CONFIG_FILES([build.mak
9 build/os-auto.mak
10 pjlib/build/os-auto.mak
11 pjlib-util/build/os-auto.mak
12 pjmedia/build/os-auto.mak
13 pjsip/build/os-auto.mak
14 ])
Benny Prijonoa9b372a2006-07-24 02:07:11 +000015AC_PROG_CC
Benny Prijonoc4c61d02006-08-20 20:47:34 +000016AC_PROG_CXX
Benny Prijonoa9b372a2006-07-24 02:07:11 +000017AC_LANG_C
18
Benny Prijonoc4c61d02006-08-20 20:47:34 +000019AC_CHECK_LIB(pthread,pthread_create)
Benny Prijonoc5b6dbf2006-09-10 16:33:48 +000020AC_CHECK_LIB(wsock32,puts)
21AC_CHECK_LIB(ws2_32,puts)
22AC_CHECK_LIB(ole32,puts)
23AC_CHECK_LIB(winmm,puts)
24AC_CHECK_LIB(socket,puts)
25AC_CHECK_LIB(rt,puts)
26AC_CHECK_LIB(nsl,puts)
Benny Prijonoc4c61d02006-08-20 20:47:34 +000027
28AC_MSG_RESULT([Setting PJ_M_NAME to $target_cpu])
29AC_DEFINE_UNQUOTED(PJ_M_NAME,["$target_cpu"])
30
Benny Prijonoc5b6dbf2006-09-10 16:33:48 +000031dnl
Benny Prijono1d971622006-09-10 22:27:40 +000032dnl Memory alignment detection
33dnl
34AC_MSG_CHECKING([memory alignment])
35case $target in
36 ia64-* | x86_64-* )
37 AC_DEFINE(PJ_POOL_ALIGNMENT, 8)
38 AC_MSG_RESULT([8 bytes])
39 ;;
40 * )
41 AC_DEFINE(PJ_POOL_ALIGNMENT, 4)
42 AC_MSG_RESULT([4 bytes (default)])
43 ;;
44esac
45
46
47dnl
Benny Prijonoc5b6dbf2006-09-10 16:33:48 +000048dnl Endianness detection
49dnl
Benny Prijonob466e232006-09-10 08:53:59 +000050AC_C_BIGENDIAN
Benny Prijonoc4c61d02006-08-20 20:47:34 +000051
Benny Prijonoc5b6dbf2006-09-10 16:33:48 +000052dnl
53dnl Legacy macros
54dnl
55case $target in
56 *mingw* | *cygw* | *win32* | *w32* )
57 AC_DEFINE(PJ_WIN32,1)
58 AC_DEFINE(PJ_WIN32_WINNT,0x0400)
59 AC_DEFINE(WIN32_LEAN_AND_MEAN)
60 ;;
61 *darwin*)
62 AC_DEFINE(PJ_DARWINOS,1)
63 ;;
64 *linux*)
65 AC_DEFINE(PJ_LINUX,1)
66 ;;
67 *rtems*)
68 AC_DEFINE(PJ_RTEMS,1)
69 ;;
70 *sunos* | *solaris* )
71 AC_DEFINE(PJ_SUNOS,1)
72 ;;
73 *)
74 ;;
75esac
76
77
78
79
Benny Prijonob466e232006-09-10 08:53:59 +000080dnl # --disable-floating-point option
Benny Prijonoc4c61d02006-08-20 20:47:34 +000081AC_ARG_ENABLE(floating-point,
82 AC_HELP_STRING([--disable-floating-point],
83 [Disable floating point where possible]),
84 [if test "$enable_floating_point" = "no"; then
85 AC_DEFINE(PJ_HAS_FLOATING_POINT,0)
86 AC_MSG_RESULT([Checking if floating point is disabled... yes])
87 fi],
88 [
89 AC_DEFINE(PJ_HAS_FLOATING_POINT,1)
90 AC_MSG_RESULT([Checking if floating point is disabled... no])
91 AC_CHECK_LIB(m,fmod)
92 ])
93
94
Benny Prijonoa9b372a2006-07-24 02:07:11 +000095AC_CHECK_HEADER(arpa/inet.h,[AC_DEFINE(PJ_HAS_ARPA_INET_H,1)])
96AC_CHECK_HEADER(assert.h,[AC_DEFINE(PJ_HAS_ASSERT_H,1)])
97AC_CHECK_HEADER(ctype.h,[AC_DEFINE(PJ_HAS_CTYPE_H,1)])
Benny Prijonoc5b6dbf2006-09-10 16:33:48 +000098
99case $target in
100 *mingw* | *cygw* | *win32* | *w32* )
101 AC_DEFINE(PJ_HAS_ERRNO_H,0)
102 ;;
103 *)
104 AC_CHECK_HEADER(errno.h,[AC_DEFINE(PJ_HAS_ERRNO_H,1)])
105 ;;
106esac
107
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000108AC_CHECK_HEADER(linux/socket.h,[AC_DEFINE(PJ_HAS_LINUX_SOCKET_H,1)])
109AC_CHECK_HEADER(malloc.h,[AC_DEFINE(PJ_HAS_MALLOC_H,1)])
110AC_CHECK_HEADER(netdb.h,[AC_DEFINE(PJ_HAS_NETDB_H,1)])
111AC_CHECK_HEADER(netinet/in.h,[AC_DEFINE(PJ_HAS_NETINET_IN_H,1)])
112AC_CHECK_HEADER(setjmp.h,[AC_DEFINE(PJ_HAS_SETJMP_H,1)])
113AC_CHECK_HEADER(stdarg.h,[AC_DEFINE(PJ_HAS_STDARG_H,1)])
114AC_CHECK_HEADER(stddef.h,[AC_DEFINE(PJ_HAS_STDDEF_H,1)])
115AC_CHECK_HEADER(stdio.h,[AC_DEFINE(PJ_HAS_STDIO_H,1)])
116AC_CHECK_HEADER(stdlib.h,[AC_DEFINE(PJ_HAS_STDLIB_H,1)])
117AC_CHECK_HEADER(string.h,[AC_DEFINE(PJ_HAS_STRING_H,1)])
118AC_CHECK_HEADER(sys/ioctl.h,[AC_DEFINE(PJ_HAS_SYS_IOCTL_H,1)])
119AC_CHECK_HEADER(sys/select.h,[AC_DEFINE(PJ_HAS_SYS_SELECT_H,1)])
120AC_CHECK_HEADER(sys/socket.h,[AC_DEFINE(PJ_HAS_SYS_SOCKET_H,1)])
121AC_CHECK_HEADER(sys/time.h,[AC_DEFINE(PJ_HAS_SYS_TIME_H,1)])
122AC_CHECK_HEADER(sys/timeb.h,[AC_DEFINE(PJ_HAS_SYS_TIMEB_H,1)])
123AC_CHECK_HEADER(sys/types.h,[AC_DEFINE(PJ_HAS_SYS_TYPES_H,1)])
124AC_CHECK_HEADER(time.h,[AC_DEFINE(PJ_HAS_TIME_H,1)])
125AC_CHECK_HEADER(unistd.h,[AC_DEFINE(PJ_HAS_UNISTD_H,1)])
126AC_CHECK_HEADER(mswsock.h,[AC_DEFINE(PJ_HAS_MSWSOCK_H,1)])
127AC_CHECK_HEADER(winsock.h,[AC_DEFINE(PJ_HAS_WINSOCK_H,1)])
128AC_CHECK_HEADER(winsock2.h,[AC_DEFINE(PJ_HAS_WINSOCK2_H,1)])
129
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000130AC_MSG_RESULT([Setting PJ_OS_NAME to $target])
131AC_DEFINE_UNQUOTED(PJ_OS_NAME,["$target"])
132
133AC_MSG_RESULT([Setting PJ_HAS_ERRNO_VAR to 1])
134AC_DEFINE(PJ_HAS_ERRNO_VAR,1)
135
136AC_MSG_RESULT([Setting PJ_HAS_HIGH_RES_TIMER to 1])
137AC_DEFINE(PJ_HAS_HIGH_RES_TIMER,1)
138
139AC_MSG_RESULT([Setting PJ_HAS_MALLOC to 1])
140AC_DEFINE(PJ_HAS_MALLOC,1)
141
142AC_MSG_RESULT([Setting PJ_NATIVE_STRING_IS_UNICODE to 0])
143AC_DEFINE(PJ_NATIVE_STRING_IS_UNICODE,0)
144
145AC_MSG_RESULT([Setting PJ_ATOMIC_VALUE_TYPE to long])
146AC_DEFINE(PJ_ATOMIC_VALUE_TYPE,long)
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000147
Benny Prijonob466e232006-09-10 08:53:59 +0000148dnl # Determine if inet_aton() is available
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000149AC_MSG_CHECKING([if inet_aton is available])
Benny Prijonob466e232006-09-10 08:53:59 +0000150AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arpa/inet.h>]],
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000151 [inet_aton(0, 0);])],
152 [AC_DEFINE(PJ_SOCK_HAS_INET_ATON,1)
153 AC_MSG_RESULT(yes)],
154 [AC_MSG_RESULT(no)])
155
Benny Prijonob466e232006-09-10 08:53:59 +0000156dnl # Determine if sockaddr_in has sin_len member
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000157AC_MSG_CHECKING([if sockaddr_in has sin_len member])
Benny Prijonob466e232006-09-10 08:53:59 +0000158AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
159 #include <sys/socket.h>
160 #include <netinet/in.h>
161 #include <arpa/inet.h>]],
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000162 [struct sockaddr_in a; a.sin_len=0;])],
163 [AC_DEFINE(PJ_SOCKADDR_HAS_LEN,1)
164 AC_MSG_RESULT(yes)],
165 AC_MSG_RESULT(no))
166
Benny Prijonob466e232006-09-10 08:53:59 +0000167dnl # Determine if socklen_t is available
Benny Prijono30f85c62006-09-09 20:05:33 +0000168AC_MSG_CHECKING([if socklen_t is available])
Benny Prijono1d971622006-09-10 22:27:40 +0000169AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
Benny Prijono30f85c62006-09-09 20:05:33 +0000170 [socklen_t xxx = 0;])],
171 [AC_DEFINE(PJ_HAS_SOCKLEN_T,1)
172 AC_MSG_RESULT(yes)],
173 AC_MSG_RESULT(no))
174
Benny Prijonob466e232006-09-10 08:53:59 +0000175dnl # Determine if SO_ERROR is available
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000176AC_MSG_CHECKING([if SO_ERROR is available])
Benny Prijonoc5b6dbf2006-09-10 16:33:48 +0000177case $target in
178 *mingw* | *cygw* | *win32* | *w32* )
179 AC_DEFINE(PJ_HAS_SO_ERROR,1)
180 AC_MSG_RESULT(yes)
181 ;;
182 *)
183 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
184 #include <sys/socket.h>
185 #include <netinet/in.h>
186 #include <arpa/inet.h>]],
187 [int i=SO_ERROR;])],
188 [AC_DEFINE(PJ_HAS_SO_ERROR,1)
189 AC_MSG_RESULT(yes)],
190 AC_MSG_RESULT(no))
191 ;;
192esac
193
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000194
Benny Prijonob466e232006-09-10 08:53:59 +0000195dnl # Determine if RW-mutex is available
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000196AC_MSG_CHECKING([if pthread_rwlock_t is available])
197AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
198 [pthread_rwlock_t *x;])],
199 [AC_DEFINE(PJ_EMULATE_RWMUTEX,0)
200 AC_MSG_RESULT(yes)],
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000201 [AC_DEFINE(PJ_EMULATE_RWMUTEX,1)
202 AC_MSG_RESULT(no)])
203
Benny Prijonoc5b6dbf2006-09-10 16:33:48 +0000204AC_SUBST(ac_os_objs)
205case $target in
206 *mingw* | *cygw* | *win32* | *w32* )
207 ac_os_objs="os_core_win32.o os_error_win32.o os_time_win32.o os_timestamp_win32.o guid_win32.o ioqueue_select.o"
208 ;;
209 *)
210 ac_os_objs="os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o guid_simple.o ioqueue_select.o"
211 ;;
212esac
213
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000214
Benny Prijonob466e232006-09-10 08:53:59 +0000215dnl ##########################################
216dnl #
217dnl # PJMEDIA
218dnl #
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000219
Benny Prijonob466e232006-09-10 08:53:59 +0000220dnl # Sound device backend selection
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000221AC_SUBST(ac_pjmedia_snd)
Benny Prijono1d971622006-09-10 22:27:40 +0000222AC_ARG_ENABLE(sound,
223 AC_HELP_STRING([--disable-sound],
224 [Exclude sound (i.e. use null sound)]),
225 [if test "$enable_sound" = "no"; then
226 [ac_pjmedia_snd=null]
227 AC_MSG_RESULT([Checking if sound is disabled... yes])
228 fi]
229 )
230
231if test "$enable_sound" = "no"; then
232 true;
233else
234 case $target in
Benny Prijonob466e232006-09-10 08:53:59 +0000235 *darwin*)
236 ac_pjmedia_snd=pa_darwinos
237 AC_MSG_RESULT([Checking sound device backend... coreaudio])
238 LIBS="$LIBS -framework CoreAudio"
239 ;;
240 *cygwin* | *mingw*)
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000241 ac_pjmedia_snd=pa_win32
242 AC_MSG_RESULT([Checking sound device backend... win32 sound])
243 ;;
244 *rtems*)
245 ac_pjmedia_snd=null
246 AC_MSG_RESULT([Checking sound device backend... null sound])
247 ;;
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000248 *)
249 ac_pjmedia_snd=pa_unix
250 AC_CHECK_HEADER(alsa/version.h,
251 [AC_SUBST(ac_pa_use_alsa,1)
252 LIBS="$LIBS -lasound"
253 ],
254 [AC_SUBST(ac_pa_use_alsa,0)])
255 AC_MSG_RESULT([Checking sound device backend... unix])
256 ;;
Benny Prijono1d971622006-09-10 22:27:40 +0000257 esac
258fi
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000259
Benny Prijonob466e232006-09-10 08:53:59 +0000260dnl # Include resampling small filter
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000261AC_SUBST(ac_no_small_filter)
262AC_ARG_ENABLE(small-filter,
263 AC_HELP_STRING([--disable-small-filter],
264 [Exclude small filter in resampling]),
265 [if test "$enable_small_filter" = "no"; then
266 [ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0']
267 AC_MSG_RESULT([Checking if small filter is disabled... yes])
268 fi],
269 AC_MSG_RESULT([Checking if small filter is disabled... no]))
270
Benny Prijonob466e232006-09-10 08:53:59 +0000271dnl # Include resampling large filter
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000272AC_SUBST(ac_no_large_filter)
273AC_ARG_ENABLE(large-filter,
274 AC_HELP_STRING([--disable-large-filter],
275 [Exclude large filter in resampling]),
276 [if test "$enable_large_filter" = "no"; then
277 [ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0']
278 AC_MSG_RESULT([Checking if large filter is disabled... yes])
279 fi],
280 AC_MSG_RESULT([Checking if large filter is disabled... no]))
281
Benny Prijonob466e232006-09-10 08:53:59 +0000282dnl # Include G.711 Annex A PLC
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000283AC_SUBST(ac_no_g711_plc)
284AC_ARG_ENABLE(g711-plc,
285 AC_HELP_STRING([--disable-g711-plc],
286 [Exclude G.711 Annex A PLC]),
287 [if test "$enable_g711_plc" = "no"; then
288 [ac_no_g711_plc='-DPJMEDIA_HAS_G711_PLC=0']
289 AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...yes])
290 fi],
291 AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...no]))
292
Benny Prijonob466e232006-09-10 08:53:59 +0000293dnl # Include Speex AEC
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000294AC_SUBST(ac_no_speex_aec)
295AC_ARG_ENABLE(speex-aec,
296 AC_HELP_STRING([--disable-speex-aec],
297 [Exclude Speex Acoustic Echo Canceller/AEC]),
298 [if test "$enable_speex_aec" = "no"; then
299 [ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0']
300 AC_MSG_RESULT([Checking if Speex AEC is disabled...yes])
301 fi],
302 AC_MSG_RESULT([Checking if Speex AEC is disabled...no]))
303
Benny Prijonob466e232006-09-10 08:53:59 +0000304dnl # Include G711 codec
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000305AC_SUBST(ac_no_g711_codec)
306AC_ARG_ENABLE(g711-codec,
307 AC_HELP_STRING([--disable-g711-codec],
308 [Exclude G.711 codecs from the build]),
309 [if test "$enable_g711_codec" = "no"; then
310 [ac_no_g711_codec=1]
311 AC_MSG_RESULT([Checking if G.711 codec is disabled...yes])
312 fi],
313 AC_MSG_RESULT([Checking if G.711 codec is disabled...no]))
314
315
Benny Prijonob466e232006-09-10 08:53:59 +0000316dnl # Include L16 codec
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000317AC_SUBST(ac_no_l16_codec)
318AC_ARG_ENABLE(l16-codec,
319 AC_HELP_STRING([--disable-l16-codec],
320 [Exclude Linear/L16 codec family from the build]),
321 [if test "$enable_l16_codec" = "no"; then
322 [ac_no_l16_codec=1]
323 AC_MSG_RESULT([Checking if L16 codecs are disabled...yes])
324 fi],
325 AC_MSG_RESULT([Checking if G.711 codec is disabled...no]))
326
327
Benny Prijonob466e232006-09-10 08:53:59 +0000328dnl # Include GSM codec
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000329AC_SUBST(ac_no_gsm_codec)
330AC_ARG_ENABLE(gsm-codec,
331 AC_HELP_STRING([--disable-gsm-codec],
332 [Exclude GSM codec in the build]),
333 [if test "$enable_gsm_codec" = "no"; then
334 [ac_no_gsm_codec=1]
335 AC_MSG_RESULT([Checking if GSM codec is disabled...yes])
336 fi],
337 AC_MSG_RESULT([Checking if GSM codec is disabled...no]))
338
Benny Prijonob466e232006-09-10 08:53:59 +0000339dnl # Include Speex codec
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000340AC_SUBST(ac_no_speex_codec)
341AC_ARG_ENABLE(speex-codec,
342 AC_HELP_STRING([--disable-speex-codec],
343 [Exclude Speex codecs in the build]),
344 [if test "$enable_speex_codec" = "no"; then
345 [ac_no_speex_codec=1]
346 AC_MSG_RESULT([Checking if Speex codec is disabled...yes])
347 fi],
348 AC_MSG_RESULT([Checking if Speex codec is disabled...no]))
349
Benny Prijonob466e232006-09-10 08:53:59 +0000350dnl # Include iLBC codec
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000351AC_SUBST(ac_no_ilbc_codec)
352AC_ARG_ENABLE(ilbc-codec,
353 AC_HELP_STRING([--disable-ilbc-codec],
354 [Exclude iLBC codec in the build]),
355 [if test "$enable_ilbc_codec" = "no"; then
356 [ac_no_ilbc_codec=1]
357 AC_MSG_RESULT([Checking if iLBC codec is disabled...yes])
358 fi],
359 AC_MSG_RESULT([Checking if iLBC codec is disabled...no]))
360
361
362
Benny Prijonob466e232006-09-10 08:53:59 +0000363dnl ##########################################
364dnl #
365dnl # MANUAL CONFIG
366dnl #
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000367
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000368
Benny Prijonob466e232006-09-10 08:53:59 +0000369dnl # Determine if select() requires nfds to be filled up with
370dnl # correct value (max_fd+1). If zero, nfds will be filled up with
371dnl # PJ_FD_SETSIZE
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000372AC_MSG_CHECKING([if select() needs correct nfds])
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000373case $target in
374 *rtems*) AC_DEFINE(PJ_SELECT_NEEDS_NFDS,1)
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000375 AC_MSG_RESULT(yes)
376 ;;
377 *) AC_DEFINE(PJ_SELECT_NEEDS_NFDS,0)
378 AC_MSG_RESULT([no (default)])
379 AC_MSG_RESULT([** Decided that select() doesn't need correct nfds (please check)])
380 ;;
381esac
382
Benny Prijonob466e232006-09-10 08:53:59 +0000383dnl # Determine if pj_thread_create() should enforce thread stack size when
384dnl # creating thread. Default is zero, to allow OS to allocate appropriate
385dnl # thread's stack size.
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000386AC_MSG_CHECKING([if pj_thread_create() should enforce stack size])
387case $target in
388 *rtems*) AC_DEFINE(PJ_THREAD_SET_STACK_SIZE,1)
389 AC_MSG_RESULT(yes)
390 ;;
391 *) AC_DEFINE(PJ_THREAD_SET_STACK_SIZE,0)
392 AC_MSG_RESULT([no (default)])
393 ;;
394esac
395
Benny Prijonob466e232006-09-10 08:53:59 +0000396dnl # Determine if pj_thread_create() should allocate thread's stack from
397dnl # the pool. Default is zero, to let OS allocate thread's stack.
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000398AC_MSG_CHECKING([if pj_thread_create() should allocate stack])
399case $target in
400 *rtems*) AC_DEFINE(PJ_THREAD_ALLOCATE_STACK,1)
401 AC_MSG_RESULT(yes)
402 ;;
403 *) AC_DEFINE(PJ_THREAD_ALLOCATE_STACK,0)
404 AC_MSG_RESULT([no (default)])
405 ;;
406esac
407
Benny Prijonob466e232006-09-10 08:53:59 +0000408dnl # This value specifies the value set in errno by the OS when a non-blocking
409dnl # socket recv() can not return immediate data.
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000410case $target in
Benny Prijonoc5b6dbf2006-09-10 16:33:48 +0000411 *mingw* | *cygw* | *win32* | *w32* )
412 AC_DEFINE(PJ_BLOCKING_ERROR_VAL,WSAEWOULDBLOCK)
413 ;;
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000414 *) AC_DEFINE(PJ_BLOCKING_ERROR_VAL,EAGAIN)
415 AC_MSG_RESULT([** Setting non-blocking recv() retval to EAGAIN (please check)])
416 ;;
417esac
418
Benny Prijonob466e232006-09-10 08:53:59 +0000419dnl # This value specifies the value set in errno by the OS when a non-blocking
420dnl # socket connect() can not get connected immediately.
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000421case $target in
Benny Prijonoc5b6dbf2006-09-10 16:33:48 +0000422 *mingw* | *cygw* | *win32* | *w32* )
423 AC_DEFINE(PJ_BLOCKING_CONNECT_ERROR_VAL,WSAEWOULDBLOCK)
424 ;;
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000425 *) AC_DEFINE(PJ_BLOCKING_CONNECT_ERROR_VAL,EINPROGRESS)
426 AC_MSG_RESULT([** Setting non-blocking connect() retval to EINPROGRESS (please check)])
427 ;;
428esac
429
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000430
Benny Prijonoc4c61d02006-08-20 20:47:34 +0000431AC_SUBST(target)
432AC_SUBST(ac_cross_compile)
433if test "$build" = "$host"; then
434 ac_cross_compile=
435else
436 ac_cross_compile=${host}-
437fi
438AC_SUBST(ac_linux_poll,select)
439AC_SUBST(ac_host,unix)
440AC_SUBST(ac_main_obj)
441case $target in
442 *rtems*)
443 ac_main_obj=main_rtems.o
444 ;;
445 *)
446 ac_main_obj=main.o
447 ;;
448esac
449AC_SUBST(CC)
Benny Prijonoa9b372a2006-07-24 02:07:11 +0000450AC_OUTPUT()
451